B4A Library StartApp ADS Library

Discussion in 'Additional libraries, classes and official updates' started by hanyelmehy, Jun 16, 2015.

  1. hanyelmehy

    hanyelmehy Active Member Licensed User

    Library attached below
    copy StartAppPlus.jar and StartAppPlus.xml to lib folder
    download and rename last StartApp SDK to startappinappplus.jar then add it also to lib folder

    add this to manfest
    Code:
    AddManifestText(
    <uses-permission android:name=
    "android.permission.INTERNET"/>
    <uses-permission android:name=
    "android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name=
    "android.permission.ACCESS_NETWORK_STATE"/>)
    AddApplicationText(<
    activity android:name="com.startapp.android.publish.list3d.List3DActivity"
              android:theme=
    "@android:style/Theme" />
    <
    activity android:name="com.startapp.android.publish.AppWallActivity"
              android:theme=
    "@android:style/Theme.Translucent"
              android:configChanges=
    "orientation|keyboardHidden|screenSize" />)
    its easy to use
    Code:
    Dim StAppPlus As StartAppPlus
    StAppPlus.Initialize(DevID,AppID)
    'you have many methods like
    StAppPlus.showSlider
    StAppPlus.ShowSplash(App Name)
    StAppPlus.ShowInterstitials

    'To Show Banner

    StAppPlus.ShowBanner

    Activity.AddView(StAppPlus,0,(100%y-50dip),100%x,50dip)
    lib tested with StartAppInApp-2.4.jar
    if you did not signup yet please use my link for signup
    https://portal.startapp.com//#/signup?referredBy=rfd5kwc
     

    Attached Files:

    Last edited: Jun 17, 2015
    DonManfred and MarcoRome like this.
  2. Shay

    Shay Well-Known Member Licensed User

    what is it?
     
  3. hanyelmehy

    hanyelmehy Active Member Licensed User

    StartApp - a Mobile Ad Network specializing in android app (like admob,....)
    check http://www.startapp.com/
     
  4. rleiman

    rleiman Well-Known Member Licensed User

    Hi,

    I signed up with StartApp.

    Can you check my code? I must be missing something because the banner does not show up.

    In the manifest:

    Code:
    'This code will be applied to the manifest file during compilation.
    'You do not need to modify it in most cases.
    'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
    AddManifestText(
    <uses-sdk android:minSdkVersion=
    "5" android:targetSdkVersion="14"/>
    <supports-screens android:largeScreens=
    "true"
        android:normalScreens=
    "true"
        android:smallScreens=
    "true"
        android:anyDensity=
    "true"/>
        )

    AddManifestText(
    <uses-permission android:name=
    "android.permission.INTERNET"/>
    <uses-permission android:name=
    "android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name=
    "android.permission.ACCESS_NETWORK_STATE"/>)

    AddApplicationText(<
    activity android:name="com.startapp.android.publish.list3d.List3DActivity"
              android:theme=
    "@android:style/Theme" />
    <
    activity android:name="com.startapp.android.publish.AppWallActivity"
              android:theme=
    "@android:style/Theme.Translucent"
              android:configChanges=
    "orientation|keyboardHidden|screenSize" />)

    SetApplicationAttribute(android:icon, 
    "@drawable/icon")
    SetApplicationAttribute(android:
    label"$LABEL$")
    SetApplicationAttribute(android:theme, 
    "@android:style/Theme.Holo")
    'End of default text.
    In the main module:

    Code:
    #Region  Project Attributes
        
    #ApplicationLabel: StartApp Test
        
    #VersionCode: 1
        
    #VersionName:
        
    'SupportedOrientations possible values: unspecified, landscape or portrait.
        #SupportedOrientations: portrait
        
    #CanInstallToExternalStorage: False
    #End Region

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

    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 StAppPlus As StartAppPlus
        
    Private ImageViewExit As ImageView
        
    Private PanelMenu As Panel
    End Sub

    Sub Activity_Create(FirstTime As Boolean)
        
    'Do not forget to load the layout file created with the visual designer. For example:
        Activity.LoadLayout("main")

        
    ' Set up the adverts.
        '--------------------
        StAppPlus.Initialize("My ID his here.","My app ID is here.")

        StAppPlus.ShowBanner
        
    Activity.AddView(StAppPlus,0,(100%y-50dip),100%x,50dip)
    End Sub

    Sub Activity_Resume

        
    ' Neatly arrange views.
        '----------------------
        Utils.CenterViewOnBottom(ImageViewExit, PanelMenu, 200)

    End Sub

    Sub Activity_Pause (UserClosed As Boolean)

    End Sub

    Sub ImageViewExit_Click
        
    Activity.Finish
    End Sub
     
  5. rleiman

    rleiman Well-Known Member Licensed User

    Hi hanyelmehy,

    Do you have a startapp library that works with version 3.2 of the SDK?

    If not, can you post a copy of the version 2.4 SDK you tested your library on?

    Thanks.
     
  6. clarionero

    clarionero Member Licensed User

    rleiman likes this.
  7. rleiman

    rleiman Well-Known Member Licensed User

    Hi clarionero,

    Thanks for such a quick reply. :)

    I just downloaded the files and will try it later today.
     
  8. hanyelmehy

    hanyelmehy Active Member Licensed User

    Library work with StartAppInApp-3.2.0.jar just
    rename StartAppInApp-3.2.0.jar to startappinappplus.jar and replace old one in your lib folder
    and use this in Manifest
    Code:
    '/////////////////////////////StartApp plus ////////////////////////////////////////////////
    '//////////////////////////////////////////////////////////////////////////////////////////
    AddManifestText(
    <uses-permission android:name=
    "android.permission.INTERNET"/>
    <uses-permission android:name=
    "android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name=
    "android.permission.ACCESS_NETWORK_STATE"/>)
    AddApplicationText(<
    activity android:name="com.startapp.android.publish.list3d.List3DActivity"
              android:theme=
    "@android:style/Theme" />
    <
    activity android:name="com.startapp.android.publish.OverlayActivity"
              android:theme=
    "@android:style/Theme.Translucent"
              android:configChanges=
    "orientation|keyboardHidden|screenSize" />
    <
    activity android:name="com.startapp.android.publish.FullScreenActivity"
              android:theme=
    "@android:style/Theme"
              android:configChanges=
    "orientation|keyboardHidden|screenSize" />)
    '////////////////////////// END OF StartApp plus/////////////////////////////////////////
    '//////////////////////////////////////////////////////////////////////////////////////////
     
  9. ceballot

    ceballot Member Licensed User

    Hi

    StAppPlus.Initialize(DevID,AppID)

    What is the parameter DevID?

    Thanks
     
  10. rleiman

    rleiman Well-Known Member Licensed User

    Hi,

    DevID is a number you get from Startapp after you register with them. This number needs to be surrounded in double quote marks ("Your Dev ID")
    AppID is the number Startapp give you when you add your app to their web site for being included when users click on the ads. This also needs to be surrounded by the quote marks.
     
  11. kurng

    kurng Member Licensed User

    you have ex code for other methods

    thk
     
  12. hookshy

    hookshy Well-Known Member Licensed User

    Any idea how to cancel returning ads with this library ...?
    Does anyone have an earlier version before this returning ads function ?

    2.3.6 seems to skip this return ad ...
    2.3.5 may not be compatible with google as android ID is no loger allowed

    from startapp change log
    • 2.3.5:
      • Removed usage of the Android ID.
    • 2.3.6:
      • Major improvements & bug fixes.
    • 2.4:
      • New ad type - the Return Ad!
      • Added a callback for ad click event.
      • Bug fixes.
    • 2.4.1:
      • Minor improvement.
     
Loading...