SOLVED: Reading mobile OS notifications

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
simon.schvartzman
Posts: 641
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

SOLVED: Reading mobile OS notifications

Post by simon.schvartzman » Mon Aug 07, 2017 1:15 pm

Is it possible to read/acknowledge a mobile OS notifications from a LC script?

This is what I want to achieve and the problem I'm facing:

I have a mobile (iPhone or Android) device running unattended 24 x 7, from time to time it stops and I can't find out the reason. When I get to the device (installed far from home) it is resting on the Home screen and there is no indication of what happened.

I suspect the reason could be an OS notification like those when the device is overheating or when the battery is under 20%.

Any ideas as how to deal with this?

Thanks
Last edited by simon.schvartzman on Wed Aug 09, 2017 9:18 pm, edited 1 time in total.
Simon
________________________________________
To ";" or not to ";" that is the question

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 755
Joined: Fri Jun 27, 2008 9:00 pm

Re: Reading mobile OS notifications

Post by Mikey » Mon Aug 07, 2017 2:31 pm

Do you mean you have an app running on the device 24/7? Do you mean that the app crashes?
Plug it in and pull the device log from xcode.

simon.schvartzman
Posts: 641
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

Re: Reading mobile OS notifications

Post by simon.schvartzman » Mon Aug 07, 2017 7:40 pm

Mickey, comments on your remarks below
Do you mean you have an app running on the device 24/7?
Yes, this is the case
Do you mean that the app crashes?
I'm not sure if it is a crash or something else. I've noted that when the OS sends a notification (like battery low) the LC App gets interrupted and doesn't go back to the running state. Am I correct?
Plug it in and pull the device log from xcode.
That's a brilliant idea, as I use Xcode just to load to iPhone I never thought about this. I'm not sure I will be able to read the outcome but that's another story...(may be I'll need your help (again))

Many thanks
Simon
________________________________________
To ";" or not to ";" that is the question

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 755
Joined: Fri Jun 27, 2008 9:00 pm

Re: Reading mobile OS notifications

Post by Mikey » Mon Aug 07, 2017 7:49 pm

If you can pull the log you can submit it with a bug report.
I don't remember what ios does when you get a low battery. If someone here doesn't know, I'm sure there's info. on the ios dev portal

simon.schvartzman
Posts: 641
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

Re: Reading mobile OS notifications

Post by simon.schvartzman » Tue Aug 08, 2017 3:34 pm

Mikey, I was able to pull the log (attached). I have no idea what it means but looks impressive to me :D

Will submit the bug report as you said and will update here about the findings.

Thanks
Attachments
log.zip
(14.1 KiB) Downloaded 131 times
Simon
________________________________________
To ";" or not to ";" that is the question

simon.schvartzman
Posts: 641
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

Re: Reading mobile OS notifications

Post by simon.schvartzman » Wed Aug 09, 2017 9:17 pm

It seems is not a bug after all. @Panos conclusion, after performing the log analysis is there was no crash the iPhone stoped due to temperature (overheating) problems.
Simon
________________________________________
To ";" or not to ";" that is the question

Post Reply

Return to “Talking LiveCode”