00d / google-voice-java

Automatically exported from code.google.com/p/google-voice-java
0 stars 0 forks source link

Feature: Delete SMS/Voicemail/Calls Permanantly #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently calling the deleteMessage() method in the Voice class deletes the 
message from the google voice inbox.  It does not entirely remove it from the 
server.  These messages can still be accesses in the trash folder.

If we want to delete a message from google voice entirely, we need another way 
to do that.

This could be a security issue, as a complete record of all communications are 
stored by google, and must be manually deleted through the browser interface.  
If someone is negligent and their account is compromised, that could be a trove 
of contact information in the wrong hands.  If we can automate complete 
deletion, this risk will be reduced.

Original issue reported on code.google.com by walt.jav...@gmail.com on 4 Mar 2011 at 11:29

GoogleCodeExporter commented 9 years ago
Would you like to write this feature and be added as a committer?

Original comment by malone.j...@gmail.com on 6 Mar 2011 at 3:08

GoogleCodeExporter commented 9 years ago
Sure.  I can figure it out.

Original comment by walt.jav...@gmail.com on 6 Mar 2011 at 3:11

GoogleCodeExporter commented 9 years ago
OK, you should be added now

Original comment by malone.j...@gmail.com on 6 Mar 2011 at 10:38

GoogleCodeExporter commented 9 years ago

Original comment by walt.jav...@gmail.com on 22 Mar 2011 at 6:13

GoogleCodeExporter commented 9 years ago

Original comment by walt.jav...@gmail.com on 22 Mar 2011 at 6:24

GoogleCodeExporter commented 9 years ago
Hi Walt, maybe you already fixed this issue, but I wanted to ask.  Any progress?

Original comment by malone.j...@gmail.com on 3 Feb 2012 at 3:29

GoogleCodeExporter commented 9 years ago
    // /voice/inbox/deleteForeverMessages/
    public String deleteForever(String[] messagIds) throws IOException {
        String out = "";
        String smsdata = "";
        for (String _mid : messagIds) {
            smsdata += "&" + URLEncoder.encode("messages", enc) + "=" + _mid;
        }
        smsdata += "&_rnr_se=";
        smsdata += URLEncoder.encode(rnrSEE, enc);

        System.out.println("smsdata: " + smsdata);

        URL deleteurl = new URL("https://www.google.com/voice/inbox/deleteForeverMessages/");

        URLConnection smsconn = deleteurl.openConnection();
        smsconn.setRequestProperty("Authorization", "GoogleLogin auth=" + authToken);
        smsconn.setRequestProperty("User-agent", USER_AGENT);

        smsconn.setDoOutput(true);
        OutputStreamWriter callwr = new OutputStreamWriter(smsconn.getOutputStream());
        callwr.write(smsdata);
        callwr.flush();

        BufferedReader callrd = new BufferedReader(new InputStreamReader(smsconn.getInputStream()));

        String line;
        while ((line = callrd.readLine()) != null) {
            out += line + "\n\r";

        }

        callwr.close();
        callrd.close();

        if (out.equals("")) {
            throw new IOException("No Response Data Received.");
        }

        return out;
    }

Original comment by gherty.h...@gmail.com on 22 Apr 2014 at 11:53

GoogleCodeExporter commented 9 years ago
I think you must put message in trash with deleteMessage first.  then delete 
forever

Original comment by gherty.h...@gmail.com on 22 Apr 2014 at 11:54