B4A Library Tooleap Library - Floating notifications and miniApps

Discussion in 'Additional libraries, classes and official updates' started by thedesolatesoul, May 18, 2014.

  1. thedesolatesoul

    thedesolatesoul Expert Licensed User





    Tooleap Tutorials
    Part 1 - Introduction to Tooleap
    Part 2 - Introduction to Tooleap Development
    Part 3 - Installation of Tooleap library and Application Setup
    Part 4 - Creating a Tooleap Activity in B4A
    Part 5 - Launching a miniApp
    Part 6 - Other considerations
    ...more later

    Tooleap Libraries
    - All tooleap libraries are attached to the post including the sdk jar

    Requirements
    B4A 3.80
    Android 2.2+

    Samples and Demos
    - Attached to this post
    - NJDude's Sample: http://www.basic4ppc.com/android/fo...cations-and-miniapps.41136/page-2#post-247534
     

    Attached Files:

    Last edited: May 25, 2014
  2. thedesolatesoul

    thedesolatesoul Expert Licensed User

    Library Docs:

    TooleapHelper
    Author:
    thedesolatesoul
    Version: 0.05
    • MSTooleapActivityHelper
      Methods:
      • getCurrentActivityTooleapAppId As Long
        Returns the Tooleap AppID for the current activity
        Return type: long
      • isStartedByTooleap As Boolean
        Returns if a TooleapActivity was started in normal mode or in MiniApp mode
        Return type: boolean
    • MSTooleapManager
      Methods:
      • addMiniApp (miniApp As MSTooleapMiniApp) As Long
        Add a new Mini-App to Tooleap.
        miniApp: is the miniApp to be added
        Return type: long (appID)
      • getAllMiniApps As List
        Get a list containing all of the active Mini-Apps added to the Tooleap Service.
        Return type: List of all active MSTooleapMiniApp
      • getMiniApp (appID As Long) As MSTooleapMiniApp
        Get the Mini-App data associated with the appID
        appID: of the miniApp to be returned
        Return type: MSTooleapMiniApp
      • getMiniAppNotificationBadge (appId As Long) As Int
        Get the current numeric value of the notification badge
        appId: of the MiniApp
        Return type: Int
      • getVisibleAppId As Long
        Get the Mini-App ID of the Mini-App currently visible to the user.
        Return type: long appID
      • removeAllMiniApps
        Remove all the Mini-Apps added to the Tooleap service
      • removeMiniApp (appId As Long)
        Remove an existing Mini-App from Tooleap.
        appId: of miniApp to be removed
      • updateMiniApp (appId As Long, miniApp As MSTooleapMiniApp) As Boolean
        Update the Mini-App.
        You can use this to update the text or notification properties
        appId: of the miniApp to be updated
        miniApp:
        Return type: boolean (whether app was successfully updated or not)
      • updateMiniAppAndNotify (appId As Long, miniApp As MSTooleapMiniApp) As Boolean
        Update the Mini-App and post a notification to be shown.
        appId: of the miniApp to be updated
        miniApp: to be updated
        Return type: boolean (whether app was successfully updated or not)
    • MSTooleapMiniApp
      Fields:
      • CONTEXTUAL_BROWSER As String
      • CONTEXTUAL_HOME_SCREEN As String
      • CONTEXTUAL_MY_APPLICATION As String
      • LISTTYPE_BLACKLIST As Int
      • LISTTYPE_WHITELIST As Int
      • TYPE_HOME_MINIAPP As Int
      • TYPE_NOTIFICATION_MINIAPP As Int
      • TYPE_PERSISTENT_MINIAPP As Int
      • TYPE_POPOUT_MINIAPP As Int
      Methods:
      • Initialize (intent As IntentWrapper, type As Int)
        Create a new TooleapMiniApp
        intent: Intent is in the form of:
        Dim i As Intent
        i.Initialize("","")
        i.SetComponent("com.maximussoft.tooleap/.test")
        type: Can be one of the miniApp types
      • Initialize2 (ActivityName As String, title As String, notification As String)
        Quick method to initialize miniApp
        ActivityName: : Name of activity (in lowercase)
        title: : Title of miniApp
        notification: : Notification text
      • IsInitialized As Boolean
      • SetContextualFilterList (contextual As String, ListType As Int)
        Set the availability of the Mini-App by providing a contextual filter list of applications
        Only pertinent to persistent miniapps
        contextual: : Can be
        CONTEXTUAL_BROWSER An application list of all browser apps on the device
        CONTEXTUAL_HOME_SCREEN The device home screen application
        CONTEXTUAL_MY_APPLICATION The developers application/your apps package name)
      • SetFilterList (pList As List, ListType As Int)
        Set the availability of the Mini-App by providing a filter list of applications
        Only pertinent to persistent miniapps
        filterList: is a list of packagenames
        ListType: can be either LISTTYPE_WHITELIST or LISTTYPE_BLACKLIST
      • allowUserToDismiss (isDismissible As Boolean)
        Set whether this persistent mini app is dismissible (determines the close button availability).
        Only for PersistentMiniApps
        isDismissible:
      • hasFilter As Boolean
        Returns whether the Mini-App has a filter list defined
        Only for PersistentMiniApps
        Return type: boolean whether the miniapp has a whitelist or blacklist filter
      Properties:
      • AppID As Long [read only]
        Gets the AppID for this miniApp
      • ContentIntent As IntentWrapper [read only]
        Returns the content intent which was set during Initialize
      • ContentText As CharSequence [write only]
        The text to be displayed at second line of text in the applications menu.
      • ContentTitle As CharSequence [write only]
        The text to be displayed as the title of the Mini-App.
      • Icon As Bitmap [write only]
        Bitmap representing the icon data.
      • NotificationBadgeNumber As Int [write only]
        The numeric value of the notification badge
      • NotificationText As CharSequence [write only]
        The text to be displayed in the text balloon when the notification first arrives.
      • When As Date [read only]
        The timestamp pertaining to the notification (usually the time the event occurred).
      • bubbleBackgroundColor As Int [write only]
        The Bubble's background color for this Mini-App in ARGB format.
     
    Last edited: May 19, 2014
  3. thedesolatesoul

    thedesolatesoul Expert Licensed User

  4. NJDude

    NJDude Expert Licensed User

    Very nice!
     
  5. vpires

    vpires Member Licensed User

    So onNewIntent is finally fixed in 3.8 ? If yes, i'll bug Erel for a version upgrade discount.
     
  6. thedesolatesoul

    thedesolatesoul Expert Licensed User

    Basic sample attached. Play with it :)

    Yes, it is definitely fixed.
    I think member referals can get some discount, I can send you a referal code if you want.
     
    NJDude likes this.
  7. Douglas Farias

    Douglas Farias Expert Licensed User

    hi man
    i got this error when i try open your sample
    i think this error is because your private sign key
     

    Attached Files:

  8. thedesolatesoul

    thedesolatesoul Expert Licensed User

    Are you using B4A 3.80 to open it? (Released today)
     
    NJDude likes this.
  9. Douglas Farias

    Douglas Farias Expert Licensed User

  10. thedesolatesoul

    thedesolatesoul Expert Licensed User

    NJDude likes this.
  11. RAJAN MBA

    RAJAN MBA Member Licensed User

    Hi,
    Thanks for the lib, but why does this lib require Internet permission?
    Code:
    <uses-permission android:name="android.permission.INTERNET" />
    Edit: Ok.Found the explanation in your blog:
     
  12. Erel

    Erel Administrator Staff Member Licensed User

    Well done!

    <off topic>Users who are not eligible for a free upgrade will receive an email with a discount offer later today</off topic>
     
  13. RAJAN MBA

    RAJAN MBA Member Licensed User

    How long does it take to get their sdk after signing up ? I thought they would send a link immediately on signup and verification (I found no link on their webpage for direct sdk download)
     
  14. thedesolatesoul

    thedesolatesoul Expert Licensed User

    I think it takes a day depending on how much backlog they have. There seem to be a lot of developers signing up.
     
    NJDude and RAJAN MBA like this.
  15. RAJAN MBA

    RAJAN MBA Member Licensed User

    Thanks for you know what ;) Double Like ! Works Great !
     
  16. ivan.tellez

    ivan.tellez Active Member Licensed User

    Is tooleap SDK free?
     
  17. RAJAN MBA

    RAJAN MBA Member Licensed User

    Last edited: May 20, 2014
    thedesolatesoul likes this.
  18. Tooleap

    Tooleap Member Licensed User

    Hi,
    I'm one of the developers of Tooleap. If anyone here has a specific question about Tooleap, you can post it here, and i'll try to help you.

    Note that the wrapper was created by thedesolatesoul, so I can only help you with questions specifically about Tooleap.
    Many thanks to thedesolatesoul for creating the wrapper and the tutorial! :)

    Danny
     
    Last edited: May 20, 2014
    eSolution, Sytek, NJDude and 3 others like this.
  19. thedesolatesoul

    thedesolatesoul Expert Licensed User

    Welcome Danny :)
     
    NJDude and Tooleap like this.
  20. RAJAN MBA

    RAJAN MBA Member Licensed User

    Hi,
    Would it be possible to remove the search bar from mini apps ? I don't want to add Internet permission for my planned app.
     
Loading...