android
Android - BroadcastReceiver trying to return result during a non-ordered broadcast
I am trying to catch the BOOT_COMPLETED intent. In my receiver, I just print something to the Log. In Logcat I get this error, and the log statement that I put never prints out. I have set the permission in the manifest for <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> And have also declared the required intent filter in my receiver. What am I doing wrong?
What am I doing wrong? That's impossible to answer given the limited information you have supplied. Perhaps your action string is wrong in your <intent-filter>. Here is a sample project that does just what you describe (boot-time receiver writing a message to LogCat).
I had the problem too, found this answer and solved it by diffing with CommonsWare's sample code: You will get this error, when you call setResultData(...) in the onReceive()-Method of the BroadcastReceiver and reacting to a non-ordered Broadcast. It looks like the boot broadcast is non-ordered. see also: Developer docs #Override public void onReceive(Context context, Intent intent) { try { Intent serviceIntent = new Intent(context, MyService.class); context.startService(serviceIntent); // setResultData(null); } catch (Exception exception) { exception.printStackTrace(); } }
Related Links
App keeps stopping and I don't know what's going on
why i am getting null reference exception on set adapter?
Android Maps v2 Stopped Working
Bitmap.compress to png - save only if file is in the right size
tablelayout tablerow layout alignment
“Automatic” ProgressDialog won't dismiss
Objectify+Eclipse+Generate Cloud Endpoint Client Library: “Variable does not conform to style guide”
Not getting a childPosition/groupPosition when clicking on child or checkbox in ExpandableListView
send sms in phonegap app
error retrieving inserted data sqlite android
error:open fail:EROFS(Read-only file system) [duplicate]
android:Get photo from facebook post using graph api
custom listView in fragment tab
Changing package name before publishing production app
Android set image on ListView in Fragment
Why after passing canvas.getWidth() method to x coordinate the object is not being drawn?