涉及到Jar包Cordova自定義插件插件的plugin.xml文件

  1. <?xml version="1.0" encoding="UTF-8"?>  
  2. <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"  
  3.         xmlns:android="http://schemas.android.com/apk/res/android"  
  4.         id="cn.jpush.phonegap.JPushPlugin"  
  5.         version="2.0.2">  
  6.   
  7.     <name>JPush Plugin</name>  
  8.     <description>JPush for cordova plugin</description>  
  9.     <author>JPush</author>  
  10.     <keywords>JPush,push</keywords>  
  11.     <license>Apache 2.0 License</license>  
  12.   
  13.     <engines>  
  14.         <engine name="cordova" version=">=3.0"/>  
  15.     </engines>  
  16.   
  17.     <js-module src="www/JPushPlugin.js" name="JPushPlugin">  
  18.             <clobbers target="window.plugins.jPushPlugin"/>  
  19.     </js-module>  
  20.   
  21.     <platform name="ios">  
  22.             <config-file target="config.xml" parent="/*">  
  23.                 <feature name="JPushPlugin">  
  24.                     <param name="ios-package" value="JPushPlugin"/>  
  25.                 </feature>  
  26.             </config-file>  
  27.   
  28.             <header-file src="src/ios/Plugins/JPushPlugin.h"/>  
  29.             <source-file src="src/ios/Plugins/JPushPlugin.m"/>  
  30.   
  31.             <header-file src="src/ios/lib/APService.h" />  
  32.             <source-file src="src/ios/lib/libPushSDK-1.8.3.a" framework="true" />  
  33.             <header-file src="src/ios/Plugins/AppDelegate+JPush.h"/>  
  34.             <source-file src="src/ios/Plugins/AppDelegate+JPush.m"/>  
  35.             <resource-file src="src/ios/PushConfig.plist" />  
  36.             <framework src="CFNetwork.framework" weak="true" />  
  37.             <framework src="CoreFoundation.framework" weak="true" />  
  38.             <framework src="CoreTelephony.framework" weak="true" />  
  39.             <framework src="SystemConfiguration.framework" weak="true" />  
  40.             <framework src="CoreGraphics.framework" weak="true" />  
  41.             <framework src="Foundation.framework" weak="true" />  
  42.             <framework src="UIKit.framework" weak="true" />  
  43.             <framework src="Security.framework" weak="true" />  
  44.             <framework src="libz.dylib" weak="true" />  
  45.   
  46.         </platform>  
  47.   
  48.     <!-- android -->  
  49.     <platform name="android">  
  50.   
  51.         <config-file target="res/xml/config.xml" parent="/*">  
  52.             <feature name="JPushPlugin">  
  53.                 <param name="android-package" value="cn.jpush.phonegap.JPushPlugin"/>  
  54.             </feature>  
  55.         </config-file>  
  56.   
  57.         <config-file target="AndroidManifest.xml" parent="/manifest">  
  58.             <!-- Required  一些系統要求的權限,如訪問網絡等-->  
  59.             <uses-permission android:name="$PACKAGE_NAME.permission.JPUSH_MESSAGE"/>  
  60.             <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT"/>  
  61.             <uses-permission android:name="android.permission.INTERNET"/>  
  62.             <uses-permission android:name="android.permission.WAKE_LOCK"/>  
  63.             <uses-permission android:name="android.permission.READ_PHONE_STATE"/>  
  64.             <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>  
  65.             <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>  
  66.             <uses-permission android:name="android.permission.VIBRATE"/>  
  67.             <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>  
  68.             <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>  
  69.             <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>  
  70.             <uses-permission android:name="android.permission.WRITE_SETTINGS"/>  
  71.             <permission  
  72.                     android:name="$PACKAGE_NAME.permission.JPUSH_MESSAGE"  
  73.                     android:protectionLevel="signature"/>  
  74.         </config-file>  
  75.         <config-file target="AndroidManifest.xml" parent="/manifest/application">  
  76.             <!-- Required SDK核心功能-->  
  77.             <activity  
  78.                     android:name="cn.jpush.android.ui.PushActivity"  
  79.                     android:theme="@android:style/Theme.Translucent.NoTitleBar"  
  80.                     android:configChanges="orientation|keyboardHidden">  
  81.                 <intent-filter>  
  82.                     <action android:name="cn.jpush.android.ui.PushActivity"/>  
  83.                     <category android:name="android.intent.category.DEFAULT"/>  
  84.                     <category android:name="$PACKAGE_NAME"/>  
  85.                 </intent-filter>  
  86.             </activity>  
  87.             <!-- Required  SDK核心功能-->  
  88.             <service  
  89.                     android:name="cn.jpush.android.service.DownloadService"  
  90.                     android:enabled="true"  
  91.                     android:exported="false">  
  92.             </service>  
  93.             <!-- Required SDK 核心功能-->  
  94.             <service  
  95.                     android:name="cn.jpush.android.service.PushService"  
  96.                     android:enabled="true"  
  97.                     android:exported="false">  
  98.                 <intent-filter>  
  99.                     <action android:name="cn.jpush.android.intent.REGISTER"/>  
  100.                     <action android:name="cn.jpush.android.intent.REPORT"/>  
  101.                     <action android:name="cn.jpush.android.intent.PushService"/>  
  102.                     <action android:name="cn.jpush.android.intent.PUSH_TIME"/>  
  103.   
  104.                 </intent-filter>  
  105.             </service>  
  106.             <!-- Required SDK核心功能-->  
  107.             <receiver  
  108.                     android:name="cn.jpush.android.service.PushReceiver"  
  109.                     android:enabled="true">  
  110.                 <intent-filter android:priority="1000">  
  111.                     <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY"/>  
  112.                     <!--Required  顯示通知欄 -->  
  113.                     <category android:name="$PACKAGE_NAME"/>  
  114.                 </intent-filter>  
  115.                 <intent-filter>  
  116.                     <action android:name="android.intent.action.USER_PRESENT"/>  
  117.                     <action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>  
  118.                 </intent-filter>  
  119.                 <!-- Optional -->  
  120.                 <intent-filter>  
  121.                     <action android:name="android.intent.action.PACKAGE_ADDED"/>  
  122.                     <action android:name="android.intent.action.PACKAGE_REMOVED"/>  
  123.                     <data android:scheme="package"/>  
  124.                 </intent-filter>  
  125.             </receiver>  
  126.   
  127.             <!-- User defined.  For test only  用戶自定義的廣播接收器 -->  
  128.             <receiver  
  129.                     android:name="cn.jpush.phonegap.MyReceiver"  
  130.                     android:enabled="true">  
  131.                 <intent-filter android:priority="1000">  
  132.                     <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY"/>  
  133.                     <!-- Required  顯示通知欄 -->  
  134.                     <category android:name="$PACKAGE_NAME"/>  
  135.                 </intent-filter>  
  136.                 <intent-filter>  
  137.                     <action android:name="cn.jpush.android.intent.REGISTRATION"/>  
  138.                     <!-- Required  用戶註冊SDK的intent -->  
  139.                     <action android:name="cn.jpush.android.intent.UNREGISTRATION"/>  
  140.                     <action android:name="cn.jpush.android.intent.MESSAGE_RECEIVED"/>  
  141.                     <!-- Required  用戶接收SDK消息的intent -->  
  142.                     <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED"/>  
  143.                     <!-- Required  用戶接收SDK通知欄信息的intent -->  
  144.                     <action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED"/>  
  145.                     <!-- Required  用戶打開自定義通知欄的intent -->  
  146.                     <action android:name="cn.jpush.android.intent.ACTION_RICHPUSH_CALLBACK"/>  
  147.                     <!-- Optional 用戶接受Rich Push Javascript 回調函數的intent -->  
  148.                     <category android:name="$PACKAGE_NAME"/>  
  149.                 </intent-filter>  
  150.             </receiver>  
  151.             <!-- Required SDK核心功能-->  
  152.             <receiver android:name="cn.jpush.android.service.AlarmReceiver"/>  
  153.             <!-- Required  . Enable it you can get statistics data with channel -->  
  154.             <meta-data android:name="JPUSH_CHANNEL" android:value="developer-default"/>  
  155.             <meta-data android:name="JPUSH_APPKEY" android:value="your appkey"/>  
  156.         </config-file>  
  157.   
  158.         <source-file src="src/android/jpush-sdk-release1.7.5.jar" target-dir="libs"/>  
  159.         <source-file src="src/android/armeabi/libjpush175.so" target-dir="libs/armeabi"/>  
  160.         <source-file src="src/android/armeabi-v7a/libjpush175.so" target-dir="libs/armeabi-v7a"/>  
  161.         <source-file src="src/android/arm64-v8a/libjpush175.so" target-dir="libs/arm64-v8a"/>  
  162.   
  163.         <source-file src="src/android/JPushPlugin.java" target-dir="src/cn/jpush/phonegap"/>  
  164.         <source-file src="src/android/MyReceiver.java" target-dir="src/cn/jpush/phonegap"/>  
  165.           <source-file src="src/android/test_notification_layout.xml" target-dir="res/layout"/>  
  166.           <source-file src="src/android/jpush_notification_icon.png" target-dir="res/drawable"/>  
  167.     </platform>  
  168. </plugin> 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章