Best code examples for Android ContextWrapper class (android.content.ContextWrapper)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android ContextWrapper class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android ContextWrapper examples from Open Source projects
This code example shows how to use the following methods: getString, getPackageName, getResources
83:	progressDialogTitleId = activity.getResources().getIdentifier( 
84:	PROGRESS_DIALOG_TITLE_RESOURCE, "string", activity.getPackageName()); 
-
88:	progressDialogMsgId = activity.getResources().getIdentifier( 
89:	PROGRESS_DIALOG_MESSAGE_RESOURCE, "string", activity.getPackageName()); 
-
91:	progressDialog.setMessage(activity.getString(progressDialogMsgId)); 
-
93:	progressDialog.setOnKeyListener(new OnKeyListener() { 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getActivity, getApplicationContext, getClass
48:	intent = PendingIntent.getActivity(activity, 0, new Intent(activity, activity.getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0); 
-
96:	if (MoSyncNFC.nfcPermissionsSet(activity)) { 
97:	NfcAdapter nfc = NfcAdapter.getDefaultAdapter(activity.getApplicationContext()); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getContentResolver
22:	activity = new Activity(); 
23:	contentResolver = activity.getContentResolver(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getSystemService, getClass
86:	mNM = (NotificationManager)service.getSystemService(Context.NOTIFICATION_SERVICE); 
-
88:	Class<?> clazz = service.getClass(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getSystemService
26:	((KeyguardManager) app.getSystemService(KEYGUARD_SERVICE)) // 
-
30:	((PowerManager) app.getSystemService(POWER_SERVICE)) // 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: deleteFile, openFileOutput, openOrCreateDatabase
92:	SQLiteDatabase db = mActivity.openOrCreateDatabase(DB_NAME, Context.MODE_PRIVATE, null); 
-
96:	mActivity.deleteFile(fileName); 
-
164:	SQLiteDatabase db = mActivity.openOrCreateDatabase(DB_NAME, Context.MODE_PRIVATE, null); 
-
176:	FileOutputStream fos = mActivity.openFileOutput(fileName, Context.MODE_PRIVATE); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getPackageManager
62:	final PackageManager packageManager = this.activity.getPackageManager(); 
-
72:	this.iabHelper = new IabHelper(this.activity); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getPackageName
43:	File deployJson = new File(new File(extStorage, app.getPackageName()), "deploy.json"); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: finish, getFilesDir
30:	File sampleImage1 = new File(mActivity.getFilesDir() 
-
34:	File sampleImage2 = new File(mActivity.getFilesDir() 
-
38:	mActivity.finish(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getComponentName, startActivity, getPackageManager
70:	ResolveInfo info = activity.getPackageManager().resolveActivity(intent, 
-
73:	ComponentName myName = activity.getComponentName(); 
-
83:	activity.startActivity(intent); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getSystemService, getClass
85:	mNM = (NotificationManager) mService.getSystemService(Service.NOTIFICATION_SERVICE); 
-
87:	mStartForeground = mService.getClass().getMethod("startForeground", 
-
89:	mStopForeground = mService.getClass().getMethod("stopForeground", 
-
97:	mSetForeground = mService.getClass() 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: registerReceiver
40:	activity.registerReceiver(this, filter); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getComponentName, getPackageManager, getResources
63:	.getResources().getConfiguration().orientation); 
-
67:	PackageManager packageManager = currentActivity.getPackageManager(); 
68:	ActivityInfo activityInfo = packageManager.getActivityInfo(currentActivity.getComponentName(), 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: overridePendingTransition, startActivity, getPackageName
129:	intent.setClassName(activity.getPackageName(), className); 
-
136:	activity.startActivity(intent); 
-
139:	activity.startActivity(intent); 
-
141:	activity.overridePendingTransition(NO_ANIMATION, NO_ANIMATION); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getApplicationContext
38:	mContext = activity.getApplicationContext(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getContentResolver
119:	ContentResolver resolver = context.getContentResolver(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getResources
36:	resources = application.getResources(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: registerReceiver
40:	activity.registerReceiver(this, filter); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getApplicationInfo, getPackageManager
192:	ai = act.getApplicationInfo(); 
-
234:	Drawable d = getApplicationInfo().loadIcon(act.getPackageManager()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getBaseContext
52:	return realContextWrapper.getBaseContext().getApplicationContext(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getContentResolver
170:	ContentResolver resolver = context.getContentResolver(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: unregisterReceiver
58:	activity.unregisterReceiver(powerStatusReceiver); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: startActivity, getPackageManager
32:	final PackageManager packageManager = activity.getPackageManager(); 
-
39:	activity.startActivity(intent); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getSystemService, getClass
86:	mNM = (NotificationManager)service.getSystemService(Context.NOTIFICATION_SERVICE); 
-
88:	Class<?> clazz = service.getClass(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getResources
93:	final Resources resources = application.getResources(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getSystemService, getAssets
46:	this.manager = (AudioManager) activity.getSystemService(Context.AUDIO_SERVICE); 
47:	this.assets = activity.getAssets(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getSharedPreferences
60:	if (activity != null) return activity.getSharedPreferences(name, mode); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getContentResolver
55:	mContent = activity.getContentResolver(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: bindService, startService
28:	ContextWrapper cw = new ContextWrapper(context); 
29:	cw.startService(new Intent(cw, MusicPlaybackService.class)); 
-
31:	if (cw.bindService(new Intent(cw, MusicPlaybackService.class), sb, 0)) { 
-
33:	return new ServiceToken(cw); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getSharedPreferences
41:	sharedPreferences = application 
-
47:	return new EncryptedSharedPreferences(application, sharedPreferences); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: bindService
47:	super(context); 
-
52:	activity_.bindService(intent, this, Context.BIND_AUTO_CREATE); 
-
54:	offset_ = DrawingHelper.offset(context); 
55:	radius_ = DrawingHelper.cornerRadius(context); 
-
63:	iconMappings_ = TurnIcons.LoadMapping(context); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getSystemService, registerReceiver
118:	app.registerReceiver(this, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION)); 
-
121:	conMgr = (ConnectivityManager) app.getSystemService(Context.CONNECTIVITY_SERVICE); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getContentResolver
288:	final ContentResolver cr = activity.getContentResolver(); 
-
305:	searchEngine.startSearch(activity, url, appData, extraData); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAssets, getFilesDir
35:	= activity.getFilesDir().getAbsolutePath() + "/wt-assets/"; 
-
37:	copyWtAssets(wtAssetsDir, activity.getAssets()); 
-
58:	= new File(activity.getFilesDir().getAbsolutePath() + "/tmp"); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getSharedPreferences
41:	sharedPreferences = application 
-
47:	return new EncryptedSharedPreferences(application, sharedPreferences); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getSharedPreferences
67:	if (activity != null) return activity.getSharedPreferences(name, mode); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getPackageManager
117:	PackageManager pm = mParent.getPackageManager(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getAssets
31:	mAssetManager = act.getAssets(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: registerReceiver
40:	activity.registerReceiver(this, filter); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getContentResolver
56:	if (activity != null) return activity.getContentResolver(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: registerReceiver
40:	activity.registerReceiver(this, filter); 
Full Snippet Info
6
CodeRank
Related Android ContextWrapper Questions & Answers:
See Code Examples for Android ContextWrapper Methods: