Code Monkey home page Code Monkey logo

openfirelbs's Introduction

Build Status

openfireLBS

This is Openfire LBS(Location Based Service) plugin based on private extension protocol as the following but NOT based on XEP-0080(http://xmpp.org/extensions/xep-0080.html).

XMPP LBS Extension

1 Get users near me with my location

REQUEST

<iq id="c911" type="get" from="[email protected]/TCL-S960">
<query xmlns="com.nodexy.im.openfire.location">
	<item user="chris" lon="22.323009" lat="29.098763"/>
</query>
</iq>

RESPONSE

<iq id="c911" type="result" to="[email protected]/TCL-S960">
<query xmlns="com.nodexy.im.openfire.location">
	<item user="chris1" lon="22.323009" lat="29.098763" sex="0" online="30min"/>
	<item user="chris2" lon="22.323009" lat="29.098763" sex="0" online="30min"/>
	<item user="chris3" lon="22.323009" lat="29.098763" sex="0" online="30min"/>
	... ...
</query>
</iq>

2 Upload my location

REQUEST

<iq id="c912" type="set" from="[email protected]/TCL-S960">
<query xmlns="com.nodexy.im.openfire.location">
	<item user="chris" lon="22.323009" lat="29.098763"/>
</query>
</iq>

RESPONSE

<iq id="c912" type="result" to="[email protected]/TCL-S960">
<query xmlns="com.nodexy.im.openfire.location"/>
</iq>

3 Share my location to friends

REQUEST

<iq id="c913" type="set" from="[email protected]/TCL-S960" to="[email protected]/TCL-S960">
<query xmlns="com.nodexy.im.openfire.location">
	<item user="chris" lon="22.323009" lat="29.098763"/>
</query>
</iq>

RESPONSE

<iq id="c913" type="result" to="[email protected]/TCL-S960" from="[email protected]/TCL-S960">
<query xmlns="com.nodexy.im.openfire.location"/>
</iq>

WARNING

The source code has no functional testing , pls DO NOT use it in your business production directly.

openfirelbs's People

Contributors

node 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

Watchers

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

openfirelbs's Issues

insert failed

Hello,I followed your code but found it doesn't work.I did it as the following steps:
1.Create a new table "ofLocation" in database "openfire"
2.add your plugin in openfire source,and build it.
3.use smack API create a XML request like this(the same as your " 2 Upload my GEO location" ):
(https://cloud.githubusercontent.com/assets/4738938/3793036/3f237074-1b8a-11e4-99c0-85b0e2eef394.png)

result : sql excuting is right,but I found nothing in table "ofLocation".

Could anyone do me a favor ? Thanks in advance.

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.