Startapp ads in sketchware pro is second largest requested topic in sketchware pro community. There are many tutorials regarding this but all of them provides incomplete information. I was making a earning app and I want to enable startapp ads and that's why I searched for it, and I got all these errors
- wrong library
- error full blocks
- no cpm or zero cpm
- app not install after build
- proccess stops after DX loading
All these problems are very common and I faced these problems many times. And I know many others users also get this error.
So in today post I'll tell the right and effective and my tested method of adding startapp ads and earning with it.
So let's start
View Area
Add a linear in view area, in my case name of linear is linear .
Logic area
Download Startapp Latest Blocks For Sketchware Pro from this link
Link:
Import blocks in sketchware pro
Add first two blocks in oncreate and fill their desired values as mentioned
AppId = Startapp app id
ReturnAd = if true then increase revenue, decrease user experience
Class = your activity
Name = any name
View = where to show ad
An example you can see in above picture.
Imports
Add a import option and add these three imports
com.startapp.sdk.adsbase.*
com.startapp.sdk.adsbase.adlisteners.*
com.startapp.sdk.ads.banner.*
Add them one by one
Library
Download library from link and unzip it and paste to
.sketchware/libs/local_libs/
Then go to library importer and import the library of StartAppSdk
Android Manifest
Click on 3 dots then click on Android Manifest
When new window open click on AppComponentsAsd
A code editor will open paste the following code
<meta-data
android:name="com.startapp.sdk.APPLICATION_ID"
android:value="app_id" />
<meta-data
android:name="com.startapp.sdk.RETURN_ADS_ENABLED"
android:value="false" />
<provider
android:name="com.startapp.sdk.adsbase.StartAppInitProvider"
android:authorities="package_name.startappinitprovider"
android:exported="false" />
<activity
android:name="com.startapp.sdk.adsbase.consent.ConsentActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:theme="@android:style/Theme.Translucent"/>
<activity
android:name="com.startapp.sdk.ads.list3d.List3DActivity"
android:theme="@android:style/Theme"/>
<activity
android:name="com.startapp.sdk.adsbase.activities.OverlayActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:theme="@android:style/Theme.Translucent"/>
<activity
android:name="com.startapp.sdk.adsbase.activities.FullScreenActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:theme="@android:style/Theme"/>
<service android:name="com.startapp.sdk.adsbase.InfoEventService" />
<service
android:name="com.startapp.sdk.adsbase.PeriodicJobService"
android:permission="android.permission.BIND_JOB_SERVICE" />
<receiver android:name="com.startapp.sdk.adsbase.remoteconfig.BootCompleteListener">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</receiver>
Change app_id and package_name with yours.
Permissions
Go to permissions manager and add all these permissions
Add the permission as shown in next pictures
After doing all these things run your project and you will see banner ads appearing.
Note: I have started a blog series in which you will learn how to implement ads in sketchware and how to earn from them. if you want to show real and earning ads in sketchware pro then follow and visit this blog regularly.