Hi Folks,
This is a beta test version of the Greystripe (
Greystripe) ad library.
I have only added the fullscreen ads in this library as for banner ads we have the 4 other ad libraries available.
Attached are the necessary files for the library, and a sample project, which if you run without changing the appid will give you a fullscreen error ad instead.
Steps:
1 - Register at greystripe
2 - create an app id (they have an approval process which could take a while)
3 - Download their SDK, and rename the jar to "gssdk.jar" from "gssdk_1.6.1.jar"
4 - add the attached jar and xml files to your extra libraries folder, and add gssdk.jar there too.
5 - restart B4A and try running the attached sample
In Manifest the following is needed:
<!-- GreyStripe Code Start-->
<provider android:name="com.greystripe.android.sdk.AdContentProvider"
android:authorities="<packagename>.AdContentProvider"
android:multiprocess="true"
android:exported="false" />
<activity android:name="com.greystripe.android.sdk.AdView"
android:configChanges="keyboard|keyboardHidden|orientation" >
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- GreyStripe Code End-->
Change the <packagename> to your package name without the "<" and ">" tags.
And permissions:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
Remember to select Project > do not overwrite manifest file.
Give it a go. The sample attempts to show an ad every 3 seconds. In real life scenario, this full screen ads is more suitable for screen transition stages.
If no ad is available displayAd just returns false.
Feedback mucho appreciato!
Good luck all!