安卓应用市场推送

一、华为:

https://developer.huawei.com/consumer/cn/

开通PUSH需要SHA256证书指纹1

 

二、OPPO:

https://open.oppomobile.com/

审核大约需要1个工作日

 

三、小米:

https://dev.mi.com/console/

需要法人手持身份证的照片

如无法提供法人手持身份证件照,需要使用企业域名邮箱重新注册开发者账号

 

四、VIVO:

https://dev.vivo.com.cn/home

需要上传企业法人本人手持身份证信息扫描件(必须与营业执照法人一致)

 

五、魅族

https://open.flyme.cn/account?t=1566633623969

 

六、三星

https://seller.samsungapps.com/main/sellerMain.as

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要在 Android 应用关闭时推送通知,你可以使用 Firebase Cloud Messaging(FCM)服务。FCM 是一种跨平台消息传递解决方案,可以通过云端发送消息并将它们传递到移动设备和浏览器。 下面是实现步骤: 1. 在 Firebase 控制台中创建一个项目,并将其与你的应用程序关联。 2. 在应用程序中集成 Firebase SDK,并在应用程序中注册 FCM。 3. 创建一个 Service 类来处理后台消息传递,并在 AndroidManifest.xml 文件中声明该服务。 4. 将消息数据包含在推送通知中,以便在用户单击通知时打开应用程序并将用户转到相应的屏幕。 以下是 Service 类的示例代码: ```java public class MyFirebaseMessagingService extends FirebaseMessagingService { private static final String TAG = "MyFirebaseMsgService"; @Override public void onMessageReceived(RemoteMessage remoteMessage) { Log.d(TAG, "From: " + remoteMessage.getFrom()); // Check if message contains a data payload. if (remoteMessage.getData().size() > 0) { Log.d(TAG, "Message data payload: " + remoteMessage.getData()); // Handle the data payload. // ... } // Check if message contains a notification payload. if (remoteMessage.getNotification() != null) { Log.d(TAG, "Message Notification Body: " + remoteMessage.getNotification().getBody()); sendNotification(remoteMessage.getNotification().getBody()); } } private void sendNotification(String messageBody) { Intent intent = new Intent(this, MainActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_ONE_SHOT); String channelId = getString(R.string.default_notification_channel_id); Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this, channelId) .setSmallIcon(R.drawable.ic_launcher) .setContentTitle("FCM Message") .setContentText(messageBody) .setAutoCancel(true) .setSound(defaultSoundUri) .setContentIntent(pendingIntent); NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); // Since android Oreo notification channel is needed. if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { NotificationChannel channel = new NotificationChannel(channelId, "Channel human readable title", NotificationManager.IMPORTANCE_DEFAULT); notificationManager.createNotificationChannel(channel); } notificationManager.notify(0, notificationBuilder.build()); } } ``` 你需要在 AndroidManifest.xml 文件中声明该服务: ```xml <service android:name=".MyFirebaseMessagingService" android:exported="false"> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT" /> </intent-filter> </service> ``` 最后,你需要在 Firebase 控制台中创建一个通知,并在应用程序中将其发送。这样,在 Android 应用关闭时,推送通知将自动发送给用户。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值