You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
@tobrun Unfortunately I can't see a way around this. Using background services on Android requires a <service> in the manifest.
We can add a check in MapView that will throw if the service has not started with a description that explains they need to add the service to the manifest.
Activity
ljbade commentedon Sep 25, 2015
Will be working on the
android-metricsbranch.First step will be to define a POJ
Eventsobject that will hold our supported data.I will copy the iOS properties for the moment, but will need to go back and work out more Android specific properties.
ljbade commentedon Sep 25, 2015
Next is to create the singleton
EventManager.ljbade commentedon Sep 25, 2015
Hmm looking at the Android docs we want to use a background service to handle event processing and uploading.
ljbade commentedon Sep 25, 2015
I created a
EventServicethat end developers will have to add to their application manifest.It is started by
EventManager.pushEventand will return a status viaLocalBroadcastManager.The
EventServicewill handle the data upload.tobrun commentedon Sep 25, 2015
This is great 👍
Just one minor remark:
I'm personally not a big fan of this, if end developer ignore this we will not receive any metrics..
ljbade commentedon Sep 25, 2015
@tobrun Unfortunately I can't see a way around this. Using background services on Android requires a
<service>in the manifest.We can add a check in
MapViewthat will throw if the service has not started with a description that explains they need to add the service to the manifest.ljbade commentedon Sep 25, 2015
Anyway current branch has very rough
EventManagerthat manages to upload a turnstile event and gets a HTTP 400 back from the server.Things to work on:
EventManagerorMapViewEventManagersingleton again (once we remove access key topushEvent)tobrun commentedon Sep 25, 2015
If we execute an Asynctask in pushEvent() we could remove dependency on Service.
During singleton creation it is better to enforce the application context
tobrun commentedon Jan 11, 2016
I believe this issue is out of date and is tracked elsewhere.
cc @bleege