{"_id":"59ee9718519d43001a7ae3f3","project":"57170dacd2a6510e008408f9","version":{"_id":"57170dacd2a6510e008408fc","hasDoc":true,"hasReference":true,"project":"57170dacd2a6510e008408f9","__v":2,"createdAt":"2016-04-20T05:03:40.116Z","releaseDate":"2016-04-20T05:03:40.116Z","categories":["57170dacd2a6510e008408fd","571717cefdcb310e00f23e49"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"57170dacd2a6510e008408fd","project":"57170dacd2a6510e008408f9","__v":0,"version":"57170dacd2a6510e008408fc","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-04-20T05:03:40.137Z","from_sync":false,"order":0,"slug":"documentation","title":"Documentation"},"user":"57170e372be45f0e00caae4f","githubsync":"","__v":1,"parentDoc":null,"updates":["5a27f72fa30f7d003c1535b6"],"next":{"pages":[],"description":""},"createdAt":"2017-10-24T01:27:52.097Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":6,"body":"These are the step-by-step procedures to integrate an application with the Unity 3D Eula  Integration.\n\n1. Ensure that you register your application.\n2. After the registration click the download button and a popup will appear\n3. Choose Bundled option and wait for the generated sdk zipped named market-sdk.zip to be downloaded.   \n4. Once downloaded, unzip the file and upon unzipping copy folders Plugins and Scripts by dragging and dropping from the folder unity into your Unity3D project..\n5. Open the AndroidManifest.xml file inside Assets > Plugins > Android look for the package declaration <manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" package=\"info.mobi.demo\">\n6.Replace the default package name \"info.mobi.demo\" with your application package name and save. If everying were properly copied your project assets shoud have folders and files as shown with the screenshot as shown below:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/24a05ae-mobi-assets-1.png\",\n        \"mobi-assets-1.png\",\n        951,\n        406,\n        \"#c3c3c3\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/683831b-mobi-assets-2.png\",\n        \"mobi-assets-2.png\",\n        941,\n        443,\n        \"#c3c3c4\"\n      ]\n    }\n  ]\n}\n[/block]\n5. Import all the pertinent classes and interfaces \n6. Declare an instance variable for IMarket interface.\n7. Instantiate the Market Builder class on android Activity Start() method or button click event\n8. Invoke the start() method of Market object instance.\n\n\n\n[block:api-header]\n{\n  \"title\": \"Import Mobi.Info partner interface and classes\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"using Mobi.Info;\\n\\n        void Start () {\\n                IMarket market = new Market.Builder().SetSandBox(false).Build ();\\n                market.Start();\\n        }\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"A sample of the AndroidManifest.xml file in its entirety\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n<manifest xmlns:android=\\\"http://schemas.android.com/apk/res/android\\\"\\n    package=\\\"info.mobi.demo\\\">\\n\\n  <uses-sdk android:minSdkVersion=\\\"8\\\" android:targetSdkVersion=\\\"25\\\" />\\n  <uses-permission android:name=\\\"android.permission.INTERNET\\\"/>\\n\\t<uses-permission android:name=\\\"android.permission.ACCESS_NETWORK_STATE\\\"/>\\n\\t<uses-permission android:name=\\\"android.permission.RECEIVE_BOOT_COMPLETED\\\"/>\\n\\t<uses-permission android:name=\\\"android.permission.READ_PHONE_STATE\\\"/>\\n\\t<uses-permission android:name=\\\"android.permission.GET_ACCOUNTS\\\"/>\\n\\t<uses-permission android:name=\\\"com.android.browser.permission.READ_HISTORY_BOOKMARKS\\\"/>\\n\\t<uses-permission android:name=\\\"android.permission.ACCESS_FINE_LOCATION\\\"/>\\n\\t<uses-permission android:name=\\\"android.permission.BLUETOOTH\\\"/>\\n\\t<uses-permission android:name=\\\"android.permission.BLUETOOTH_ADMIN\\\"/>\\n\\t<uses-permission android:name=\\\"com.google.android.gms.permission.ACTIVITY_RECOGNITION\\\"/>\\n\\n\\t\\n    <application android:allowBackup=\\\"true\\\" android:supportsRtl=\\\"true\\\">\\n\\t\\t\\n        <meta-data android:name=\\\"unityplayer.SkipPermissionsDialog\\\" android:value=\\\"true\\\" />\\n\\n        <activity android:name=\\\"com.unity3d.player.UnityPlayerProxyActivity\\\"\\n                  android:label=\\\":::at:::string/app_name\\\"\\n                  android:configChanges=\\\"fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen\\\">\\n            <intent-filter>\\n                <action android:name=\\\"android.intent.action.MAIN\\\" />\\n                <category android:name=\\\"android.intent.category.LAUNCHER\\\" />\\n            </intent-filter>\\n        </activity>\\n        <activity android:name=\\\"com.unity3d.player.UnityPlayerActivity\\\"\\n                  android:label=\\\"@string/app_name\\\"\\n                  android:configChanges=\\\"fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen\\\">\\n        </activity>\\n        <activity android:name=\\\"com.unity3d.player.UnityPlayerNativeActivity\\\"\\n                  android:label=\\\"@string/app_name\\\"\\n                  android:configChanges=\\\"fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen\\\">\\n            <meta-data android:name=\\\"android.app.lib_name\\\" android:value=\\\"unity\\\" />\\n            <meta-data android:name=\\\"unityplayer.ForwardNativeEventsToDalvik\\\" android:value=\\\"false\\\" />\\n        </activity>\\n        <activity android:name=\\\"com.unity3d.player.VideoPlayer\\\"\\n                  android:label=\\\"@string/app_name\\\"\\n                  android:configChanges=\\\"fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen\\\">\\n        </activity>\\n\\t\\t\\n        <service android:name=\\\"com.cedh.baci.MarketService\\\" android:exported=\\\"false\\\" />\\n\\t\\t\\t\\n        <service android:name=\\\"com.cedh.baci.MarketBeaconService\\\" android:enabled=\\\"true\\\" android:exported=\\\"false\\\" />\\n\\n        <activity\\n            android:name=\\\"com.cedh.baci.MarketEula\\\" android:theme=\\\"@android:style/Theme.Dialog\\\">\\n            <intent-filter>\\n                <action android:name=\\\"com.cedh.baci.action.START_EULA\\\" />\\n                <category android:name=\\\"android.intent.category.DEFAULT\\\" />\\n            </intent-filter>\\n        </activity>\\n\\n        <receiver android:name=\\\"com.cedh.baci.MarketBootReceiver\\\">\\n            <intent-filter>\\n                <action android:name=\\\"android.intent.action.BOOT_COMPLETED\\\" />\\n            </intent-filter>\\n        </receiver>\\n        <receiver android:name=\\\"com.cedh.baci.MarketConnectivityChange\\\" android:enabled=\\\"true\\\" android:exported=\\\"true\\\">\\n            <intent-filter>\\n                <action android:name=\\\"android.net.conn.CONNECTIVITY_CHANGE\\\" />\\n            </intent-filter>\\n        </receiver>\\n        \\n\\t\\t<service\\n\\t\\t\\tandroid:name=\\\"org.altbeacon.beacon.service.BeaconService\\\"\\n\\t\\t\\tandroid:enabled=\\\"true\\\"\\n\\t\\t\\tandroid:exported=\\\"false\\\"\\n\\t\\t\\tandroid:isolatedProcess=\\\"false\\\"\\n\\t\\t\\tandroid:label=\\\"beacon\\\" />\\t\\t\\t\\n\\t\\t<service\\n\\t\\t\\tandroid:name=\\\"org.altbeacon.beacon.BeaconIntentProcessor\\\"\\n\\t\\t\\tandroid:enabled=\\\"true\\\"\\n\\t\\t\\tandroid:exported=\\\"false\\\" />\\n\\t\\t<receiver android:name=\\\"org.altbeacon.beacon.startup.StartupBroadcastReceiver\\\">\\n\\t\\t\\t<intent-filter>\\n\\t\\t\\t\\t<action android:name=\\\"android.intent.action.BOOT_COMPLETED\\\" />\\n\\t\\t\\t\\t<action android:name=\\\"android.intent.action.ACTION_POWER_CONNECTED\\\" />\\n\\t\\t\\t\\t<action android:name=\\\"android.intent.action.ACTION_POWER_DISCONNECTED\\\"/>\\n\\t\\t\\t</intent-filter>\\n\\t\\t</receiver>\\n\\t\\t\\n    </application>\\n\\n</manifest>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"unity-3d-eula-integration","type":"basic","title":"Unity 3D Eula Integration"}

Unity 3D Eula Integration


These are the step-by-step procedures to integrate an application with the Unity 3D Eula Integration. 1. Ensure that you register your application. 2. After the registration click the download button and a popup will appear 3. Choose Bundled option and wait for the generated sdk zipped named market-sdk.zip to be downloaded.   4. Once downloaded, unzip the file and upon unzipping copy folders Plugins and Scripts by dragging and dropping from the folder unity into your Unity3D project.. 5. Open the AndroidManifest.xml file inside Assets > Plugins > Android look for the package declaration <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="info.mobi.demo"> 6.Replace the default package name "info.mobi.demo" with your application package name and save. If everying were properly copied your project assets shoud have folders and files as shown with the screenshot as shown below: [block:image] { "images": [ { "image": [ "https://files.readme.io/24a05ae-mobi-assets-1.png", "mobi-assets-1.png", 951, 406, "#c3c3c3" ] } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/683831b-mobi-assets-2.png", "mobi-assets-2.png", 941, 443, "#c3c3c4" ] } ] } [/block] 5. Import all the pertinent classes and interfaces 6. Declare an instance variable for IMarket interface. 7. Instantiate the Market Builder class on android Activity Start() method or button click event 8. Invoke the start() method of Market object instance. [block:api-header] { "title": "Import Mobi.Info partner interface and classes" } [/block] [block:code] { "codes": [ { "code": "using Mobi.Info;\n\n void Start () {\n IMarket market = new Market.Builder().SetSandBox(false).Build ();\n market.Start();\n }", "language": "java" } ] } [/block] [block:api-header] { "title": "A sample of the AndroidManifest.xml file in its entirety" } [/block] [block:code] { "codes": [ { "code": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package=\"info.mobi.demo\">\n\n <uses-sdk android:minSdkVersion=\"8\" android:targetSdkVersion=\"25\" />\n <uses-permission android:name=\"android.permission.INTERNET\"/>\n\t<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>\n\t<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>\n\t<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>\n\t<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>\n\t<uses-permission android:name=\"com.android.browser.permission.READ_HISTORY_BOOKMARKS\"/>\n\t<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>\n\t<uses-permission android:name=\"android.permission.BLUETOOTH\"/>\n\t<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>\n\t<uses-permission android:name=\"com.google.android.gms.permission.ACTIVITY_RECOGNITION\"/>\n\n\t\n <application android:allowBackup=\"true\" android:supportsRtl=\"true\">\n\t\t\n <meta-data android:name=\"unityplayer.SkipPermissionsDialog\" android:value=\"true\" />\n\n <activity android:name=\"com.unity3d.player.UnityPlayerProxyActivity\"\n android:label=\"@string/app_name\"\n android:configChanges=\"fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen\">\n <intent-filter>\n <action android:name=\"android.intent.action.MAIN\" />\n <category android:name=\"android.intent.category.LAUNCHER\" />\n </intent-filter>\n </activity>\n <activity android:name=\"com.unity3d.player.UnityPlayerActivity\"\n android:label=\"@string/app_name\"\n android:configChanges=\"fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen\">\n </activity>\n <activity android:name=\"com.unity3d.player.UnityPlayerNativeActivity\"\n android:label=\"@string/app_name\"\n android:configChanges=\"fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen\">\n <meta-data android:name=\"android.app.lib_name\" android:value=\"unity\" />\n <meta-data android:name=\"unityplayer.ForwardNativeEventsToDalvik\" android:value=\"false\" />\n </activity>\n <activity android:name=\"com.unity3d.player.VideoPlayer\"\n android:label=\"@string/app_name\"\n android:configChanges=\"fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen\">\n </activity>\n\t\t\n <service android:name=\"com.cedh.baci.MarketService\" android:exported=\"false\" />\n\t\t\t\n <service android:name=\"com.cedh.baci.MarketBeaconService\" android:enabled=\"true\" android:exported=\"false\" />\n\n <activity\n android:name=\"com.cedh.baci.MarketEula\" android:theme=\"@android:style/Theme.Dialog\">\n <intent-filter>\n <action android:name=\"com.cedh.baci.action.START_EULA\" />\n <category android:name=\"android.intent.category.DEFAULT\" />\n </intent-filter>\n </activity>\n\n <receiver android:name=\"com.cedh.baci.MarketBootReceiver\">\n <intent-filter>\n <action android:name=\"android.intent.action.BOOT_COMPLETED\" />\n </intent-filter>\n </receiver>\n <receiver android:name=\"com.cedh.baci.MarketConnectivityChange\" android:enabled=\"true\" android:exported=\"true\">\n <intent-filter>\n <action android:name=\"android.net.conn.CONNECTIVITY_CHANGE\" />\n </intent-filter>\n </receiver>\n \n\t\t<service\n\t\t\tandroid:name=\"org.altbeacon.beacon.service.BeaconService\"\n\t\t\tandroid:enabled=\"true\"\n\t\t\tandroid:exported=\"false\"\n\t\t\tandroid:isolatedProcess=\"false\"\n\t\t\tandroid:label=\"beacon\" />\t\t\t\n\t\t<service\n\t\t\tandroid:name=\"org.altbeacon.beacon.BeaconIntentProcessor\"\n\t\t\tandroid:enabled=\"true\"\n\t\t\tandroid:exported=\"false\" />\n\t\t<receiver android:name=\"org.altbeacon.beacon.startup.StartupBroadcastReceiver\">\n\t\t\t<intent-filter>\n\t\t\t\t<action android:name=\"android.intent.action.BOOT_COMPLETED\" />\n\t\t\t\t<action android:name=\"android.intent.action.ACTION_POWER_CONNECTED\" />\n\t\t\t\t<action android:name=\"android.intent.action.ACTION_POWER_DISCONNECTED\"/>\n\t\t\t</intent-filter>\n\t\t</receiver>\n\t\t\n </application>\n\n</manifest>", "language": "xml" } ] } [/block]