Office Hours — Today, May 31

Yesterday, May 30

May 31
8:55 AM
Mark M.
has entered the room
Mark M.
turned on guest access
9:05 AM
Tiru B.
has entered the room
Tiru B.
Hi Mark
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.
Alarms are getting triggered fine on Google, LG, Samsung, etc.
Mark M.
there are two possible causes that I have theorized for this:
1. Some manufacturers have elected to treat this act as "force stop" rather than "kill background process", and "force stop" cancels alarms
2. They might just be cancelling alarms along with killing the process
9:10 AM
Tiru B.
They are stopping the process
Mark M.
well, that happens on all devices
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
as I think that would also interrupt GCM messages
it's certainly more than just cancelling alarms, as that should not affect GCM/FCM
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
if it is, you were already force-stopped by swiping away the task
Tiru B.
yes... it was grayed out
let me check it gaain
Mark M.
then that's what's happening
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
however, most developers are not in position to have two separate apps
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
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
9:15 AM
Mark M.
however, it would not be an app that the user normally uses
you would use JobScheduler/AlarmManager/GCM/etc. to have the 2nd app run occasionally and kick the 1st app via an explicit Intetn
er, Intent
basically, the goal is for the 2nd app to rarely have a task that the user might clear and have *it* get force-stopped
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
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
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
if your app is started via an explicit Intent, you are moved out of the force-stopped state
for most apps, that comes when the user taps on a home screen launcher icon
Tiru B.
ok
9:20 AM
Tiru B.
thanks for your time
Mark M.
you are very welcome!
Tiru B.
how is your business/hobby
are you still a one man army?
Mark M.
:: looks around ::
yes, I am still a one-man army
unless you count dust bunnies
who, frankly, really suck at typing
Tiru B.
:-)
good
that way you're always in full control
Mark M.
well, until the dust bunnies stage a coup
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!
9:25 AM
Tiru B.
wait a minute... one last question... what tools do you use for writing the book?
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
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?
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
no, I have not been to I|O in a few years
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
AnDevCon DC is coming up in July
9:30 AM
Tiru B.
ok... as I am in India, YouTube or the IO site is the only sensible option at the moment
BTW, If I may ask, how many active subscribers does the book have?
Mark M.
right now, about 1400
Tiru B.
great Mark!
proud of you
as always, it's very nice talking to you
talk to you later... bye
Mark M.
likewise!
Tiru B.
has left the room
10:00 AM
Mark M.
turned off guest access

Yesterday, May 30

 

Office Hours

People in this transcript

  • Mark Murphy
  • Tiru Bokka