Since today at an amazing speed Admob is crashing when trying to display an Add according to Firebase.
Also Crashlytics is not getting the mapping... do not know why
This happens in every version of android 4, 5, 6, 7, 8, 9, 10.
Fatal Exception: android.content.ActivityNotFoundException
Unable to find explicit activity class {com.myCompany.myApp/com.google.android.gms.ads.AdActivity}; have you declared this activity in your AndroidManifest.xml?
com.myCompany.myApp.GameActivity.E
android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:1933)
android.app.Instrumentation.execStartActivity (Instrumentation.java:1616)
android.app.ContextImpl.startActivity (ContextImpl.java:904)
android.app.ContextImpl.startActivity (ContextImpl.java:882)
android.content.ContextWrapper.startActivity (ContextWrapper.java:383)
com.google.android.gms.internal.ads.Di.a (Unknown Source:9)
com.google.android.gms.ads.internal.overlay.zzn.a (Unknown Source:77)
com.google.android.gms.internal.ads.KC.a (Unknown Source:76)
com.google.android.gms.internal.ads.zu.a (Unknown Source:9)
com.google.android.gms.internal.ads.cF.showInterstitial (Unknown Source:24)
com.google.android.gms.internal.ads.Cea.c (Unknown Source:7)
com.google.android.gms.ads.InterstitialAd.c (Unknown Source:2)
com.myCompany.myApp.GameActivity.E (Unknown Source:82)
com.myCompany.myApp.X.onClick (Unknown Source:4)
android.view.View.performClick (View.java:6390)
Tried to reproduce the error locally, but couldn't
This started suddenly... and is in the only app that I'm getting that error in Firebase (all are implemented the same way)
Gradle
dependencies {
...
implementation 'com.google.android.gms:play-services-ads:18.2.0'
implementation 'com.google.firebase:firebase-core:17.2.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
...
}
MANIFEST
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myCompany.MyApp"
android:installLocation="auto">
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true"
/>
<application
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme"
>
<uses-library
android:name="org.apache.http.legacy"
android:required="false"/>
<meta-data
android:name="com.google.android.gms.ads.AD_MANAGER_APP"
android:value="true"/>
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="THENUMBERFORMYADMOB"/>
<service
android:name=".services.MusicService"
android:enabled="true"/>
<meta-data
android:name="firebase_crashlytics_collection_enabled"
android:value="${crashlyticsCollectionEnabled}" />
<activity
android:name=".SplashActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".LevelsActivity"
android:label="#string/title_activity_game"
android:parentActivityName=".SplashActivity">
</activity>
<activity
android:name=".GameActivity"
android:keepScreenOn="true"
android:label="#string/title_activity_game"
android:parentActivityName=".LevelsActivity">
</activity>
...
OTHER ACTIVITIES
...
</application>
</manifest>
I implemented Admob accordingly to the guide.
¿Should I add an Admob activity?
In google play crash report I'm getting reports regarding
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
WebViewGoogle.apk
#00 pc 00000000008fca14 /system/app/WebViewGoogle/WebViewGoogle.apk
But this has been for a long time (since 1' July... when started suddenly with a spike...) and google is "fixing it"... could this be related?
Related
Suddenly, I tried to open my application and the app did not wanted to start. It stopped before opening it. I started searching and tried all of other similar questions, but none worked. this is my log:
2020-07-18 22:27:41.652 21042-21042/? I/art: Not late-enabling -Xcheck:jni (already on)
2020-07-18 22:27:41.652 21042-21042/? W/art: Unexpected CPU variant for X86 using defaults: x86
2020-07-18 22:27:41.878 21042-21042/? W/System: ClassLoader referenced unknown path: /data/app/com.ainimei.remotemouse-1/lib/x86
2020-07-18 22:27:41.900 21042-21042/? D/AndroidRuntime: Shutting down VM
2020-07-18 22:27:41.900 21042-21042/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.ainimei.remotemouse, PID: 21042
java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException:
******************************************************************************
* The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers *
* should follow the instructions here: *
* https://googlemobileadssdk.page.link/admob-android-update-manifest *
* to add a valid App ID inside the AndroidManifest. *
* Google Ad Manager publishers should follow instructions here: *
* https://googlemobileadssdk.page.link/ad-manager-android-update-manifest. *
******************************************************************************
at android.app.ActivityThread.installProvider(ActivityThread.java:5856)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5445)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5384)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1545)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: java.lang.IllegalStateException:
******************************************************************************
* The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers *
* should follow the instructions here: *
* https://googlemobileadssdk.page.link/admob-android-update-manifest *
* to add a valid App ID inside the AndroidManifest. *
* Google Ad Manager publishers should follow instructions here: *
* https://googlemobileadssdk.page.link/ad-manager-android-update-manifest. *
******************************************************************************
at com.google.android.gms.internal.ads.zzyz.attachInfo(com.google.android.gms:play-services-ads-lite##19.2.0:33)
at com.google.android.gms.ads.MobileAdsInitProvider.attachInfo(com.google.android.gms:play-services-ads-lite##19.2.0:3)
at android.app.ActivityThread.installProvider(ActivityThread.java:5853)
... 10 more
here is my androidManifest.xml:
note that the code has no meta-data tag. But I never needed it until now. Also my app does not use ads on it.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ainimei.remotemouse">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<application
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="#drawable/ainimei_logo_icon"
android:label="#string/app_name"
android:roundIcon="#drawable/ainimei_logo_icon"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".SelectConnectionType" />
<activity android:name=".ControlBluetoothConnection" />
<activity android:name=".Connection" />
<activity
android:name=".KeyboardActivity"
android:screenOrientation="landscape" />
<activity
android:name=".ProfileSettingsActivity"
android:screenOrientation="portrait" />
<activity
android:name=".loginActivity"
android:screenOrientation="portrait" />
<activity
android:name=".buyPremiumActivity"
android:screenOrientation="portrait" />
<activity
android:name=".select_control"
android:screenOrientation="portrait" />
<activity
android:name=".SettingsActivity"
android:screenOrientation="portrait" />
<activity
android:name=".MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I keep trying anyways.
In your manifest file , inside the application tag put this code
<application>
<!-- Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713 -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
/// pass the key generated from your admob which contains ~(APP ID)
android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/> //
</application>
just check whether meta-data tag is out of activity tag
if it is like this
<manifest>
<application>
<activity>
<meta-data>
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-4347201915048498~6120388314"/>
</activity>
</application>
</manifest>
this should be changed to this
<manifest>
<application>
<activity>
</activity>
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-4347201915048498~6120388314"/>
</application>
</manifest>
After decompiling with apk tool, I changed targetsdk version to 29(and minsdk version to 19), and build and signed it again.
This is apktool.yml file:
isFrameworkApk: false
packageInfo:
forcedPackageId: '127'
renameManifestPackage: null
sdkInfo:
minSdkVersion: '19'
targetSdkVersion: '29'
sharedLibrary: false
sparseResources: true
unknownFiles: {}
usesFramework:
ids:
- 1
tag: null
version: 2.4.1
versionInfo:
versionCode: '1'
versionName: '1'
and this is AndroidManifest file:
<?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" package="air.id181apeke">
<application android:hardwareAccelerated="false" android:icon="#drawable/icon" android:label="....">
<activity android:configChanges="keyboardHidden|orientation|screenSize" android:label="Oxford - Starter" android:launchMode="singleTask" android:name=".AppEntry" android:screenOrientation="user" android:theme="#style/Theme.NoShadow" android:windowSoftInputMode="adjustResize|stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<meta-data android:name="autoOrients" android:value="true"/>
<meta-data android:name="fullScreen" android:value="true"/>
<meta-data android:name="uniqueappversionid" android:value="9de9b08c-60fa-4ecc-86ea-983d2105693d"/>
<meta-data android:name="containsVideo" android:value="false"/>
</activity>
</application>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
<uses-feature android:name="android.hardware.camera" android:required="true"/>
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="true"/>
</manifest>
What's wrong here buddies?
Should I add something or some files?
Cheers
I have an application with admob.
It works on all devices, but it doesn't show ads on android 8 samsung devices.
It also works samsung's other versions and other brands all versions including android 8.
I get following error.
2018-10-12 21:21:47.508 13284-31190/? E/Ads: Error waiting for future.
java.util.concurrent.ExecutionException: java.util.concurrent.TimeoutException
at com.google.android.gms.ads.internal.util.future.af.get(:com.google.android.gms#14366015#14.3.66 (040300-213742215):18)
at com.google.android.gms.ads.internal.util.future.g.a(:com.google.android.gms#14366015#14.3.66 (040300-213742215):11)
at com.google.android.gms.ads.internal.request.service.c.a(:com.google.android.gms#14366015#14.3.66 (040300-213742215):62)
at com.google.android.gms.ads.internal.request.service.c.a(:com.google.android.gms#14366015#14.3.66 (040300-213742215):169)
at com.google.android.gms.ads.internal.request.service.f.run(:com.google.android.gms#14366015#14.3.66 (040300-213742215):1)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.util.concurrent.TimeoutException
at com.google.android.gms.ads.internal.util.future.m.run(Unknown Source:2)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301
For ads, I use following version:
implementation 'com.google.android.gms:play-services-ads:17.0.0'
Manifest File
<?xml version="1.1" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.package.app">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="#mipmap/icon"
android:label="#string/app_name"
android:roundIcon="#mipmap/roundicon"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".DepartmentCoursesActivity" />
<activity android:name=".ExamDetailActivity" />
<activity android:name=".AddLessonActivity" />
<activity android:name=".LoginActivity" />
<activity android:name=".CourseExamListActivity" />
<activity android:name=".ImageZoomActivity"></activity>
<!-- Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713 -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="[MY_AD_ID]"/>
</application>
</manifest>
And also there is following log, it may be related
2018-10-12 21:21:46.618 1764-1764/? E/ServiceUtils: [#MLP#] Unable to get package name: android.content.pm.PackageManager$NameNotFoundException: com.samsung.ipservice (com.samsung.ipservice)
at android.app.ApplicationPackageManager.getPackageInfoAsUser (ApplicationPackageManager.java:301)
at android.app.ApplicationPackageManager.getPackageInfo (ApplicationPackageManager.java:272)
at com.samsung.mlp.platform.utils.ServiceUtils.isPackageAvailable (ServiceUtils.java:55)
at com.samsung.mlp.platform.framework.ItemFetchTask.buildImageSelectionSchema (ItemFetchTask.java:147)
at com.samsung.mlp.platform.framework.ItemFetchTask.buildMediaSelectionSchema (ItemFetchTask.java:129)
at com.samsung.mlp.platform.framework.ItemFetchTask.<init> (ItemFetchTask.java:107)
at com.samsung.mlp.platform.framework.LPServiceController.setupExecutors (LPServiceController.java:200)
at com.samsung.mlp.platform.framework.LPServiceController.<init> (LPServiceController.java:179)
at com.samsung.mlp.platform.framework.LPServiceController.getInstance (LPServiceController.java:168)
at com.samsung.mlp.platform.LPService.onBind (LPService.java:49)
at android.app.ActivityThread.handleBindService (ActivityThread.java:3571)
at android.app.ActivityThread.-wrap2 (null:0)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1791)
at android.os.Handler.dispatchMessage (Handler.java:105)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6944)
at java.lang.reflect.Method.invoke (Method.java:-2)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)
Add below code in manifest file
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent" />
Hope this will work...!
I am trying to implement the BluetoothLeGatt Example Project from android into my own app to handle the BLE Services.
BluetoothLeGatt Example Android
The actual state is that i have my own app which has only one activity and i am switching between the other pages with fragments. I would like to implement the android example so i can receive Bluetooth data and save it into a own data class (via an Interface or something like that not sure right now).
The Bluetooth Example is working without any Problems if i am running it on my device. I can also implement the example into my app and use it as "start activity" with the following manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.bb.app">
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:debuggable="true">
<activity
android:name=".DeviceScanActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/app_name">
<!--android:theme="#style/AppTheme.NoActionBar"-->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".DeviceControlActivity"/>
<activity android:name=".MyActivity"/>
<service android:name=".BluetoothLeService" android:enabled="true"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
</application>
</manifest>
But i am not able to Switch between the example activity and my own. I am using a simple Button with a onClickListener to Switch it like that:
buttonChangeActivity = (Button) findViewById(R.id.buttonChangeActivity);
buttonChangeActivity.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
Toast.makeText(DeviceControlActivity.this, "PRESSED", Toast.LENGTH_SHORT).show();
try{
Intent myIntent = new Intent(DeviceControlActivity.this, MyActivity.class);
DeviceControlActivity.this.startActivity(myIntent);
}catch (Exception e){
Toast.makeText(DeviceControlActivity.this, "ERROR", Toast.LENGTH_SHORT).show();
}
}
});
And it is still working. But then it says that the MyActivity class Needs to use the Theme.AppCompat but i am already using it. Here is the whole error code:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.bb.app/com.example.bb.app.MyActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5258)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:343)
at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:312)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:277)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.example.bb.app.MyActivity.onCreate(MyActivity.java:262)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
I am using a toolbar in my activity and the example Project uses an actionbar so i am pretty sure i Need to "Switch" between the themes while my Project is running but i don't know how to. I've already read some other cases about this behavior:
Stackoverflow 1
Any advice how to Switch the themes while the Project is running or where to Change it in my Android Studio?
Ok needed only few more minutes and i've fixed my own issue.
Just changed the manifest like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.bb.app">
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme.NoActionBar"
android:debuggable="true">
<activity
android:name=".MyActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/app_name">
<!--android:theme="#style/AppTheme.NoActionBar"-->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".DeviceControlActivity"
android:theme="#android:style/Theme.Holo.Light"/>
<activity android:name=".DeviceScanActivity"
android:theme="#android:style/Theme.Holo.Light"/>
<service android:name=".BluetoothLeService" android:enabled="true"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
</application>
</manifest>
So changing the theme for each activity, thanks anyways.
I am working on this class : UserManager
public int getUserCount ()
Return the number of users currently created on the device.
My code is:
UserManager um = (UserManager) getSystemService(USER_SERVICE);
int count = um.getUserCount();
Log.i("count",""+count);
It produce error like this:
Caused by: java.lang.SecurityException: You need MANAGE_USERS permission to: query users
at android.os.Parcel.readException(Parcel.java:1425)
at android.os.Parcel.readException(Parcel.java:1379)
at android.os.IUserManager$Stub$Proxy.getUsers(IUserManager.java:321)
at android.os.UserManager.getUsers(UserManager.java:198)
at android.os.UserManager.getUserCount(UserManager.java:186)
at com.example.multiusertest.MainActivity.onCreate(MainActivity.java:52)
at android.app.Activity.performCreate(Activity.java:5104)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
I already added this permission manually in Manifest file. Does anyone know why it is produce.
Manifest File:
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.MANAGE_USERS"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.multiusertest.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
The MANAGE_USERS has a protectionlevel of signature|system, which means that the application has to be signed with the platform key. See this thread on XDA