Joke Collection Website - Public benefit messages - How to import smssdk for android SMS verification
How to import smssdk for android SMS verification
Let's start developing the Android project call interface API.
Create an Android project:
Modify the AndroidManifest.xml file and add the following code (user rights).
= = = First change:
password
& ltuses-permission Android:name = " Android . permission . read _ CONTACTS "/& gt;
& ltuses-permission Android:name = " Android . permission . read _ PHONE _ STATE "/& gt;
& ltuses-permission Android:name = " Android . permission . write _ EXTERNAL _ STORAGE "/& gt;
& ltuses-permission Android:name = " Android . permission . access _ NETWORK _ STATE "/& gt;
& ltuses-permission Android:name = " Android . permission . access _ WIFI _ STATE "/& gt;
& ltuses-permission Android:name = " Android . permission . internet "/& gt;
& ltuses-permission Android:name = " Android . permission . receive _ SMS "/& gt;
& ltuses-permission Android:name = " Android . permission . get _ TASKS "/& gt;
& ltuses-permission Android:name = " Android . permission . access _ FINE _ LOCATION "/& gt;
= = = Second change:
password
& lt activities
Android:name = " cn . smssdk . smssdkuishell "
Android:config changes = " keyboard hidden | orientation | screenSize "
Android:Theme = "@ Android:style/ theme. Translucent. No title bar "
Android:windowSoftInputMode = " state hidden | adjust size "/& gt;
Copy jar package to libs directory? (attention! The official did not mention that you must copy the jar package and the armeabi folder)
The correct directory structure should be as follows
Write code in MainActivity, which is executed in two steps, one loading and two sending.
Code (where AppKey and AppSecret are replaced by their own)
//initialization
Cn.smssdk.SMSSDK.initSDK(this, "your AppKey", "your appsecret");
//Send SMS
cn . smss dk . smss dk . getverificationcode(" 86 "," 186 12 12 1304 ");
Compilation test
receive a text message
- Previous article:Hairdressing off-season activity planning
- Next article:Always display text messages during a call.
- Related articles
- Words of thanks from enterprises to customers
- Traffic control 12 123 how to inform the owner to move the car?
- Why does Apple 6s Wan send text messages inexplicably? The message is blue.
- How to write a warm holiday notice
- Is Guangzhou Chengbo Information Co., Ltd. a liar?
- How to set a drop-down box to see the message when it is received without opening it?
- Is it true that the mobile phone received the SMS notification from Agricultural Bank of China about how much it can deliver?
- How to inquire about the results of Guizhou college entrance examination in 2009? When is the inquiry?
- How to delete vivoiqooneo5 information with one click
- Cold case four years ago: the husband and wife disappeared after entering the elevator, and all 22 monitors disappeared. What happened?