mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-01-19 13:52:49 +08:00
Update README.md
This commit is contained in:
parent
9a44c236a5
commit
7e8bfe5ee2
23
README.md
23
README.md
@ -1,35 +1,34 @@
|
||||
## JPush PhoneGap Plugin ##
|
||||
###创建项目###
|
||||
1. cordova create 文件夹名字 包名 应用名字
|
||||
|
||||
```
|
||||
cordova create Myproj com.myproj.jpush MyTestProj
|
||||
```
|
||||
|
||||
2. 添加平台
|
||||
|
||||
```
|
||||
cd Myproj :不进行这一步可能会出现[RangeError:Maximum call stack size exceeded]
|
||||
|
||||
cordova platform add android
|
||||
```
|
||||
|
||||
### 安装 ###
|
||||
|
||||
1. 使用 phonegap 或者 cordova cli 添加插件(建议在git客户端下使用,在windows 的cmd界面下 该命令提示git command line tool 不可用):
|
||||
|
||||
```
|
||||
cordova plugin add https://github.com/jpush/jpush-phonegap-plugin.git
|
||||
```
|
||||
|
||||
2. 修改www/config.xml文件,添加或者覆盖以下字段
|
||||
|
||||
###Android 手工安装###
|
||||
1. 复制src/android/*.java 到cn/jpush/phonega/目录下(即:cn.jpush.phonegap的包下)
|
||||
|
||||
2. 复制src/android/armeabi/libjpush.so 到lib/armeabi/
|
||||
|
||||
3. 复制src/android/jpush-sdk-release1.5.0.jar 到lib/
|
||||
|
||||
4. 复制src/android/test_notification_layout.xml到res/layout/
|
||||
|
||||
5. 复制src/android/jpush_notification_icon.png 到res/drawable/
|
||||
|
||||
6. 修改 AndroidManifest.xml 在 manifest 节点下添加以下权限
|
||||
|
||||
```
|
||||
<!-- Required 一些系统要求的权限,如访问网络等-->
|
||||
<uses-permission android:name="$PACKAGE_NAME.permission.JPUSH_MESSAGE"/>
|
||||
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT"/>
|
||||
@ -45,9 +44,10 @@
|
||||
<permission
|
||||
android:name="$PACKAGE_NAME.permission.JPUSH_MESSAGE"
|
||||
android:protectionLevel="signature"/>
|
||||
|
||||
```
|
||||
7. 修改AndroidManifest.xml 在 manifest/application 节点下添加SDK相关组件声明
|
||||
|
||||
```
|
||||
<activity
|
||||
android:name="cn.jpush.android.ui.PushActivity"
|
||||
android:theme="@android:style/Theme.Translucent.NoTitleBar"
|
||||
@ -128,8 +128,7 @@
|
||||
<meta-data android:name="JPUSH_CHANNEL" android:value="developer-default"/>
|
||||
<meta-data android:name="JPUSH_APPKEY" android:value="299d0fee887820e7d90a68b2"/>
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user