How to detect malicious apps on mobile phones? Integrate Huawei application security testing to improve App security

Virus applications on mobile phones and other devices may threaten user privacy information and transaction security, and even cause financial losses.

In response to this, Huawei has opened up its security detection service, providing application security detection (AppsCheck API) to help App developers obtain a list of malicious applications on their running devices . The App can decide whether to restrict the user's payment in the App based on the detection result.

1. Service introduction

Huawei application security detection features:

  1. Virus application detection rate is high, verified by authoritative institutions: the accuracy rate of virus application detection is 99%.

  2. Provides the ability to detect unknown threats based on behavior.

After integrating application security testing, the business process of your App testing is as follows:

Insert picture description here
(1) Your application integrates HMS Core SDK to call application security inspection services.

(2) The security detection service returns a list of malicious applications to your App.

---- End

Two, scene case introduction

At present, apps such as finance, utility tools, education, shooting beautification, news reading, and audio-visual entertainment have integrated Huawei's application security detection API. Developers can obtain a list of malicious apps on the device through the API.

Insert picture description here
Example: When scanning the QR code to pay, if a risk is detected, the user can receive a risk alert on the interface

Financial applications integrate Huawei application security testing, which can effectively improve the security of financial accounts. For example, when logging in to an application account, start application security detection to obtain a list of malicious applications. If the application detects malicious applications in other applications on the device, it will prompt access risks and restrict user operations to avoid user privacy leakage or financial loss.

Insert picture description here

Audio-visual entertainment applications integrate Huawei application security testing to ensure that video playback and download are performed on tested and risk-free devices, which helps prevent piracy, while App operation is safer and more efficient, which can bring more smoothness to users Worry-free video playback experience.

Insert picture description here

Others, such as news reading applications integrated application security detection, when users are reading, making in-app payments and other operations, account security is more secure.

Insert picture description here

Three, develop code

1 Configure related information in AppGallery Connect

Before developing an application, you need to configure relevant information in AppGallery Connect.
Specific steps

2 Configure the Maven warehouse address of the HMS Core SDK

2.1 Open the Android Studio project-level "build.gradle" file

Insert picture description here

2.2 Add HUAWEI agcp plugin and Maven code base

Configure the Maven repository address of the HMS Core SDK in allprojects-> repositories.

allprojects {  
      repositories {  
          google()  
          jcenter()  
          maven {url 'https://developer.huawei.com/repo/'}  
      }  
   }

Configure the Maven repository address of the HMS Core SDK in buildscript->repositories.

  buildscript {  
     repositories {  
         google()  
         jcenter()  
         maven {url 'https://developer.huawei.com/repo/'}  
     }  
  }

Add configuration in buildscript ->dependencies.

  buildscript{  
      dependencies {  
           classpath 'com.huawei.agconnect:agcp:1.3.1.300'  
      }  
   }

3 Create SafetyDetectClient

  // 创建SafetyDetectClient  
  SafetyDetectClient   appsCheckClient = SafetyDetect.getClient(getActivity());   
}

4 Call to get the list of malicious applications and monitor the call results

  Task task = appsCheckClient.getMaliciousAppsList();
  task.addOnSuccessListener(new OnSuccessListener<MaliciousAppsListResp>() {
   // 获取恶意应用列表检测结果 
      @Override 
  public void onSuccess (MaliciousAppsListResp maliciousAppsListResp) {

    }  

  }).addOnFailureListener(new OnFailureListener() {
     // 获取异常错误码以及异常详情 
     @Override 
             public void onFailure(Exception e) {
             }
         });

DEMO presentation

See Demo example:

Insert picture description here

For more detailed development guidelines, please click on the official website of Huawei Developer Alliance:

Huawei Developer Alliance

Obtain development guidance documents

To download the demo and sample code, please go to Github:https://github.com/HMS-Core/hms-safetydetect-demo-android

To solve integration problems, please go to Stack Overflow:https://stackoverflow.com/questions/tagged/huawei-mobile-services?tab=Newest


Original link: https://developer.huawei.com/consumer/cn/forum/topic/0201428371433090004?fid=18

Author: eat anything at night

Guess you like

Origin blog.51cto.com/14772288/2588601