Closed antho35 closed 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="" />`
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.
Ignore anything related to license until you purchase one.
Show me your:
$ cordova plugins
And what do you mean by “platform update”?
I think the first build has been made with android 7.1.1 and now I passed to 7.1.4
$ 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
Same issue, same popup, bgGeo is still undefined
If it’s undefined, the plugin is not installed. You should investigate your installed plugins.
Or:
platformready
event has fired.I'm having the same problem. I'm testing with a debug build. This used to work. `
`
My plugin is installed.
Create a new Hello World project and test the plugin in isolation.
I Created a new hello world project. I still get the "invalid license key" message but it works.
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?
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
No, I didn't downgrade the version
agains: Show me your platforms/android/project.properties
Why are you posting screenshots of text. Paste the text (edit your post)
@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.
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
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()
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
.
Everything is ok ! Thanks !!
is there need to pay for license key?
@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.
Your Environment
Plugin version: 3.0.1
Platform: Android
OS version:
Device manufacturer / model:
Cordova version (
cordova -v
): 8.1.2 (cordova-lib@8.1.1)Cordova platform version (
cordova platform ls
): Installed platforms: android 7.1.4 Available platforms: browser ~5.0.1 ios ~4.5.4 osx ~4.0.1 windows ~6.0.0Plugin config `
`
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