Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: xe7 background location sensor?



Permlink Replies: 5 - Last Post: Apr 14, 2015 2:30 PM Last Post By: Sandeep Chandra
KabloNET Progra...

Posts: 17
Registered: 7/4/03
xe7 background location sensor?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 10, 2014 1:12 AM
Hi,

i use xe7 and iOS 7.1 and i want to use background location services. When my software active, it runs very good but when iphone sleep then its stop. i found setIdleTimerDisabled method but it won't work for me?

How can i use background services on iOS?

i use these code for setIdleTimeDisabled :

procedure TForm1.FormCreate(Sender: TObject);
var
UIApp : UIApplication;
begin
UIApp := TUIApplication.Wrap(TUIApplication.OCClass.sharedApplication);
UIApp.setIdleTimerDisabled(True);

Thanks a lot.
KabloNET Progra...

Posts: 17
Registered: 7/4/03
Re: xe7 background location sensor?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 10, 2014 2:27 AM   in response to: KabloNET Progra... in response to: KabloNET Progra...
Sorry, my bad...

i didn't edit my app Info.plist file. I edit it and problem solved...

Thanks.
Luca Marchetti

Posts: 3
Registered: 8/28/14
Re: xe7 background location sensor?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 22, 2015 8:45 AM   in response to: KabloNET Progra... in response to: KabloNET Progra...
But what if the user turn the display off?
Did you found any other tip to have location sensor running in background on ios?

Thank you
KabloNET Progra...

Posts: 17
Registered: 7/4/03
Re: xe7 background location sensor?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 24, 2015 4:57 AM   in response to: Luca Marchetti in response to: Luca Marchetti
Hi,

i couldn't find any solution for this and this solution won't work for me either.... After 2-3 times after program don't send gps the data...

Luca Marchetti wrote:
But what if the user turn the display off?
Did you found any other tip to have location sensor running in background on ios?

Thank you
Steve Childs

Posts: 19
Registered: 10/23/13
Re: xe7 background location sensor?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 10, 2015 8:23 AM   in response to: KabloNET Progra... in response to: KabloNET Progra...
Its because you can't create a true background process in Android with Delphi. Google "Android service Delphi" and you'll see what a right faff it is to do with Delphi.

Same with iOS. Embarcadero really need to sort this out as it really restricts what can be done with Delphi on Mobile.

Background processing is used all over the place - i.e. you have data to sync back to the server, good luck if you're not online at that moment, you can't leave it trying in the background when the user switches to a different app.

Basically the moment (or shortly after) your app gets put into the background, the OS can kill it off at any time.

KabloNET Programmer wrote:
Hi,

i couldn't find any solution for this and this solution won't work for me either.... After 2-3 times after program don't send gps the data...

Luca Marchetti wrote:
But what if the user turn the display off?
Did you found any other tip to have location sensor running in background on ios?

Thank you

Edited by: Steve Childs on Apr 10, 2015 8:24 AM
Sandeep Chandra

Posts: 25
Registered: 2/17/12
Re: xe7 background location sensor? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 14, 2015 2:30 PM   in response to: Steve Childs in response to: Steve Childs
On 11/04/2015 3:25 a.m., Steve Childs wrote:
Same with iOS. Embarcadero really need to sort this out as it really restricts what can be done with Delphi on Mobile.

Almost any app I do there seems to be a need to run something in the
background and with this limitation it is just not the tool to pick (for
me), I really want to use Delphi for mobiles but until this is addressed
I cannot use Delphi to do any mobile app development.


--
Cheers

Sandeep

Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02