Code example for LocalActivityManager

Methods: getCurrentActivity

    public void startIntentService() { 
        // creating and starting an android service, which can be used for intents from every activity 
        Application androidApp = activityManager.getCurrentActivity().getApplication();
	 * Opens the shared preference file. If none is found, a new one will be created. 
	public void initializePreferences() { 
	    // open preferences file 
	    preferences = mContext.getSharedPreferences(Const.PREFERENCES, 0);
	    // check for first launch 
	    boolean isFirstLaunch = preferences.getBoolean("firstLaunch", true);
	    isDebugMode = Boolean.parseBoolean(
Stop searching for code, let great code find you!  Add Codota to your java IDE