Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto-populate android inbox

I am working on an android app to analyze a users message history.

One major issue is that i need a bank of messages to work with, ideally over a long period of time.

I have found how to send messages to the emulator via telnet but this is A. slow and B. messages are time stamped on arrival.

I would like suggestions on how to programmatically generate a pseudo-random inbox of say, 300 messages (content doesn't matter at this point, but i need a range of times and dates).

Update: As an idea, would it be possible to somehow load my phones (1.5 android) message history to the emulator?

like image 657
TrewTzu Avatar asked Aug 18 '26 15:08

TrewTzu


2 Answers

If you want to track and analyse the message history in your app, you can easily use a content provider for accessing SMS messages. But it's not documented in the public SDK.

If you use ContentResolver.query() with a Uri of content://sms you should be able to access these messages on 1.5(ECLAIR) and later version.

Please go through the link for details how to do all that:Referal for Content Provider

Also before beginning on Content Provider, please visit and understand the Android Developer Blog. Once: Android Developer Blog Warns to do that..

like image 83
Arpit Garg Avatar answered Aug 20 '26 05:08

Arpit Garg


the sms db is stored at /data/data/com.android.providers.telephony/databases/mmssms.db . Copy this from your phone onto the sdk. Or you could populate the db once and take a backup and restore it everytime.

like image 42
nandeesh Avatar answered Aug 20 '26 05:08

nandeesh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!