public class BaseApplication
extends android.app.Application
android.app.Application
subclasses.
The purpose of BaseApplication
is just to call
App.init(Context)
to initialize App
class.
BaseApplication
or its subclass is expected to be set
as the value of android:name
attribute of application
tag in AndroidManifest.xml
as shown below.
<?xml version="1.0" encoding="utf-8" ?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" ......> <application android:name="com.neovisionaries.android.app.BaseApplication"> ......>
App
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, AUDIO_SERVICE, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_NOT_FOREGROUND, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DROPBOX_SERVICE, INPUT_METHOD_SERVICE, KEYGUARD_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MODE_APPEND, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NOTIFICATION_SERVICE, POWER_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, TELEPHONY_SERVICE, UI_MODE_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
Constructor and Description |
---|
BaseApplication() |
Modifier and Type | Method and Description |
---|---|
void |
onCreate()
Called after this instance was created.
|
void |
onTerminate()
Called before this instance is discarded.
|
attachBaseContext, bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalFilesDir, getFilesDir, getFileStreamPath, getMainLooper, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getResources, getSharedPreferences, getSystemService, getTheme, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, revokeUriPermission, sendBroadcast, sendBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendStickyBroadcast, sendStickyOrderedBroadcast, setTheme, setWallpaper, setWallpaper, startActivity, startInstrumentation, startIntentSender, startService, stopService, unbindService, unregisterReceiver
public void onCreate()
onCreate(android.os.Bundle)
of the root Activity) , but because Android may not
discard this instance even after the root Activity finishes,
this method is not always called on application startup.
The implementation of this method calls App.init
(this)
and
emits "CREATED" log message.
onCreate
in class android.app.Application
BaseRootActivity.onCreate(android.os.Bundle)
public void onTerminate()
onDestroy()
of the root
Activity), but because Android may not discard
this instance even after the root Activity finished, this method
is not always called on application termination. In addition,
the Android specification does not guarantee that this method
is called.
The implementation of this method emits "TERMINATED" log message.
onTerminate
in class android.app.Application
BaseRootActivity.onDestroy()
Copyright © 2016. All rights reserved.