All Products
Search
Document Center

Manage release rules

Last Updated: May 31, 2021

Resource configuration management is a basic function of Mobile Delivery Service. With this function, you can predefine various configuration data required for Mobile Delivery Service and don’t have to manually input the data every time, with work efficiency improved and error occurrence decreased.

The configuration data, such as city and device model, is also referred to as resources. When adding configuration data, the resource name is shown to users. Only the resource value is used to match request parameters of clients.

On the resource configuration management page, you can perform the following operations:

Add a resource

  1. Log in to the mPaaS console, and click Mobile Delivery Service > Release rule management from the navigation bar on the left to go to the resource rule management page.
  2. On the release rule management page, click Add resource. In the pop-up window, select resource type and platform type, enter the resource name and resource value, and then click OK to create the resource.

    • Resource type: The type of the resource. City, Device Model, Network, and Device System Version are supported.
    • Platform type: Select a mobile platform. You can choose Android, iOS, or All.
    • Resource name: The name of the resource. You can define the name as needed. The resource name is shown to users and generally consistent with the resource value.
    • Resource value: Only one resource value is supported. The following content describes the values of various types of resources:
      • City: The name of the city at the prefecture and city level. The name must contain the administrative unit, such as the city, region, autonomous prefecture, league. For example, the name can be Shanghai Municipality, Haidong District, Qiannan Buyi and Miao Autonomous Prefecture, and Xing’an League.
      • Model: The model of the mobile device, such as VIVO X5M and iPhone 6S.
      • Network: The type of the network. Valid values: 2G, 3G, 4G, 5G, Wi-Fi, and WLAN.
      • Device OS version: The system version of the mobile device, such as 10.0.1 and 5.1.1.Add resource

    If you do not know the model, network, and device system version of the mobile device, you can query the information about the mobile client by calling the specified API. For more information, see Call API operations to query resource configurations.

Modify resource configurations

To modify resource configurations, find the resource and click Modify in the Operation column. Edit the resource configurations as required. Click OK to save the modification.

Delete a resource

To delete a resource, find the resource and then click Delete in the Operation column. To delete multiple resources, select multiple resources, click Batch delete, and then click OK.

Call API operations to query resource configurations

When you add a resource, if you do not know the resource values of the network, device model, and device system version, you can call the API to query configurations of the resource.

Perform the following steps:

  1. Open a local project and call the following API to obtain the information of the mobile client:

    • Android clients
       
    1. DeviceInfo deviceInfo = DeviceInfo.createInstance(context);
    2. AppInfo appInfo = AppInfo.createInstance(context);
    3. deviceInfo.getOsVersion(); //The version of the device system.
    4. deviceInfo.getmMobileModel(); //The model of the device.
    5. appInfo.getmProductVersion(); //The version of the device.
    6. int networkType = NetworkUtils.getNetworkType(context);//The network type of the device.
    7. networkType = 1 (2G)
    8. networkType = 2 (3G)
    9. networkType = 3 (Wi-Fi)
    10. networkType = 4 (4G)
    • iOS clients
    Type Network Device system version (system API) Device model (mPaaS-encapsulated API)
    Switch configuration None [[UIDevice currentDevice] systemVersion]
    • Baseline version before 10.1.68.32: [APMobileIdentifier shareIdentifier].deviceModel
    • Baseline version 10.1.68.32 and later: [MPaaSDVInfo sharedInstance].deviceModel
    Upgrade detection Wireless networks: Wi-Fi
    Mobile networks: WWAN
    [[UIDevice currentDevice] systemVersion]
    • Baseline version before 10.1.68.32: [APMobileIdentifier shareIdentifier].deviceModel
    • Baseline version 10.1.68.32 and later: [MPaaSDVInfo sharedInstance].deviceModel
    Hotfix management
    Offline package management
    Mini Program management
    [DTReachability networkName] [[UIDevice currentDevice] systemVersion]
    • Baseline version before 10.1.68.32: [APMobileIdentifier shareIdentifier].deviceModel
    • Baseline version 10.1.68.32 and later: [MPaaSDVInfo sharedInstance].deviceModel
  2. Report the client resource information to the server by uploading the log, and then view the resource configuration information on the server.