How to send text message in phonegap - android

I am developing one app in phonegap.
In my app i am using one text field which contains some text and one
button for sending text.When i will click on button then one alert box
should open .Which contains three button "SMS","CHAT","Cancel".when i
will click on SMS button then my message should be send via sms.When
i will click on chat button then my message should be sent via chat.
How is it possible .Is there anyone have any demo or idea then pls
reply for my post .I will be very thankful to you.

There is no direct support in the phonegap api for what you are trying to do, but you can write your own phonegap plugin to achieve what you want.
There is a SMS Composer Plugin, which should be a good starting point for what you are trying to create: https://github.com/grantsanders/SMSComposer
Updated: here are two SMS plugins, since the above plugin is 404ing
Android: https://github.com/phonegap/phonegap-plugins/tree/master/Android/SMSPlugin
iOS: https://github.com/phonegap/phonegap-plugins/tree/master/iOS/SMSComposer

The link by Daniel is now broken.
However I found this website full of PhoneGap plugins: https://github.com/phonegap/phonegap-plugins

Related

SMS to prefilled text message on Google Pixel

I am trying to create a link in an email that will open a mobile device's default texting app if pushed. Here is what I have so far:
a href="sms:;?&body=This%20is%20the%20body%20message."
I have tested it and it seems to work on iOS devices as well as some Android devices. However, on a Google Pixel 3, it opens the default messaging app but shows an error which reads Could not start conversation.
How can I change my code to successfully open a conversation with a blank recipient?
After hours of trial and error, I was able to prefill the Pixel (3XL), iOS (simulated in Xcode), and macOS Messages using the following structure:
Pixel: sms://+1${PHONE}/?body=${encodedString}
iOS: sms://+1${PHONE}/&body=${encodedString}
Give this a try from a link, I think you need a number and replace ; with ?
Send SMS
For non iOS you want to use (For your Pixel Example)
sms:phone_number?body=The_Message
For iOS you want to use
sms:phone_number;body=The_Message

android print from pdfview

I have an app is working with PDFView. Today I added buttons for print by send data to printer directly. Do you have any solution, how to print data from PDFView just click on button. Note: Below image have 2 buttons but my purpose need only one button calls "Print Food" and other button will other purpose. Thanks & Best Regards.
I tried 2 days in search. Now solution solved. I just download app from Play Store name: Printer+ so that app will automatic print our app from the PDFView. Thank You for your replied and Thanks for Printer+ App.

Android mobile number verification

Hi guys I need help from you all in Android mobile number verification process. I have a android phone I just need to verify the otp but in this case they using the auto verification method is it possible to verify my otp through fwd the msg or by using prank message app Pls anyone help me to solve my problem and thx in advance...
Assuming that you are asking for "how to implement OTP verification". There are number of ways to tackle this. Please look at the below link for two ways of achieving this using Google authenticator or using a SMS gateway.
Android one time password (OTP)
here is the tutorial to read the incoming messages using Broadcast receiver if you are going to use the second method.
"Reading incoming messages using broadcast receiver."
I believe you are trying to implement a way you can implement your own TTS (Text-To-Speech) Verification system that prompts the user to enter in the code.
If so, you can use Nexmo's Text To Speech Prompt.
All you have to do is make an HTTP call (For example: https://api.nexmo.com/tts-prompt/json)
From here you can use the parameters you want such as,
text - Body of the text message to be read to the end user
machine_detection - How to react when an answering machine is detected
lg - To determine what language the text is read in
bye_text - Body of the text message played after digits are entered successfully
failed_text - Body of the text message played after 3 failed attempts
There are many other parameters you can work with and customize your TTS prompt to capture/confirm data.
Full disclosure, I work at Nexmo
You can see more information how to implement this here

How to show toast when application is installed

I am working on this project which have no launcher activity.I want to show a toast to the user when application is installed on the phone.i am beginner in android.
Do any body have any idea of how to do this? please do share the solution i shall be thankful.
Its not possible Usman. Don't get distracted by following intents
Intent.ACTION_PACKAGE_ADDED
Intent.ACTION_PACKAGE_INSTALL
These are not sent to the package that just got installed i.e. your app :)

facebook private message using url

i'm doing simple android project using phonegap. I have to send private message to my friends in facebook from my application. Is there any way to send message through Url?
Until recently Facebook didn't support the send dialogue on mobile, so you couldn't do that.
With their push of Facebook messenger, they started supporting private messages on mobile - https://developers.facebook.com/docs/ios/share#message-dialog
Not idea if there's a PhoneGap plugin that supports it, I'm looking for one as well...
Check Direct URL Example section in send dialog page
https://www.facebook.com/dialog/send?app_id=123050457758183&
name=People%20Argue%20Just%20to%20Win&
link=http://www.nytimes.com/2011/06/15/arts/people-argue-just-to-win-scholars-assert.html&
redirect_uri=http://www.example.com/response
This is a sample link given in documentation.
On m.facebook.com, no display is needed, nor is any other display than 'touch' allowed as we always default to 'touch'.
So that doesn't seem to solve the problem.
Facebook says it's a bug by design https://developers.facebook.com/bugs/507406422635550?browse=search_511bd57f912f84e18364257

Categories

Resources