How to access sms inbox from javascript on android (phonegap)

11,358

Solution 1

There is a plugin for doing it with phonegap,

Take a look at SMS reception plugin for Phonegap

Solution 2

This functionality is not currently in PhoneGap though it might come in a future release. This is something that whole community would probably appreciate!

I think you will want to create a plugin to achieve this functionality for the moment. Some examples of plugins are here: https://github.com/phonegap/phonegap-plugins.

Here is an example of using an Android ContentProvider to interact with the SMS inbox How to delete an SMS from the inbox in Android programmatically?

Share:
11,358
naugtur
Author by

naugtur

I am a JavaScript developer with experience in building unusual browser applications, complicated live data visualization, creating tools for developers and building back-ends in node.js. Senior JS developer, R&D and speaker. Open Source enthusiast Started using jQuery about the year 2007, early adopter of jQuery Mobile Framework (started at the alpha2 version, first jquery-mobile silver badge on stackoverflow) A fan of Browseify http://naugtur.pl https://github.com/naugtur

Updated on September 19, 2022

Comments

  • naugtur
    naugtur over 1 year

    I just discovered PhoneGap and was wondering if there's a way to access the SMS inbox from Javascript with it. Or if there's another easy way to do it in an app created from a HTML/CSS/JS solution.

    There's no info about SMS access in the phonegap docs, but maybe the inbox is avaliable as a url or a folder?

    I would like to stick with phonegap so that the app would work on many devices, but an android only solution is satisfactory too.

  • naugtur
    naugtur over 13 years
    That's bad news for me, as I have no intention of learning how to create native apps for all the platforms... Can I issue a feature request or comment an existing one somewhere?
  • davejohnson
    davejohnson over 13 years
    I would try asking on the phonegap mailing list. Creating a plugin for phonegap does not involve that much native coding and is often similar between Android and BlackBerry at least.
  • PJ1405
    PJ1405 over 8 years
    This is only for receiving the incoming smses but to access all smses which are there in inbox already, any plugin is not there.