I have an android app which needs data to launch. That data must be passed using implicit Intent with custom URI data(myapp://launch/?id={xxxx}).
I created an application with apk but I could not find to launch a container with Intent URI data.
I tried to pass custom data through the --userdata flag but it failed.
How can I configure an application’s manifest to create that application or how can I launch a container with Intent data?
This is definitely possible with Anbox Cloud, but it requires you to create a small bootstrap Android application. This bootstrap application will only be used to start the other application with your custom URI.
Then comes the more open-ended part: there are multiple ways for you to pass the URI to the target application.
If the custom URI never or rarely changes and you don’t need them to be different for every container, you can just hardcode the custom URI in your boostrap application. If it changes, you can then and update the AMS application by refreshing the APK.
If you need to have a different, custom URI per container, you can for instance:
Pass that URI in the userdata
Create a hook to read from the
userdata at /var/lib/anbox/userdata. A pre-start hook would seem better in
your case. That hook can then create a custom file in the Android filesystem
in your application’s data directory.
Read the URI from the file in the Android filesystem with your boostrap
application and start the target application
As you have full control over that bootstrap application, you could even think of other ways to achieve what you want in that case.