May 31 | 8:55 AM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
May 31 | 9:05 AM |
Tiru B. | has entered the room |
Tiru B. |
Hi Mark
|
Tiru B. |
Good morning
|
Mark M. |
hello, Tiru!
|
Tiru B. |
How are you?
|
Mark M. |
OK, and yourself?
|
Tiru B. |
Great. I was planning to talk to for a while. At last, time permitted me to join this chat
|
Mark M. |
how can I help you today?
|
Tiru B. |
We are having trouble with alarms when people remove our app from their recents list on devices such as Xiomi, Vivo, Oppo, etc.
|
Tiru B. |
Alarms are getting triggered fine on Google, LG, Samsung, etc.
|
Mark M. |
there are two possible causes that I have theorized for this:
|
Mark M. |
1. Some manufacturers have elected to treat this act as "force stop" rather than "kill background process", and "force stop" cancels alarms
|
Mark M. |
2. They might just be cancelling alarms along with killing the process
|
May 31 | 9:10 AM |
Tiru B. |
They are stopping the process
|
Mark M. |
well, that happens on all devices
|
Mark M. |
stopping the process does not cancel alarms, though
|
Tiru B. |
Sadly, the app is not even receiving the GCM push notifications
|
Mark M. |
that suggests my "force stop" scenario
|
Mark M. |
as I think that would also interrupt GCM messages
|
Mark M. |
it's certainly more than just cancelling alarms, as that should not affect GCM/FCM
|
Mark M. |
if you have a device (or two) at the office that can reproduce the problem, go into Settings after swiping away your task, and see if the Force Stop button is grayed out
|
Mark M. |
if it is, you were already force-stopped by swiping away the task
|
Tiru B. |
yes... it was grayed out
|
Tiru B. |
let me check it gaain
|
Mark M. |
then that's what's happening
|
Mark M. |
if you are somehow in position to have two separate apps, you could use a second app as a "watchdog", using an explicit Intent to talk to the first (force-stopped) app, which should move it out of the force-stopped state
|
Mark M. |
however, most developers are not in position to have two separate apps
|
Mark M. |
and in that case, there isn't a lot that you can do about it that I know of, other than to yell at the manufacturer
|
Tiru B. |
I am fine with two apps, but what would happen if user force stops both of them
|
Tiru B. |
Are you suggesting that 2nd app shouldn't have any UI activities?
|
Mark M. |
well, it will need something in the UI, otherwise it will never run
|
May 31 | 9:15 AM |
Mark M. |
however, it would not be an app that the user normally uses
|
Mark M. |
you would use JobScheduler/AlarmManager/GCM/etc. to have the 2nd app run occasionally and kick the 1st app via an explicit Intetn
|
Mark M. |
er, Intent
|
Mark M. |
basically, the goal is for the 2nd app to rarely have a task that the user might clear and have *it* get force-stopped
|
Mark M. |
you could have the two apps each kick the other, in hopes that all the time at least one of the apps is not force-stopped
|
Mark M. |
this, of course, is aggravating
|
Tiru B. |
can the 2nd app have a service that the 1st app launches?
|
Mark M. |
sure, why not?
|
Tiru B. |
that way 2nd app will not have any UI activity
|
Mark M. |
or, use a BroadcastReceiver, sending an explicit Intent as a broadcast
|
Mark M. |
ah, I see
|
Tiru B. |
and user will never need to launch the 2nd app directly
|
Mark M. |
yes, that should work -- it's an extension of my "have each app kick the other" approach
|
Tiru B. |
great
|
Mark M. |
the key is the explicit Intent
|
Mark M. |
if your app is started via an explicit Intent, you are moved out of the force-stopped state
|
Mark M. |
for most apps, that comes when the user taps on a home screen launcher icon
|
Tiru B. |
ok
|
May 31 | 9:20 AM |
Tiru B. |
thanks for your time
|
Mark M. |
you are very welcome!
|
Tiru B. |
how is your business/hobby
|
Tiru B. |
are you still a one man army?
|
Mark M. |
:: looks around ::
|
Mark M. |
yes, I am still a one-man army
|
Mark M. |
unless you count dust bunnies
|
Mark M. |
who, frankly, really suck at typing
|
Tiru B. |
:-)
|
Tiru B. |
good
|
Tiru B. |
that way you're always in full control
|
Mark M. |
well, until the dust bunnies stage a coup
|
Tiru B. |
:-)
|
Tiru B. |
BTW, I'm surprised you didn't cover anything about Mobile Device Management (MDM)
|
Mark M. |
I have a chapter on device administration, though it needs updating
|
Tiru B. |
Talk to you later. Have fun!
|
Mark M. |
thanks! you too!
|
May 31 | 9:25 AM |
Tiru B. |
wait a minute... one last question... what tools do you use for writing the book?
|
Tiru B. |
docbook, htmlbook, markdown, any such thing?
|
Mark M. |
MultiMarkdown, PrinceXML, and some Ruby scripts, mostly
|
Tiru B. |
never heard of princexml... will look it up
|
Mark M. |
it converts HTML/XML to PDF
|
Mark M. |
commercial tool
|
Tiru B. |
ok.. i have used Apache FOP in the past
|
Mark M. |
I used to write DocBook and generate an OpenOffice/LibreOffice ODT file, then get a PDF from there
|
Tiru B. |
what made you switch to MMD?
|
Tiru B. |
btw, did you go to Google IO this year?
|
Mark M. |
DocBook was kinda a pain, the DocBook->ODT conversion process had issues, and I couldn't automate as much
|
Mark M. |
no, I have not been to I|O in a few years
|
Mark M. |
for the presentations, the videos are better than being there live, IMHO
|
Tiru B. |
ok.. have you presented at any conferences lately?
|
Mark M. |
DevFest DC a few weeks ago
|
Mark M. |
AnDevCon DC is coming up in July
|
May 31 | 9:30 AM |
Tiru B. |
ok... as I am in India, YouTube or the IO site is the only sensible option at the moment
|
Tiru B. |
BTW, If I may ask, how many active subscribers does the book have?
|
Mark M. |
right now, about 1400
|
Tiru B. |
great Mark!
|
Tiru B. |
proud of you
|
Tiru B. |
as always, it's very nice talking to you
|
Tiru B. |
talk to you later... bye
|
Mark M. |
likewise!
|
Tiru B. | has left the room |
May 31 | 10:00 AM |
Mark M. | turned off guest access |