dimanche 21 février 2016

Get _id from sent message

I'm making an app to send/receive messages. I want to save the message ID in a database for later use. But I can't find a way to save the ID from the sent message.

I send the messages like this:

if(!toAddress.equals(""))
    {
        SmsManager manager = SmsManager.getDefault() ;
        manager.sendTextMessage(toAddress, null, bodyToSend, null, null);
        DBConnect db = new DBConnect(act);
        db.saveTranslatedSMS(ID,result); //It's this ID that I need
    }

Any ideas? I'm kind of a noob in android developing... sorry....

Aucun commentaire:

Enregistrer un commentaire