Hi guys,
I am a newbie at Unity. I somehow managed to set up a scene with Easy Movie Texture, added Google VR plugin to make it VR compatible (split screen and head movement). The video also plays from the asset folder. I was also able to export the apk and play in on the mobile.
Now I want to pass android intent from another native android app which will be a file URI for the video to be played. How should I proceed? I am absolutely clueless about it.
On Android, you use the Bundle class to wrap parameters (mapping from string → other types) and pass together with an intent.
The steps to do this:
- In the other native app, you construct an Intent object that will launch your Unity game.
- On that intent, you add the URI of the video to be played to that intent’s bundle (using i[ntent.putExtra](Intent | Android Developers(java.lang.String, java.lang.String)))
- On the receiving (launched) Unity game, you should add code to read these extras (intent.getExtras) and get the URI.
I hope this is clear enough. Unfortunately, i don’t have a code sample of doing this, but you can probably Google it to find something to get you started (not sure if you’ll find a Unity sample though…)
You can also PM me if you need help with this.
Thanks, a lot liortal !! Unity Sample is what would help me. As I mentioned I am new to Unity
Will try to google it, will even look for it on github ![:wink: :wink:](https://emoji.discourse-cdn.com/google/wink.png?v=12)