![]()
1 当程序处于关闭状态收到推送消息时,点击图标会调用- (BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary )launchOptions这个方法,那么消息给通过launchOptions这个参数获取到。
为了接收发送远程推送通知你必须完成以下3个主要的任务:
1、App必须正确配置并注册APNS(Apple Push Notification Service),以便所有设置都完成时就能马上接收到通知。
2、服务端必须向APNS发送一条明确指向一个或多个设备的通知。
3、App必需接收服务端发送的通知,App可以执行通知包含的任务或者在application的代理(delegate)回调方法内处理用户交互行为。
TelephonyManager mTelephonyManager = (TelephonyManager) getSystemService(ContextTELEPHONY_SERVICE);
// 返回值MCC + MNC
String operator = mTelephonyManagergetNetworkOperator();
int mcc = IntegerparseInt(operatorsubstring(0, 3));
int mnc = IntegerparseInt(operatorsubstring(3));
// 中国移动和中国联通获取LAC、CID的方式
GsmCellLocation location = (GsmCellLocation) mTelephonyManagergetCellLocation();
int lac = locationgetLac();
int cellId = locationgetCid();
Logi(TAG, " MCC = " + mcc + "\t MNC = " + mnc + "\t LAC = " + lac
以上就是关于ios点击icon进入程序怎么获取推送消息全部的内容,包括:ios点击icon进入程序怎么获取推送消息、ios 怎么获取远程推送的通知内容、android 集成多个推送,怎么获取cid等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)