JSMS Android SDK Integration Guide

Last updated:2024-04-17
Expand all
JSMS Android SDK Integration Guide

Note: The client SDK for Jiguang SMS is no longer updated or maintained. Developers should use the REST API to implement business logic.

SDK Description

Supported Versions

  • The SDK currently supports only Android 2.3 or later.

SDK Package Contents

  • AndroidManifest.xml: configuration file for client SDK embedding reference.
  • libs/jpush-sdk-sms-v1.x.x.jar: SDK Java package.
  • example: a complete Android project that demonstrates the basic usage of the SMS SDK and can be used as a reference.

Integration Steps

Create an App

Register as a Jiguang developer and create an app on Jiguang Web Portal to obtain the AppKey. If you are already a user of other Jiguang products and have created an app, you do not need to create one again.

Import the SDK Package

Unzip the package and copy libs/jpush-sdk-sms-v1.x.x.jar to the libs directory of your project.

Obfuscation for JPush Android SDK Integration

-keep class cn.jpush.sms.SMSSDK {*;} -keep class cn.jpush.sms.listener.** {*;}
          -keep class cn.jpush.sms.SMSSDK {*;}
-keep class cn.jpush.sms.listener.** {*;}

        
This code block is shown in the floating window

Configure AndroidManifest.xml

  • Configure permissions:
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.READ_PHONE_STATE"/> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
                  <uses-permission android:name="android.permission.INTERNET"/>
        <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
        <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

        
This code block is shown in the floating window
  • Configure AppKey:
<meta-data android:name="JPUSH_APPKEY" android:value="Your AppKey"/>
                  <meta-data android:name="JPUSH_APPKEY" android:value="Your AppKey"/>

        
This code block is shown in the floating window

Add Code

Refer to the demo and SDK API documentation to add the integration.

Was this document helpful?

Copyright 2011-2026, jiguang.cn, All Rights Reserved. 粤ICP备12056275号-13 Shenzhen Hexun Huagu Information Technology Co., Ltd.

Open in Docs Center