wonjsohn / google-glass-api

Automatically exported from code.google.com/p/google-glass-api
0 stars 0 forks source link

Support ACTION_VIEW intent to play video with the Glass video player #594

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am trying to play a video located under raw folder in project resources using 
com.google.glass.action.VIDEOPLAYER but it fails  

I am using XE 19

Additional Information:
it is played normally if I use android VideoView but when I replaced it with 
the google glass player the video was not played. when I moved to the videos to 
the external storage of the glass it worked

the following code works:
    String PATH = Environment.getExternalStorageDirectory().toString()
                + vedioPath;
        Intent i = new Intent();
        i.setAction("com.google.glass.action.VIDEOPLAYER");
        i.putExtra("video_url", PATH);
        startActivity(i);

the following code does not work for the same video located on the resources 

 String PATH =
Uri.parse("android.resource://"+getPackageName()+"/"+R.raw.myvideo).toString();
        Intent i = new Intent();
        i.setAction("com.google.glass.action.VIDEOPLAYER");
        i.putExtra("video_url", PATH);
        startActivity(i);

Original issue reported on code.google.com by MohanadH...@gmail.com on 24 Aug 2014 at 10:04

GoogleCodeExporter commented 8 years ago

Original comment by ala...@google.com on 30 Sep 2014 at 6:15

GoogleCodeExporter commented 8 years ago
It seems odd that video is so clunky on this device since video is such a huge 
draw of the Glass device...

Original comment by Tetreau...@gmail.com on 4 Nov 2014 at 5:13

GoogleCodeExporter commented 8 years ago
Hello
I don't get/understand the answer from this problem. Is it possible to play a 
video on Google Glass that is in the /res/raw folder with the 
com.google.glass.action.VIDEOPLAYER or not?

Original comment by vinc...@mnstr.com on 14 Jan 2015 at 10:46

GoogleCodeExporter commented 8 years ago
No you can't. If you want today a video on  raw folder use the android player 
it works. 

Original comment by MohanadH...@gmail.com on 14 Jan 2015 at 11:05