transistorsoft / cordova-background-geolocation-lt

The most sophisticated background location-tracking & geofencing module with battery-conscious motion-detection intelligence for iOS and Android.
http://www.transistorsoft.com/shop/products/cordova-background-geolocation
Other
655 stars 277 forks source link

Invalid license key using debug apk #916

Closed antho35 closed 5 years ago

antho35 commented 5 years ago

Your Environment

Expected Behavior

Using a debug apk, backgroundGeolocation should run in evaluation mode

Actual Behavior

popup "LICENSE VALIDATION FAILURE Invalid license key : YOUR_LICENSE_KEY" + bgGeo is undefined

Context

I have already remove/readd plugin and platform but nothing works

unugurhamit commented 5 years ago

add this line to your AndroidManifest.xml and replace with your licence key. `<meta-data android:name="com.transistorsoft.locationmanager.license" android:value="" />`

antho35 commented 5 years ago

this line is already added !

I haven't purchased any license, I just want to use evaluation mode. It worked few weeks ago but since a platform update it doesn't work.

christocracy commented 5 years ago

Ignore anything related to license until you purchase one.

Show me your:

$ cordova plugins
christocracy commented 5 years ago

And what do you mean by “platform update”?

antho35 commented 5 years ago

cordova_plugins

antho35 commented 5 years ago

I think the first build has been made with android 7.1.1 and now I passed to 7.1.4

christocracy commented 5 years ago

$ cordova platform remove android $ cordova platform add android $ cordova plugin remove cordova-background-geolocation-lt $ cordova plugin add cordova-background-geolocation-lt $ cordova build android

antho35 commented 5 years ago

Same issue, same popup, bgGeo is still undefined

christocracy commented 5 years ago

If it’s undefined, the plugin is not installed. You should investigate your installed plugins.

christocracy commented 5 years ago

Or:

yochyG commented 5 years ago

I'm having the same problem. I'm testing with a debug build. This used to work. `

`

antho35 commented 5 years ago

My plugin is installed.

christocracy commented 5 years ago

Create a new Hello World project and test the plugin in isolation.

yochyG commented 5 years ago

I Created a new hello world project. I still get the "invalid license key" message but it works.

yochyG commented 5 years ago

Ok so for me it breaks when I downgrade the version of GOOGLE_API_VERSION. I had to that because of another plugin I'm using (phonegap-plugin-push). I'm still playing around to see how I can make this two plugins work together. Will keep you updated. @antho35 did you also downgrade the version?

christocracy commented 5 years ago

You need to use play-services version >= 12.0.0. 16.0.0 is latest (recommended). If you’re using a plugin that doesn’t expose a variable to specify the version, that plugin is garbage.

Show me your plugins and platforms/android/project.properties

antho35 commented 5 years ago

No, I didn't downgrade the version

cordova_plugin

christocracy commented 5 years ago

agains: Show me your platforms/android/project.properties

antho35 commented 5 years ago

project properties

christocracy commented 5 years ago

Why are you posting screenshots of text. Paste the text (edit your post)

yochyG commented 5 years ago

@christocracy I think what's happening is that for some reason the code is not working (one reason or the other) and since people see the error "invalid license key" they think that's the reason.

@antho35 just because you see the error doesn't mean it's not working. Double check everything else.

christocracy commented 5 years ago

Are you watching your app boot with $ adb logcat -s TSLocationManager, eg:

04-30 09:14:49.830 17012 17012 I TSLocationManager: ╟─ android.intent.action.MY_PACKAGE_REPLACED
04-30 09:14:49.843 17012 17012 I TSLocationManager: [c.t.l.service.HeartbeatService b]
04-30 09:14:49.843 17012 17012 I TSLocationManager:   🎾  Start heartbeat (60s)
04-30 09:14:49.852 17012 17012 I TSLocationManager: [c.t.l.s.ActivityRecognitionService a]
04-30 09:14:49.852 17012 17012 I TSLocationManager:   🎾  Start motion-activity updates
04-30 09:14:49.880 17012 17012 I TSLocationManager: [c.t.l.g.TSGeofenceManager start]
04-30 09:14:49.880 17012 17012 I TSLocationManager:   🎾  Start monitoring geofences
04-30 09:14:49.893 17012 17012 D TSLocationManager: [c.t.l.http.HttpService startMonitoringConnectivityChanges]
04-30 09:14:49.893 17012 17012 D TSLocationManager:   🎾  Start monitoring connectivity changes
04-30 09:14:49.900 17012 17012 D TSLocationManager: [c.t.locationmanager.device.a c]
04-30 09:14:49.900 17012 17012 D TSLocationManager:   🎾  Start monitoring powersave changes
⏳ startBackgroundTask: 1
04-30 09:14:51.564 17012 17012 D TSLocationManager: [c.t.locationmanager.util.b a]
04-30 09:14:51.564 17012 17012 D TSLocationManager:   ℹ️  LocationAuthorization: Permission granted
04-30 09:14:51.785 17012 17012 D TSLocationManager: [c.t.l.s.ActivityRecognitionService a]
04-30 09:14:51.785 17012 17012 D TSLocationManager:   🚘 ️DetectedActivity [type=STILL, confidence=100]
04-30 09:14:51.821 17012 17012 D TSLocationManager: [c.t.l.s.ActivityRecognitionService onDestroy]
04-30 09:14:51.821 17012 17012 D TSLocationManager:   🔴  ActivityRecognitionService destroyed
04-30 09:14:52.093 17012 17012 I TSLocationManager: [c.t.l.s.ActivityRecognitionService a]
04-30 09:14:52.093 17012 17012 I TSLocationManager: ╔═════════════════════════════════════════════
04-30 09:14:52.093 17012 17012 I TSLocationManager: ║ Motion Transition Result
04-30 09:14:52.093 17012 17012 I TSLocationManager: ╠═════════════════════════════════════════════
04-30 09:14:52.093 17012 17012 I TSLocationManager: ╟─ 🎾  ENTER: still
04-30 09:14:52.093 17012 17012 I TSLocationManager: ╚═════════════════════════════════════════════
04-30 09:14:52.197 17012 17012 D TSLocationManager: [c.t.l.s.ActivityRecognitionService onDestroy]
04-30 09:14:52.197 17012 17012 D TSLocationManager:   🔴  ActivityRecognitionService destroyed
04-30 09:14:52.767 17012 17012 D TSLocationManager: [c.t.l.adapter.TSConfig$Builder setNotification] ************ setNotification: {"layout":"","title":"","text":"","smallIcon":"","largeIcon":"","strings":{},"actions":[]}, currentValue: {"layout":"notification_layout","title":"2019-04-30 09:11:32.728636","text":"This is a test","smallIcon":"","largeIcon":"","strings":{},"actions":[]}
04-30 09:14:52.771 17012 17012 D TSLocationManager: [c.t.l.a.TSConfig$Notification a] ********** isDirty: 3, [notification.title, notification.text, notification.layout]
04-30 09:14:52.825 17012 17048 I flutter : [activitychange] - [ActivityChangeEvent still (100%)]
04-30 09:14:52.826 17012 17012 D TSLocationManager: [c.t.l.adapter.TSConfig c] ℹ️   Persist config
04-30 09:14:52.831 17012 17048 I flutter : [activitychange] - [ActivityChangeEvent still (100%)]
04-30 09:14:52.883 17012 17012 I TSLocationManager: [c.t.l.service.HeartbeatService b]
04-30 09:14:52.883 17012 17012 I TSLocationManager:   🎾  Start heartbeat (60s)
04-30 09:14:52.886 17012 17085 I TSLocationManager: [c.t.l.http.HttpService flush]
04-30 09:14:52.886 17012 17085 I TSLocationManager: ╔═════════════════════════════════════════════
04-30 09:14:52.886 17012 17085 I TSLocationManager: ║ HTTP Service (count: 0)
04-30 09:14:52.886 17012 17085 I TSLocationManager: ╠═════════════════════════════════════════════
04-30 09:14:52.893 17012 17012 D TSLocationManager: [c.t.locationmanager.util.b a]
04-30 09:14:52.893 17012 17012 D TSLocationManager:   ℹ️  LocationAuthorization: Permission granted
04-30 09:14:52.908 17012 17087 I TSLocationManager: - Enable: true → true, trackingMode: 1
04-30 09:14:52.916 17012 17087 I TSLocationManager: [c.t.l.service.HeartbeatService b]
04-30 09:14:52.916 17012 17087 I TSLocationManager:   🎾  Start heartbeat (60s)
04-30 09:14:52.917 17012 17012 I TSLocationManager: [c.t.l.http.HttpService flush]
04-30 09:14:52.917 17012 17012 I TSLocationManager: ╔═════════════════════════════════════════════
04-30 09:14:52.917 17012 17012 I TSLocationManager: ║ HTTP Service (count: 0)
04-30 09:14:52.917 17012 17012 I TSLocationManager: ╠═════════════════════════════════════════════
04-30 09:14:52.921 17012 17012 D TSLocationManager: [c.t.l.a.BackgroundGeolocation ready] LocationPermission :true
04-30 09:14:52.923 17012 17087 I TSLocationManager: [c.t.l.s.ActivityRecognitionService a]
04-30 09:14:52.923 17012 17087 I TSLocationManager:   🎾  Start motion-activity updates
04-30 09:14:52.929 17012 17087 I TSLocationManager: [c.t.l.g.TSGeofenceManager start]
04-30 09:14:52.929 17012 17087 I TSLocationManager:   🎾  Start monitoring geofences
04-30 09:14:52.940 17012 17087 D TSLocationManager: [c.t.l.http.HttpService startMonitoringConnectivityChanges]
04-30 09:14:52.940 17012 17087 D TSLocationManager:   🎾  Start monitoring connectivity changes
04-30 09:14:52.942 17012 17087 D TSLocationManager: [c.t.locationmanager.device.a c]
04-30 09:14:52.942 17012 17087 D TSLocationManager:   🎾  Start monitoring powersave changes
antho35 commented 5 years ago
04-30 15:30:32.767 22889 23035 E TSLocationManager: ╟─ Invalid license key: YOUR_LICENSE_KEY
04-30 15:30:32.767 22889 23035 E TSLocationManager: ╟─ BackgroundGeolocation is fully functional in DEBUG builds without a license.
04-30 15:30:32.767 22889 23035 E TSLocationManager: ╚═════════════════════════════════════════════
04-30 15:30:32.997 22889 23035 D TSLocationManager: $ addLocationListener()
04-30 15:30:33.007 22889 23035 D TSLocationManager: $ addMotionChangeListener()
04-30 15:30:33.015 22889 23035 D TSLocationManager: $ ready()
04-30 15:30:33.034 22889 23035 D TSLocationManager: [c.t.l.adapter.TSConfig c] ℹ️   Persist config
04-30 15:30:33.098 22889 23035 D TSLocationManager: [c.t.l.a.BackgroundGeolocation ready] LocationPermission :false
04-30 15:31:25.513 22889 23035 D TSLocationManager: $ addLocationListener()
04-30 15:31:25.521 22889 23035 D TSLocationManager: $ addMotionChangeListener()
04-30 15:31:25.528 22889 23035 D TSLocationManager: $ ready()
04-30 15:33:42.230 22889 22889 I TSLocationManager: [c.t.l.a.BackgroundGeolocation$h onReceive]
04-30 15:33:42.230 22889 22889 I TSLocationManager: ╔═════════════════════════════════════════════
04-30 15:33:42.230 22889 22889 I TSLocationManager: ║ Location-provider change: true
04-30 15:33:42.230 22889 22889 I TSLocationManager: ╠═════════════════════════════════════════════
04-30 15:33:42.230 22889 22889 I TSLocationManager: ╟─ GPS: true
04-30 15:33:42.230 22889 22889 I TSLocationManager: ╟─ Network: true
04-30 15:33:42.271 22889 22889 I TSLocationManager: [c.t.l.a.BackgroundGeolocation$h onReceive]
04-30 15:33:42.271 22889 22889 I TSLocationManager: ╔═════════════════════════════════════════════
04-30 15:33:42.271 22889 22889 I TSLocationManager: ║ Location-provider change: true
04-30 15:33:42.271 22889 22889 I TSLocationManager: ╠═════════════════════════════════════════════
04-30 15:33:42.271 22889 22889 I TSLocationManager: ╟─ GPS: true
04-30 15:33:42.271 22889 22889 I TSLocationManager: ╟─ Network: true
04-30 15:34:49.615 22889 23035 D TSLocationManager: $ addLocationListener()
04-30 15:34:49.618 22889 23035 D TSLocationManager: $ addMotionChangeListener()
04-30 15:34:49.622 22889 23035 D TSLocationManager: $ ready()
christocracy commented 5 years ago

Looks fine, but why are you calling #ready multiple times? It's supposed to be called just once, each time the app boots.

04-30 15:30:33.015 22889 23035 D TSLocationManager: $ ready()

The plugin has booted. It's is in stopped state, waiting for you to call #start.

antho35 commented 5 years ago

Everything is ok ! Thanks !!

raja-arumugam commented 4 years ago

is there need to pay for license key?

christocracy commented 4 years ago

@raja-arumugam iOS is free. Android requires purchase to unlock for release builds. The plugin is fully functional in debug builds without a license so you can try before you buy. Yes, you'll see a Toast message "License Validation Failure". Ignore everything about license in debug builds.