B4A ads Plugin

sorex

Expert
Licensed User
Longtime User
but i m understand, its a new company need some time and new advertisers to make a good ecpm.

as explained before you need people that install apps, without that you CURRENTLY have no other earning options with this service.
 

sorex

Expert
Licensed User
Longtime User
Did you read lastest documentation? It's changed. XML file is correct.

then the supplied jar files are incorrect.

I replaced all 3 files in my additional libs folder with the ones from the zip downloaded on 17.07 and still get the error you see below...

error.png
 

sorex

Expert
Licensed User
Longtime User
ok, another version was uploaded that fixed this problem. Now it works.

notice that the documentation doesn't mention anything about the additional lines needed in the manifest file.
 

lukaszdisplayio

New Member
Licensed User
ok, another version was uploaded that fixed this problem. Now it works.

notice that the documentation doesn't mention anything about the additional lines needed in the manifest file.
Sorex can you tell me what is missing in documentation? I will fix it.
 

sorex

Expert
Licensed User
Longtime User
@lukaszdisplayio ,

this needs to be added to the manifest file or it won't work

B4X:
AddApplicationText(<activity android:name="io.display.sdk.DioActivity" ></activity>
<activity android:name="io.display.sdk.DioTranslucentActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" ></activity>)
 

DonManfred

Expert
Licensed User
Longtime User
To anybody who is using the Display.io wrapper:

Would you mind to try this new version?

Just replace your installed wrapper with this one. The 3rd-party-Code (from Display.io) is included in this wrapper. So no need for the additional jar.

I´ve tried this wrap with picture-ads as well as with video-ads. All my tryings do work.

Please make sure you have added this lines to the manifest-editor

B4X:
AddApplicationText(<activity android:name="io.display.sdk.DioActivity" ></activity>
<activity android:name="io.display.sdk.DioTranslucentActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" ></activity>)
AddApplicationText(<activity android:name="io.display.sdk.device.PermissionsHandler" />)


Make sure to use b4a 6+ as it requires the android support library from the maven-repository.
 

Attachments

  • iodisplayV1.2.zip
    104.6 KB · Views: 280

Douglas Farias

Expert
Licensed User
Longtime User
To anybody who is using the Display.io wrapper:

Would you mind to try this new version?

Just replace your installed wrapper with this one. The 3rd-party-Code (from Display.io) is included in this wrapper. So no need for the additional jar.

I´ve tried this wrap with picture-ads as well as with video-ads. All my tryings do work.

Please make sure you have added this lines to the manifest-editor

B4X:
AddApplicationText(<activity android:name="io.display.sdk.DioActivity" ></activity>
<activity android:name="io.display.sdk.DioTranslucentActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" ></activity>)
AddApplicationText(<activity android:name="io.display.sdk.device.PermissionsHandler" />)


Make sure to use b4a 6+ as it requires the android support library from the maven-repository.

hi man.
i have this error when i try check the lib on libraries tab
1.jpg

later this i cant declare, dim blabla is .... (dont show iodisplay or displayio)

i m tryed delete old lib but dont works
i m tryed too make a new project and dont works too same problem

thx
 

Douglas Farias

Expert
Licensed User
Longtime User
the right lib is iodisplay. Not displayio
removed the old and put only your lib now.

1.jpg

tested
when i call
B4X:
ioad.Initialize("ioAd","5014")
Nothing happens, not an event is called.

And when I call ioad.showAd from a button, nothing happens.

here is the old events (i dont know if u changed this)
B4X:
Sub ioAd_onInit()
End Sub

Sub ioAd_onAdReady(placementId As String)   
End Sub

Sub ioAd_onNoAds(placementId As String)   
End Sub

Sub ioAd_onAdClick(placementId As String)   
End Sub

Sub ioAd_onAdclose(placementId As String)   
End Sub

Sub ioAd_onAdCompleted(placementId As String)   
End Sub

Sub ioAd_onAdShown(placementId As String)   
End Sub

thx
 

DonManfred

Expert
Licensed User
Longtime User
B4X:
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
    ioAd.Initialize("ioAd","xxx") ' xxx = appID
End Sub

Sub ioAd_onInit()  
    Log("ioAd_onInit")
    ioAd.showAdPlacement("yyy") ' yyy = PlacementID
End Sub
Sub ioAd_onNoAds(placementId As String)  
    Log($"ioAd_onNoAds(${placementId})"$)
End Sub
Sub ioAd_onAdClick(placementId As String)  
    Log($"ioAd_onAdClick(${placementId})"$)
End Sub
Sub ioAd_onAdclose(placementId As String)  
    Log($"ioAd_onAdclose(${placementId})"$)
End Sub
Sub ioAd_onAdCompleted(placementId As String)  
    Log($"ioAd_onAdCompleted(${placementId})"$)
End Sub
Sub ioAd_onAdShown(placementId As String)  
    Log($"ioAd_onAdShown(${placementId})"$)
End Sub

iodisplay0101.png
<-- AppID
 

Douglas Farias

Expert
Licensed User
Longtime User
B4X:
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
    ioAd.Initialize("ioAd","xxx") ' xxx = appID
End Sub

Sub ioAd_onInit() 
    Log("ioAd_onInit")
    ioAd.showAdPlacement("yyy") ' yyy = PlacementID
End Sub
Sub ioAd_onNoAds(placementId As String) 
    Log($"ioAd_onNoAds(${placementId})"$)
End Sub
Sub ioAd_onAdClick(placementId As String) 
    Log($"ioAd_onAdClick(${placementId})"$)
End Sub
Sub ioAd_onAdclose(placementId As String) 
    Log($"ioAd_onAdclose(${placementId})"$)
End Sub
Sub ioAd_onAdCompleted(placementId As String) 
    Log($"ioAd_onAdCompleted(${placementId})"$)
End Sub
Sub ioAd_onAdShown(placementId As String) 
    Log($"ioAd_onAdShown(${placementId})"$)
End Sub

iodisplay0101.png
<-- AppID

dont work here :(

here is the code
B4X:
#Region  Project Attributes
    #ApplicationLabel: Display io Example
    #VersionCode: 1
    #VersionName: 1.0
    #SupportedOrientations: portrait
    #CanInstallToExternalStorage: False
    #AdditionalJar: com.android.support:support-v4
   
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: False
#End Region

Sub Process_Globals
End Sub

Sub Globals
   
    Private ioad As ioController
    Private Button1 As Button
    Private Button2 As Button

End Sub

Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("1")
    ioad.Initialize("ioAd","5014") ' xxx = appID
   
   
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub




Sub Button1_Click
    ioad.showAd
End Sub





Sub Button2_Click
    ioad.showAdPlacement("1634")
End Sub



Sub ioAd_onInit() 
    Log("ioAd_onInit")
    ioad.showAdPlacement("1634") ' yyy = PlacementID
End Sub
Sub ioAd_onNoAds(placementId As String) 
    Log($"ioAd_onNoAds(${placementId})"$)
End Sub
Sub ioAd_onAdClick(placementId As String) 
    Log($"ioAd_onAdClick(${placementId})"$)
End Sub
Sub ioAd_onAdclose(placementId As String) 
    Log($"ioAd_onAdclose(${placementId})"$)
End Sub
Sub ioAd_onAdCompleted(placementId As String) 
    Log($"ioAd_onAdCompleted(${placementId})"$)
End Sub
Sub ioAd_onAdShown(placementId As String) 
    Log($"ioAd_onAdShown(${placementId})"$)
End Sub

teste.jpg


the ioAd_onInit is not called.

** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **

thx
 
Top