traccar-client-android icon indicating copy to clipboard operation
traccar-client-android copied to clipboard

Position Issue:

Open arunramya opened this issue 6 years ago • 16 comments

Tracking controller && Position Provider is not worked in Samsung Galaxy j2. Please help me to fix this..

arunramya avatar Apr 26 '18 05:04 arunramya

Please elaborate.

tananaev avatar Apr 26 '18 05:04 tananaev

Device: Samsung Galaxy j2

I have downloaded this zip file & extracted & imported in android studio.. finally i successfully compiled your project and ran. i have turned on service status in your app. its also turned on. but i did not get any location updates after that. Please give me a solution to fix this.

Wifi enabled, Location also enabled and two sim card inserted inside the phone.

apiClient is successfully connected. But Not able to get locations.

arunramya avatar Apr 26 '18 05:04 arunramya

What makes you think both of the classes that you mentioned in the original comment are not working?

tananaev avatar Apr 26 '18 05:04 tananaev

This is my Log cat:

04-26 11:12:17.181 20880-20880/org.traccar.client E/Zygote: MountEmulatedStorage()
04-26 11:12:17.181 20880-20880/org.traccar.client E/Zygote: v2
04-26 11:12:17.181 20880-20880/org.traccar.client I/libpersona: KNOX_SDCARD checking this for 10454
04-26 11:12:17.181 20880-20880/org.traccar.client I/libpersona: KNOX_SDCARD not a persona
04-26 11:12:17.186 20880-20880/org.traccar.client I/SELinux: Function: selinux_compare_spd_ram , priority [2] , priority version is VE=SEPF_SM-J200G_5.1.1_0073
04-26 11:12:17.186 20880-20880/org.traccar.client E/Zygote: accessInfo : 0
04-26 11:12:17.191 20880-20880/org.traccar.client E/SELinux: [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL
04-26 11:12:17.191 20880-20880/org.traccar.client I/art: Late-enabling -Xcheck:jni
04-26 11:12:17.241 20880-20880/org.traccar.client D/TimaKeyStoreProvider: TimaSignature is unavailable
04-26 11:12:17.246 20880-20880/org.traccar.client D/ActivityThread: Added TimaKeyStore provider
04-26 11:12:18.781 20880-20894/org.traccar.client I/art: Background sticky concurrent mark sweep GC freed 8620(538KB) AllocSpace objects, 6(96KB) LOS objects, 11% free, 4MB/5MB, paused 5.214ms total 31.129ms
04-26 11:12:18.791 20880-20880/org.traccar.client I/CrashlyticsCore: Initializing Crashlytics 2.6.1.23
04-26 11:12:18.916 20880-21035/org.traccar.client W/ResourcesManager: Asset path '/system/framework/com.android.media.remotedisplay.jar' does not exist or contains no resources.
04-26 11:12:18.916 20880-21035/org.traccar.client W/ResourcesManager: Asset path '/system/framework/com.android.location.provider.jar' does not exist or contains no resources.
04-26 11:12:18.966 20880-20894/org.traccar.client W/art: Suspending all threads took: 22.125ms
04-26 11:12:18.971 20880-21027/org.traccar.client I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
04-26 11:12:18.971 20880-21027/org.traccar.client I/System.out: (HTTPLog)-Static: isShipBuild true
04-26 11:12:18.971 20880-21027/org.traccar.client I/System.out: (HTTPLog)-Thread-32914-125176808: SmartBonding Enabling is false, SHIP_BUILD is true, log to file is false, DBG is false
04-26 11:12:18.971 20880-21027/org.traccar.client I/System.out: (HTTPLog)-Thread-32914-125176808: SMARTBONDING_FEATURE_ENABLED is true
04-26 11:12:18.976 20880-20894/org.traccar.client I/art: Background partial concurrent mark sweep GC freed 3076(269KB) AllocSpace objects, 5(80KB) LOS objects, 29% free, 4MB/6MB, paused 25.168ms total 124.470ms
04-26 11:12:18.976 20880-21027/org.traccar.client I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
04-26 11:12:18.981 20880-20880/org.traccar.client I/FA: App measurement is starting up, version: 11400
04-26 11:12:18.981 20880-20880/org.traccar.client I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
04-26 11:12:18.996 20880-21027/org.traccar.client I/System.out: KnoxVpnUidStorageknoxVpnSupported API value returned is false
04-26 11:12:19.046 20880-21027/org.traccar.client I/System.out: KnoxVpnUidStorageknoxVpnSupported API value returned is false
04-26 11:12:19.046 20880-20880/org.traccar.client V/FA: Collection enabled
04-26 11:12:19.046 20880-20880/org.traccar.client V/FA: App package, google app id: org.traccar.client, 1:428882750786:android:ef295cb853f800fc
04-26 11:12:19.051 20880-20880/org.traccar.client I/FA: To enable faster debug mode event logging run:
                                                          adb shell setprop debug.firebase.analytics.app org.traccar.client
04-26 11:12:19.051 20880-20880/org.traccar.client D/FA: Debug-level message logging enabled
04-26 11:12:19.201 20880-20880/org.traccar.client V/FA: Registered activity lifecycle callback
04-26 11:12:19.241 20880-21075/org.traccar.client W/FA: Failed to retrieve Firebase Instance Id
04-26 11:12:19.246 20880-21075/org.traccar.client V/FA: Using measurement service
04-26 11:12:19.266 20880-21075/org.traccar.client V/FA: Connecting to remote service
04-26 11:12:19.271 20880-20880/org.traccar.client I/CrashlyticsInitProvider: CrashlyticsInitProvider initialization successful
04-26 11:12:19.476 20880-21098/org.traccar.client W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
04-26 11:12:19.476 20880-20880/org.traccar.client I/FirebaseInitProvider: FirebaseApp initialization successful
04-26 11:12:19.481 20880-21075/org.traccar.client V/FA: Using measurement service
04-26 11:12:19.481 20880-21075/org.traccar.client V/FA: Connection attempt already in progress
04-26 11:12:19.481 20880-20880/org.traccar.client I/InstantRun: starting instant run server: is main process
04-26 11:12:19.486 20880-21098/org.traccar.client W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
04-26 11:12:19.496 20880-21104/org.traccar.client I/DynamiteModule: Considering local module com.google.android.gms.flags:2 and remote module com.google.android.gms.flags:0
04-26 11:12:19.496 20880-21104/org.traccar.client I/DynamiteModule: Selected local version of com.google.android.gms.flags
04-26 11:12:19.506 20880-21104/org.traccar.client W/ResourcesManager: Asset path '/system/framework/com.android.media.remotedisplay.jar' does not exist or contains no resources.
04-26 11:12:19.506 20880-21104/org.traccar.client W/ResourcesManager: Asset path '/system/framework/com.android.location.provider.jar' does not exist or contains no resources.
04-26 11:12:19.521 20880-21104/org.traccar.client W/DynamiteModule: Local module descriptor class for com.google.android.gms.crash not found.
04-26 11:12:19.536 20880-21104/org.traccar.client I/DynamiteModule: Considering local module com.google.android.gms.crash:0 and remote module com.google.android.gms.crash:213
04-26 11:12:19.536 20880-21104/org.traccar.client I/DynamiteModule: Selected remote version of com.google.android.gms.crash, version >= 213
04-26 11:12:19.761 20880-20894/org.traccar.client W/art: Suspending all threads took: 110.589ms
04-26 11:12:19.771 20880-20894/org.traccar.client I/art: Background sticky concurrent mark sweep GC freed 7315(771KB) AllocSpace objects, 11(176KB) LOS objects, 16% free, 5MB/6MB, paused 115.028ms total 206.231ms
04-26 11:12:19.781 20880-21104/org.traccar.client I/FirebaseCrashApiImpl: FirebaseCrashApiImpl created by ClassLoader ae[DexPathList[[zip file "/data/data/com.google.android.gms/app_chimera/m/00000036/DynamiteModulesC_GmsCore_prodlmp_hdpi_release.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]]
04-26 11:12:19.781 20880-21104/org.traccar.client I/FirebaseCrash: FirebaseCrash reporting loaded - com.google.android.gms.internal.zzdmw@3b0d585c
04-26 11:12:19.826 20880-21105/org.traccar.client I/DynamiteModule: Considering local module com.google.android.gms.flags:2 and remote module com.google.android.gms.flags:0
04-26 11:12:19.826 20880-21105/org.traccar.client I/DynamiteModule: Selected local version of com.google.android.gms.flags
04-26 11:12:19.856 20880-21105/org.traccar.client W/DynamiteModule: Local module descriptor class for com.google.android.gms.crash not found.
04-26 11:12:19.901 20880-20880/org.traccar.client W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
04-26 11:12:19.906 20880-20894/org.traccar.client W/art: Suspending all threads took: 12.540ms
04-26 11:12:19.921 20880-20894/org.traccar.client I/art: Background sticky concurrent mark sweep GC freed 7492(530KB) AllocSpace objects, 1(39KB) LOS objects, 9% free, 6MB/6MB, paused 17.294ms total 60.158ms
04-26 11:12:19.931 20880-21105/org.traccar.client I/FirebaseCrashApiImpl: FirebaseCrash reporting API initialized
04-26 11:12:19.941 20880-21105/org.traccar.client I/FirebaseCrash: FirebaseCrash reporting initialized com.google.android.gms.internal.zzdmw@3b0d585c
04-26 11:12:19.946 20880-21105/org.traccar.client D/FirebaseCrash: Firebase Analytics Listener for Firebase Crash is initialized
04-26 11:12:20.006 20880-20880/org.traccar.client V/FA: onActivityCreated
04-26 11:12:20.081 20880-20880/org.traccar.client W/Resources: Converting to string: TypedValue{t=0x10/d=0x12c a=-1}
04-26 11:12:20.086 20880-20880/org.traccar.client W/Resources: Converting to string: TypedValue{t=0x10/d=0x0 a=-1}
04-26 11:12:20.091 20880-20880/org.traccar.client W/Resources: Converting to string: TypedValue{t=0x10/d=0x0 a=-1}
04-26 11:12:20.161 20880-20880/org.traccar.client D/PhoneWindow: *FMB* installDecor mIsFloating : false
04-26 11:12:20.161 20880-20880/org.traccar.client D/PhoneWindow: *FMB* installDecor flags : -2139029248
04-26 11:12:20.311 20880-20894/org.traccar.client I/art: Background sticky concurrent mark sweep GC freed 381(67KB) AllocSpace objects, 0(0B) LOS objects, 1% free, 6MB/6MB, paused 5.304ms total 59.643ms
04-26 11:12:20.381 20880-20894/org.traccar.client W/art: Suspending all threads took: 11.939ms
04-26 11:12:20.391 20880-20894/org.traccar.client I/art: Background partial concurrent mark sweep GC freed 8080(459KB) AllocSpace objects, 2(32KB) LOS objects, 25% free, 6MB/8MB, paused 16.133ms total 74.469ms
04-26 11:12:20.481 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:20.481 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:20.506 20880-20880/org.traccar.client D/AbsListView: Get MotionRecognitionManager
04-26 11:12:20.516 20880-20880/org.traccar.client E/MotionRecognitionManager: mSContextService = null
04-26 11:12:20.526 20880-20880/org.traccar.client E/MotionRecognitionManager: motionService = com.samsung.android.motion.IMotionRecognitionService$Stub$Proxy@1266d308
04-26 11:12:20.536 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:20.556 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:20.561 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:20.566 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:20.571 20880-21075/org.traccar.client V/FA: Using measurement service
04-26 11:12:20.571 20880-21075/org.traccar.client V/FA: Connection attempt already in progress
04-26 11:12:20.576 20880-21075/org.traccar.client V/FA: Activity resumed, time: 176652923
04-26 11:12:20.591 20880-21075/org.traccar.client I/DynamiteModule: Considering local module com.google.android.gms.tagmanager:12 and remote module com.google.android.gms.tagmanager:12
04-26 11:12:20.591 20880-21075/org.traccar.client I/DynamiteModule: Selected remote version of com.google.android.gms.tagmanager, version >= 12
04-26 11:12:20.656 20880-20880/org.traccar.client D/ViewRootImpl: Buffer Count from app info with  ::-1 && -1 for :: org.traccar.client from View :: -1 DBQ Enabled ::false false
04-26 11:12:20.666 20880-21190/org.traccar.client D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: false
04-26 11:12:20.686 20880-20880/org.traccar.client D/PhoneWindow: *FMB* isFloatingMenuEnabled mFloatingMenuBtn : null
04-26 11:12:20.686 20880-20880/org.traccar.client D/PhoneWindow: *FMB* isFloatingMenuEnabled return false
04-26 11:12:20.726 20880-21075/org.traccar.client W/GoogleTagManager: No container asset found in /assets/containers. Checking top level /assets directory for container assets.
04-26 11:12:20.751 20880-21190/org.traccar.client D/libEGL: eglInitialize EGLDisplay = 0xa0cbfc54
04-26 11:12:20.751 20880-21190/org.traccar.client I/OpenGLRenderer: Initialized EGL, version 1.4
04-26 11:12:20.771 20880-21075/org.traccar.client W/GoogleTagManager: Tag Manager's event handler WILL NOT be installed (no container loaded)
04-26 11:12:20.771 20880-21075/org.traccar.client I/GoogleTagManager: Tag Manager initilization took 134ms
04-26 11:12:20.771 20880-21075/org.traccar.client D/FA: Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=6066055927277484348}]
04-26 11:12:20.811 20880-21075/org.traccar.client V/FA: Using measurement service
04-26 11:12:20.811 20880-21075/org.traccar.client V/FA: Connection attempt already in progress
04-26 11:12:20.846 20880-21190/org.traccar.client I/OpenGLRenderer: HWUI protection enabled for context ,  &this =0xb473ab20 ,&mEglDisplay = 1 , &mEglConfig = -1584528740 
04-26 11:12:20.846 20880-21190/org.traccar.client D/OpenGLRenderer: Get maximum texture size. GL_MAX_TEXTURE_SIZE is 8192
04-26 11:12:20.846 20880-21190/org.traccar.client D/OpenGLRenderer: Enabling debug mode 0
04-26 11:12:20.851 20880-21190/org.traccar.client D/mali_winsys: new_window_surface returns 0x3000,  [540x960]-format:1
04-26 11:12:20.866 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:20.871 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:20.946 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:20.951 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:20.961 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:20.966 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:20.976 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:20.981 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:20.991 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:20.996 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:21.021 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:21.021 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:21.036 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:21.041 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:21.141 20880-20880/org.traccar.client W/art: Before Android 4.1, method int android.support.v7.widget.DropDownListView.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
04-26 11:12:21.171 20880-21027/org.traccar.client E/Fabric: Failed to retrieve settings from https://settings.crashlytics.com/spi/v2/platforms/android/apps/org.traccar.client/settings
04-26 11:12:21.201 20880-21029/org.traccar.client E/Answers: Failed to retrieve settings
04-26 11:12:21.206 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:21.216 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:21.216 20880-20880/org.traccar.client I/Choreographer: Skipped 30 frames!  The application may be doing too much work on its main thread.
04-26 11:12:21.226 20880-21028/org.traccar.client W/CrashlyticsCore: Received null settings, skipping report submission!
04-26 11:12:21.566 20880-21075/org.traccar.client D/FA: Connected to remote service
04-26 11:12:21.571 20880-21075/org.traccar.client V/FA: Processing queued up service tasks: 4
04-26 11:12:21.616 20880-20880/org.traccar.client I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@571e605 time:81736469
04-26 11:12:23.106 20880-20880/org.traccar.client D/ViewRootImpl: ViewPostImeInputStage ACTION_DOWN
04-26 11:12:23.256 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:23.316 20880-20880/org.traccar.client D/PhoneWindow: *FMB* installDecor mIsFloating : true
04-26 11:12:23.316 20880-20880/org.traccar.client D/PhoneWindow: *FMB* installDecor flags : 8388610
04-26 11:12:23.341 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:23.351 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:23.356 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:23.361 20880-20880/org.traccar.client D/TextView: setTypeface with style : 0
04-26 11:12:23.366 20880-20880/org.traccar.client D/ViewRootImpl: Buffer Count from app info with  ::-1 && -1 for :: org.traccar.client from View :: -1 DBQ Enabled ::false false
04-26 11:12:23.386 20880-20880/org.traccar.client D/PhoneWindow: *FMB* isFloatingMenuEnabled mFloatingMenuBtn : null
04-26 11:12:23.386 20880-20880/org.traccar.client D/PhoneWindow: *FMB* isFloatingMenuEnabled return false
04-26 11:12:23.431 20880-21190/org.traccar.client D/mali_winsys: new_window_surface returns 0x3000,  [597x443]-format:1
04-26 11:12:26.701 20880-21075/org.traccar.client V/FA: Inactivity, disconnecting from the service
04-26 11:12:26.991 20880-20880/org.traccar.client D/ViewRootImpl: ViewPostImeInputStage ACTION_DOWN
04-26 11:12:27.186 20880-20880/org.traccar.client E/ViewRootImpl: sendUserActionEvent() mView == null
04-26 11:12:27.361 20880-21670/org.traccar.client I/FirebaseCrash: Sending crashes
04-26 11:12:28.901 20880-20880/org.traccar.client D/ViewRootImpl: ViewPostImeInputStage ACTION_DOWN
04-26 11:12:29.096 20880-20880/org.traccar.client I/TrackingService: service create
04-26 11:12:29.201 20880-20880/org.traccar.client D/TrackingController: read
04-26 11:12:29.346 20880-20880/org.traccar.client I/NetworkManager: network on
04-26 11:12:30.891 20880-20880/org.traccar.client E/Lost api connected: successfully (Checked myself)
04-26 11:12:30.891 20880-20880/org.traccar.client E/Request to get update: initialized (Checked myself)

arunramya avatar Apr 26 '18 05:04 arunramya

Position Provider:

 LocationRequest request = LocationRequest.create()
                    .setPriority(getPriority(preferences.getString(MainFragment.KEY_ACCURACY, "medium")))
                    .setInterval(distance > 0 || angle > 0 ? MINIMUM_INTERVAL : interval);
            LocationServices.FusedLocationApi.requestLocationUpdates(apiClient, request, this);

i think here you requested to get update for location with some condition..

LocationServices.FusedLocationApi.requestLocationUpdates(apiClient, request, this);

but the above line is not get location updates in samsung galaxy j2. i have changed nothing in your project.

arunramya avatar Apr 26 '18 05:04 arunramya

Please help me!

arunramya avatar Apr 26 '18 06:04 arunramya

  1. Have you given permissions to the app?
  2. Do you have location enabled in Android settings?
  3. Are you outdoors to receive GPS signal?

tananaev avatar Apr 26 '18 06:04 tananaev

Yes, i gave permission to the application. And also checked if location is enabled or not. yes. i can receive GPS signal.

arunramya avatar Apr 26 '18 06:04 arunramya

Then it should work. If it doesn't then it means one of your statements is wrong.

tananaev avatar Apr 26 '18 08:04 tananaev

I would recommend that you first try using an author supplied build from https://play.google.com/store/apps/details?id=org.traccar.client or https://github.com/traccar/traccar-client-android/releases

garyvdm avatar Apr 26 '18 09:04 garyvdm

I have checked what you recommended. It also has problem. Sometimes your app wont continue position updating.. I saw your service running in settings but it wont update position sometimes.

Note:

what i have used

frequency=1; distance=1; angle=1

arunramya avatar Apr 26 '18 09:04 arunramya

Rather leave distance and angle blank. If you set a distance value, it won't report the position to the server if you are not moving.

You said "Sometimes your app wont continue position updating". Does that mean that sometimes it does report the position to the server?

garyvdm avatar Apr 26 '18 10:04 garyvdm

Its reporting position to the server successfully sometimes only in Samsung j2. I will check another one time and then give answer to u tomorrow..

(I moved 60 km from x to y yesterday) but it wont update position.. thats why i raised the question.. Anyway i ll check today.

arunramya avatar Apr 26 '18 10:04 arunramya

can you tell me please, what is the advantage of your lost API client.

arunramya avatar Apr 27 '18 04:04 arunramya

This provides some reasoning:

https://developers.google.com/location-context/fused-location-provider/

tananaev avatar Apr 27 '18 04:04 tananaev

@arunramya Please download and run GPS status and make sure you have GPS lock.
(Also if you have dropped your phone, you may have partially broken GPS functionality, and it works only erratically.)

E3V3A avatar May 04 '18 07:05 E3V3A