Java Question GreyStripe Ads - Fullscreen Ads - Beta Test Please

ssg

Well-Known Member
Licensed User
Longtime User
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:

B4X:
<!-- 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:

B4X:
<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!
 

Attachments

  • GSLib.zip
    2.6 KB · Views: 550
  • GreyStripeTest.zip
    5.8 KB · Views: 523

ssg

Well-Known Member
Licensed User
Longtime User
SSG,

I was able to get it working.

Thanks for your work on this!

Jack

Hi Jack,

Thanks for the feedback, and thanks for reminding me to bring this bugger out of beta! LOL!

As to the answer to your other question, yes, Greystripe has pretty good returns, I am wondering why I did not use it in all my apps??? (Time for an update!)

Just as a measure, for the month of November, with the ads implemented in 3 of my apps, it gave a return of $46.86. Not bad I'd say...

Good luck with your implementations!

Best Regards,
Bill
 

susu

Well-Known Member
Licensed User
Longtime User
Hi my friend, I'll follow you :D

Ps: LeadBolt app ad is bad for my country. They didn't count the clicks :(
 

susu

Well-Known Member
Licensed User
Longtime User
Hi Bill,

How to add a test device? Which "Identifier" number I should use?

Thank you.

Edit:

I found it.

"To find the unique identifier for your Android device simply dial *#06# The number you get back is the unique identifier or “IMEI” for your Android device."
 

ssg

Well-Known Member
Licensed User
Longtime User
Hi my friend, I'll follow you :D

Ps: LeadBolt app ad is bad for my country. They didn't count the clicks :(

Hi susu,

Good idea to have the greystripe ads in. But it might be more suitable for games instead of apps though.

As for leadbolt, it is a CPA type of ad network. You dont get paid on clicks, you get paid on conversions. The payout is much larger for the conversions, so in the long run you'll make better from CPA ads. But too bad about them not having ads for your country :(

Good luck!
 

susu

Well-Known Member
Licensed User
Longtime User
Hi Bill,

Could you please add Banner Ad to Greystripe library? It seems I only have this option for Banner Ad. Thank you so much.
 

susu

Well-Known Member
Licensed User
Longtime User
Thank you Bill. As I mentioned before, AdMob suddently banned my apps. LeadBolt didn't count the clicks on app ad so Greystripe is the only option for me.
 

ssg

Well-Known Member
Licensed User
Longtime User
susu, have u tried the mobfox and millenial media ones too? Those are another 2 options. But i'd give millenial media a pass, they hardly have good ads for asean anyway ( you are in asia right? vietnam i think :p )
 

susu

Well-Known Member
Licensed User
Longtime User
Do you think MobFox is good for me?
 
Last edited:

ssg

Well-Known Member
Licensed User
Longtime User
Hi susu,

I think i remember you posted your country in here somewhere before :D

I tried the greystripe banner ads, but could not get them to work :(

Go ahead and use MobFox. At least you will still have banner ads in.

Cheers!

-Bill
 

susu

Well-Known Member
Licensed User
Longtime User
I'll try MobFox. Hope you can make Greystripe banner ad works.

Ps: Do you have any donate app? I want to buy you a beer to thank you :D
 

ssg

Well-Known Member
Licensed User
Longtime User
Hi susu,

I wont have access to my development pc over the weekend. I will try and see if I can get the banners to work next week.

No donation is necessary, your thank you is more than enough!

Cheers!

-Bill
 

susu

Well-Known Member
Licensed User
Longtime User
Oh yeah! Happy New Year! Have a great time.

And I want to thank you a thousand times :D
 

fared15

Member
Licensed User
Longtime User
error...

im getting this error any body please i think so version 2.1 sdk have this problem i didnt found version 1.6 sdk if u can give it should be gr8 or update library please
B4X:
** Activity (main) Create, isFirst = true **


main_activity_create (java line: 310)
java.lang.NoClassDefFoundError: com.greystripe.android.sdk.GSSDK
   at com.madelephantstudios.MESGSLib.MESGSLib.Initialize(MESGSLib.java:28)
   at pocket.radio.main._activity_create(main.java:310)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
   at pocket.radio.main.afterFirstLayout(main.java:85)
   at pocket.radio.main.access$100(main.java:16)
   at pocket.radio.main$WaitForLayout.run(main.java:72)
   at android.os.Handler.handleCallback(Handler.java:608)
   at android.os.Handler.dispatchMessage(Handler.java:92)
   at android.os.Looper.loop(Looper.java:156)
   at android.app.ActivityThread.main(ActivityThread.java:5045)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
   at dalvik.system.NativeStart.main(Native Method)
 
Top