Question: I know about [singleton](https://en.wikipedia.org/wiki/Singleton_pattern), but I can't use it in an Android project. I am a beginner in Android.

How and where can we use singleton in an Android project for *large data*? I have used it for simple values.

Answer: 
Singleton in Android is the same as singleton in Java:

A basic singleton class example:

```
public class AppManager
{
    private static AppManager    _instance;

    private AppManager()
    {

    }

    public synchronized static AppManager getInstance()
    {
        if (_instance == null)
        {
            _instance = new AppManager();
        }
        return _instance;
    }
}

```
1. For "large data" use a database. Android gives you SQLite.
2. Of course you can use singletons in Android. What makes you think you cannot?

For more information on the singleton pattern, read *[Singleton pattern](http://en.wikipedia.org/wiki/Singleton_pattern)*.

For more information on SQLite in Android, read: *[Data and file storage overview](http://developer.android.com/guide/topics/data/data-storage.html#db)*.