I have used videoplayback sample.When the target image is detected i started a new activit or android 4.0 above and below devices.and in that activity i played the relevant video through media player. Everthing goes prefect and play video for almost every devices. But when i use google nexus it shows the msg app is stoped unfortunatly. I have used asyn task to play video from server and shown progress dialog till the video prepare to start.
- Sort Posts
- 9 replies
- Last post
App is stoped Unfortunately in google nexus but working fine in all other devices of android
App is stoped Unfortunately in google nexus but working fine in
App is stoped Unfortunately in google nexus but working fine in
Yes before adding this part every thing was fine nexus also.if i was playing video in main ui thread it was playing the video.but when i use async task toavoid heavy operation on main thread and shown a progress dialog, this issue comes.App is stoped unfortunatelly.
App is stoped Unfortunately in google nexus but working fine in
I am staring a new activity in which i am starting the relevent video in media player, i used asyn task to prepare media player and till then i am showing a progress bar and dismiss when video is prepared.except it i am not doing anything in async task.
protected String doInBackground(String... params)
{
// code to be executed in background thread
holder = mPreview.getHolder();
holder.addCallback(MediaPlayerDemo_Video.this);
holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
extras = getIntent().getExtras();
return "Executed";
}
I have dismiss progress dialog in onprepared method.I dont have nexus for now so i am unable to put logcat.
App is stoped Unfortunately in google nexus but working fine in
Are you properly using onProgressUpdate() and onPostExecute() as explained here:
http://developer.android.com/reference/android/os/AsyncTask.html
?
App is stoped Unfortunately in google nexus but working fine in
Usually you don't need to implement the onPreExecute(); however the onProgressUpdate() is meant to do things that are supposed to happen in the UI thread (for instance updating a progress bar is something that should be done in that method to ensure thread-safety)
App is stoped Unfortunately in google nexus but working fine in
Just wondering if you really need to do that in an AsyncTask; the MediaPlayer is already capable of working "in background", see how it is used in our VideoPlayback sample.
Other than that, I don(t have other hints in this case, but perhaps you might have better luck if search about this topic (MediaPlayer with AsyncTask) in Android-specific forums, as this is probably not a Vuforia-specific issue.
Hi, does the official Videoplayback sample runs fine on the Nexus ?