Send And Receive Sms Using Kivy

1,394 views
Skip to first unread message

ismail nagi

unread,
Feb 2, 2021, 2:44:47 PM2/2/21
to Kivy users support
Hi everyone, I am Creating a money transfer system in kivy/kivymd. After every transaction i need a message to be sent to the sender and receiver. As for now i am using email to send the messages. Is there any way that i can implement this feature. Thank You

kenechukwu Akubue

unread,
Feb 2, 2021, 2:47:37 PM2/2/21
to kivy-...@googlegroups.com
use twillo

On Tue, 2 Feb 2021 at 20:44, ismail nagi <freelance...@gmail.com> wrote:
Hi everyone, I am Creating a money transfer system in kivy/kivymd. After every transaction i need a message to be sent to the sender and receiver. As for now i am using email to send the messages. Is there any way that i can implement this feature. Thank You

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/f8d8dca4-20cd-41a2-8569-bdbbfe55fbbbn%40googlegroups.com.
Message has been deleted

ismail nagi

unread,
Feb 3, 2021, 12:18:49 AM2/3/21
to Kivy users support
Thank You. Is there any free alternatives?
Message has been deleted

ismail nagi

unread,
Feb 3, 2021, 1:42:27 AM2/3/21
to kivy-...@googlegroups.com
Yes. If I may ask please, because I don't understand it quite well. Does plyer automatically send the SMS or does it just open the default messaging app on the phone?

On Wed, 3 Feb 2021, 9:31 am planckp...@gmail.com, <planckp...@gmail.com> wrote:
Did you look at Plyer ?

Inside Plyer it looks pretty simple:
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/ICAiXyyneXQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/4dda7ce6-967c-47cc-bc29-aa9cbe9475c9n%40googlegroups.com.

planckp...@gmail.com

unread,
Feb 3, 2021, 1:43:26 AM2/3/21
to Kivy users support
Sending a SMS looks easy just look at the Plyer implementation, or just use Plyer.

Receiving a text presumably means the app receiving all texts, is that what you want?


On Tuesday, February 2, 2021 at 7:18:49 PM UTC-10 freelance...@gmail.com wrote:

planckp...@gmail.com

unread,
Feb 3, 2021, 1:46:05 AM2/3/21
to Kivy users support
Does plyer automatically send the SMS or does it just open the default messaging app on the phone?

If you don't understand the code, build a small test case and see what happens.

ismail nagi

unread,
Feb 3, 2021, 1:54:19 AM2/3/21
to kivy-...@googlegroups.com
Ok. In details...
A transaction is made through the app
Example, someone sends money
Another person receives money
The messages for the transaction is sent over mobile automatically and is sent through the default messaging app on the phone...that's all
Thank you again

You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/ICAiXyyneXQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/1af42d6b-ff8d-41ea-9e31-1ac55a2c0479n%40googlegroups.com.

planckp...@gmail.com

unread,
Feb 3, 2021, 12:41:32 PM2/3/21
to Kivy users support
Perhaps I misunderstood the question.

Is the question:
How to have your app share a string with the default texting app, and have the default texting app automatically send the string as a text?

ismail nagi

unread,
Feb 3, 2021, 1:08:51 PM2/3/21
to kivy-...@googlegroups.com

planckp...@gmail.com

unread,
Feb 3, 2021, 4:08:38 PM2/3/21
to Kivy users support
I can show you the Python app basics, but you'll have to figure out some details, and you'll have to research how texting apps behave.

How to have your app share a string

To share a string, this code will open a share sheet:

from android import mActivity
from pyjnius import autoclass
JString = autoclass('java.lang.String')
Intent  = autoclass('android.content.Intent')


    def share_text_choose(self, data):
        send = Intent()
        send.setAction(Intent.ACTION_SEND)  
        send.setType("text/plain")
        send.putExtra(Intent.EXTRA_TEXT, JString(data))
        mActivity.startActivity(Intent.createChooser(send,None))

You'll have to add a phone number to this, presumably as another putExtra() but I don't have an example. You'll have to research.

with the default texting app,

To send to a specific app (and not to the share sheet),  replace the last line with:

       send.setPackage(app)
       mActivity.startActivity(send)

       where app is the id of the app, the user's default mail app is 'com.android.email'  you'll have to research the default text app id

and have the default texting app automatically send the string as a text?

And finally I can't tell you how any or all texting apps behave when sent this Intent.
No way for me to know, and it is way outside the domain of this group.
I assume they will respond to ACTION_SEND (my email app does) but I don't know. More research if you have an issue testing.

Finally using the default text app to automatically send a text looks like a huge permissions hole.
I would not expect some random app to be able to send texts with no extra permission or user interaction.
If the text app is to automatically sends the text, then there will have to be a permissions dialog somewhere - perhaps in the texting app?

That is all I know.
Reply all
Reply to author
Forward
0 new messages