Android application works fine in 3G but not with WIFI -


this play video app works fine in 3g forces close via wifi code:

import android.net.uri; import android.os.bundle; import android.app.activity; import android.widget.mediacontroller; import android.widget.videoview;  public class video extends activity {      @override     protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.activity_video);          string path="http://commonsware.com/misc/test2.3gp";           uri uri=uri.parse(path);         mediacontroller mc = new mediacontroller(this);          videoview video=(videoview)findviewbyid(r.id.videoview);         mc.setanchorview(video);         mc.setmediaplayer(video);         video.setmediacontroller(mc);         video.setvideouri(uri);         video.start();     }  } 

and manifest

<uses-permission android:name="android.permission.internet"/> 

this logcat

03-25 09:25:27.019: w/iinputconnectionwrapper(20221): showstatusicon on inactive inputconnection 03-25 09:25:32.359: i/mediaplayer(20221): uri is:http://commonsware.com/misc/test2.3gp 03-25 09:25:32.359: i/mediaplayer(20221): path null 03-25 09:25:32.359: d/mediaplayer(20221): couldn't open file on client side, trying server side 03-25 09:25:32.489: d/videoview(20221): onmeasure() 03-25 09:25:32.489: i/videoview(20221):     setting size: 320x240 03-25 09:25:32.569: d/videoview(20221): onmeasure() 03-25 09:25:32.569: i/videoview(20221):     setting size: 320x240 03-25 09:25:32.699: e/mediaplayer(20221): error (1, -2147483648) 03-25 09:25:32.699: e/mediaplayer(20221): error (1,-2147483648) 03-25 09:25:32.699: d/videoview(20221): error: 1,-2147483648 

in screen apperas: "this video can´t played" clue??

thank much

i had mistake, via wifi have pass firewall , forgot in device, fail.

thanks everybody


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -