Back to project page Android-SDK.
The source code is released under:
MIT License
If you think the Android project Android-SDK listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.getcloudengine; /*from w ww .jav a 2s. c om*/ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; public class CloudEngineReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { CloudEngineUtils utils = CloudEngineUtils.getInstance(); if(!utils.isNetworkAvailable(context)) { return; } else{ SharedPreferences sharedPref = context.getSharedPreferences( CloudEngine.PREFERENCE_FILE , Context.MODE_PRIVATE); String apiKey = sharedPref.getString(CloudEngine.API_KEY, null); String appId = sharedPref.getString(CloudEngine.APP_ID, null); if(apiKey != null && appId !=null) { CloudEngine.initialize(context, apiKey, appId); CloudObject.syncServer(context); } } } }