android - allowing user to cancel foreground service -
Apparently the code pasted below (1) sets my service as foreground service and (2) tray But my icon displays on top of the screen if the user taps my icon, today's date is quickly filtered - I think it's some kind of default behavior ContentTitle and ContentText are never visible (hence What are they good?)
What do I want to do, h Icon is a dropdown or used for any type of Popvando, the user can or have any of my service to end or to terminate me that functionality can not find any examples do it? how?
BTW, the only purpose of my notification is to run my service in the foreground, I do not have to ever inform about the user.
Thanks, Gary
Notifications Compatibility. Builder b = new notification. Builder (this); B. Setsmolix (R.drawable.ic_launcher) .setContentTitle ("PhoneStaller") .setContentText ("Hello World"); Implies whatIsThisIntentFor = new intent (Intent.ACTION_VIEW);
b.setContentIntent (pending intervent gate activity (this, 0, WhatIsThisIntentFor, 0)); Post-text "itemprop =" text "> can this be done?
However, SetContentIntent () broadcast pending can be a broadcast receiver call stopService () (or whatever the mechanism may be Service is closed).
Comments
Post a Comment