Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement "Quick Responses" #299

Closed
MatejKovacic opened this issue Aug 8, 2013 · 17 comments
Closed

Implement "Quick Responses" #299

MatejKovacic opened this issue Aug 8, 2013 · 17 comments
Assignees
Labels

Comments

@MatejKovacic
Copy link

Android has an useful option for rejecting call with SMS. When you receive a call, you can reject it with pre-prepared or custom SMS.

However, this SMS is not sent through TextSecure but through default Android application for sending SMS's.

Can this be changed?

@kenneththomasbrown
Copy link

This will become possible with Android 4.3.

See "Intent for handling Quick Responses" at https://developer.android.com/about/versions/jelly-bean.html

@BernhardPosselt
Copy link

I've got Android 4.4 and this is not possible yet, one of the problems that bugs me the most and why I dont run it as default SMS app

@moxie0 moxie0 self-assigned this Feb 26, 2014
@mcginty mcginty mentioned this issue Feb 28, 2014
@mcginty
Copy link
Contributor

mcginty commented Feb 28, 2014

Renamed issue to "Implement 'Quick Responses'" since that's the feature that needs to be added. This would be a great Pull Request if somebody wants to pick it up. On our list.

@santa4nt
Copy link
Contributor

santa4nt commented Mar 1, 2014

The skeleton is already in place. See: QuickResponseService.java in src/org/thoughtcrime/securesms/service/QuickResponseService.java and within AndroidManifest.xml:

<service android:name=".service.QuickResponseService"
         android:permission="android.permission.SEND_RESPOND_VIA_MESSAGE"
         android:exported="true" >
    <intent-filter>
        <action android:name="android.intent.action.RESPOND_VIA_MESSAGE" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="sms" />
        <data android:scheme="smsto" />
        <data android:scheme="mms" />
        <data android:scheme="mmsto" />
    </intent-filter>
</service>

I can take a gander at it if you'd like.

@moxie0
Copy link
Contributor

moxie0 commented Mar 2, 2014

Fair warning, it's actually a deceptively difficult change. The code is fairly well setup for the scenario where you receive an incoming message and don't have a cached MasterSecret, but it's not clear what to do when sending a message without a cached MasterSecret. If you actually have a passphrase configured, there will be no way to send the message using a secure session, for instance.

@santa4nt
Copy link
Contributor

santa4nt commented Mar 2, 2014

That's the first thing that came to my mind, too. Especially after reading the documentation that the implementing service should not spawn any activity and everything has to be done in the background.

@moxie0
Copy link
Contributor

moxie0 commented Mar 2, 2014

Easiest thing to do would be to start off by supporting the case where the passphrase is cached or there's no passphrase configured. Would at least be an improvement.

@asafh
Copy link

asafh commented Mar 3, 2014

Hi, please take a look at #962 and let me know what you think

@SanderGit
Copy link

The word QuickResponse was not mentioned in this issue yet but is in the error message when trying to send one:

Adding this keyword for findability.

@uniquePWD
Copy link

Two things, this issue seems to be getting conflated with the quick reply issue. This issue however is for "Reject Call and Send Text Reply".

@moxie0 I'm in agreement with you. Get the functionality for general users in place and then think about the implementation of the passphrase methodology. Which I'd simply suggest a popup password box proceeds the selection dialog of the quick message.

But as things stand, this is functionality that's suggested by all Android phones as standard and by not having something in place, it makes TextSecure look amateurish.

@fajabird
Copy link

Hi,
seems this issue still persists. What about implementing a small toast-message after someone tries to reject a call with a message that this funtionality is not supported yet because I already had some people asking me (the guy who recommended TS) what happened to their reject-messages. Or is someone already working this out?

@fajabird
Copy link

Ohh - I just took a look at the code and a "not supported yes" toast-message seems to be already implemented:

Toast.makeText(this,
getString(R.string.QuickResponseService_sorry_quick_response_is_not_yet_supported_by_textsecure),
Toast.LENGTH_LONG).show();

BUT it does not show up for me? Someone else getting that toast?

@McLoo
Copy link
Contributor

McLoo commented Jan 22, 2015

@fajabird shows up for me. Rejecting call with text ends up in rejecting with 'not supported' toast following :)

@merkste
Copy link

merkste commented Mar 1, 2015

I'd like to see the quick reply feature working, too. Any news for us on this one?

@asafh
Copy link

asafh commented Mar 1, 2015

@merkste, unfortunately I don't see myself tackling this in the immediate future - since I don't want to uninstall TextSecure from my daily phone. When I get a secondary phone (not too long I hope, but I can't promise nothing) I'll look into this again.

@JavaJens
Copy link

JavaJens commented Mar 1, 2015

@asafh You could:
a) Install two TextSecure versions in parallel and test with the browser extension (very buggy)
b) Specify what needs to be done to continue your development efforts and maybe point others in the right direction

@asafh
Copy link

asafh commented Mar 21, 2015

@JavaJens what I've done and moxie's input on what needs to be done is described pretty well over PR #962. Basically, what needs to be done is trying to get the key from the key caching service directly, if it is available go ahead with sending the message, otherwise show a toast with the "TextSecure is currently locked. Quick Response messages are disabled." or similar.

Since the code base has already changed quite a bit, I would the code in that PR's commit as a reference. It will be easier to simply do the similar work on a new branch from main.

If you decide to tackle this, and have questions you want to consult me about - feel free to send me a message here or at ["hello",String.fromCharCode(31*2+2)/regex scrapper/,"ous",".im"].join("")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests