Skip to content

Tag: android

Is there a unique boot session id or count on an android device?

The app I’m writing needs to know if a ‘boot session’, for want of a better term, has changed but it doesn’t need to actually start at boot and I would prefer if possible not to have to use the RECEIVE_BOOT_COMPLETED permission. So I was wondering if there is any device-wide boot sessi…

android get radio stream data

I am trying to get what song is on with this code: } Url I want to use are from this page: http://radio.m-1.fm/ so for example http://radio.m-1.fm/M-1PLIUS (which is http://84.46.147.81/m1plius/mp3) but I get error java.net.SocketException: Permission denied Any ideas what is wrong? Answer Add Internet Permis…

Convert a Bundle to JSON

I’d like to convert the an Intent’s extras Bundle into a JSONObject so that I can pass it to/from JavaScript. Is there a quick or best way to do this conversion? It would be alright if not all possible Bundles will work. Answer You can use Bundle#keySet() to get a list of keys that a Bundle contai…

LibGDX: Make all actors on a stage unchecked

I have a stage with multiple buttons on it that basically serves as a toolbox. I want the user to be able to select between the different items that are displayed; therefore when the user selects one item, all others have to be deselected. I thought of doing that with the checked property of libGDX buttons. H…