Log in or register to post comments

App is stoped Unfortunately in google nexus but working fine in all other devices of android

March 6, 2013 - 2:14am #1

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.

App is stoped Unfortunately in google nexus but working fine in

March 7, 2013 - 11:42pm #10

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.

 

 

App is stoped Unfortunately in google nexus but working fine in

March 7, 2013 - 8:51pm #9

Okay that's fine. But till now i didn't solution why the app is crashing in only google nexus in this activity. is it not allowing me to play video from async task or something else is wrong in this activity.?

App is stoped Unfortunately in google nexus but working fine in

March 7, 2013 - 6:35am #8

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

March 6, 2013 - 11:43pm #7

I have left codeless these methods like this.

        @Override
        protected void onPreExecute() {
                    }

        @Override
        protected void onProgressUpdate(Void... values) {
              }

sholud i do something there.? till then i am going througly your url for async task.

App is stoped Unfortunately in google nexus but working fine in

March 6, 2013 - 11:32pm #6

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

March 6, 2013 - 11:26pm #5

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

March 6, 2013 - 11:13pm #4

Sounds like a threading issue... perhaps the Nexus is the only one which shows the problem, but maybe you have a bug and it only shows up on the Nexus.

can you explain a bit better (or share code snippet) what you do with the AsyncTask ?

App is stoped Unfortunately in google nexus but working fine in

March 6, 2013 - 8:48pm #3

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

March 6, 2013 - 11:06am #2

Hi, does the official Videoplayback sample runs fine on the Nexus ?

 

Log in or register to post comments