Code example for ConnectivityManager

Methods: getBackgroundDataSetting

		mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "Radare2");
		// check the global background data setting 
		ConnectivityManager cm = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);
		if (!cm.getBackgroundDataSetting()) {
		// do the actual work, in a separate thread 
		new PollTask().execute();
	private class PollTask extends AsyncTask<Void, Void, Void> {
		 * This is where YOU do YOUR work. There's nothing for me to write here 
		 * you have to fill this in. Make your HTTP request(s) or whatever it is 
		 * you have to do to get your updates in here, because this is run in a 
		 * separate thread