AppWerft / Ti.LocationTrackerService

Foregroundservice for Geotracking realized for Axway Titanium
Other
3 stars 4 forks source link

Provide full working example #4

Open PietroGranati opened 6 years ago

PietroGranati commented 6 years ago

Hello, since the last issue 'Manifest' is not the right one to continue the discussion I've opened this one.

I'm trying the homepage example on an Huawei p20, no more error appears (well tracker.setLocationCallback fires an UNDEFINED error for the function) but also no notification appears and no firing for location events.

My question is if you can provide a 'full' working example code so I can start from there.

Thank you for your amazing work!

PietroGranati commented 6 years ago

Last update 2.1.1 give me that error:

`[INFO] : I/💎🚘 TiGeoLogger: Last client unbound from service mChangingConfiguration=false requestingLocationUpdates=true

[INFO] : I/💎🚘 TiGeoLogger: Starting foreground service

[INFO] : I/💎🚘 TiGeoLogger: getNotification started

[ERROR] : TiApplication: (main) [10,11929] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to unbind to service ti.locationtrackerservice.LocationUpdatesService@622906f with Intent { cmp=it.libemax.locationoreo/ti.locationtrackerservice.LocationUpdatesService }: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.replace(java.lang.CharSequence, java.lang.CharSequence)' on a null object reference; Titanium 7.1.1,2018/04/19 11:11,undefined

[ERROR] : TiApplication: java.lang.RuntimeException: Unable to unbind to service ti.locationtrackerservice.LocationUpdatesService@622906f with Intent { cmp=it.libemax.locationoreo/ti.locationtrackerservice.LocationUpdatesService }: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.replace(java.lang.CharSequence, java.lang.CharSequence)' on a null object reference

[ERROR] : TiApplication: at android.app.ActivityThread.handleUnbindService(ActivityThread.java:3906)

[ERROR] : TiApplication: at android.app.ActivityThread.-wrap28(Unknown Source:0)

[ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2002)

[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:109)

[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:166)

[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:7367)

[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method)

[ERROR] : TiApplication: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)

[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963)

[ERROR] : TiApplication: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.replace(java.lang.CharSequence, java.lang.CharSequence)' on a null object reference

[ERROR] : TiApplication: at ti.locationtrackerservice.LocationUpdatesService.getNotification(LocationUpdatesService.java:356)

[ERROR] : TiApplication: at ti.locationtrackerservice.LocationUpdatesService.onUnbind(LocationUpdatesService.java:243)

[ERROR] : TiApplication: at android.app.ActivityThread.handleUnbindService(ActivityThread.java:3887)

[ERROR] : TiApplication: ... 8 more`

AppWerft commented 6 years ago

In this case the parameter contentText is missing. I have added a condition to avoid this. v2.1.2

Wingee commented 6 years ago

Thanks @AppWerft - where is v2.1.2 ? I can't see the zip in the dist folder. Thanks

PietroGranati commented 6 years ago

I've built it https://github.com/AppWerft/Ti.LocationTrackerService/pull/5/commits/5758bf88085c001c54a05bd24cf42a61a2d88275

Wingee commented 6 years ago

Is it working for you with 2.1.2 @PietroGranati ?

PietroGranati commented 6 years ago

None, after I bit of research I found a guy here: https://github.com/appcelerator/titanium_mobile/pull/10076 After resolve the issue published an unofficial 7.1.2 SDK and it finally works like a charm!

You need to download it via the link "Here's the generated SDK zipfile." and put in the folder of others SDKs.

DouglasHennrich commented 6 years ago

@PietroGranati I can't click on that link, it says I'm not allowed

PietroGranati commented 6 years ago

https://jira.appcelerator.org/browse/TIMOB-16066