Skip to content

Project Setup Android Studio (EN)

im-ade edited this page May 29, 2018 · 3 revisions

1. SDK Setup

Copy maio.jar to the lib folder.

2. Google Play Services Setup

Go to SDK Tools and download the Google Repository.

Add the following dependencies to build.gradle:

compile 'com.google.android.gms:play-services:+'

3. Android Manifest Setup

Maio SDK Activity Setup

Add the following activity tag:

Sample

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.example.test" 
          android:versionCode="1" 
          android:versionName="1.0" >
    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="23" />
    <application android:icon="@drawable/ic_launcher"
                 android:label="@string/app_name" 
                 android:theme="@style/Theme.AppCompat" >
    <activity android:name=".MainActivity" android:label="@string/app_name" >
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    </activity>
    <!--Maio SDk Activity starts here-->
  <activity
          android:name="jp.maio.sdk.android.AdFullscreenActivity"  
          android:configChanges="orientation|screenLayout|screenSize|smallestScreenSize"  
          android:hardwareAccelerated="true"  
          android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >  
  </activity>
  <activity            
          android:name="jp.maio.sdk.android.HtmlBasedAdActivity"            
          android:configChanges="keyboardHidden|orientation|screenSize|screenLayout"            
          android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
  </activity>
    <!-- Ends here -->
    </application>
</manifest>

※ Android Studio will automatically add permissions and settings for Google Play Services.

4. Implementation

https://github.com/imobile-maio/maio-Android-SDK/wiki/Implementation-(EN)