Seeing this in my logs:
android.app.IntentReceiverLeaked: Activity StreamDetailActivity has leaked IntentReceiver com.qualcomm.qce.allplay.controllersdk.OnboardingManager$WifiReceiver@a4e6e97 that was originally registered here. Are you missing a call to unregisterReceiver()?
I know I need to unregister in OnPause() and re-register on OnResume(), but I am trying to work out EXACTLY what I need to do this on. I can't actually see any broadcast recievers I am using. Is this possibly something the SDK should be doing?
I am seeing similar behaviour in the demo app.
Thank You.
Hi Pinball Wizard,
Thanks for your discovery. Yes, this receiver is AllPlay's. This receiver is dynamically registered when AllPlay starts. It detects Wi-Fi changes and provide the best discovery performance. The demo app was suppose to be a simple app, so it just initializes AllPlay in the AudioFragment.java, and AudioActivity.java. It passes in the Activity Context to initialize AllPlay, which register this BroadcastReceiver, so when the activity got destroyed, you see the leak error message.
I apologize the for the poor Documentation, but AllPlay SDK should really be initialized in your Application class and have an interface to link your context and acitvity/fragment together if you need to know about AllPlay in different activities and fragments. If you just want to keep AllPlay in a single activity, then it may be best to call stop() when activity is destroyed. You can also pass in the Application Context during init() if you don't want to stop it. So in the demo app,
mAllPlayController.init("Local Audio Demo", true, mActivity.getApplicationContext());
This will use the Application Context to register, which will be active until the app is closed or killed (Kind of the same if SDK is initialized in your Application class)
Thanks
Daniel