java - E/MotionRecognitionManager: mSContextService = null -


i writing geolocation tracker , doesn't run after onconnected(). got errors haven't found on solving them. appreciate help. sorry being such noob. asks more details, write?

so here log:

    08-20 23:31:43.642 31662-31662/? e/zygote: v2     08-20 23:31:43.642 31662-31662/? w/selinux: function: selinux_compare_spd_ram, index[1], priority [2], priority version ve=sepf_secmobile_6.0.1_0030     08-20 23:31:43.642 31662-31662/? w/selinux: selinux: seapp_context_lookup: seinfo=default, level=s0:c512,c768, pkgname=com.aurelius.agrotest      08-20 23:31:44.202 31662-31662/? w/art: failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -xrelocate --boot-image=/system/framework/boot.art --runtime-arg -xms64m --runtime-arg -xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.aurelius.agrotest-1/split_lib_dependencies_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.aurelius.agrotest-1@split_lib_dependencies_apk.apk@classes.dex) because non-0 exit status     08-20 23:31:44.542 31662-31662/? w/art: failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -xrelocate --boot-image=/system/framework/boot.art --runtime-arg -xms64m --runtime-arg -xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.aurelius.agrotest-1/split_lib_slice_0_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.aurelius.agrotest-1@split_lib_slice_0_apk.apk@classes.dex) because non-0 exit status     08-20 23:31:44.622 31662-31662/? w/art: failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -xrelocate --boot-image=/system/framework/boot.art --runtime-arg -xms64m --runtime-arg -xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.aurelius.agrotest-1/split_lib_slice_1_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.aurelius.agrotest-1@split_lib_slice_1_apk.apk@classes.dex) because non-0 exit status     08-20 23:31:44.702 31662-31662/? w/art: failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -xrelocate --boot-image=/system/framework/boot.art --runtime-arg -xms64m --runtime-arg -xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.aurelius.agrotest-1/split_lib_slice_2_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.aurelius.agrotest-1@split_lib_slice_2_apk.apk@classes.dex) because non-0 exit status     08-20 23:31:44.792 31662-31662/? w/art: failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -xrelocate --boot-image=/system/framework/boot.art --runtime-arg -xms64m --runtime-arg -xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.aurelius.agrotest-1/split_lib_slice_3_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.aurelius.agrotest-1@split_lib_slice_3_apk.apk@classes.dex) because non-0 exit status     08-20 23:31:44.872 31662-31662/? w/art: failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -xrelocate --boot-image=/system/framework/boot.art --runtime-arg -xms64m --runtime-arg -xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.aurelius.agrotest-1/split_lib_slice_4_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.aurelius.agrotest-1@split_lib_slice_4_apk.apk@classes.dex) because non-0 exit status     08-20 23:31:44.952 31662-31662/? w/art: failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -xrelocate --boot-image=/system/framework/boot.art --runtime-arg -xms64m --runtime-arg -xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.aurelius.agrotest-1/split_lib_slice_5_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.aurelius.agrotest-1@split_lib_slice_5_apk.apk@classes.dex) because non-0 exit status     08-20 23:31:45.032 31662-31662/? w/art: failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -xrelocate --boot-image=/system/framework/boot.art --runtime-arg -xms64m --runtime-arg -xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.aurelius.agrotest-1/split_lib_slice_6_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.aurelius.agrotest-1@split_lib_slice_6_apk.apk@classes.dex) because non-0 exit status     08-20 23:31:45.112 31662-31662/? w/art: failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -xrelocate --boot-image=/system/framework/boot.art --runtime-arg -xms64m --runtime-arg -xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.aurelius.agrotest-1/split_lib_slice_7_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.aurelius.agrotest-1@split_lib_slice_7_apk.apk@classes.dex) because non-0 exit status     08-20 23:31:45.192 31662-31662/? w/art: failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -xrelocate --boot-image=/system/framework/boot.art --runtime-arg -xms64m --runtime-arg -xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.aurelius.agrotest-1/split_lib_slice_8_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.aurelius.agrotest-1@split_lib_slice_8_apk.apk@classes.dex) because non-0 exit status     08-20 23:31:45.272 31662-31662/? w/art: failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -xrelocate --boot-image=/system/framework/boot.art --runtime-arg -xms64m --runtime-arg -xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.aurelius.agrotest-1/split_lib_slice_9_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.aurelius.agrotest-1@split_lib_slice_9_apk.apk@classes.dex) because non-0 exit status     08-20 23:31:45.272 31662-31662/? w/system: classloader referenced unknown path: /data/app/com.aurelius.agrotest-1/lib/arm     08-20 23:31:45.602 31662-31662/? w/system: classloader referenced unknown path: /data/data/com.google.android.gms/app_chimera/m/0000000e/n/armeabi     08-20 23:31:46.022 31662-31662/? e/motionrecognitionmanager: mscontextservice = null     08-20 23:31:46.022 31662-31662/? e/motionrecognitionmanager: motionservice = com.samsung.android.motion.imotionrecognitionservice$stub$proxy@42f9821     08-20 23:31:46.162 31662-31662/? w/afz: copymemory missing platform - proto runtime falling safer methods.     08-20 23:31:48.162 31662-31757/com.aurelius.agrotest w/dynamitemodule: local module descriptor class com.google.android.gms.googlecertificates not found.     08-20 23:31:48.222 31662-31757/com.aurelius.agrotest w/system: classloader referenced unknown path: /data/data/com.google.android.gms/app_chimera/m/0000000c/n/armeabi-v7a     08-20 23:31:48.222 31662-31757/com.aurelius.agrotest w/system: classloader referenced unknown path: /data/data/com.google.android.gms/app_chimera/m/0000000c/n/armeabi 

the androidmanifest:

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.aurelius.agrotest">      <!--          access_coarse/fine_location permissions not required use          google maps android api v2, must specify either coarse or fine          location permissions 'mylocation' functionality.      -->     <uses-permission android:name="android.permission.access_fine_location" />     <uses-permission android:name="android.permission.access_coarse_location" />     <uses-permission android:name="android.permission.internet" />      <application         android:allowbackup="true"         android:icon="@mipmap/ic_launcher"         android:label="@string/app_name"         android:roundicon="@mipmap/ic_launcher_round"         android:supportsrtl="true"         android:theme="@style/apptheme">          <!--              api key google maps-based apis defined string resource.              (see file "res/values/google_maps_api.xml").              note api key linked encryption key used sign apk.              need different api key each encryption key, including release key used              sign apk publishing.              can define keys debug , release targets in src/debug/ , src/release/.          -->         <meta-data             android:name="com.google.android.geo.api_key"             android:value="@string/google_maps_key" />          <activity             android:name=".maptrackingactivity"             android:label="@string/title_activity_map_tracking">             <intent-filter>                 <action android:name="android.intent.action.main" />                  <category android:name="android.intent.category.launcher" />             </intent-filter>         </activity>          <service             android:name=".routeservice"             android:enabled="true"             android:exported="true" />          <activity             android:name=".processresultactivity"             android:label="@string/title_activity_process_result"></activity>     </application>  </manifest> 

and activity

   package com.aurelius.agrotest;     import android.manifest;    import android.content.broadcastreceiver;    import android.content.context;    import android.content.intent;    import android.content.intentfilter;    import android.content.pm.packagemanager;    import android.graphics.color;    import android.location.location;    import android.os.bundle;    import android.support.annotation.nonnull;    import android.support.annotation.nullable;    import android.support.v4.app.activitycompat;    import android.support.v4.app.fragmentactivity;    import android.support.v4.content.localbroadcastmanager;    import android.util.log;    import com.google.android.gms.common.api.googleapiclient;    import com.google.android.gms.common.api.pendingresult;    import com.google.android.gms.common.api.resultcallback;    import com.google.android.gms.common.api.status;    import com.google.android.gms.location.locationrequest;    import com.google.android.gms.location.locationservices;    import com.google.android.gms.location.locationsettingsrequest;    import com.google.android.gms.location.locationsettingsresult;    import com.google.android.gms.location.locationsettingsstatuscodes;    import com.google.android.gms.maps.cameraupdatefactory;    import com.google.android.gms.maps.googlemap;    import com.google.android.gms.maps.onmapreadycallback;    import com.google.android.gms.maps.supportmapfragment;    import com.google.android.gms.maps.model.cameraposition;    import com.google.android.gms.maps.model.latlng;    import com.google.android.gms.maps.model.markeroptions;    import com.google.android.gms.maps.model.polyline;    import com.google.android.gms.maps.model.polylineoptions;    import com.aurelius.agrotest.database.databasequery;    import java.util.arraylist;    import java.util.list;    public class maptrackingactivity extends fragmentactivity implements onmapreadycallback, googleapiclient.connectioncallbacks{ private static final string tag = maptrackingactivity.class.getsimplename(); private googleapiclient mgoogleapiclient; private location mlastlocation; private locationrequest mlocationrequest; private double latitudevalue = 0.0; private double longitudevalue = 0.0; private googlemap mmap; private databasequery mquery; private routebroadcastreceiver routereceiver; private list<latlng> starttopresentlocations; @override protected void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     setcontentview(r.layout.activity_map_tracking);     log.d(tag, "oncreate has been called");     if (mgoogleapiclient == null) {         mgoogleapiclient = new googleapiclient.builder(this)                 .addconnectioncallbacks(this)                 .addapi(locationservices.api)                 .build();     }     mquery = new databasequery(this);     starttopresentlocations = mquery.getalllocationobjects();//dbq     mlocationrequest = createlocationrequest();     routereceiver = new routebroadcastreceiver();     // obtain supportmapfragment , notified when map ready used.     supportmapfragment mapfragment = (supportmapfragment) getsupportfragmentmanager().findfragmentbyid(r.id.map);     mapfragment.getmapasync(this); } @override public void onmapready(googlemap googlemap) {     mmap = googlemap;     log.d(tag, "onmapready has been called"); } private void markstartinglocationonmap(googlemap mapobject, latlng location){     mapobject.addmarker(new markeroptions().position(location).title("current location"));     mapobject.movecamera(cameraupdatefactory.newlatlng(location)); } @override public void onconnected(@nullable bundle bundle) {     log.d(tag, "connection method has been called");     locationsettingsrequest.builder builder = new locationsettingsrequest.builder().addlocationrequest(mlocationrequest);     pendingresult<locationsettingsresult> result = locationservices.settingsapi.checklocationsettings(mgoogleapiclient, builder.build());     result.setresultcallback(new resultcallback<locationsettingsresult>() {         @override         public void onresult(@nonnull locationsettingsresult result) {             log.d(tag, "connection has results!");             final status status = result.getstatus();             switch (status.getstatuscode()) {                 case locationsettingsstatuscodes.success:                     if (activitycompat.checkselfpermission(getapplicationcontext(), manifest.permission.access_fine_location) == packagemanager.permission_granted                             && activitycompat.checkselfpermission(getapplicationcontext(), manifest.permission.access_coarse_location) == packagemanager.permission_granted) {                         mlastlocation = locationservices.fusedlocationapi.getlastlocation(mgoogleapiclient);                         if (mlastlocation != null) {                             latitudevalue = mlastlocation.getlatitude();                             longitudevalue = mlastlocation.getlongitude();                             log.d(tag, "latitude 4: " + latitudevalue + " longitude 4: " + longitudevalue);                             refreshmap(mmap);                             markstartinglocationonmap(mmap, new latlng(latitudevalue, longitudevalue));                             startpolyline(mmap, new latlng(latitudevalue, longitudevalue));                         }                     }                     break;                 case locationsettingsstatuscodes.settings_change_unavailable:                     break;             }         }     }); } @override public void onconnectionsuspended(int i) { } private class routebroadcastreceiver extends broadcastreceiver{     @override     public void onreceive(context context, intent intent) {         string local = intent.getextras().getstring("result_code");         assert local != null;         if(local.equals("local")){             //get data database             starttopresentlocations = mquery.getalllocationobjects();//dbq             if(starttopresentlocations.size() > 0){                 //prepare map drawing.                 list<latlng> locationpoints = starttopresentlocations;                 refreshmap(mmap);                 markstartinglocationonmap(mmap, locationpoints.get(0));                 drawrouteonmap(mmap, locationpoints);             }         }     } } /*private list<latlng> getpoints(list<location> mlocations){     list<latlng> points = new arraylist<latlng>();     for(location mlocation : mlocations){         points.add(new latlng(mlocation.getlatitude(), mlocation.getlongitude()));     }     return points; }*/ private void startpolyline(googlemap map, latlng location){     if(map == null){         log.d(tag, "map object not null");         return;     }     polylineoptions options = new polylineoptions().width(5).color(color.blue).geodesic(true);     options.add(location);     polyline polyline = map.addpolyline(options);     cameraposition cameraposition = new cameraposition.builder()             .target(location)             .zoom(16)             .build();     map.animatecamera(cameraupdatefactory.newcameraposition(cameraposition)); } private void drawrouteonmap(googlemap map, list<latlng> positions){     polylineoptions options = new polylineoptions().width(5).color(color.blue).geodesic(true);     options.addall(positions);     polyline polyline = map.addpolyline(options);     cameraposition cameraposition = new cameraposition.builder()             .target(new latlng(positions.get(0).latitude, positions.get(0).longitude))             .zoom(17)             .bearing(90)             .tilt(40)             .build();     map.animatecamera(cameraupdatefactory.newcameraposition(cameraposition)); } private void refreshmap(googlemap mapinstance){     mapinstance.clear(); } protected locationrequest createlocationrequest() {     locationrequest mlocationrequest = new locationrequest();     mlocationrequest.setinterval(5000);     mlocationrequest.setfastestinterval(3000);     mlocationrequest.setpriority(locationrequest.priority_high_accuracy);     return mlocationrequest; } @override protected void onresume() {     super.onresume();     if(routereceiver == null){         routereceiver = new routebroadcastreceiver();     }     intentfilter filter = new intentfilter(routeservice.action);     localbroadcastmanager.getinstance(this).registerreceiver(routereceiver, filter); } @override protected void onpause() {     super.onpause();     localbroadcastmanager.getinstance(this).unregisterreceiver(routereceiver); } @override protected void onstart() {     mgoogleapiclient.connect();     super.onstart(); } @override protected void onstop() {     mgoogleapiclient.disconnect();     super.onstop(); } 

}


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -