We know you want to make some money off your hard work. In this tutorial we will be implementing StartApp ads.
First you need to signup or login to start app website here StartApp
After login in, we will Add New app.
Press Menu, then my apps.
Now click on Add New app.
Now if you app is already published in playstore simply copy your apps Playstore link and paste it in the link field. If you have not published app to playstore, choose haven't yet published app to playstore.
Once you have pasted link or added your app details click on Add app. You app will be added and an app ID will be generated. Copy or take note of the ID, we will need it in app integration.
Let's now proceed to app integration of the ads.
Open your project. And go to local library.
Tick the startapp sdk library ( considering you already have the startapp sdk library).Now go back to the layout editor. Add a linear H (horizontal). This will hold the banner ads.
Move to events and click on the + symbol then add custom imports.Open the import and add three imports.
1. com.startapp.sdk.ads.banner.*
2. com.startapp.sdk.adsbase.*
3. com.startapp.sdk.adsbase.adlisteners.*
Now we go back to the logic editor, in events, choose onCreate.
Use blocks as below. This will initialize and load banner ads on your linear earlier added. In app ID field, paste the ID you got earlier on startapp website.
If you want return ads, set the Boolean to true.
Time to edit manifest. Open code editor.You are done. Your banner ads should now show when you run your app.














0 Comments