I'm trying to play a local video (mp4) on Google Glass using VIDEOPLAYER.
My code is:
Intent i = new Intent();
i.setAction("com.google.glass.action.VIDEOPLAYER");
i.putExtra("video_url", "android.resource://" + getPackageName() +"/"+R.raw.close_upper_case_mp4);
startActivity(i);
When I launch the code (on "startActivity(i)"), I get:
java.lang.NullPointerException
at org.eclipse.debug.internal.ui.DebugUIPlugin.launchInBackground(DebugUIPlugin.java:1257)
at org.eclipse.debug.ui.DebugUITools.launch(DebugUITools.java:757)
at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.debugRunningApp(AndroidLaunchController.java:176)
at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.clientChanged(AndroidLaunchController.java:1742)
at com.android.ddmlib.AndroidDebugBridge.clientChanged(AndroidDebugBridge.java:912)
at com.android.ddmlib.Device.update(Device.java:600)
at com.android.ddmlib.Client.update(Client.java:903)
at com.android.ddmlib.HandleWait.handleWAIT(HandleWait.java:88)
at com.android.ddmlib.HandleWait.handleChunk(HandleWait.java:66)
at com.android.ddmlib.MonitorThread.callHandler(MonitorThread.java:414)
at com.android.ddmlib.MonitorThread.processClientActivity(MonitorThread.java:322)
at com.android.ddmlib.MonitorThread.run(MonitorThread.java:263)
and it seems like the Glass is loading something but nothing happens.
I think that the path is not correct, because I tried other things (like MediaPlayer) and I get the same result.
Any clues?