Description: This library was created using the Tapit sdk to give Basic4Android users the capability to add Tapit network ads on their applications



Download 324.2 Kb.
Page2/2
Date09.06.2018
Size324.2 Kb.
#53722
1   2

Interstitial Ad Full Screen Ad

User Instructions:

Register with Tapit at http://tapit.com/.

Once registered, Add a Site or App.

Once you add a site or an app, you will be assigned a Zone Id.

Download the Tapit SDK.

Download tapit B4A library here http://www.basic4ppc.com/forum/additional-libraries-classes-official-updates/18711-tapit-ads-wrapper.html. Or here http://support.tapit.com/forums.



Integrating Library with Basic4Android:

Unzip the downloaded files and place the TapitAds.jar, TapitAds.xml and TapitAdView.jar files into the Additional Libraries folder in Basic4Android folder.



Open Basic4Android and look for the TapitAds library in the library tab to the right of the screen.



Permissions:

The following permissions are required in your XML file.

android.permission.INTERNET, android.permission.ACCESS_NETWORK_STATE, android.permission.READ_PHONE_STATE, android.permission.ACCESS_FINE_LOCATION, android.permission.ACCESS_COARSE_LOCATION.

This permissions are already declared in the library, there is no need to add them manually, or through the manifest editor in Basic4Android.



For processing some ORMMA feature like playing embedded video please
add this before the :

AddApplicationText()

You need to add this as well.

AddApplicationText(

android:configChanges="keyboard|keyboardHidden|orientation"/>)
Testing the Tapit Library:
please follow the example below.

'Activity module

Sub Process_Globals

'These global variables will be declared once when the application starts.

'These variables can be accessed from all modules.
End Sub
Sub Globals

'These global variables will be redeclared each time the activity is created.

'These variables can only be accessed from this module.

Dim tapit As TapitAd ‘declare variable as TapitAd


Dim button1, button2, button3, button4 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)

Activity.LoadLayout("main")


button1.Initialize("button1")

button2.Initialize("button2")

button3.Initialize("button3")

button4.Initialize("button4")


tapit.Initialize("tapit", "Zone Id") ‘initialize the library and enter your Zone Id

Activity.AddView(tapit, 0, 0, 100%x, 90) ‘for banners, you can addview to panels, activity etc..
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub tapit_begin

Log("starting download.....") ‘For troubleshooting purposes

End Sub
Sub tapit_receivead

Log("succesfully showed ad")

End Sub
Sub tapit_error(reason As String)

Log(reason)

End Sub
Sub button1_Click

tapit.Interstitial(5, 20, 5, True) ‘Display Interstitial Ads, display close button 5 seconds after ad loads, autoclose in 20 seconds, update ads every 5 seconds, and set soundeffects to true. Note you can pass 0 to disable the autoclosing feature.

End Sub
Sub button2_Click

tapit.Full_Screen(10, False) ‘Display Full Screen Ads, Autoclose in 10 seconds and set show status bar to false.

End Sub
Sub button3_Click

tapit.Offer_Wall(False) ‘Display Offer Wall Ads, set show status bar to false.

End Sub
Sub button4_Click

tapit.Video_Ad(False, 20) ‘Display Video ads, set showstatus bar to False, and autoclose in 20 seconds.

End Sub

Troubleshooting:

Please refer to unfiltered logs to determine what may cause failure to load ads.

Make sure that all three required files are placed inside the Additional Libraries folder in the Basic4Android folder. TapitAds.jar, TapitAds.xml and TapitAdView.jar files.

Make sure the TapitAds library file is checked in the libs tab to the right of the screen in Basic4Android IDE.



Make sure that this attributes are added in the XML file.

AddApplicationText()

and

AddApplicationText(

android:configChanges="keyboard|keyboardHidden|orientation"/>)
For more information please refer to the Basic4Android forums, or the Tapit support forum.


Download 324.2 Kb.

Share with your friends:
1   2




The database is protected by copyright ©ininet.org 2024
send message

    Main page