android - Google map v2 api not tracking user location -


for reason mapfragment won't show user location anymore? map tiles still displayed it's not displaying current location??

         public class mytask extends asynctask<void, void, void>{                  protected void onpreexecute() {                      map = ((mapfragment) getfragmentmanager().findfragmentbyid(r.id.map))                             .getmap();                     map.movecamera(cameraupdatefactory.newlatlngzoom(place, 4000));                     map.animatecamera(cameraupdatefactory.zoomto(10), 2000, null);                     map.setmylocationenabled(true);                     map.getuisettings().setzoomcontrolsenabled(true);                     map.getuisettings().setmylocationbuttonenabled(true);                     map.settrafficenabled(true);                     locationmanager = (locationmanager) getsystemservice(context.location_service);               } 

this basic mapfragment worked until started testing on android device uses same android version difference theres no sim card in device. make difference??

manifest-

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.example"     android:versioncode="1"     android:versionname="1.0"     android:largescreens="true"      android:normalscreens="true"      android:smallscreens="true"      android:resizeable="true"      android:anydensity="true"     android:theme="@android:style/theme.notitlebar" >      <uses-sdk         android:minsdkversion="15"         android:targetsdkversion="17" />      <permission         android:name="com.example.permission.maps_receive"         android:protectionlevel="signature" />      <uses-feature         android:glesversion="0x00020000"         android:required="true" />      <uses-permission android:name="com.example.permission.maps_receive" />     <uses-permission android:name="android.permission.internet" />     <uses-permission android:name="android.permission.write_external_storage" />     <uses-permission android:name="com.google.android.providers.gsf.permission.read_gservices" />     <uses-permission android:name="android.permission.access_coarse_location" />     <uses-permission android:name="android.permission.access_fine_location" />     <uses-permission android:name="android.permission.access_network_state" />           <application              android:icon="@drawable/applogo12"              android:label="@string/app_name"              android:theme="@style/customtheme">           <activity             android:name=".splashactivity"             android:screenorientation="portrait">             <intent-filter>                 <action android:name="android.intent.action.main" />                 <category android:name="android.intent.category.launcher" />             </intent-filter>         </activity>         <activity android:name=".homeactivity" android:screenorientation="portrait"></activity>             <meta-data             android:name="com.google.android.maps.v2.api_key"             android:value="-----" />     </application> </manifest>  

i have no idea how api has stopped working. feedback appreciated

yes, sim card absence issue. have same trouble wasn't able location without sim card (no sim - no network location provider), because gps location provider couldn't determine location indoors.


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -