What exactly is scAddress in SmsManager's sendTextMessage function? - android

I'm working on an application that will be sending a text message to another person from the app (this is not being published to the Play Store). I am looking at the documentation for SmsManager, and there is a parameter (which I currently have null), scAddress, which is described by:
String: is the service center address or null to use the current default SMSC
In short, I don't want the app to use my actual phone number to send out this text message. What exactly is the "service center address?"
My application does not care about receiving a response for the text message. What happens if the user replies to this message? Is this related to the service center address?
Thank you!

Related

Huawei Push Kit Notification Message key/value is null in Android

I have implemented Huawei Push Kit to my application.
Data messages have been processed by implementing HmsMessageService.
The notification message delivered to the device very well, but when you tap the notification, key/value value that you actually entered is displayed as null. I have set name of theintent filter exactly same with the string on the Console. At the bottom, payload and value are displayed as null even though I filled it from the console. What might be the problem?
In addition, the value was fetched via getIntent from onCreate where the activity started. However, getIntent() is not null.
I believe the phone you are using for receiving the push messages are not meeting with the minimum data message requirements.
Here is a official link about restrictions : Documentation

PushNotification "dryRun" attribute for iOS

For Android devices I am using dryRun attribute to control message is delivered to device or not, generally I have used this parameter to check the pntoken is invalid or not without sending a sample message to device.
I am searching for same attributes or a way to check whether token is valid, expired or invalid for IOS devices.
There is no Dry run option for iOS but you might want to go with message without any alert.
{
"aps": {
"category": "categoryName"
}
}
With above payload call will go through but nothing should show up on the device.
Based on this documentation, to run a quick test of your push notification setup for Apple Push Notification Service (APNS), use the Send Test Notification page.
Here are the steps that you need to do.
Enter a connection token string in the Recipient field, OR search for a recipient by clicking Search, and then select one of the search results. By default, the Search results list displays the five devices most recently registered for your connected app.
a. To find other devices, enter a user name in the Search text box.
b. Click Go to generate a list of all devices currently registered under that user name.
Optionally, for Alert, enter an alert message or dictionary per Apple’s specifications.
For Badge, enter a badge number or 0 for no badge.
For Sound, enter the name of a sound file in the application bundle, or enter default to use the system default alert sound.
Optionally, to use a custom payload, enter your payload’s JSON value in the Custom Payload field.
Click Send to send the test push notification, or click Clear to reset the form.
For more information, check this SO question and this thread if it can help you.

Android : Unread message update in icon

I'm developing an android application with communication integrated. My application have to show number of unread messages via app icon, it's will be look like that skype, facebook or etc. I can not found any solutions to perform it, please help me.
You can use this library
It works well for most of the devices.
PS. Nexus devices (or, more specific, the google launcher) does not support this!
You have to pass token with a message if a message is read or not.
Suppose we have a token 0 for read messages and 1 for unread messages.
If message read then make token 0 else it is 1.
To count the total number of unread messages, count the total number of unread messages (where token=1) from the list.
You can use this repo or use any repo from this link

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

Sending an SMS using Google Voice

I have an app where I need to be able to send SMS messages. I have the code to send them directly, but I would like to give the option to use Google Voice to users who don't have messaging plans. Does anyone know how to do this? I can't seem to find the way. Here is the way I am doing it now:
StringBuffer buffer = new StringBuffer();
buffer.append("GEOC ");
buffer.append(mLogType.getSelectedItemPosition() == 0 ? "#" : "x");
buffer.append(mGeocache.getWaypoint()).append(" ");
if(mLogEdit.getText().length() > 0)
{
buffer.append(mLogEdit.getText().toString());
}
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage("41411", null, buffer.toString(), null, null);
You want to use an SMS Intent.
That will give the user the option to select (or skip this step if he already have a default option) which SMS sending utility he want's to use.
several applications register themselves as such, such as skype, yahoo hub, google voice, etc.
So using a Intent, you tell android to use whatever the user wants to send the text message to a sms recipient.
It's my belief that the user must have a google voice account setup and have the voice app installed. Then when you fire an intent to send an sms it will be their preference to use google voice or not.
I've found a site where they've written their own google voice java library that you can import into your app and use. I just downloaded it yesterday so can't help with specific yet, but go ahead and take a look. It looks really promising.
http://code.google.com/p/google-voice-java/

Categories

Resources