-3

Im interested in running some custom analytics on my interactions with contacts on my phone.

Some things I would like to see are:
How many times was this contact called
How long did the conversation last
How many missed calls from this contact
How many answered calls from this contact

What time and date was an sms sent
What was its message content
What time and date was an sms received
What was its message content

If it was mms can i get the picture some how
Ill use a third party api for facial recognition and nudity checks (was it a nude, selfie, meme)

Is there a way to simply export this data into a xml or csv file? (How would I save pictures?)

My goal here is to make an app using some sort of android java sdk. Then using the app, ill upload to my web server and use php to do the analytics.

Where do i look to start getting the information i want to analyze?

Nazca
  • 112
  • 1
  • 7
  • This site is for narrowly-focused Questions dealing with one specific programming issue. Wider ranging questions leading to ongoing discussions are not appropriate here. Perhaps another site such as http://www.JavaRanch.com/. – Basil Bourque Mar 09 '18 at 05:03
  • This site is full of wonderfull helpful people like sharad who gave a good answer to my very direct question about programming. Thanks to sharad i now have enough information to do what i want and no longer need help. – Nazca Mar 09 '18 at 08:25
  • Thanks for the compliment, however @BasilBourque is correct this site is meant for narrow questions that focus on a spefic issue such as maybe an error you don't understand or something like that. – Sharad Khanna Mar 11 '18 at 00:31

1 Answers1

2

Try to look at these links:

PhoneStateListener

TelephonyManager

Read SMS

ContentResolver

To export your pictures from mms use a filestream and a bitmap:

private void GetMmsAttachment(String _id, String _data) 
{ 
    Uri partURI = Uri.parse("content://mms/part/" + _id ); 
    String filePath = "/sdcard/photo.jpg";
    InputStream is = null;
    OutputStream picFile = null;
    Bitmap bitmap = null;

    try { 
        is = getContentResolver().openInputStream(partURI); 
        bitmap = BitmapFactory.decodeStream(is);

        picFile = new FileOutputStream(filePath);
        bitmap.compress(Bitmap.CompressFormat.JPEG, 50, picFile);
        picFile.flush();
        picFile.close();
    } 
    catch (Exception e) 
    { 
        e.printStackTrace(); 
        //throw new MmsException(e); 
    } 
}

Also for photo Identification I recommend you use IBM Watson,.If the photo has text use Google Tesseract to extract the text.

Sharad Khanna
  • 352
  • 3
  • 11