Code Monkey home page Code Monkey logo

pathsense-samples-android's People

Contributors

dfinlay avatar dyerjo avatar pablobaxter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pathsense-samples-android's Issues

Bad notification for startForeground on Android 8.0

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.

Notification is stuck

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

Crash on API 27

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)

pathsense cuts battery drain location

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.

Latency

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.

Does not work for the locked device?

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?

Notification settings ignored

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

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?

Only Enter or Exit

Is it possible to add Geofences to the API with the option to trigger only exit or enter events?

Adding Geofence causes ClassCastException

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)

Battery drain issue

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.

can't receive the broadcast

i have called PathsenseLocationProviderApi.getInstance(this).requestInVehicleLocationUpdates();
and registered my receiver in manifest,but i can't receive the broadcast,

Is this project still alive?

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!

java.lang.IllegalArgumentException: provider doesn't exist: network

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)

Configure location update Interval

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.