DownloadManager.ACTION_DOWNLOAD_COMPLETE broadcast receiver receiving same download id more than once with different download statuses in Android

This is a reported bug see: http://code.google.com/p/android/issues/detail?id=18462 The way around I found is to verify if the download was a success, if not ditch the intent or re-queue the file if it was never downloaded… Lost a couple of hours figuring that one 🙁 ** Edit: adding code example ** /** * Check if download … Read more

WebRTC – scalable live stream broadcasting / multicasting

As it was pretty much covered here, what you are trying to do here is not possible with plain, old-fashionned WebRTC (strictly peer-to-peer). Because as it was said earlier, WebRTC connections renegotiate encryption keys to encrypt data, for each session. So your broadcaster (B) will indeed need to upload its stream as many times as … Read more

Detect screen on/off from iOS service

You can use Darwin notifications, to listen for the events. I’m not 100% sure, but it looks to me, from running on a jailbroken iOS 5.0.1 iPhone 4, that one of these events might be what you need: com.apple.iokit.hid.displayStatus com.apple.springboard.hasBlankedScreen com.apple.springboard.lockstate Update: also, the following notification is posted when the phone locks (but not when … Read more

How to Send BroadCast from one app to another app

First thing first declare the receiver in app B in the manifest file like this: <receiver android:name=”.MyBroadcastReceiver” android:enabled=”true” android:exported=”true”> <intent-filter> <action android:name=”com.pkg.perform.Ruby” /> </intent-filter> </receiver> when sending the broadcast add FLAG_INCLUDE_STOPPED_PACKAGES flag to the intent [src] because when you broadcast from app A to app B , app B might not be running, this flag … Read more