Giter VIP home page Giter VIP logo

Comments (41)

teamherois avatar teamherois commented on June 7, 2024

I have upgrade to the most recent version of the plugin - installed is version 2.0.4

from cordova-background-geolocation-sampleapp.

christocracy avatar christocracy commented on June 7, 2024

When the app is destroyed, the plugin clearly knows its not supposed to stopOnTerminate. It's completely in the OS's hands to restart the app. There's nothing else you or I can do. Before being destroyed, the plugin successfully created a geofence around its last position. iOS persists geofence monitoring automatically. An iOS geofence will respond even after application kill or device reboot.

Aug  5 10:32:52 74-80-239-249 Software_Studio_Geolocation_Plugin[6530]: ╔═════════════════════════════════════════════════
Aug  5 10:32:52 74-80-239-249 Software_Studio_Geolocation_Plugin[6530]: ║TSLocationManager ► Destroy
Aug  5 10:32:52 74-80-239-249 Software_Studio_Geolocation_Plugin[6530]: ╠═════════════════════════════════════════════════
Aug  5 10:32:52 74-80-239-249 Software_Studio_Geolocation_Plugin[6530]: ╟─ stopOnTerminate: 0
Aug  5 10:32:52 74-80-239-249 Software_Studio_Geolocation_Plugin[6530]: ► Motion-detector: OFF
Aug  5 10:32:52 74-80-239-249 Software_Studio_Geolocation_Plugin[6530]: ✓ create stationary geofence, radius: 32

You app will be killed for a period, until the device responds to a "significant location change". Only then will iOS re-awaken your app. For me, this typically takes 100-200 meters of movement beyond the point where app was killed (tested all over the world).

It's actually a harder problem to keep the app from coming awake when stopOnTerminate: true.

from cordova-background-geolocation-sampleapp.

teamherois avatar teamherois commented on June 7, 2024

Hi Chris,

thanks for the quick response. My problem - the app is coming awake (he's the relevant segment of the log above):

Aug 5 10:33:17 74-80-239-249 Software_Studio_Geolocation_Plugin[6896]: Apache Cordova native platform version 3.9.1 is starting.
Aug 5 10:33:17 74-80-239-249 Software_Studio_Geolocation_Plugin[6896]: Multi-tasking -> Device: YES, App: YES <<========= Restart tof the app.....
Aug 5 10:33:17 74-80-239-249 Software_Studio_Geolocation_Plugin[6896]: Unlimited access to network resources

(that's Cordova waking up my app - and the "unlimited ccess to network resources" is from a console log in the UIController framerwork from Cordova). These events appear in my log - immediately after the terminate event above - and then I tell the simulator - to simulate a 'freeway drive' in my location (SanFrancisco)

the challenge seems to be - what happens from there - the IOS docs - which I'm sure you are deeply familiar with here (https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/LocationAwarenessPG/CoreLocation/CoreLocation.html#//apple_ref/doc/uid/TP40009497-CH2-SW16) - states that it's on me (or the plugin) to relaunch the location services.

I'm guessing that your plugin has the hooks referred to in the article - I'm wondering if the Cordova lib for jQuery is not passing along the request to my app when in headless mode? or do I need to have the jQuery equivalent of onPlatformReady - to relaunch and configure the plugin.

On the jQuery side I'm used to attaching to an 'onDeviceReady' event - however, based on my testing - where I have a log event at the top of onDeviceReady - onDeviceReady is never firing.

Any hints? ways to debug? If this is again - a consulting request - my client has authorized my spending their funds - on resolving this issue.

So - summarizing - the App is in fact restarting - however, it never fires the onDeviceReady event - or actually consumes my javascript code - that should restart the Geo-Activity.

thanks !
Bruce

from cordova-background-geolocation-sampleapp.

teamherois avatar teamherois commented on June 7, 2024

( ps - I did follow your earlier suggestion on tried to hook into the reload event on the page - that also did not prove fruitful as it does not seem my application pages are actually loading

from cordova-background-geolocation-sampleapp.

christocracy avatar christocracy commented on June 7, 2024

I'm not responsible for Cordova event-ready. The only thing the plugin is responsible for is creating a geofence before it dies so that iOS will re-awaken the app when the device moves beyond that geofence.

Are you sure you don't have a Javascript error in your app code?

from cordova-background-geolocation-sampleapp.

christocracy avatar christocracy commented on June 7, 2024

You can see me demo this behaviour in the Demo Video here. Scroll to bottom.

from cordova-background-geolocation-sampleapp.

teamherois avatar teamherois commented on June 7, 2024

Chris,

thank you again for the continued quick responses.

  1. Agreed you don't have responsibility for Cordova event ready.

2.. I've reviewed the code ad-nauseum. It runs in background mode without issue. In terms of running if headless mode - I'm all ears on how I would determine if it will function headless without issue or ensuring there are no code issues (Agree that I could be overlooking something). I've taken out all of the extra code - and left it extremely simple (in the original post).

  1. I know your sample app does the work - I've loaded it in the xCode and run it. It is Iconic framework.
  2. I guess the question I have boils down to :
  3. Have anyone using a jQuery template - successful with restarting their app and Geo?
  4. Advice on who can provide the expertise to help debug the issue with the app not loading pages or firing the onDeviceReady method?

from cordova-background-geolocation-sampleapp.

christocracy avatar christocracy commented on June 7, 2024

There is no headless with iOS, only Android.

On Friday, August 5, 2016, teamherois [email protected] wrote:

Chris,

thank you again for the continued quick responses.

  1. Agreed you don't have responsibility for Cordova event ready.

2.. I've reviewed the code ad-nauseum. It runs in background mode without
issue. In terms of running if headless mode - I'm all ears on how I would
determine if it will function headless without issue or ensuring there are
no code issues (Agree that I could be overlooking something). I've taken
out all of the extra code - and left it extremely simple (in the original
post).

I know your sample app does the work - I've loaded it in the xCode and
run it. It is Iconic framework.
2.

I guess the question I have boils down to :

  1. Have anyone using a jQuery template - successful with restarting
    their app and Geo?
  2. Advice on who can provide the expertise to help debug the issue
    with the app not loading pages or firing the onDeviceReady method?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA6l1tERAslDGvHtWUy1QM_gzSNZu9Cks5qc4ZlgaJpZM4Jd5oB
.

Snet form Gmail Mobile

from cordova-background-geolocation-sampleapp.

teamherois avatar teamherois commented on June 7, 2024

Thanks - good information.

Open question - have you tried or know of any that has successfully implemented re-start features in jQuery ?

from cordova-background-geolocation-sampleapp.

teamherois avatar teamherois commented on June 7, 2024

Chris, In your sample app - can you please tell me how you are restarting geo-services - if the plugin is not doing this , then your sample app is doing this - I just cannot find the code in either the plugin or the app:

From the IOS App guide on restarting location services:

If you are monitoring regions or using the significant-change location service in your app, there are situations where you must start location services at launch time. Apps using those services can be terminated and subsequently relaunched when new location events arrive. Although the app itself is relaunched, location services are not started automatically. When an app is relaunched because of a location update, the launch options dictionary passed to your application:willFinishLaunchingWithOptions: or application:didFinishLaunchingWithOptions: method contains the UIApplicationLaunchOptionsLocationKey key.

The presence of that key signals that new location data is waiting to be delivered to your app. To obtain that data, you must create a new CLLocationManager object and restart the location services that you had running prior to your app’s termination. When you restart those services, the location manager delivers all pending location updates to its delegate.

That's found here:
https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/LocationAwarenessPG/CoreLocation/CoreLocation.html#//apple_ref/doc/uid/TP40009497-CH2-SW16

The code I'm searching for is a some sort of reference to UIApplicationLaunchOptionsLocationKey ?

If I need to build something I my side to enable this - can you point me to what needs to be built?

Best,
Bruce

from cordova-background-geolocation-sampleapp.

christocracy avatar christocracy commented on June 7, 2024

You are over-thinking this. If you want to continue tracking when user
closes app, all you need to do is stopOnTerminate: false, that's it.

You don't need to think about "re-start". If the app is closed while still
enabled with stopOnTerminate: false, it will automatically restart tracking
as soon as the app relaunches.

On Friday, August 5, 2016, teamherois [email protected] wrote:

Thanks - good information.

Open question - have you tried or know of any that has successfully
implemented re-start features in jQuery ?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA6lxGru1fe2mD8Tt_sCfCgOgJ8OiBfks5qc43OgaJpZM4Jd5oB
.

Snet form Gmail Mobile

from cordova-background-geolocation-sampleapp.

christocracy avatar christocracy commented on June 7, 2024

Go here and watch the video (scroll to bottom)
http://shop.transistorsoft.com/pages/cordova-background-geolocation-premium

from cordova-background-geolocation-sampleapp.

teamherois avatar teamherois commented on June 7, 2024

Chris, I've done the watching of the video.

I'd love to not overthink this !

I''ve passed the correct flag to the IOS side....:

Here's my jSON options object I'm passing at configure time:

oOptions = {
desiredAccuracy: 0,
stationaryRadius: 20,
startOnBoot: true,
stopTimeout: 5,
stopDetectionDelay: 3,
distanceFilter: nDistanceFilter,
locationUpdateInterval: nGPSLogFrequency,
activityRecognitionInterval: nGPSLogFrequency,
fastestLocationUpdateInterval: nFastest,
activityType: 'Other',
debug: bDebug, // <-- enable this hear sounds for background-geolocation life-cycle.
//url : sUrl ,
//params : oGeoObject2Post,
//headers : oHeaders,
stopOnTerminate: false
}

The log above shows the app shutting down. Setting the stationary fence - and then attempting to do a restart.

The app then restarts with the messages shown above and copied back here:

Aug 5 10:33:17 74-80-239-249 Software_Studio_Geolocation_Plugin[6896]: Apache Cordova native platform version 3.9.1 is starting.
Aug 5 10:33:17 74-80-239-249 Software_Studio_Geolocation_Plugin[6896]: Multi-tasking -> Device: YES, App: YES <<========= Restart tof the app.....
Aug 5 10:33:17 74-80-239-249 Software_Studio_Geolocation_Plugin[6896]: Unlimited access to network resources

but then geo-location services do not restart.

Next step would be? (Earlier in this thread you asked me to take a fresh look at my code to ensure there are no errors .... I've done that..) - so - you're still of the belief - that there's an error in my code if it's not restarting??

from cordova-background-geolocation-sampleapp.

teamherois avatar teamherois commented on June 7, 2024

here's the plugin responding in my log to the configure event:

╠═════════════════════════════════════════════════
2016-08-06 10:46:24.578 Software_Studio_Geolocation_Plugin[17555:115830] ╟─ {
activityRecognitionInterval = 30000;
activityType = 1;
autoSync = 1;
batchSync = 0;
debug = 1;
desiredAccuracy = "-1";
disableElasticity = 0;
disableMotionActivityUpdates = 0;
disableStopDetection = 0;
distanceFilter = 30;
enabled = 1;
extras = 0;
headers = 0;
heartbeatInterval = 60;
isMoving = 0;
locationTimeout = 60;
maxBatchSize = "-1";
maxDaysToPersist = 1;
maxRecordsToPersist = "-1";
method = POST;
params = 0;
pausesLocationUpdatesAutomatically = 0;
preventSuspend = 0;
schedule = 0;
schedulerEnabled = 0;
startOnBoot = 1;
stationaryRadius = 25;
stopAfterElapsedMinutes = "-1";
stopDetectionDelay = 3;
stopOnTerminate = 0;
stopTimeout = 300;
url = 0;
useSignificantChangesOnly = 0;
}

from cordova-background-geolocation-sampleapp.

teamherois avatar teamherois commented on June 7, 2024

and here's a simplified - even further slimmed down version of my Geo-code:

var berror = false;
var obluemarker;
var bgeoon = false;
var nlastloggedtime = 0;
var ngpsage = 60000;
var bstarted = false;
var BackgroundGeoLocation;
var dLastGeoPoint = new Date();
var dLastMotionPoint = new Date();
//var oGeoObject2Post = Apperyio.getModel('oGeo2Log');

dLastGeoPoint.setDate(dLastGeoPoint.getDate() - 1);

function fwatchmyposition() {
console.log("++++++++++++++++++++++++Starting Software Studion GeoLocation Plugin++++++++++++++++++++++++++++++++++++++++++++++++");
var adata;
var aSW;
var aNE;
var oSW;
var oNE;
var oOptions;
var nDistanceFilter = 30;
var nGPSLogFrequency = 30000;
var bDebug = true;
var sUrl = "https://api.appery.io/rest/1/db/collections/GeoEventHistory";
var nFastest = nGPSLogFrequency - 5000;
//alert('In FWatchMyPosition-');
console.trace() ;
// I. Set up background geolocation....
console.log('_Starting call to background GeoLocation......');
if ( (BackgroundGeoLocation === undefined || BackgroundGeoLocation === null) && window.BackgroundGeolocation !== undefined ) {
console.log('_
_assigning background geolocation from window....');
BackgroundGeoLocation = window.BackgroundGeolocation;
}
if (BackgroundGeoLocation !== undefined) {
console.log('_
_using IOS configuration.....');
oOptions = {
desiredAccuracy: 0,
stationaryRadius: 20,
startOnBoot: true,
stopTimeout: 5,
stopDetectionDelay: 3,
distanceFilter: nDistanceFilter,
locationUpdateInterval: nGPSLogFrequency,
activityRecognitionInterval: nGPSLogFrequency,
fastestLocationUpdateInterval: nFastest,
activityType: 'Other',
debug: bDebug, // <-- enable this hear sounds for background-geolocation life-cycle.
//url : sUrl ,
//params : oGeoObject2Post,
//headers : oHeaders,
stopOnTerminate: false // <-- enable this to clear background location settings when the app terms
}
try {
console.log('_
_Starting Geolocation configure event....');
console.log(JSON.stringify(oOptions));
var bResult = fStartMotionServices();
BackgroundGeoLocation.configure(oOptions, fStartGeo, geoFailureFN);
//BackgroundGeoLocation.configure(fStartGeo, geoFailureFn, oOptions);
} catch (e) {
//alert('Error turning on Geolocation configuration: ' + e);
console.log('
_
*********_Error turning on Geolocation....');
}
//fUpdateGeoStructure();
} else {
console.log('
_*************Background Geolocation function not found....');
}
return;
}

function fRestartGeo( sMethod ) {
var bResult = false;
var bRestart = fLocalGet('bInSuspendMode', 'boolean');
console.log('_In Geolocation restart method - for Method:' + sMethod + " and restart is set to :" + bRestart,toString() );
if ( !bRestart ) {
console.log('_*************_Not in restart mode....');
return false;
}
if (fLocalGet('bRestartingGeo', 'boolean')) {
console.log('_*************_Geo Restart already in progress...');
return false;
}
fLocalSet('bRestartingGeo', true);
if ((BackgroundGeoLocation === undefined || BackgroundGeoLocation === null) && window.window.BackgroundGeolocation !== undefined ) {
console.log('_
_attempting to restart geolocation...')
fwatchmyposition();
console.log('_
**************_Geo restart complete');
} else {
console.log('
_*******************Background Geolocation already started or is undefined...');
}
fLocalSet('bRestartingGeo', 'false');
}

function fturnoffgeowatch(bForReal) {
//navigator.geolocation.clearWatch(geowatchID);
//geowatchID = 0;
if (bForReal === undefined || bForReal === null) {
bForReal = false;
}
if (BackgroundGeoLocation !== undefined && bForReal) {
BackgroundGeoLocation.stop();
localStorage.setItem('bGeoOn', false);
//BackgroundGeoLocation = undefined ;
}
return;
}

function fStartGeo(state) {
bgeoon = true;
localStorage.setItem('bGeoOn', true);
console.log('_background Geolocation configuration success');
console.log('_
_- Current state: ', state);
console.log('
__- Geolocation - asking question - Am I enabled (should be not yet - false)?', state.enabled);
if (!state.enabled || state.enabled === undefined) {
try {
BackgroundGeoLocation.start() //fStartMotionServices); //geoCallbackFn, geoFailureFn);
console.log('_
_started background GeoLocation');
} catch (e) {
console.log('_
********_Unable to start BackgroundGeoLocation Function...');
}
} else {
// services already started.... start the motion services....
console.log('
_************************background geoLocation already enabled...');
}
}

function fStartMotionServices() {
console.log('_starting-re-configuring Motion and Location change services....');
BackgroundGeoLocation.onLocation(fgeoCallbackFn);
console.log('_
_starting on motion services....');
BackgroundGeoLocation.onMotionChange(fGeoMotionCallback);
console.log('
*_****************Complete with configure of location serverice and motion change services');
}

function fgeoCallbackFn(oLocation, nTaskID) {
console.log('***************_Processing Location The task id is :' , nTaskID );
console.log('
_***************Location change sensed-location is: ' + JSON.stringify( oLocation ) + 'task id: ' + nTaskID.toString() )
fFinishGeo( nTaskID ) ;
}

function fGeoMotionCallback(bIsMoving, oLocation, nTaskID ) {
// called when the device stops or starts.....
fLocalSet('bIsMoving', bIsMoving);
//
// log a geoEvent for the display - for sure here....
//
console.log('******************motion change sensed - location is: ' + JSON.stringify( oLocation ) + 'task id: ' + nTaskID.toString() )
fFinishGeo(nTaskID);
}

function geoFailureFN(error) {
console.log("******************Error starting geolocation ....:" );
}

function fFinishGeo(nTask) {
console.log('******************finishing call to geoLocation for ' + nTask);
if (BackgroundGeoLocation !== undefined) {
BackgroundGeoLocation.finish(nTask); // call the finish routine directly
}
return;
}

from cordova-background-geolocation-sampleapp.

teamherois avatar teamherois commented on June 7, 2024

Here's more analysis, as this feature will not work with my app - despite slimming this down - to the absolute bare minimum code.

1. When the app starts in the foreground here are the first 10 lines in the system log:

Aug 7 19:00:20 74-80-239-249 Software_Studio_Geolocation_Plugin[9094]: Apache Cordova native platform version 3.9.1 is starting.
Aug 7 19:00:20 74-80-239-249 Software_Studio_Geolocation_Plugin[9094]: Multi-tasking -> Device: YES, App: YES
Aug 7 19:00:20 74-80-239-249 Software_Studio_Geolocation_Plugin[9094]: Unlimited access to network resources
Aug 7 19:00:20 74-80-239-249 assertiond[9030]: assertion failed: 15G31 13E230: assertiond + 15801 [3C808658-78EC-3950-A264-79A64E0E463B]: 0x1
Aug 7 19:00:20 --- last message repeated 1 time ---
Aug 7 19:00:20 74-80-239-249 Software_Studio_Geolocation_Plugin[9094]: [CDVTimer][backgroundfetch] 0.334024ms<===== First log Entry after start when normal start occurs

Aug 7 19:00:20 74-80-239-249 Software_Studio_Geolocation_Plugin[9094]: [CDVTimer][TotalPluginStartup] 0.611961ms

When the app is restarted - the log looks like this:

Aug 7 19:05:28 74-80-239-249 Software_Studio_Geolocation_Plugin[9225]: Apache Cordova native platform version 3.9.1 is starting.
Aug 7 19:05:28 74-80-239-249 Software_Studio_Geolocation_Plugin[9225]: Multi-tasking -> Device: YES, App: YES
Aug 7 19:05:28 74-80-239-249 Software_Studio_Geolocation_Plugin[9225]: Unlimited access to network resources
Aug 7 19:05:28 74-80-239-249 assertiond[9154]: assertion failed: 15G31 13E230: assertiond + 15801 [3C808658-78EC-3950-A264-79A64E0E463B]: 0x1
Aug 7 19:06:08 --- last message repeated 1 time ---
Marker - Aug 7, 2016, 7:06:51 PM

of note - the call/log entry to background fetch - and the entry to totalpluginStartup does not occur.

Questions:

  1. Is the backgroundfetch plugin required at startup? Is this the plugin that you recently added to your plugin?
  2. If the application is not running backgroundfetch - since it is in the background at startup - and the plugin restart is taking too long - is there a way to extend the wait period?

Restart is clearly not working - for some reason that appears to be totally out of my control. It may indeed be also out of your control. Please advise.

Best,

ZBruce

from cordova-background-geolocation-sampleapp.

christocracy avatar christocracy commented on June 7, 2024

Try the SampleApp. Don't even look at the code. Just follow the
directions and boot it

On Sunday, August 7, 2016, teamherois [email protected] wrote:

Here's more analysis, as this feature will not work with my app - despite
slimming this down - to the absolute bare minimum code.

  1. When the app starts in the foreground here are the first 10 lines in
    the system log:

Aug 7 19:00:20 74-80-239-249 Software_Studio_Geolocation_Plugin[9094]:
Apache Cordova native platform version 3.9.1 is starting.
Aug 7 19:00:20 74-80-239-249 Software_Studio_Geolocation_Plugin[9094]:
Multi-tasking -> Device: YES, App: YES
Aug 7 19:00:20 74-80-239-249 Software_Studio_Geolocation_Plugin[9094]:
Unlimited access to network resources
Aug 7 19:00:20 74-80-239-249 assertiond[9030]: assertion failed: 15G31
13E230: assertiond + 15801 [3C808658-78EC-3950-A264-79A64E0E463B]: 0x1
Aug 7 19:00:20 --- last message repeated 1 time ---
Aug 7 19:00:20 74-80-239-249 Software_Studio_Geolocation_Plugin[9094]:
[CDVTimer][backgroundfetch] 0.334024ms<===== First log Entry after start
when normal start occurs
Aug 7 19:00:20 74-80-239-249 Software_Studio_Geolocation_Plugin[9094]:
[CDVTimer][TotalPluginStartup] 0.611961ms

When the app is restarted - the log looks like this:

Aug 7 19:05:28 74-80-239-249 Software_Studio_Geolocation_Plugin[9225]:
Apache Cordova native platform version 3.9.1 is starting.
Aug 7 19:05:28 74-80-239-249 Software_Studio_Geolocation_Plugin[9225]:
Multi-tasking -> Device: YES, App: YES
Aug 7 19:05:28 74-80-239-249 Software_Studio_Geolocation_Plugin[9225]:
Unlimited access to network resources
Aug 7 19:05:28 74-80-239-249 assertiond[9154]: assertion failed: 15G31
13E230: assertiond + 15801 [3C808658-78EC-3950-A264-79A64E0E463B]: 0x1
Aug 7 19:06:08 --- last message repeated 1 time ---
Marker - Aug 7, 2016, 7:06:51 PM

of note - the call/log entry to background fetch - and the entry to
totalpluginStartup does not occur.

Questions:

Is the backgroundfetch plugin required at startup? Is this the plugin
that you recently added to your plugin?
2.

If the application is not running backgroundfetch - since it is in the
background at startup - and the plugin restart is taking too long - is
there a way to extend the wait period?

Restart is clearly not working - for some reason that appears to be
totally out of my control. It may indeed be also out of your control.
Please advise.

Best,

ZBruce


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA6l90VsyxhD7y77FVHNKjRSRYv74xFks5qdpPYgaJpZM4Jd5oB
.

Snet form Gmail Mobile

from cordova-background-geolocation-sampleapp.

christocracy avatar christocracy commented on June 7, 2024

https://github.com/transistorsoft/cordova-background-geolocation-SampleApp

On Sunday, August 7, 2016, Chris Scott [email protected] wrote:

Try the SampleApp. Don't even look at the code. Just follow the
directions and boot it

On Sunday, August 7, 2016, teamherois <[email protected]
javascript:_e(%7B%7D,'cvml','[email protected]');> wrote:

Here's more analysis, as this feature will not work with my app - despite
slimming this down - to the absolute bare minimum code.

  1. When the app starts in the foreground here are the first 10 lines in
    the system log:

Aug 7 19:00:20 74-80-239-249 Software_Studio_Geolocation_Plugin[9094]:
Apache Cordova native platform version 3.9.1 is starting.
Aug 7 19:00:20 74-80-239-249 Software_Studio_Geolocation_Plugin[9094]:
Multi-tasking -> Device: YES, App: YES
Aug 7 19:00:20 74-80-239-249 Software_Studio_Geolocation_Plugin[9094]:
Unlimited access to network resources
Aug 7 19:00:20 74-80-239-249 assertiond[9030]: assertion failed: 15G31
13E230: assertiond + 15801 [3C808658-78EC-3950-A264-79A64E0E463B]: 0x1
Aug 7 19:00:20 --- last message repeated 1 time ---
Aug 7 19:00:20 74-80-239-249 Software_Studio_Geolocation_Plugin[9094]:
[CDVTimer][backgroundfetch] 0.334024ms<===== First log Entry after start
when normal start occurs
Aug 7 19:00:20 74-80-239-249 Software_Studio_Geolocation_Plugin[9094]:
[CDVTimer][TotalPluginStartup] 0.611961ms

When the app is restarted - the log looks like this:

Aug 7 19:05:28 74-80-239-249 Software_Studio_Geolocation_Plugin[9225]:
Apache Cordova native platform version 3.9.1 is starting.
Aug 7 19:05:28 74-80-239-249 Software_Studio_Geolocation_Plugin[9225]:
Multi-tasking -> Device: YES, App: YES
Aug 7 19:05:28 74-80-239-249 Software_Studio_Geolocation_Plugin[9225]:
Unlimited access to network resources
Aug 7 19:05:28 74-80-239-249 assertiond[9154]: assertion failed: 15G31
13E230: assertiond + 15801 [3C808658-78EC-3950-A264-79A64E0E463B]: 0x1
Aug 7 19:06:08 --- last message repeated 1 time ---
Marker - Aug 7, 2016, 7:06:51 PM

of note - the call/log entry to background fetch - and the entry to
totalpluginStartup does not occur.

Questions:

Is the backgroundfetch plugin required at startup? Is this the plugin
that you recently added to your plugin?
2.

If the application is not running backgroundfetch - since it is in
the background at startup - and the plugin restart is taking too long - is
there a way to extend the wait period?

Restart is clearly not working - for some reason that appears to be
totally out of my control. It may indeed be also out of your control.
Please advise.

Best,

ZBruce


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA6l90VsyxhD7y77FVHNKjRSRYv74xFks5qdpPYgaJpZM4Jd5oB
.

Snet form Gmail Mobile

Snet form Gmail Mobile

from cordova-background-geolocation-sampleapp.

christocracy avatar christocracy commented on June 7, 2024

And please learn to format code with markdown syntax

from cordova-background-geolocation-sampleapp.

teamherois avatar teamherois commented on June 7, 2024

Hi Chris,

Following the instructions - and only because it may be relevant - is there a presumption that the plugin will be used with Versions of Cordova at or above 4.0 ?

(whitelist plugin seems to suggest that 4.0 or above is being used...)..

Bruce

from cordova-background-geolocation-sampleapp.

christocracy avatar christocracy commented on June 7, 2024

Ignore whitelist. Use v5+.

from cordova-background-geolocation-sampleapp.

teamherois avatar teamherois commented on June 7, 2024

and if my 'builder' (from Appery.io) is using Cordova V. 3.9.1 IOS as a 'built in' framework - is this a non-starter - or just a possible suspect then ?

from cordova-background-geolocation-sampleapp.

christocracy avatar christocracy commented on June 7, 2024

If Appery.io is stuck at 3.9.1, they need to be publicly shamed for not
caring about their customers. Cordova is @ 6.3.0

You need Cordova >= 5.0 to build Android.

Nevertheless, I built background-fetch plugin over 3 years ago on iOS 7 and
Cordova 3.0.

On Monday, August 8, 2016, teamherois [email protected] wrote:

and if my 'builder' (from Appery.io) is using Cordova V. 3.9.1 IOS as a
'built in' framework - is this a non-starter - or just a possible suspect
then ?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA6l4Mnvp8PlLFxYFUWQ7C7Hk3RRiDLks5qd-B2gaJpZM4Jd5oB
.

Snet form Gmail Mobile

from cordova-background-geolocation-sampleapp.

christocracy avatar christocracy commented on June 7, 2024

11 months ago, someone was prompting Appery.io about requirements to
support my stuff:

Their platform is seriously complete crap. If they haven't got it together
after nearly a year...

https://c.getsatisfaction.com/apperyio/topics/what-is-the-status-of-a-new-upcoming-import-wizard-that-max-is-talking-about

On Monday, August 8, 2016, Chris Scott [email protected] wrote:

If Appery.io is stuck at 3.9.1, they need to be publicly shamed for not
caring about their customers. Cordova is @ 6.3.0

You need Cordova >= 5.0 to build Android.

Nevertheless, I built background-fetch plugin over 3 years ago on iOS 7
and Cordova 3.0.

On Monday, August 8, 2016, teamherois <[email protected]
javascript:_e(%7B%7D,'cvml','[email protected]');> wrote:

and if my 'builder' (from Appery.io) is using Cordova V. 3.9.1 IOS as a
'built in' framework - is this a non-starter - or just a possible suspect
then ?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA6l4Mnvp8PlLFxYFUWQ7C7Hk3RRiDLks5qd-B2gaJpZM4Jd5oB
.

Snet form Gmail Mobile

Snet form Gmail Mobile

from cordova-background-geolocation-sampleapp.

teamherois avatar teamherois commented on June 7, 2024

Chris, respect your opinion and I get that. They do now support the import wizard - and your plugin comes in flawlessly (with this exception) and works wonderfully except sadly as noted here.

So - I guess the best I can say here is that they 'sort of' support your stuff - because I've succeeded right to this point.

I just prompted their support (This will be my 3rd ticket to them on this as well) to see if moving to their Ionic builder (since your example app works on the Ionic platform) will cure the issue (or if for some compatibility issue - they are on an older platform there as well).

I appreciate your help here immensely. In terms of a path forward - I'm going to try to bring your code in your www folder into their builder (which turns off code generation) and try to build your code on their builder.

I'm not sure that will help me much as what I'm looking for is a jQuery app that runs on Cordova 3.9.1 and includes your geoLocation code. I will try to rebuild my code and my sample app on Ionic (they support that now) - and my guess is - that will work just fine.

I'll then be left with porting my other app ( not the sample one which I was building just to remove any and all possible code that might make debugging this issue hard - but the one for my client) which was an alpha test version anyway - on the Ionic platform.

On the positive side - if I get this to work - I will be touting the features of your platform and most excellent support - on the Appery forum (which you referred to above - and where I am reasonably active) to anyone looking for a solution to their geolocation requirements. (under my user name - Bruce Stuart).... which is how I met the client I am currently doing work for (by recommending your platform based on my use for a previous client last summer-fall ).

Best,

bruce

from cordova-background-geolocation-sampleapp.

teamherois avatar teamherois commented on June 7, 2024

I've moved my IOS version down to 8.4 in an attempt to get different behaviors in the logs - to give additional hints to what's happening.

so - App does appear to restart - and - it throws this error in the log - after the restart (but does not restart geo-tracking):

74-80-239-249.ic2net.net assertiond[7372]: could not create or rename power assertion for <BKNewProcess: 0x7f864ac0d190; io.appery.app.SoftwareStudioGeoPlugin; pid: 7488; hostpid: -1>: 0xe00002c9

That's what's being thrown into the log repeatedly. Any idea what might be going on?

from cordova-background-geolocation-sampleapp.

christocracy avatar christocracy commented on June 7, 2024

Nothing to do with the plugin.

from cordova-background-geolocation-sampleapp.

teamherois avatar teamherois commented on June 7, 2024

The BkNewProcess - based on a couple of quick searches (which admittedly I won't hang my hat on) - yields that a background process - which is launching - is taking too much time at startup of that process in the background.

Any chance it's - back to the this thread from yesterday - the BackgroundFetch? Is there an older version of the plugin - that doesn't use background fetch ? or is that something that's been designed in from day 1 ?

I still have your .5 plugin version from last year - hesitant to put it into this - however, will do so if you think it's time well spent.... I'd need to revert to an older version of code to launch it... I'm sure.

from cordova-background-geolocation-sampleapp.

christocracy avatar christocracy commented on June 7, 2024

Background-fetch is not a problem. It's barely a hundred lines of Obj-c code. You have no idea how simple this thing is. BackgroundGeolocation is probably ~7000 lines.

It's probably one of the simplest Cordova plugin's you'll ever find; barely more complex than a Hello World.

from cordova-background-geolocation-sampleapp.

teamherois avatar teamherois commented on June 7, 2024

Thanks. Chris - what's the lowest version of Cordova that you believe the plugin will support? Do you believe it will run effectively on my 3.9.1 version ? The Appery team has told me they believe you are requiring 4.x and above? True statement or ??

from cordova-background-geolocation-sampleapp.

christocracy avatar christocracy commented on June 7, 2024

The Android plugin requires Gradle to build. You need minimum Cordova 5.

On Fri, Aug 12, 2016 at 1:08 PM, teamherois [email protected]
wrote:

Thanks. Chris - what's the lowest version of Cordova that you believe the
plugin will support? Do you believe it will run effectively on my 3.9.1
version ? The Appery team has told me they believe you are requiring 4.x
and above? True statement or ??


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA6lzSKm13NxMz4Km938fj_WmXYwA3lks5qfKiDgaJpZM4Jd5oB
.

Chris Scott
Transistor Software http://www.transistorsoft.com

from cordova-background-geolocation-sampleapp.

teamherois avatar teamherois commented on June 7, 2024

thanks - Minimum version on IOS then is also Cordova 5 ?

from cordova-background-geolocation-sampleapp.

christocracy avatar christocracy commented on June 7, 2024

iOS is fine with Cordova 4.

On Fri, Aug 12, 2016 at 1:30 PM, teamherois [email protected]
wrote:

thanks - Minimum version on IOS then is also Cordova 5 ?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA6l2j5uN_xH7IadckNUVu4I-XOw8_zks5qfK2dgaJpZM4Jd5oB
.

Chris Scott
Transistor Software http://www.transistorsoft.com

from cordova-background-geolocation-sampleapp.

teamherois avatar teamherois commented on June 7, 2024

but likely not 3.9.1 then ?

from cordova-background-geolocation-sampleapp.

christocracy avatar christocracy commented on June 7, 2024

Forget about Cordova 3.x. It's not going to work.

On Fri, Aug 12, 2016 at 1:31 PM, teamherois [email protected]
wrote:

but likely not 3.9.1 then ?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA6l4JTjkdEEyBAWkpiQ8RXfKXLufP3ks5qfK3-gaJpZM4Jd5oB
.

Chris Scott
Transistor Software http://www.transistorsoft.com

from cordova-background-geolocation-sampleapp.

teamherois avatar teamherois commented on June 7, 2024

Thanks - that's my issue then. I'll need to find an alternative approach to using my existing builder.

from cordova-background-geolocation-sampleapp.

christocracy avatar christocracy commented on June 7, 2024

PhoneGap build works fine.

On Fri, Aug 12, 2016 at 1:34 PM, teamherois [email protected]
wrote:

Thanks - that's my issue then. I'll need to find an alternative approach
to using my existing builder.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA6l_OicNvJERn6t0jMmkmXoJaDCsGyks5qfK6QgaJpZM4Jd5oB
.

Chris Scott
Transistor Software http://www.transistorsoft.com

from cordova-background-geolocation-sampleapp.

teamherois avatar teamherois commented on June 7, 2024

(Everything works - except the restart after terminate on the 3.9.1 platform - so it's a bit of a tease then...) Confused then - Phonegap on 3.9.1 should work ?

from cordova-background-geolocation-sampleapp.

christocracy avatar christocracy commented on June 7, 2024

Cordova 3.x doesn't support npm dependencies. If you want to support your own fork of my plugin, go ahead and modify the dependencies in the plugin.xml to the old non-npm style.

The Cordova train has moved along to v6.

from cordova-background-geolocation-sampleapp.

teamherois avatar teamherois commented on June 7, 2024

Happy to do that and thanks for the suggestion. Since I'm an avid learner and a bit green on what the non-npm style might look like - a quick link or suggestion on the best way to pull this off?

from cordova-background-geolocation-sampleapp.

christocracy avatar christocracy commented on June 7, 2024

Seriously, forget about 3.x and target 5.x.

https://cordova.apache.org/announcements/2015/04/21/plugins-release-and-move-to-npm.html

On Fri, Aug 12, 2016 at 1:55 PM, teamherois [email protected]
wrote:

Happy to do that and thanks for the suggestion. Since I'm an avid learner
and a bit green on what the non-npm style might look like - a quick link or
suggestion on the best way to pull this off?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#52 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA6l_QlDv4r9-I7qhDk5HX-E4xuwrJRks5qfLN8gaJpZM4Jd5oB
.

Chris Scott
Transistor Software http://www.transistorsoft.com

from cordova-background-geolocation-sampleapp.

Related Issues (20)

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.