I’m trying to setup the “Run Intent” feature of the Xibo Player (for Android) action bar, the idea is to trigger an action of an App that is listening for this intent. Unfortunately, I can’t get it to work.
Lets say you are using this on an Android device, you could simply run a command from Xibo. If you are using Xibo player on a rooted device, it will easily accept the command to run.
Example of how I use commands to run something from terminal, note that echo is not needed, depends on your command.
I think the error logged comes from the example app rather than Xibo - i.e. Xibo is sending the intent as expected but the example app is not able to listen to it.
When Xibo sends the intent configure it is not implicit because the app doesn’t know anything about the application who will receive it - therefore it falls under the new restrictions in later versions of android.
It is my understanding that if you register your listener at runtime instead using registerReceiver, it should work.
As a side note, I think the same restrictions would apply to running a command, as this is an issue with receiving the intent not sending it.
Thanks for your support @dan, I was able to achieve the goal with the following step:
Define a BroadcastReceiver class that will receive the intent. In this class, override the onReceive() method to perform the desired action when the intent is received. For example:
public class MyReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// Perform action here
}
}
In the app’s manifest file, declare the BroadcastReceiver with an <intent-filter> that specifies the action and package name of the external app. For example: