Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

Message to place order for medicine automatically sends #175

Open
HimanshuS01 opened this issue Jan 6, 2017 · 6 comments
Open

Message to place order for medicine automatically sends #175

HimanshuS01 opened this issue Jan 6, 2017 · 6 comments

Comments

@HimanshuS01
Copy link

Current Behaviour
When user going to place an order for medicines, orderMedicineDialog box is generated which shows two option->email and message.On clicking the message button the confirmation dialog is generated to either send the message or not.So if user select a cancel option or back pressed ,message sends automatically.

Expected Behaviour
Message(order should be placed) should only be send when user clicks the send button in confirmation dialog.

@chhavip @yatna @MeepyMay can I send PR?
Thanks.

@yatna
Copy link
Member

yatna commented Jan 8, 2017

@HimanshuS01 Yes, go ahead.

@HimanshuS01
Copy link
Author

@chhavip @yatna I have tried a lot but it seems that when we click the Send or Cancel button on the view confirmation dialog, it will send a message to its handler in its thread. But it seems that there is no way for capturing the click event(Send or Cancel) in the view confirmation dialog(i.e. generated automatically by android studio) .With reference to the below link:
http://stackoverflow.com/questions/21982319/view-confirmation-recharge-billing-dialog-when-send-sms

Instead of the current method that we are using, can we launch SMS application through intent ?as mentioned in the below link
http://stackoverflow.com/questions/2372248/launch-sms-application-with-an-intent

So what I am thinking that when the user clicks the message button in the Place Order dialog ,SMS application is launched through intent.

@yatna @chhavip can I continue with the above approach? Thanks :)

@m-murad
Copy link

m-murad commented Jan 25, 2017

@HimanshuS01
I think it can be done using startActivityForResult function

@HimanshuS01
Copy link
Author

startActivityForResult() method is basically used to send information from one activity to another and vice-versa. The android startActivityForResult method, requires a result from the second activity (activity to be invoked). Hey @free4murad but in our case we are not getting any result from second activity(i.e. SMS application)
so this can be simply done by just launching the SMS application through intent as mention in the below link
http://stackoverflow.com/questions/2372248/launch-sms-application-with-an-intent
Thanks :)

@HimanshuS01
Copy link
Author

A gentle reminder . Thanks :)

@HimanshuS01
Copy link
Author

@yatna @chhavip @anubhakushwaha Please have a look :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants