Giter VIP home page Giter VIP logo

androidpushnotificationsdemo's People

Contributors

tokudu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

androidpushnotificationsdemo's Issues

about keepAlive() function

In keepAlive() function in PushService line 292, as we can see: if "mConnection.sendKeepAlive();" this line throws a MqttException Exception and catched by the exception block, we will cancle both KEEP_ALIVE alarm and RECONNECT alarm.Thus we will lose connection with the server forever! And will not reconnect at some point in the future. What I'm worried is the CLIENT will completely lose connection with the SERVER forever? Am I right and how to figure out the problem?

Subscribe Topic

Hi,

I want to subscribe from topic. How can I subscribe from topic ?

Best Regards,

Licensing information of the Project

Hi Anton,
Thanks for such a simple example for android MQTT client.Having said that I would request you to kindly let us know about the licencing of the project as it is not mentioned in the project directory.

Thanks and Regards
Ashish Vyas

NetworkOnMainThreadException with newer Android versions

12-05 13:02:04.201: ERROR/com.app.service.PushService(5696): MqttException
        com.ibm.mqtt.MqttException
        at com.ibm.mqtt.MqttBaseClient.doConnect(Unknown Source)
        at com.ibm.mqtt.MqttBaseClient.connect(Unknown Source)
        at com.ibm.mqtt.MqttClient.connect(Unknown Source)
        at com.ibm.mqtt.MqttClient.connect(Unknown Source)
        at com.app.service.PushService$MQTTConnection.<init>(PushService.java:446)
        at com.app.service.PushService.connect(PushService.java:284)
        at com.app.service.PushService.reconnectIfNecessary(PushService.java:378)
        at com.app.service.PushService.onStartCommand(PushService.java:191)
        at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2490)
        at android.app.ActivityThread.access$1900(ActivityThread.java:130)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1292)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:137)
        at android.app.ActivityThread.main(ActivityThread.java:4745)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:511)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
        at dalvik.system.NativeStart.main(Native Method)
        Caused by: android.os.NetworkOnMainThreadException
        at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1117)
        at java.net.InetAddress.lookupHostByName(InetAddress.java:385)
        at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
        at java.net.InetAddress.getByName(InetAddress.java:289)
        at java.net.InetSocketAddress.<init>(InetSocketAddress.java:105)
        at java.net.InetSocketAddress.<init>(InetSocketAddress.java:90)
        at com.ibm.mqtt.j2se.MqttJava14NetSocket.<init>(Unknown Source)
        at com.ibm.mqtt.j2se.MqttJavaNetSocket.setConnection(Unknown Source)
        at com.ibm.mqtt.Mqtt.tcpipConnect(Unknown Source)

Seems to happen on JB+ now.

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.