Giter Site home page Giter Site logo

mqtt-subscriber's Introduction

MQTT-Subscriber-

An app to demonstrate MQTT subscribe using Paho Android MQTT Library .

##Usage

1.Clone project in Android Studio .

2.Open MainActivity.java and substitute your MQTT Username and password you got from CloudMQTT Dashboard .(See below)

3.Download [MQTTLens] (https://chrome.google.com/webstore/detail/mqttlens/hemojaaeigabkbcookmlgmdigohjobjm?hl=en)

4.In MainActivity.java ,put a topic you want app to subscribe to . (For e.g. door/status)

5.In MQTTLens ,create a new connection , name it anything you want (say CloudMQTT Broker) and substitute username,password ,URL and Port number as you get from CloudMQTT Control Pannel

6.Now in MQTT Lens , put the same topic in Publish Topic field to which you subscribed to in app in step 4 .

7.Put "open" and click publish and then "close" and click publish .

##CloudMQTT

CloudMQTT is hosted MQTT broker , for testing and learning purpose it's free tier is enough and I find it better compared to using HiveMQ or Eclipse.

Just sign up and opt for free tier plan and get required credentials from CloudMQTT Control Pannel

mqtt-subscriber's People

Contributors

charany1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mqtt-subscriber's Issues

cannot subscribe !

nullpointerexception accures when tryung to sub.
have you maneged to solve this problam?

onFailure

I use user name, password, mqtt server path and port from Instance info.
But it could not connect.
Could you please tell me details which (username, password, server path, port) should I modify?

Thank you very much.

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.