accessing received mails

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

accessing received mails

Postby themisomagos » Mon Feb 02, 2009 12:25 pm

Hello.
i am trying to make a little app for android that will act as a spam filter.For that i need to find a way to access the mails in the android inbox of any account.do you know how this can be done?

thank you in advance
themisomagos
themisomagos
Freshman
Freshman
 
Posts: 2
Joined: Mon Feb 02, 2009 11:56 am

Top

Postby themisomagos » Thu Feb 12, 2009 8:49 pm

okay.
i found the db in which emails are stored.
for some reason i cant receive any mails but i m able to send.
it is not important right now.
so i am using the code below to access the db in my java code.
but "mydatabase" openDatabase function requires a path string but the string below is not valid (although it is in android's local filesystem)
do you know what i can do for the path to be valid?
(Actually i want to access a .db file in the androids local file system)


thanks in advance!


Code: Select all
private  SQLiteDatabase mydatabase;
String emails=" ";


        mydatabase.openDatabase("/data/data/com.android.email/databases/3e7b0d2b-1256-4521-979e-bb4fa37c1fe6.db", null, MODE_WORLD_READABLE);
        mCursor= mydatabase.query("messages", new String[] { "text_content" }, "folder_id=3", null, null, null, null);
        int numRows = mCursor.getCount();
          mCursor.isFirst();
          
       

        for (int i = 0; i < numRows; ++i) {
             emails+="\n\n";
             emails+=mCursor.getString(0);
             
           
             mCursor.moveToNext();
        }
themisomagos
Freshman
Freshman
 
Posts: 2
Joined: Mon Feb 02, 2009 11:56 am

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: Google Feedfetcher and 4 guests