極光推送jpush(簡單易懂,分分鍾教你搞定)


先注冊賬戶:

然后點擊開發者服務:點擊打開鏈接

創建應用:

隨便起個名字,但是最好和你的應用名字一樣

然后點擊下一步推送設置

把你的工程應用名字輸入:

應用包名就是build.gradle文件里的applicationId 名字

完成之后點擊下載Demo

Demo下載完成之后解壓 ,壓縮包
將libs文件夾里的工具jar包全部復制到你的項目中,記得編譯

 

 

 

將文件中的jar包導入工程中的libs文件夾 並引用, 
在將res文件夾直接復制到項目中的src文件夾下的main文件夾里, 
它會直接補齊你工程中缺少的部分,所以不用害怕它會替換掉你的原文件

 

 

 

使用 android studio 的開發者,如果使用 jniLibs 文件夾導入 so 文件,則僅需將所有 cpu 類型的文件夾拷進去;如果將 so 文件添加在 module的libs 文件夾下,注意在 module 的 gradle 配置中添加一下配置:

  1. sourceSets {
  2. main {
  3. jniLibs.srcDirs = [ 'libs']
  4. }
  5. }

注意點,還有 jniLibs 空文件夾不要忘

 

 

 

 

MyApp  類(記得在清單文件中添加name)

  1. public class MyApp extends Application {
  2. public static String registrationId ;//獲取 極光推送的設備唯一性標識 RegistrationID
  3.  
  4. @Override
  5. public void onCreate() {
  6. super.onCreate();
  7.  
  8.  
  9. //極光推送
  10. JPushInterface.setDebugMode(true); // 設置開啟日志,發布時請關閉日志
  11. JPushInterface.init(this); // 初始化 JPush
  12.  
  13. registrationId = JPushInterface.getRegistrationID(this);//獲取 極光推送的設備唯一性標識 RegistrationID
  14. Log.e("111111registrationId", "run:--------->:" + registrationId );
  15. }
  16. }

 

MyReceiver

TestActivity

Logger 

MyReceiver
  1. package com.sgy.sgy_jpush;
  2.  
  3. import android.content.BroadcastReceiver;
  4. import android.content.Context;
  5. import android.content.Intent;
  6. import android.os.Bundle;
  7. import android.text.TextUtils;
  8. import org.json.JSONException;
  9. import org.json.JSONObject;
  10. import java.util.Iterator;
  11. import cn.jpush.android.api.JPushInterface;
  12.  
  13. /**
  14. * 自定義接收器
  15. *
  16. * 如果不定義這個 Receiver,則:
  17. * 1) 默認用戶會打開主界面
  18. * 2) 接收不到自定義消息
  19. */
  20. public class MyReceiver extends BroadcastReceiver {
  21. private static final String TAG = "JIGUANG-Example";
  22.  
  23. @Override
  24. public void onReceive(Context context, Intent intent) {
  25. try {
  26. Bundle bundle = intent.getExtras();
  27. Logger.d(TAG, "[MyReceiver] onReceive - " + intent.getAction() + ", extras: " + printBundle(bundle));
  28.  
  29. if (JPushInterface.ACTION_REGISTRATION_ID.equals(intent.getAction())) {
  30. String regId = bundle.getString(JPushInterface.EXTRA_REGISTRATION_ID);
  31. Logger.d(TAG, "[MyReceiver] 接收Registration Id : " + regId);
  32. //send the Registration Id to your server...
  33.  
  34. } else if (JPushInterface.ACTION_MESSAGE_RECEIVED.equals(intent.getAction())) {
  35. Logger.d(TAG, "[MyReceiver] 接收到推送下來的自定義消息: " + bundle.getString(JPushInterface.EXTRA_MESSAGE));
  36. // processCustomMessage(context, bundle);
  37.  
  38. } else if (JPushInterface.ACTION_NOTIFICATION_RECEIVED.equals(intent.getAction())) {
  39. Logger.d(TAG, "[MyReceiver] 接收到推送下來的通知");
  40. int notifactionId = bundle.getInt(JPushInterface.EXTRA_NOTIFICATION_ID);
  41. Logger.d(TAG, "[MyReceiver] 接收到推送下來的通知的ID: " + notifactionId);
  42.  
  43. } else if (JPushInterface.ACTION_NOTIFICATION_OPENED.equals(intent.getAction())) {
  44. Logger.d(TAG, "[MyReceiver] 用戶點擊打開了通知");
  45.  
  46. //打開自定義的Activity
  47. Intent i = new Intent(context, TestActivity.class);
  48. i.putExtras(bundle);
  49. //i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  50. i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP );
  51. context.startActivity(i);
  52.  
  53. } else if (JPushInterface.ACTION_RICHPUSH_CALLBACK.equals(intent.getAction())) {
  54. Logger.d(TAG, "[MyReceiver] 用戶收到到RICH PUSH CALLBACK: " + bundle.getString(JPushInterface.EXTRA_EXTRA));
  55. //在這里根據 JPushInterface.EXTRA_EXTRA 的內容處理代碼,比如打開新的Activity, 打開一個網頁等..
  56.  
  57. } else if(JPushInterface.ACTION_CONNECTION_CHANGE.equals(intent.getAction())) {
  58. boolean connected = intent.getBooleanExtra(JPushInterface.EXTRA_CONNECTION_CHANGE, false);
  59. Logger.w(TAG, "[MyReceiver]" + intent.getAction() +" connected state change to "+connected);
  60. } else {
  61. Logger.d(TAG, "[MyReceiver] Unhandled intent - " + intent.getAction());
  62. }
  63. } catch (Exception e){
  64.  
  65. }
  66.  
  67. }
  68.  
  69. // 打印所有的 intent extra 數據
  70. private static String printBundle(Bundle bundle) {
  71. StringBuilder sb = new StringBuilder();
  72. for (String key : bundle.keySet()) {
  73. if (key.equals(JPushInterface.EXTRA_NOTIFICATION_ID)) {
  74. sb.append( "\nkey:" + key + ", value:" + bundle.getInt(key));
  75. } else if(key.equals(JPushInterface.EXTRA_CONNECTION_CHANGE)){
  76. sb.append( "\nkey:" + key + ", value:" + bundle.getBoolean(key));
  77. } else if (key.equals(JPushInterface.EXTRA_EXTRA)) {
  78. if (TextUtils.isEmpty(bundle.getString(JPushInterface.EXTRA_EXTRA))) {
  79. Logger.i(TAG, "This message has no Extra data");
  80. continue;
  81. }
  82.  
  83. try {
  84. JSONObject json = new JSONObject(bundle.getString(JPushInterface.EXTRA_EXTRA));
  85. Iterator< String> it = json.keys();
  86.  
  87. while (it.hasNext()) {
  88. String myKey = it.next();
  89. sb.append( "\nkey:" + key + ", value: [" +
  90. myKey + " - " +json.optString(myKey) + "]");
  91. }
  92. } catch (JSONException e) {
  93. Logger.e(TAG, "Get message extra JSON error!");
  94. }
  95.  
  96. } else {
  97. sb.append( "\nkey:" + key + ", value:" + bundle.get(key));
  98. }
  99. }
  100. return sb.toString();
  101. }
  102.  
  103. //send msg to MainActivity
  104. // private void processCustomMessage(Context context, Bundle bundle) {
  105. // if (MainActivity.isForeground) {
  106. // String message = bundle.getString(JPushInterface.EXTRA_MESSAGE);
  107. // String extras = bundle.getString(JPushInterface.EXTRA_EXTRA);
  108. // Intent msgIntent = new Intent(MainActivity.MESSAGE_RECEIVED_ACTION);
  109. // msgIntent.putExtra(MainActivity.KEY_MESSAGE, message);
  110. // if (!ExampleUtil.isEmpty(extras)) {
  111. // try {
  112. // JSONObject extraJson = new JSONObject(extras);
  113. // if (extraJson.length() > 0) {
  114. // msgIntent.putExtra(MainActivity.KEY_EXTRAS, extras);
  115. // }
  116. // } catch (JSONException e) {
  117. //
  118. // }
  119. //
  120. // }
  121. // LocalBroadcastManager.getInstance(context).sendBroadcast(msgIntent);
  122. // }
  123. // }
  124. }
TestActivity
  1. package com.sgy.sgy_jpush;
  2.  
  3. import android.app.Activity;
  4. import android.content.Intent;
  5. import android.os.Bundle;
  6. import android.view.ViewGroup.LayoutParams;
  7. import android.widget.TextView;
  8. import cn.jpush.android.api.JPushInterface;
  9.  
  10. public class TestActivity extends Activity {
  11.  
  12. @Override
  13. protected void onCreate(Bundle savedInstanceState) {
  14. super.onCreate(savedInstanceState);
  15. TextView tv = new TextView(this);
  16. tv.setText( "用戶自定義打開的Activity");
  17. Intent intent = getIntent();
  18. if (null != intent) {
  19. Bundle bundle = getIntent().getExtras();
  20. String title = null;
  21. String content = null;
  22. if(bundle!=null){
  23. title = bundle.getString( JPushInterface.EXTRA_NOTIFICATION_TITLE);
  24. content = bundle.getString( JPushInterface.EXTRA_ALERT);
  25. }
  26. tv.setText( "Title : " + title + " " + "Content : " + content);
  27. }
  28. addContentView(tv, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
  29. }
  30.  
  31. }
Logger 
  1. package com.sgy.sgy_jpush;
  2.  
  3. import android.util.Log;
  4.  
  5. /**
  6. * Created by efan on 2017/4/13.
  7. */
  8.  
  9. public class Logger {
  10.  
  11. //設為false關閉日志
  12. private static final boolean LOG_ENABLE = true;
  13.  
  14. public static void i(String tag, String msg){
  15. if (LOG_ENABLE){
  16. Log.i(tag, msg);
  17. }
  18. }
  19. public static void v(String tag, String msg){
  20. if (LOG_ENABLE){
  21. Log.v(tag, msg);
  22. }
  23. }
  24. public static void d(String tag, String msg){
  25. if (LOG_ENABLE){
  26. Log.d(tag, msg);
  27. }
  28. }
  29. public static void w(String tag, String msg){
  30. if (LOG_ENABLE){
  31. Log.w(tag, msg);
  32. }
  33. }
  34. public static void e(String tag, String msg){
  35. if (LOG_ENABLE){
  36. Log.e(tag, msg);
  37. }
  38. }
  39. }

 

 

清單文件:加權限:

  1. <!-- Required -->
  2. <permission
  3. android:name="com.sgy.sgy_jpush.permission.JPUSH_MESSAGE"
  4. android:protectionLevel="signature" />
  5.  
  6. <!-- Required 一些系統要求的權限,如訪問網絡等-->
  7. <uses-permission android:name="com.sgy.sgy_jpush.permission.JPUSH_MESSAGE" />
  8. <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
  9. <uses-permission android:name="android.permission.INTERNET" />
  10. <uses-permission android:name="android.permission.READ_PHONE_STATE" />
  11. <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  12. <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  13. <uses-permission android:name="android.permission.WRITE_SETTINGS" />
  14. <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
  15. <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  16. <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
  17.  
  18. <!-- Optional for location -->
  19. <uses-permission android:name="android.permission.VIBRATE" />
  20. <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <!-- 用於開啟 debug 版本的應用在6.0 系統上 層疊窗口權限 -->
  21. <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
  22. <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
  23. <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  24. <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
  25. <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
  26. <uses-permission android:name="android.permission.GET_TASKS" />

 

  1. <!-- For test only 測試狀態通知欄,需要打開的Activity -->
  2. <activity android:name="com.sgy.sgy_jpush.TestActivity" android:exported="false">
  3. <intent-filter>
  4. <action android:name="jpush.testAction" />
  5. <category android:name="jpush.testCategory" />
  6. </intent-filter>
  7. </activity>
  8.  
  9. <!-- Rich push 核心功能 since 2.0.6-->
  10. <activity
  11. android:name="cn.jpush.android.ui.PopWinActivity"
  12. android:theme="@style/MyDialogStyle"
  13. android:exported="false">
  14. </activity>
  15.  
  16. <!-- Required SDK核心功能-->
  17. <activity
  18. android:name="cn.jpush.android.ui.PushActivity"
  19. android:configChanges="orientation|keyboardHidden"
  20. android:theme="@android:style/Theme.NoTitleBar"
  21. android:exported="false">
  22. <intent-filter>
  23. <action android:name="cn.jpush.android.ui.PushActivity" />
  24. <category android:name="android.intent.category.DEFAULT" />
  25. <category android:name="com.sgy.sgy_jpush" />
  26. </intent-filter>
  27. </activity>
  28.  
  29. <!-- Required SDK 核心功能-->
  30. <!-- 可配置android:process參數將PushService放在其他進程中 -->
  31. <service
  32. android:name="cn.jpush.android.service.PushService"
  33. android:process=":pushcore"
  34. android:exported="false">
  35. <intent-filter>
  36. <action android:name="cn.jpush.android.intent.REGISTER" />
  37. <action android:name="cn.jpush.android.intent.REPORT" />
  38. <action android:name="cn.jpush.android.intent.PushService" />
  39. <action android:name="cn.jpush.android.intent.PUSH_TIME" />
  40. </intent-filter>
  41. </service>
  42. <!-- since 3.0.9 Required SDK 核心功能-->
  43. <provider
  44. android:authorities="com.sgy.sgy_jpush.DataProvider"
  45. android:name="cn.jpush.android.service.DataProvider"
  46. android:process=":pushcore"
  47. android:exported="false"
  48. />
  49.  
  50. <!-- since 1.8.0 option 可選項。用於同一設備中不同應用的JPush服務相互拉起的功能。 -->
  51. <!-- 若不啟用該功能可刪除該組件,將不拉起其他應用也不能被其他應用拉起 -->
  52. <service
  53. android:name="cn.jpush.android.service.DaemonService"
  54. android:enabled="true"
  55. android:exported="true">
  56. <intent-filter>
  57. <action android:name="cn.jpush.android.intent.DaemonService" />
  58. <category android:name="com.sgy.sgy_jpush" />
  59. </intent-filter>
  60.  
  61. </service>
  62. <!-- since 3.1.0 Required SDK 核心功能-->
  63. <provider
  64. android:authorities="com.sgy.sgy_jpush.DownloadProvider"
  65. android:name="cn.jpush.android.service.DownloadProvider"
  66. android:exported="true"
  67. />
  68. <!-- Required SDK核心功能-->
  69. <receiver
  70. android:name="cn.jpush.android.service.PushReceiver"
  71. android:enabled="true"
  72. android:exported="false">
  73. <intent-filter android:priority="1000">
  74. <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" /> <!--Required 顯示通知欄 -->
  75. <category android:name="com.sgy.sgy_jpush" />
  76. </intent-filter>
  77. <intent-filter>
  78. <action android:name="android.intent.action.USER_PRESENT" />
  79. <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
  80. </intent-filter>
  81. <!-- Optional -->
  82. <intent-filter>
  83. <action android:name="android.intent.action.PACKAGE_ADDED" />
  84. <action android:name="android.intent.action.PACKAGE_REMOVED" />
  85.  
  86. <data android:scheme="package" />
  87. </intent-filter>
  88. </receiver>
  89.  
  90. <!-- Required SDK核心功能-->
  91. <receiver android:name="cn.jpush.android.service.AlarmReceiver" android:exported="false"/>
  92.  
  93. <!-- User defined. For test only 用戶自定義的廣播接收器-->
  94. <receiver
  95. android:name="com.sgy.sgy_jpush.MyReceiver"
  96. android:exported="false"
  97. android:enabled="true">
  98. <intent-filter>
  99. <action android:name="cn.jpush.android.intent.REGISTRATION" /> <!--Required 用戶注冊SDK的intent-->
  100. <action android:name="cn.jpush.android.intent.MESSAGE_RECEIVED" /> <!--Required 用戶接收SDK消息的intent-->
  101. <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED" /> <!--Required 用戶接收SDK通知欄信息的intent-->
  102. <action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED" /> <!--Required 用戶打開自定義通知欄的intent-->
  103. <action android:name="cn.jpush.android.intent.CONNECTION" /><!-- 接收網絡變化 連接/斷開 since 1.6.3 -->
  104. <category android:name="com.sgy.sgy_jpush" />
  105. </intent-filter>
  106. </receiver>
  107.  
  108. <!-- Required . Enable it you can get statistics data with channel -->
  109. <meta-data android:name="JPUSH_CHANNEL" android:value="developer-default"/>
  110. <meta-data android:name="JPUSH_APPKEY" android:value="da075747e2a374d552993f2a" /> <!-- </>值來自開發者平台取得的AppKey-->

 

 

 

然后運行一下工程:

在回到極光平台:點擊打開鏈接

 

哈哈哈,然后你就可以收到推送的消息啦,是不是很簡單呢!!!

 

 

最后在附上完整的AndroidManifest.xml清單文件:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.sgy.sgy_jpush">

    <!-- Required -->
    <permission
        android:name="com.sgy.sgy_jpush.permission.JPUSH_MESSAGE"
        android:protectionLevel="signature" />

    <!-- Required  一些系統要求的權限,如訪問網絡等-->
    <uses-permission android:name="com.sgy.sgy_jpush.permission.JPUSH_MESSAGE" />
    <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

    <!-- Optional for location -->
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <!-- 用於開啟 debug 版本的應用在6.0 系統上 層疊窗口權限 -->
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
    <uses-permission android:name="android.permission.GET_TASKS" />

    <application
        android:name=".MyApp"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <!-- For test only 測試狀態通知欄,需要打開的Activity -->
        <activity android:name="com.sgy.sgy_jpush.TestActivity" android:exported="false">
            <intent-filter>
                <action android:name="jpush.testAction" />
                <category android:name="jpush.testCategory" />
            </intent-filter>
        </activity>

        <!-- Rich push 核心功能 since 2.0.6-->
        <activity
            android:name="cn.jpush.android.ui.PopWinActivity"
            android:theme="@style/MyDialogStyle"
            android:exported="false">
        </activity>

        <!-- Required SDK核心功能-->
        <activity
            android:name="cn.jpush.android.ui.PushActivity"
            android:configChanges="orientation|keyboardHidden"
            android:theme="@android:style/Theme.NoTitleBar"
            android:exported="false">
            <intent-filter>
                <action android:name="cn.jpush.android.ui.PushActivity" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="com.sgy.sgy_jpush" />
            </intent-filter>
        </activity>

        <!-- Required SDK 核心功能-->
        <!-- 可配置android:process參數將PushService放在其他進程中 -->
        <service
            android:name="cn.jpush.android.service.PushService"
            android:process=":pushcore"
            android:exported="false">
            <intent-filter>
                <action android:name="cn.jpush.android.intent.REGISTER" />
                <action android:name="cn.jpush.android.intent.REPORT" />
                <action android:name="cn.jpush.android.intent.PushService" />
                <action android:name="cn.jpush.android.intent.PUSH_TIME" />
            </intent-filter>
        </service>
        <!-- since 3.0.9 Required SDK 核心功能-->
        <provider
            android:authorities="com.sgy.sgy_jpush.DataProvider"
            android:name="cn.jpush.android.service.DataProvider"
            android:process=":pushcore"
            android:exported="false"
            />

        <!-- since 1.8.0 option 可選項。用於同一設備中不同應用的JPush服務相互拉起的功能。 -->
        <!-- 若不啟用該功能可刪除該組件,將不拉起其他應用也不能被其他應用拉起 -->
        <service
            android:name="cn.jpush.android.service.DaemonService"
            android:enabled="true"
            android:exported="true">
            <intent-filter>
                <action android:name="cn.jpush.android.intent.DaemonService" />
                <category android:name="com.sgy.sgy_jpush" />
            </intent-filter>

        </service>
        <!-- since 3.1.0 Required SDK 核心功能-->
        <provider
            android:authorities="com.sgy.sgy_jpush.DownloadProvider"
            android:name="cn.jpush.android.service.DownloadProvider"
            android:exported="true"
            />
        <!-- Required SDK核心功能-->
        <receiver
            android:name="cn.jpush.android.service.PushReceiver"
            android:enabled="true"
            android:exported="false">
            <intent-filter android:priority="1000">
                <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" />   <!--Required  顯示通知欄 -->
                <category android:name="com.sgy.sgy_jpush" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.USER_PRESENT" />
                <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
            </intent-filter>
            <!-- Optional -->
            <intent-filter>
                <action android:name="android.intent.action.PACKAGE_ADDED" />
                <action android:name="android.intent.action.PACKAGE_REMOVED" />

                <data android:scheme="package" />
            </intent-filter>
        </receiver>

        <!-- Required SDK核心功能-->
        <receiver android:name="cn.jpush.android.service.AlarmReceiver" android:exported="false"/>

        <!-- User defined.  For test only  用戶自定義的廣播接收器-->
        <receiver
            android:name="com.sgy.sgy_jpush.MyReceiver"
            android:exported="false"
            android:enabled="true">
            <intent-filter>
                <action android:name="cn.jpush.android.intent.REGISTRATION" /> <!--Required  用戶注冊SDK的intent-->
                <action android:name="cn.jpush.android.intent.MESSAGE_RECEIVED" /> <!--Required  用戶接收SDK消息的intent-->
                <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED" /> <!--Required  用戶接收SDK通知欄信息的intent-->
                <action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED" /> <!--Required  用戶打開自定義通知欄的intent-->
                <action android:name="cn.jpush.android.intent.CONNECTION" /><!-- 接收網絡變化 連接/斷開 since 1.6.3 -->
                <category android:name="com.sgy.sgy_jpush" />
            </intent-filter>
        </receiver>

        <!-- Required  . Enable it you can get statistics data with channel -->
        <meta-data android:name="JPUSH_CHANNEL" android:value="developer-default"/>
        <meta-data android:name="JPUSH_APPKEY" android:value="da075747e2a374d552993f2a" /> <!--  </>值來自開發者平台取得的AppKey-->


    </application>

</manifest>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM