We will soon provide you with the document translated by a professional translator.

If you have any questions, please contact us.

We will make every effort to further enhance our services.

App Safer Android SDK Guide

App Safer Android is a mobile security solution provided by the NAVER Cloud Platform that detects application tampering and mobile security breach attempts to maintain a secure execution environment for mobile applications from threats to mobile devices or services. And analyze the results to provide a mobile security solution.

App Safer Android Features

  • Rooting Detection
  • Emulator Detection
  • Debugging Detection
  • Memory Tampered Detection
  • Speedhack Detection
  • App Integrity Tampered Detection
  • Unauthorized Signature Detection

App Safer Android supported environment

File name OS Version Architecture
appsafer-${version}-sdk.aar Android 10(API 29) or later armeabi-v7a, arm64-v8a, x86, x86_64

How to apply App Safer Android SDK

  1. Create a libs directory under your project

  2. Add repositories in build.gradle file

    repositories {
     flatDir {
         dirs 'libs'
     }
    }
    
  3. Add AAR inside dependencies in build.gradle file

  4. Case 1. Add specific version

dependencies {
    implementation name:'appsafer-${vesion}-sdk', ext:'aar'
}
  • Case 2. Add regardless of version
dependencies {
    implementation fileTree(dir: 'libs', include: 'appsafer-*-sdk.aar')
}

List of App Safer Android APIs

Class name Name Description
com.nbp.appsafer.AppSafer int start(Context context) Start App Safer Android
com.nbp.appsafer.AppSafer void setUserId(String userId) Set user ID
com.nbp.appsafer.AppSafer String getUserId() Get user ID
com.nbp.appsafer.AppSafer void setFlag(int flag) Control App Safer operation

Set permissions and App Safer Key

To apply App Safer Android, you must add App Safer Key using meta-data tag in AndroidManifest.xml and apply the following permissions. The value of the android:name attribute in meta-data must be written as com.ncp.appsafer.key.

  • Required permissions
    • android.permission.INTERNET
    • android.permission.WRITE_EXTERNAL_STORAGE
<?xml version="1.0" encoding="utf-8"?>
<manifest>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    ...
    <application>
        <meta-data android:name="com.ncp.appsafer.key" android:value="APPSAFER_KEY" />
    ...
    </application>
</manifest>

Description of App Safer Android APIs

int start(Context context)

Start App Safer Android.

Parameter
Parameter Description
context Context for use in App Safer Android
Return Value
Return value Description
0 Execution success
1 Execution failure
Example
@OnClick(R.id.buttonStart)
void clickStartButton() {
    if (AppSafer.INSTANCE.start(getApplicationContext()) == 0) {
        // success logic
    }
}


void setUserId(String userId)

Called to include the user ID in the log sent to the App Safer server when initialization and detection events occur.

Parameter
Parameter Description
userId User ID
Example
void changeUserId(String userId) {
    AppSafer.INSTANCE.setUserId(userId);
}


String getUserId()

Get user ID.

Return value
Return value Description
String User ID
Example
String userId = AppSafer.INSTANCE.getUserId();


void setFlag(int flag)

Controls operation when using a specific App Safer Android SDK.

Parameter
Parameter Description
APPSAFER_FLAG_CHECK_ROOTING(1) Rooting detection
APPSAFER_FLAG_CHECK_EMULATOR(2) Emulator detection
APPSAFER_FLAG_CHECK_DEBUGGING(4) Debugging detection
APPSAFER_FLAG_CHECK_MEMORY_TAMPERED(8) Memory Tampered detection
APPSAFER_FLAG_CHECK_SPEEDHACK(16) Speedhack detection
APPSAFER_FLAG_CHECK_APP_INTEGRITY_TAMPERED(32) App Integrity Tampered detection
Example
// Check Rooting, Emulator and Speedhack
AppSafer.INSTANCE.setFlag(
  AppSafer.APPSAFER_FLAG_CHECK_ROOTING | 
  AppSafer.APPSAFER_FLAG_CHECK_EMULATOR | 
  AppSafer.APPSAFER_FLAG_CHECK_SPEEDHACK);

// Check Rooting, Debugging and Memory Tampered
AppSafer.INSTANCE.setFlag(
  AppSafer.APPSAFER_FLAG_CHECK_ROOTING | 
  AppSafer.APPSAFER_FLAG_CHECK_DEBUGGING | 
  AppSafer.APPSAFER_FLAG_CHECK_MEMORY_TAMPERED);

Note

This product is also available as a global region service.

You can find the associated information in the guide below.

に対する検索結果は~件です。 ""

    に対する検索結果がありません。 ""

    処理中...