当前位置: 首页>>代码示例>>Java>>正文


Java GCMRegistrar.onDestroy方法代码示例

本文整理汇总了Java中com.google.android.gcm.GCMRegistrar.onDestroy方法的典型用法代码示例。如果您正苦于以下问题:Java GCMRegistrar.onDestroy方法的具体用法?Java GCMRegistrar.onDestroy怎么用?Java GCMRegistrar.onDestroy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.android.gcm.GCMRegistrar的用法示例。


在下文中一共展示了GCMRegistrar.onDestroy方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onDestroy

import com.google.android.gcm.GCMRegistrar; //导入方法依赖的package包/类
@Override
protected void onDestroy() {
    super.onDestroy();

    if (mGCMRegisterTask != null) {
        LOGD(TAG, "Cancelling GCM registration task.");
        mGCMRegisterTask.cancel(true);
    }

    try {
        GCMRegistrar.onDestroy(this);
    } catch (Exception e) {
        LOGW(TAG, "C2DM unregistration error", e);
    }

    SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
    sp.unregisterOnSharedPreferenceChangeListener(this);
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:19,代码来源:BaseActivity.java

示例2: onDestroy

import com.google.android.gcm.GCMRegistrar; //导入方法依赖的package包/类
@Override
protected void onDestroy() {
	// TODO Auto-generated method stub
	
	unregisterReceiver(SmsIntentReceiver);
	if (mRegisterTask != null) {
		mRegisterTask.cancel(true);
	}
	try {
		unregisterReceiver(mHandleMessageReceiver);
		GCMRegistrar.onDestroy(this);
	} catch (Exception e) {
		Log.e("UnRegister Receiver Error", "> " + e.getMessage());
	}
	super.onDestroy();
}
 
开发者ID:halimbimantara,项目名称:Arduscam,代码行数:17,代码来源:MainActivity.java

示例3: onDestroy

import com.google.android.gcm.GCMRegistrar; //导入方法依赖的package包/类
@Override
protected void onDestroy() {
    super.onDestroy();

    if (mGCMRegisterTask != null) {
        LogUtils.LOGD(TAG, "Cancelling GCM registration task.");
        mGCMRegisterTask.cancel(true);
    }

    try {
        GCMRegistrar.onDestroy(this);
    } catch (Exception e) {
        LogUtils.LOGW(TAG, "C2DM unregistration error", e);
    }

    SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
    sp.unregisterOnSharedPreferenceChangeListener(this);
}
 
开发者ID:The-WebOps-Club,项目名称:saarang-iosched,代码行数:19,代码来源:BaseActivity.java

示例4: unregister

import com.google.android.gcm.GCMRegistrar; //导入方法依赖的package包/类
/**
 * Unregister this account/device pair within the server.
 */
public void unregister(NotifierEvent notifierEvent) {
	this.currentEvent = CURRENT_EVENT_PUSH_UNREGISTER;
	this.currentNotifierEvent = notifierEvent;
	initUnregistrationParams(notifierEvent);

	context.registerReceiver(mHandleMessageReceiver, new IntentFilter(DISPLAY_MESSAGE_ACTION));
	if (mHandleMessageReceiver != null) {
		context.unregisterReceiver(mHandleMessageReceiver);
	}

	GCMRegistrar.unregister(context);
	GCMRegistrar.onDestroy(context);
}
 
开发者ID:appez,项目名称:appez-android,代码行数:17,代码来源:PushNotificationUtility.java

示例5: onDestroy

import com.google.android.gcm.GCMRegistrar; //导入方法依赖的package包/类
@Override
protected void onDestroy() {
    if (mRegisterTask != null) {
        mRegisterTask.cancel(true);
    }
    try {
        unregisterReceiver(mHandleMessageReceiver);
        GCMRegistrar.onDestroy(this);
    } catch (Exception e) {
        Log.e("UnRegisterReceiverError", "> " + e.getMessage());
    }
    super.onDestroy();
}
 
开发者ID:abhijith-gururaj,项目名称:push-notifications-WebView,代码行数:14,代码来源:WebViewActivity.java

示例6: onDestroy

import com.google.android.gcm.GCMRegistrar; //导入方法依赖的package包/类
@Override
protected void onDestroy() {
	instance = null;

	if (mRegisterTask != null) {
		mRegisterTask.cancel(true);
	}
	unregisterReceiver(mHandleMessageReceiver);
	GCMRegistrar.onDestroy(this);
	super.onDestroy();
}
 
开发者ID:10xEngineer,项目名称:My-Wallet-Android,代码行数:12,代码来源:WalletActivity.java

示例7: onDestroy

import com.google.android.gcm.GCMRegistrar; //导入方法依赖的package包/类
@Override
protected void onDestroy() {
	super.onDestroy();
	try {
		unregisterReceiver(mHandleMessageReceiver);
		GCMRegistrar.onDestroy(this);
	} catch (Exception e) {
		Log.e("UnRegister Receiver Error", "> " + e.getMessage());
	}
}
 
开发者ID:thoinv,项目名称:kaorisan,代码行数:11,代码来源:TaskActivity.java

示例8: onDestroy

import com.google.android.gcm.GCMRegistrar; //导入方法依赖的package包/类
@Override
protected void onDestroy() {
    if (mRegisterTask != null) {
        mRegisterTask.cancel(true);
    }
    unregisterReceiver(mHandleMessageReceiver);
    GCMRegistrar.onDestroy(this);
    super.onDestroy();
}
 
开发者ID:army-of-dumbledore,项目名称:pennappsF13,代码行数:10,代码来源:DemoActivity.java

示例9: dispose

import com.google.android.gcm.GCMRegistrar; //导入方法依赖的package包/类
public static void dispose( ) {
	Utils.dispose( );
	try{
		GCMRegistrar.onDestroy( GameActivity.getInstance( ) );
	} catch ( Exception e ) {
		e.printStackTrace( );
	}
}
 
开发者ID:hyperfiction,项目名称:HypNotif,代码行数:9,代码来源:HypNotif.java

示例10: onDestroy

import com.google.android.gcm.GCMRegistrar; //导入方法依赖的package包/类
@Override
protected void onDestroy() {
    if (mRegisterTask != null) {
        mRegisterTask.cancel(true);
    }
    try {
        unregisterReceiver(mHandleMessageReceiver);
        GCMRegistrar.onDestroy(this);
    } catch (Exception e) {
        Log.e("UnRegister Receiver Error", "> " + e.getMessage());
    }
    super.onDestroy();
}
 
开发者ID:bhavyanshu,项目名称:ITM_Android_App,代码行数:14,代码来源:MainScreenActivity.java

示例11: onDestroy

import com.google.android.gcm.GCMRegistrar; //导入方法依赖的package包/类
@Override
protected void onDestroy() {
    super.onDestroy();

    if (mGCMRegisterTask != null) {
        mGCMRegisterTask.cancel(true);
    }

    try {
        GCMRegistrar.onDestroy(this);
    } catch (Exception e) {
        LOGW(TAG, "GCM unregistration error", e);
    }
}
 
开发者ID:amardeshbd,项目名称:google-iosched,代码行数:15,代码来源:HomeActivity.java

示例12: onDestroy

import com.google.android.gcm.GCMRegistrar; //导入方法依赖的package包/类
@Override
protected void onDestroy() {
    super.onDestroy();

    if (mGCMRegisterTask != null) {
        mGCMRegisterTask.cancel(true);
    }

    try {
        GCMRegistrar.onDestroy(this);
    } catch (Exception e) {
        LOGW(TAG, "C2DM unregistration error", e);
    }
}
 
开发者ID:TheDeltaProgram,项目名称:iosched2013,代码行数:15,代码来源:HomeActivity.java

示例13: OnMainActivityDestroy

import com.google.android.gcm.GCMRegistrar; //导入方法依赖的package包/类
public static void OnMainActivityDestroy(Context context) {
	// application context must be used, else an exception is thrown
	// http://stackoverflow.com/a/11937272
	GCMRegistrar.onDestroy(context.getApplicationContext());
}
 
开发者ID:protyposis,项目名称:Studentenportal,代码行数:6,代码来源:GCMUtils.java

示例14: onDestroy

import com.google.android.gcm.GCMRegistrar; //导入方法依赖的package包/类
public void onDestroy() {
    GCMRegistrar.onDestroy(mContext);
    cleanUp();
    sInstance = null;
}
 
开发者ID:AppGyver,项目名称:PushNotifications,代码行数:6,代码来源:NotificationService.java

示例15: onDestroy

import com.google.android.gcm.GCMRegistrar; //导入方法依赖的package包/类
@Override
public void onDestroy() {
  super.onDestroy();
  doUnbindService();
  GCMRegistrar.onDestroy(activity.getApplicationContext());
}
 
开发者ID:GoogleCloudPlatform,项目名称:solutions-griddler-sample-android-client,代码行数:7,代码来源:GoogleServicesFragment.java


注:本文中的com.google.android.gcm.GCMRegistrar.onDestroy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。