Beginner Android dev here.
I'm trying to create an app that will read the SMS messages stored on the device and then give the user statistics about their habits (like who they message often, common words, etc).
But to my knowledge, there doesn't seem to be a way to do this. I've looked around on forums and the most anyone talks about is accessing the inbox where you can find messages the user hasn't read. How then can the default app and third-party (Handcent for example) display the same texts? They don't keep their own database because Handcent will display all texts upon fresh install.
tl;dr: How do I read SMS messages on an Android devices, specifically messages that have been read before.
For a concrete example of accessing the SMS/MMS database, take a look at gTalkSMS.
You are going to need to call the SmsManager class. You are probably going to need to use the STATUS_ON_ICC_READ constant and maybe put what you get there into your apps local db so that you can keep track of what you have already read vs the new stuff for your app to parse through.
BUT bear in mind that you have to declare the use of the class in your manifest, so users will see that you have access to their SMS called out in the permissions dialogue they get when they install. Seeing SMS access is unusual and could put some users off. Good luck.
Here is the link that goes into depth on the Sms Manager
Do the following, download SQLLite Database Browser from here:
Locate your db. file in your phone.
Then, as soon you install the program go to: "Browse Data", you will see all the SMS there!!
You can actually export the data to an excel file or SQL.
Related
I am trying to perform WhatsApp chat analysis and basically want to have the messages instantly transferred into a text file for further processing.
The issue is that WhatsApp does create a local backup daily at around 2:00 am in the msgstore.db, however, I wish to receive the texts and media instantly after every message. In a nutshell, is real-time text and media retrieval of WhatsApp messages possible on every message?
P.S. I did try searching online for the mining methods for WhatsApp, but they usually seem to be based on the local backups that have the lowest backup interval of a day, whereas I want it on every message.
Update: As suggested by #pette, I tried emulator method and it too is able to perform chat analysis on the daily local backup. I came across many research papers and realized that WhatsApp does not allow for third party apps to sniff on its application.
Also, I tried using automation technique wherein, I use whatsapp web and automate to copy text on every message. But, these techniques are limited to computer application.
Is it possible to pipe-out whatsapp texts to another text file or log file?
you can install an android emulator, as x86, install the apk of whatsapp, mount the disk of your emulator and open msgstore.db, but you can only retrieve the text files
Maybe u can use emulator and write a script which will monitor msgstore.db file and date/time it's last time changed. It will be changed when ever new message is received or sent. Than if it's modified u can read messages from it. This is idea, as I am doing same thing on different type of DB with PHP.
Every file has time stamp when it's changed. So give it a try.
I have a requirement, wherein I have 4 android apps, which are sending notifications to a user, at a fixed time of the day. A user could have one, or more of these apps installed on his phone.
I want only one of the apps(any one) to show this notification to the user, because multiple apps popping up notifications is a bad user experience.
For this I need to share some data across the apps.
I was thinking of a mutex/lock based approach, the problem is, where do I store it?
Problems:
Shared Prefs: I don't know which app wrote the data first, and from which app's context should I read.
SQLite: Same Problem as above and app uninstalls need to be handled and SD card might be missing
Server: Mostly offline app, dont want to add internet permission just for this
I see files at a common location as the only way to store this information.
Is there any better way
As you said that the easiest ways is with file,
I did this before and i too wasn't able to find more easy way.
when you show the notification first time then Just make a new file anywhere which can be common for any app and then check if file is exist.
if it exist then don't show the notification and if not then show and make file again, also remember to delete the file from any of your app when day changed, use AlarmManager for this.
hope it helps.
I'm using MIT AppInventor. I can't find a way to send a Skype message from my application. I know that there's an intent for automated calling with Data Uri (skype:test_username?call). I'm wondering if that's possible using ActivityStarter. If not, any solution is accepted. Another way I've found (but not used yet) is to "steal" Skype's message history (main.db, SQLite 3 format), and add the message as pending, then replace the original database with the new one. This method uses root (that's ok, I have root), but I still can't find a way to edit the SQLite database. Any ideas?
I'm developing an app and one thing I would like to do it allow users to send/share data from the app with others vi MMS or by email. I have been searching but haven't found anywhere to get started on solving the problem.
Basically, I am going to programatically draw the data from an SQLite DB and put it into a delimited file (similar to a .csv) then I want to allow the user to 'export' or send it via MMS or Email. Does anyone have any tips on how I can get my program to open the messaging application and add the attachment at the users direction? Really just need some beginning info so I have a place to start.
Here is what you are looking for. This should be a good start
launch sms application with an intent
I have 5(any number) android applications which will share some data.
Now when 1st/2nd/3rd..(i couldn't know) android application will get installed by user, it will save a string in the memory(internal memory),
When any other application will get installed, it should know that one of the app has already written data and now it should act as user of this data.
To sum up, first app installed will act as provider and others as users...but all the applications can be potential provider and other as users..
Is this feasible?
i tried using file/shared preference/content providers...but in file, you should know file path before using it which is dependent on package name..
In shared preference, we have to create package context..
In content provider, we have to import provider package..
My real motive is, actually in each app, i register the user first time...
now i want , if user install 2nd app from me, it can just use data of first app and do not ask for register..
but the problem is i don't know which app will be installed first by user..
Please help if i can use some other approach??
i found one thread related to this...
https://groups.google.com/forum/?fromgroups=#!topic/android-developers/W-oOa0x9amg
http://android.bigresource.com/Android-How-to-share-data-between-applications-with-no-dependency-HRMMGMIkL.html
This thread pretty much answers my question, in terms of feasibility and options i have for this scenario.