MobVista_AppWall(English) - mobvistateam/Android_SDK_7.6.0 GitHub Wiki

Appwall access method :

  • 1.add to appWall the jar to libs
   mobvista_appwall.jar`
  • 2.configure sdk activity,as follows:
   <activity
          android:name="com.mobvista.msdk.shell.MVActivity"
          android:configChanges="keyboard|orientation"
          android:screenOrientation="portrait" >
   </activity>
  • 3.Please copy the res mobvista file to your project Pre loaded, the developer can call pre loaded on the previous page, so you need to use the ad page can quickly get ads
   public void preloadWall(){
	MobVistaSDK sdk = MobVistaSDKFactory.getMobVistaSDK();
	Map<String,Object> preloadMap = new HashMap<String,Object>();
	//Advertising form,appWall
	preloadMap.put(MobVistaConstans.PROPERTIES_LAYOUT_TYPE, MobVistaConstans.LAYOUT_APPWALL);
	preloadMap.put(MobVistaConstans.PROPERTIES_UNIT_ID, "125");
	sdk.preload(preloadMap);
  }

###load 1.Make sure that SDK is initialized 2.Initial entry picture 2.1 Full access through the online download,The developer needs to pass a viewGroup to display the entry

       Map<String,Object> properties = MvWallHandler.getWallProperties("24");
       mvHandler = new MvWallHandler(properties, this, viewGroup);
       mvHandler.load();

2.2Developers themselves into the entrance picture, this way requires the layout of the developer himself into an entrance, as follows: layout xml

<RelativeLayout  xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/rlayout"
    android:layout_width="50dp"
    android:layout_height="50dp"
    android:layout_alignParentRight="true" >

    <!-- click on the icon -->

    <ImageView
        android:id="@+id/imageview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_marginRight="5dp"
        android:scaleType="fitXY"
        android:src="@drawable/entry" />

    <!-- New advertising tips layout -->

    <RelativeLayout
        android:id="@+id/newtip_area"
        android:layout_width="9dp"
        android:layout_height="9dp"
        android:layout_alignParentRight="true"
        android:gravity="right" >

        <ImageView
            android:id="@+id/newtip_iv"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_alignParentRight="true"
            android:scaleType="fitCenter"
            android:src="@drawable/new_tip" />
    </RelativeLayout>

</RelativeLayout>

Integration code

       Map<String,Object> properties = MvWallHandler.getWallProperties("24");
       mvHandler = new MvWallHandler(properties, this, viewGroup);
       //customer entry layout begin
	View view = getLayoutInflater().inflate(R.layout.customer_entry, null);
	view.findViewById(R.id.imageview).setTag(MobVistaConstans.WALL_ENTRY_ID_IMAGEVIEW_IMAGE);
        view.findViewById(R.id.newtip_area).setTag(MobVistaConstans.WALL_ENTRY_ID_VIEWGROUP_NEWTIP);
	mvHandler.setHandlerCustomerLayout(view);
       //customer entry layout end
       mvHandler.load();

Custom wall logo and title backgroud,Developers can be introduced bitmap Title logo and background from inside the wall

     Map<String,Object> properties = MvWallHandler.getWallProperties("24");
       	// set Wall Title Logo
	Bitmap customLogo = BitmapFactory.decodeResource(getResources(),
				R.drawable.ic_launcher);
	properties.put(MobVistaConstans.PROPERTIES_WALL_TITLE_LOGO, customLogo);
	// set Wall Title backgroud image
	Bitmap customTitleBg = BitmapFactory.decodeResource(getResources(),
				R.drawable.customer_bg);
	properties.put(MobVistaConstans.PROPERTIES_WALL_TITLE_BACKGROUND,
				customTitleBg);
	// Set the main background color of the wall
	properties.put(MobVistaConstans.PROPERTIES_WALL_MAIN_BACKGROUND_ID,
				R.color.main_background);

	// Set the background color of the wall Tab
	properties.put(MobVistaConstans.PROPERTIES_WALL_TAB_BACKGROUND_ID,
				R.color.main_background);

	// Set the color of the wall Tab indicator
	properties.put(MobVistaConstans.PROPERTIES_WALL_TAB_INDICATE_LINE_BACKGROUND_ID,
				R.color.main_background);

	// Set wall advertising Button CTA style
	properties.put(MobVistaConstans.PROPERTIES_WALL_BUTTON_BACKGROUND_ID,
				R.drawable.mobvista_shape_btn);
	// Set wall Loadding dialog style
	properties.put(MobVistaConstans.PROPERTIES_WALL_LOAD_ID,
				R.layout.mobvista_wall_click_loading1);
	//Set wall interface immersion status bar color
	properties.put(MobVistaConstans.PROPERTIES_WALL_STATUS_COLOR,
				R.color.mobvista_green);
	// Set the color of the wall interface navigation bar
	properties.put(MobVistaConstans.PROPERTIES_WALL_NAVIGATION_COLOR,
				R.color.mobvista_green);
	// Set wall Title background color
	properties.put(MobVistaConstans.PROPERTIES_WALL_TITLE_BACKGROUND_COLOR,
				R.color.mobvista_green);
    mvHandler = new MvWallHandler(properties, this, nat);
    mvHandler.load();
⚠️ **GitHub.com Fallback** ⚠️