Action Bar "Run Intent" Mode

Thanks for your support @dan, I was able to achieve the goal with the following step:

  1. 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
    }
}
  1. 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:
<receiver android:name=".MyReceiver">
    <intent-filter>
        <action android:name="com.example.MY_ACTION" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="package" android:path="uk.org.xibo.client" />
    </intent-filter>
</receiver>
  1. In the app’s code, register the BroadcastReceiver with the IntentFilter that matches the action string used by the external app. For example:
MyReceiver receiver = new MyReceiver();
IntentFilter filter = new IntentFilter("com.example.MY_ACTION");
registerReceiver(receiver, filter);
  1. Setup Xibo Action Bar Mode & Intent like this:
    intent
1 Like