To transmit data to other applications I\'ve been using implicit intents as in examples below:
Intent intent = new Intent();
intent.setAction(\"com.example.OpenU
Yes, when running in a device with Android 5.0 this code will either show a warning (if your app's targetSdkVersion
is < 21) or crash outright (if targeting Lollipop itself). Check the source code for validateServiceIntent() in ContextImpl.java:
This code is dangerous as it might allow a malicious receiver to register itself and intercept (or alter) these calls.
The most reasonable alternative is probably to specify the package name of the app you want to call, by using Intent.setPackage(). When done this way, the intent is no longer implicit, and it will work. For example:
intent.setPackage("com.example.app");
Of course, if the receiver is inside your app, there are easier alternatives (but that does not seem to be the case, from your description of the issue).