Code Monkey home page Code Monkey logo

titanium_module_jpush_android's People

Contributors

liumingxing avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

xraywu

titanium_module_jpush_android's Issues

关于Tiapp.xml的配置和Module的使用

你好,根据Readme写了个大概的demo,可是按按钮准备订阅时系统提示了如下错误 (Ti SDK 5.0.4), 不知道应该如何修改?

[ERROR] :  JPush: [AndroidUtil] No target service !
[WARN] :   JPush: [AndroidUtil] AndroidManifest.xml missing required service: cn.jpush.android.service.DaemonService
[ERROR] :  JPush: [AndroidUtil] The permission should be defined - com.my.package.permission.JPUSH_MESSAGE
[WARN] :   JPush: [AndroidUtil] You should make main activity extends InstrumentedActivity (JPush), otherwise you will not see user click and user active time start on report in Portal.

我只在controller里面添加了一个按按钮订阅的事件,没有写处理点击的事件

$.registerJPushBtn.addEventListener("click",function(){
    push.setAlias(Ti.App.Properties.getString("userid", "test12345"), function(e){
          Ti.API.log("register to jpush code: " + e.code + ", token: " + e.device_token);
    });
});

Tiapp.xml里面添加的配置如下,基本就是复制了readme里面的内容然后改了几个包名和Appkey:

<service android:enabled="true" android:exported="false" android:name="cn.jpush.android.service.PushService">
    <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>
<receiver android:enabled="true" android:name="cn.jpush.android.service.PushReceiver">
    <intent-filter android:priority="1000">
        <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY"/>
        <category android:name="com.my.package"/>
    </intent-filter>
    <intent-filter>
        <action android:name="android.intent.action.USER_PRESENT"/>
        <action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
    </intent-filter>
    <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>
<receiver android:name="com.mamashai.jpush.MamashaiReceiver">
    <intent-filter>
        <action android:name="cn.jpush.android.intent.REGISTRATION"/>
        <action android:name="cn.jpush.android.intent.UNREGISTRATION"/>
        <action android:name="cn.jpush.android.intent.MESSAGE_RECEIVED"/>
        <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED"/>
        <action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED"/>
        <action android:name="cn.jpush.android.intent.ACTION_RICHPUSH_CALLBACK"/>
        <action android:name="cn.jpush.android.intent.CONNECTION"/>
        <category android:name="com.my.package"/>
    </intent-filter>
</receiver>
<activity
    android:configChanges="orientation|keyboardHidden"
    android:name="cn.jpush.android.ui.PushActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar">
    <intent-filter>
        <action android:name="cn.jpush.android.ui.PushActivity"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <category android:name="com.my.package"/>
    </intent-filter>
</activity>
<service android:enabled="true" android:exported="false" android:name="cn.jpush.android.service.DownloadService"/>
<receiver android:name="cn.jpush.android.service.AlarmReceiver"/>
<meta-data android:name="JPUSH_CHANNEL" android:value="google-play"/>
<meta-data android:name="JPUSH_APPKEY" android:value="myappkey"/>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.