user644749
user644749

Reputation: 21

Location based messaging

Im doing a project on location based services, in which i have the following conditions Set Location manually ( With a radius )

On reaching that location i need to trigger SMS activity

please tell how to go about doing this.

Upvotes: 0

Views: 387

Answers (2)

yershuachu
yershuachu

Reputation: 788

Now it's much simpler to implement scenarios like this using existing solutions.

For example using Matchmore Kotlin SDK (https://github.com/matchmore/alps-android-sdk)

You could easily create a messeage using their publication:

val publication = Publication("LocationBasedChat", 60.0, 1000.0)
publication.properties = hashMapOf("msg" to "message you want to broadcast")
createPublication(publication, { result ->
    Log.i(TAG, "Message created ${result.topic}")
}, Throwable::printStackTrace)

plus you could subscribe to any messages around by:

val subscription = Subscription("LocationBasedChat", 60.0, 1000.0)
createSubscription(subscription, { result ->
    Log.i(TAG, "Subscription created ${result.topic}")
}, Throwable::printStackTrace)

Whenever you receive a match - it means you've got new message to show to user.

matchMonitor.addOnMatchListener { matches, _ ->
    Log.i(TAG, "You messages found: ${matches.size}")
}
matchMonitor.startPollingMatches()

If you need more they cover plenty of scenarios here https://matchmore.io/

Upvotes: 2

n3utrino
n3utrino

Reputation: 2381

Use a Proximity Alert

Upvotes: 0

Related Questions