Skip to content

Boossol/Triber-Android-SDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 

Repository files navigation

What is in the repositories

  • ./example : containing an example app integrating the Triber SDK

How to install

Add library dependencies to build.gradle:

repositories {
    maven {
        url 'https://dl.bintray.com/pause/maven/'
    }
}

dependencies {
  compile ('fr.pixhe.tribersdk:triber-sdk:1.0.3@aar') {
    transitive = true
  }
}

Add keys to your manifest, inside the element

<meta-data
  android:name="com.google.android.geo.API_KEY"
  android:value="YOUR_API_KEY" />

Add a FrameLayout in one of your activities layout, that will contain TriberSdk views:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/my_fragment_container"
  android:layout_width="match_parent"
  android:layout_height="match_parent" />

Configure the appearance of the SDK views

TriberSdkConfig config = new TriberSdkConfig();
config.themeCompassArrowColor = Color.YELLOW;
// More configuration

Initialize the Triber SDK, in your Application using :

sdk.init(context, apiKey, config);

with :

  • context : The application context
  • apiKey : The TriberSDK API key
  • config : An TriberSdkConfig object, containing the SDK configuration
TriberSdk sdk = TriberSdk.getInstance();
sdk.init(context, "YOUR_API_KEY", config);
  • Launch SDK when you need to - it will display on the specified layout
sdk.launch(fragmentManager, fragmentContainerId)

with :

  • fragmentManager : The containing activity/fragment fragment manager
  • fragmentContainerId : The Id of the layout that will contain the Triber fragment (android:id)
TriberSdk sdk = TriberSdk.getInstance();
sdk.launch(fragmentManager, R.id.my_fragment_container);

Done !

Options

Use these options in the TriberSdkConfig class to personalise the Triber integration in your app

Welcome Screen

  • themeWelcomeScreenLogo : Your logo
  • themeWelcomeScreenTriberLogoColor : Welcome screen Tribe logo color (LogoColor.WHITE or LogoColor.BLACK)

Font color and typeface

  • themeTitleTypeface : Titles and item titles font
  • themeTitleColor : Titles and item titles color
  • themeTextTypeface : Text block font
  • themeTextColor : Text block color
  • buttonTypeface : Button text font
  • themeBackgroundImage : Background image

Compass

  • themeCompassArrowColor : Color of the arrow
  • themeDistanceTextColor : Distance to point text color
  • themeMeetingPointCompassIcon : Icone on the left of the meetings points list

Powered by Triber

  • themePoweredByTriberTextColor : "Powered bo Triber" text color
  • themePoweredByTriberBackgroundColor : "Powered by Triber" background color
  • themePoweredByTriberLogoColor : "Powered by Triber" Logo color (LogoColor.WHITE or LogoColor.BLACK)

Happy Tribin' ! :)

About

Triber app SDK to be integrated in android apps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published