Mobvista Necessary Matters - mobvistateam/Android_SDK_7.6.0 GitHub Wiki

##Access SDK necessary matters:

  • 1.Import the necessary jar into the project LIBS
   mobvista_common.jar
   mobvista_download.jar(Non essential)
  • 2.Configure the required permissions for SDK,as follows: Under the main manifest tag, add the following permissions:
    <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <!-- These permissions are strongly recommended and will result in higher performance -->
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  • 3.Configure service services SDK, as follows: And in application tag, add the following service:'
    <!-- MobvistaSDK *begin* -->
    <service android:name="com.mobvista.msdk.shell.MVService" >
            <intent-filter>
                <action android:name="com.mobvista.msdk.download.action" />
            </intent-filter>
    </service>
    <!-- MobvistaSDK *end* -->
  • 4.Suggested that the developer in the Application initialization SDK, that is called
    MobVistaSDK sdk = MobVistaSDKFactory.getMobVistaSDK();
    Map<String,String> map = sdk.getMVConfigurationMap(String appId,String appKey)
    //f it is packaged gradle, modify the applicationId, you can enter values in the androidmanifest.xml package in the package name manifest
    map.put(MobVistaConstans.PACKAGE_NAME_MANIFEST, "com.mobvista.mobvistademo");
    sdk.init(map, Application application);

Entity Detail: Campaign(Advertising data structure)

    private String id;

    private String appName;       //app name of this Campaign

    private String appDesc;       //app description

    private String iconUrl;       //icon url

    private String imageUrl;      //image url
	
    public String adCall;        //the string to show in the clickbutton

    public int type;            //Ad source types, such as FB for type 3

confusion sdk

It is recommended that the developer add the following code to the confusion rule when mixing the code:

-keepattributes Signature 
-keepattributes *Annotation*
-keep class com.mobvista.** {*; } 
-keep interface com.mobvista.** {*; } 
-keep class android.support.v4.** { *; }
-dontwarn com.mobvista.**
-keep class **.R$* {
	public static final int mobvista*;
}
⚠️ **GitHub.com Fallback** ⚠️