Just faced this exception under my application PID in the Android Monitor, while not doing anything special. First time I'm seeing such thing, any explanation/docs? Thanks
java.lang.SecurityException: Permission Denial:
broadcast from android asks to run as user -1 but is calling from user 0;
this requires android.permission.INTERACT_ACROSS_USERS_FULL or
android.permission.INTERACT_ACROSS_USERS
One of the possible solutions is to disable auto-fill, but it works only on Android Oreo. Check this link Disabling Android O auto-fill service for an application
Related
currently I am doing the user registration class by using Firebase authentication. However, the logcat showed this error. May I know how to solve this? I have install google play services in SDK tools and added in manifest file. Thank you:)
error1: load_driver(/vendor/lib/egl/libGLES_emulation.so): dlopen failed: library "/vendor/lib/egl/libGLES_emulation.so"
error2: Google Play services missing or without correct permission.
Error3: tid 3325: eglSurfaceAttrib(1354): error 0x3009 (EGL_BAD_MATCH)
Editted: those problem arised due to the emulator, but as long as you installed google play service on the emulator, the problem will solve
Try running it on a real device, emulator tends to cause errors.
Having followed the migration notes and added the following line to the manifest :
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
I could not figure out why I am getting a failing test case where the permission android.permission.FOREGROUND_SERVICE is not being granted (at least when it's being checked on run-time).
Based on the docs, which states that android.permission.FOREGROUND_SERVICEshould be automatically granted by the system.
apps wanting to use foreground services must now request the
FOREGROUND_SERVICE permission first. This is a normal permission, so
the system automatically grants it to the requesting app.
Can somebody explain why my test case (which uses a variant of the the following code) is failing?
assertEquals(ActivityCompat.checkSelfPermission(activity, "android.permission.FOREGROUND_SERVICE"), PackageManager.PERMISSION_GRANTED);
Yet! I am not having any SecurityException thrown. What am I missing?
This is failing because you probably run it on device with API < 28. This method field works only on API 28 and up. If you write as you should Manifest.permission.FOREGROUND_SERVICE instead of plain string, Android Studio will warn you.
FOREGROUND_SERVICE is not a dangerous permission. Hence, it has nothing to do with the runtime permission system and methods like checkSelfPermission().
I've upgraded facebook SDK from 3.0 to 3.5. Testing on my devices was fine but I got these crash reports:
java.lang.IllegalStateException: OrcaSharedPreferences used before initialized
1at android.os.Parcel.readException(Parcel.java:1433)
2at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:188)
3at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:140)
4at android.content.ContentProviderProxy.query(ContentProviderNative.java:366)
5at android.content.ContentResolver.query(ContentResolver.java:370)
6at android.content.ContentResolver.query(ContentResolver.java:313)
7at com.facebook.Settings.getAttributionId(SourceFile:418)
8at com.facebook.AppEventsLogger.getSessionEventsState(SourceFile:684)
9at com.facebook.AppEventsLogger.logEvent(SourceFile:645)
10at com.facebook.AppEventsLogger.logEvent(SourceFile:641)
11at com.facebook.AppEventsLogger.logSdkEvent(SourceFile:537)
12at com.facebook.Session.logAuthorizationStart(SourceFile:1110)
13at com.facebook.Session.authorize(SourceFile:915)
14at com.facebook.Session.open(SourceFile:995)
15at com.facebook.Session.openForRead(SourceFile:388)
16at com.facebook.Session.openActiveSession(SourceFile:891)
17at com.facebook.Session.openActiveSession(SourceFile:830)
This happens when a user tries to log in to the app using facebook.
I read in: java.lang.IllegalStateException: Orca SharedPreferences used before initialized
That it might be a case where the user doesn't have facebook app installed on his phone, but I also tested this scenario on my phone and it just opens facebook web view for logging in as it should.
It sucks to upgrade an SDK to find new crashes on code that worked just fine. What can be the cause?
Thanks!
We got this as well by force stopping the Facebook app before launching our app (also on FB SDK 3.5)
I am new to android development, and have run into a problem I seem unable to solve.
My android app should be able to communicate with my arduino device, sending info
to and retrieving info from my device. I have set up my connection between the two
with a bluetooth device and I am using amarino to facilitate the communication.
Now I can connect with amarino and send data and receive data, now I want to do this from
my app. The problem comes when I enter this line:
private static final String DEVICE_ADDRESS = "07:12:04:16:68:18";
Amarino.connect(this, DEVICE_ADDRESS);
The number is the MAC address of my bluetooth adapter connected to my arduino device.
As soon as I run my app on my phone it just force closes due to unexpected error.
Now as I said, I am a bit of a noob when it comes to android, so I installed logCat to try get some log info out of it. All I got from it was this somewhat unhelpful error message:
com.example.projectgreetv3/.StartingPlace
10-24 15:22:55.140 E/AndroidRuntime(4906): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.projectgreetv3/com.example.projectgreetv3.StartingPlace}: java.lang.ClassNotFoundException: com.example.projectgreetv3.StartingPlace in loader dalvik.system.PathClassLoader[/data/app/com.example.projectgreetv3-1.apk]
10-24 15:22:55.140 E/AndroidRuntime(4906): Caused by: java.lang.ClassNotFoundException: com.example.projectgreetv3.StartingPlace in loader dalvik.system.PathClassLoader[/data/app/com.example.projectgreetv3-1.apk]
10-24 15:22:55.148 W/ActivityManager(539): Force finishing activity com.example.projectgreetv3/.StartingPlace
10-24 15:21:51.726 I/UinboxLogger(4585): [UinboxReceiver] onReceive() >> intent.getData() : com.example.projectgreetv3
10-24 15:21:52.382 I/UninstallAppProgress(4575): Finished uninstalling pkg: com.example.projectgreetv3
10-24 15:22:52.523 D/PackageManager(539): Scanning package com.example.projectgreetv3
I hope someone can help me with this, as I am on wits end.
For more info on:
- Arduino:
- http://www.arduino.cc/
- Amarino:
http://www.amarino-toolkit.net/
If you look a bit further down on your stacktrace (in the logcat) you will probably see that the cause of this crash is an NetworkOnMainThreadException. (If you are running Android 3.0 or higher)
Please make sure that you do all your network communication on a separate thread (Thread/ASyncTask).
http://developer.android.com/reference/android/os/NetworkOnMainThreadException.html
I'm using google api java client for connecting to Google Docs in Android app.
Once in a while i get following exception:
UnknownHostException: www.google.com
Code:
transport = AndroidHttp.newCompatibleTransport();
ClientLogin authenticator = new ClientLogin();
authenticator.authTokenType = "writely";
authenticator.username = username.getText().toString();
authenticator.password = password.getText().toString();
authenticator.transport = transport;
authenticator.authenticate().getAuthorizationHeaderValue();
Device reset clears exception but is it necessary.
I suspected for DNS caching and tried following but didnt work. Im not behind a proxy as far I know.
Security.setProperty("networkaddress.cache.ttl","0");
System.setProperty("networkaddress.cache.ttl","0");
System.setProperty("networkaddress.cache.negative.ttl","0");
System.setProperty("net.eth0.dns1","8.8.8.8");
System.setProperty("net.dns1","8.8.8.8");
Last time it occurred was this morning when one network connection "died", cell auto got second one, tried to do ClientLogin but failed with exception.
Just to make it clear, Im talking about DEVICE (htc desire hd), not emulator.
Thanks in advance.
add this line to your AndroidManifest.xml file, just after the <manifest> tag and before the <application> tag:
<uses-permission android:name="android.permission.INTERNET" />
I run into this daily. I think it is a bug in the emulator. After reset of emulator it works again and it never happened on a real device.
Edit: most definitely a bug in the emulator. See this thread. There are also several posts on StackOverflow regarding those emulator connection issues.