pathsense / pathsense-samples-android Goto Github PK
View Code? Open in Web Editor NEWSample Applications for the PathSense SDK
License: Other
Sample Applications for the PathSense SDK
License: Other
In pathsense.properties, if oreo_show_notification=true
is not specified, it results in the following crash on Android 8.0+. A notification channel needs to be set when startForeground is called in com.pathsense.locationengine.apklib.LocationEngineService.onStartCommand();
android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: Notification(channel=null pri=-2 contentView=null vibrate=null sound=null tick defaults=0x0 flags=0x40 color=0x00000000 vis=PRIVATE) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1768) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6494) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
I don't see this issue when oreo_show_notification=true
is specified.
Hello,
I've recently installed your SDK and noticed that the Pathsense notification shows up for a really brief time and then quickly disappears. However, sometimes the notification doesn't disappear and is stuck. I have to either kill the process or restart the phone to make it go away.
Do you have any idea why this could be happening ?
Thank you in advance,
Fouad
Without unregistering the geofence?
android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: Notification(channel=null pri=-2 contentView=null vibrate=null sound=null tick defaults=0x0 flags=0x40 color=0x00000000 vis=PRIVATE) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1768) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6494) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
hi pathsense team!
in this link, you show a very promising compairison between battery consumption on a given GPS tracking, with and without pathsense.
Though in your SDK i cannot find what specific functions you're leveraging to achieve this. Would it rely on down sampling the GPS tracking frequency and correcting/snapping the data? (maybe as advertised in iOS Urban Canyon?) For now we're testing the activity detection feature on Android.
Tried your solution but it didn't work as fast as claimed on your site (ie. 2x).
It triggered later than Google. Is there anything we are missing?
Thanks in advance for the solution.
Hello!
I'm trying to get intent with Broadcast Receiver after the launch of the service, and lock the device, but I get it only when my screen is unlocked. Can help me please?
Does your location provider solution work without GPS (ie. via Wifi, mobile network etc.) in case GPS is unavailable to use?
Can you implement in the PathsenseGeofenceEvent class, that it returns a list of involved geofences at one time and not one by one?
The geofencing event of Google does it so.
Regards
Egmont
The properties
icon_name= drawable/pickrwhite200
oreo_show_notification= false
background_service=true
are ignored. The icon remains the default one and its always in foreground.
Pathsense stops receiving location updates if vehicle not moving and stays on the same place in about 10-15 minutes. I've tested on Samsung Galaxy t-285 and on Genymotion emulator. Library version 2.3.0.18 and 3.1.0.4i. Any suggestions on that?
Is it possible to add Geofences to the API with the option to trigger only exit or enter events?
What convention do you use for supporting different locales for notifications?
Hello,
Adding a geofence causes this error in logcat, which prints about once every second and clutters the log. Fortunately it doesn't result in the app crashing, but wondering if this can be resolved?
Android 7.1.2, Nexus 6P.
PathsenseLocationProviderApi api = PathsenseLocationProviderApi.getInstance(this);
api.addGeofence(geofenceId, latLng.latitude, latLng.longitude, (int) radius, GeofenceTrasitionReceiver.class);
java.lang.ClassCastException: com.pathsense.locationengine.lib.models.data.t cannot be cast to com.pathsense.locationengine.lib.models.data.m
at com.pathsense.locationengine.apklib.locationEngine.serviceControllers.d.a(Unknown Source)
at com.pathsense.locationengine.apklib.locationEngine.serviceControllers.f.a(Unknown Source)
at com.pathsense.locationengine.lib.detectionLogic.sensorCore.d.a(Unknown Source)
at com.pathsense.locationengine.lib.detectionLogic.sensorCore.c.d(Unknown Source)
at com.pathsense.locationengine.lib.detectionLogic.a$a.run(Unknown Source)
at com.pathsense.locationengine.lib.concurrent.e.run(Unknown Source)
at com.pathsense.locationengine.apklib.concurrent.c$a.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6121)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
override resource drawable by adding the following
drawable/icon_name.png
Hi again great team,
your solution works perfect, thanks again.
But we face a battery problem with your geofence feature, it drains battery up to 35% alone.
Is there anything we can do to decrease battery consumption while geofence feature is used?
Your help will be really appreciated, thanks again.
Detail:
We use Pathsense library in our app within a service (our specific service) named "ChildService"
And we defined API in this service as below:
final PathsenseLocationProviderApi api = PathsenseLocationProviderApi.getInstance(ChildService.this);
Once we defined the API, Pathsense LocationEngineService begins to run.
And when this service is run it drains battery needlessly although no geofence is added.
We couldn't find a way to prevent this.
Also, if geofence is not added we used destroy() method of your API. And we defined API again when geofence is added as described above. But when we destroyed and redefined the API, geofences did not run properly.
Could you please help, thanks.
i have called PathsenseLocationProviderApi.getInstance(this).requestInVehicleLocationUpdates();
and registered my receiver in manifest,but i can't receive the broadcast,
Hi, anyone looking for a decent SDK that implements the Android ActivityRecognition API and stumbled upon this?
Anyone know if it works on the latest versions of Android?
Thanks!
Android: 6.0
Android Build: EMUI4.0_H60-L02_6.5.1
Manufacturer: HUAWEI
Model: H60-L02
Thread: main-1
java.lang.IllegalArgumentException: provider doesn't exist: network
at android.os.Parcel.readException(Parcel.java:1606)
at android.os.Parcel.readException(Parcel.java:1555)
at android.location.ILocationManager$Stub$Proxy.requestLocationUpdates(ILocationManager.java:606)
at android.location.LocationManager.requestLocationUpdates(LocationManager.java:880)
at android.location.LocationManager.requestLocationUpdates(LocationManager.java:464)
at com.pathsense.locationengine.apklib.data.k.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:5546)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684)
I am not able to find any method to specify location interval, similar to: requestLocationUpdates
Is it possible to specify location interval while listening to location updates? if it is not possible then at what interval path-sense SDK request location updates from OS.
The notification is always there, but not in a group and when user tap it, nothing happens. This is not what a user expects.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.