Flooz

build passing version 3.2.0 platform android dependencies deprecated twitter @floozme

Installation

Flooz uses Gradle as dependency manager, which automates and simplifies the process of using 3rd-party libraries.

Installation process

$ git clone https://github.com/larafale/flooz-android.git
$ cd flooz-android
$ open -a /Applications/Android\ Studio.app ./flooz-android

Gradle Build Tools 24.+ and Android Studio 2.2 are required to build Flooz.

Architecture

Name Version Notes
RoundedImageView 2.2.1 A fast ImageView that supports rounded corners, ovals, and circles.
ViewPagerIndicator 2.4.1 Paging indicator widgets compatible with the ViewPager from the Android Support Library and ActionBarSherlock
StickyListHeaders 2.7.0 An android library for section headers that stick to the top
MaterialDesignLibrary 1.5 This is a library with components of Android L to you use in android 2.2
PhotoView 1.3.0 Implementation of ImageView for Android that supports zooming, by various touch gestures.
Android Segmented Control 1.0.6 ios UISegmentedControl for android
DotProgressBar 1.0 It's a simple dot progress bar
Blurry 2.0.3 Blurry is an easy blur library for Android
CreditCardEntry 1.4.7 Smooth UI for Credit Card Entry on Android device, regex check for supported credit card types and luhn check. Inspired by Square credit card entry interface
Card.io 5.3.4 card.io provides fast, easy credit card scanning in mobile apps
Fresco 0.12.0 An Android library for managing images and the memory they use.
Android Async Http 1.4.9 An Asynchronous HTTP Library for Android
Android Universal Image Loader 1.9.5 Powerful and flexible library for loading, caching and displaying images on Android.
SocketIO 0.7.0 Full-featured Socket.IO Client Library for Java, which is compatible with Socket.IO v1.0 and later.
BarcodeScanner 1.8.4 Android library projects that provides easy to use and extensible Barcode Scanner views based on ZXing and ZBar
Zxing 3.2.1 Official ZXing ("Zebra Crossing") project home
Reprint 2.7.2 A unified fingerprint library for android.
Genius Android 2.0.0-beta4 Android Material Design Theme UI and Tool Library.
libphonenumber 7.7.0 Google's common Java, C++ and JavaScript library for parsing, formatting, and validating international phone numbers.
TinyTask v1 A tiny Android library to create async background tasks.
AndroidDeviceNames 1.1 A tiny Android library that transforms the device model name into something users can understand.
Butterknife 8.4.0 Bind Android views and callbacks to fields and methods.
Mixpanel 4.9.2 An Android library for Mixpanel Analytics
Android Location Tracker 3.2 Android helper that tracks user location
Facebook 4.10.0 Used to integrate Android apps with Facebook Platform.
Branch.io 2.4.4 Deferred Deep Linking SDK for Android apps powered by Branch Metrics. We help mobile apps grow with deep links / deeplinks that power referral systems, sharing links and invites with full attribution and analytics.
Crashlytics 2.6.4 Part of Twitter Fabric, Crashlytics offers the most powerful, yet lightest weight crash reporting solution for Android

#####The models are initialized from API calls, several kinds of models are available:

  • FLButton Button object, handle events using Triggers
  • FLComment Transaction and pot comment object
  • FLCountry Country object with flag, phone prefix...
  • FLCreditCard Credit card object with holder, card number, expires...
  • FLError In-App alert object (appear from top)
  • FLNotification Notification object (text, cAt)
  • FLPreset Preset object used for initalizing new collect or new flooz view from Triggers
  • FLReport Report object used when sending user or transaction report to the API
  • FLShareText Invitations texts used for app sharing (Fb, twitter, mail, sms)
  • FLShopItem Shop item can be a product or category
  • FLSocial Social data from collect and transactions (nbLikes, nbComments, ...)
  • FLTexts Texts sended from API, used to manage all kinds of content within the app
  • FLTransaction Transaction object (can be a pot)
  • FLTrigger Trigger object with next triggers, data and kind
  • FLUser User object with all visible informations

UI

The UI part of Flooz is based entirely on code, no xibs or storyboards are used in the project, almost every view is a specific class that can be found in the Views folder. Lot of widgets are available in this folder including but not only:

Controllers used in the project are subclasses of GlobalViewController or BaseViewController, wich handle view template generation (backgroundColor, contentView, navigationBar, navigationItems).

Networking

Api documentation can be found here, it contains all routes and their parameters. AFNetworking is used for all network requests and all responses are formatted in JSON. User access token is added, with several other info’s (device, version, os, ...), in every requests as an URL parameter. The FloozRestClient singleton contains all requests, user data, texts sanded from api and socket handler.

Succeeding requests will return one of the following template:

  • Unique object

     	{
     		code: 200,
     		item: Object,
     		triggers: [Trigger],
     		popup: PopupData
     	}
  • List of objects

     	{
     		code: 200,
     		items: [Object],
     		triggers: [Trigger],
     		popup: PopupData
     	}
  • List of objects with pagination

     	{
     		code: 200,
     		items: [Object],
     		next: NextURL
     		triggers: [Trigger],
     		popup: PopupData
     	}

Sockets are used in this project for live events or updating information, sockets are handle with SocketIO. Two sockets feed are listening:

  • event can contain popup or triggers
  • feed update number of unread notifications, can also contain triggers

Triggers

A Trigger is a special object send by the API, it's used for multiple purpose and is define by a key. Most of the time Triggers will be in an array, each element of this array will be executed one after another by the FLTriggerManager.

Structure

	{
		key: 'namespace:view:action',
		delay: 0,
		data: {},
		triggers: [Trigger]
	}

key : string (required)

The key is a string formatted in three part with namespace first, then view and finally an action. Only the view part can be left empty. Between each component a : is required.

Key format: namespace:view:action

  • namespace: represent the context of the trigger (ex: app, pay, card, shop, settings, ...)
  • view: define the specific view in the namespace where the trigger will take effect
  • action: define the kind of effects the trigger will have; several action is available:
    • ask (request permissions (notifs, facebook)
    • call (http::call used to make http request on the API or a specific URL)
    • clear (clear local data)
    • hide (hide specific view defined by the namespace and the view)
    • login (force user identification)
    • logout (logout current user from the app)
    • open (open specific URL with native phone view)
    • picker (pick specific content and send it through is next triggers)
    • send (send images from current transaction or pot)
    • show (show specific view defined by the namespace and the view)
    • sync (force updating specific data)

delay : float

Execution of a trigger can be delayed with this parameter. Value has to be set in seconds.

data : jsonObject

Parameters specific to each trigger. Learn more using the push playground here.

data : array<Trigger>

Array of Triggers executed one after another when the current Trigger is done.

Usage

Buttons

Lots of buttons within the app use Triggers to do actions and are sets by the API. It's the case for all home menu buttons, popup buttons, accept/refuse/participate/close buttons, ...

Payment Process

The payment process in any part of the app is actually based on triggers sended by one http request. The API respond with a list of Triggers starting with a confirmation popup, then authenticate user using fingerprint or secure code and finally process the payment (if necessary a process where the user can register is credit card or cash-in from audiotel can be add in the process).

Pickers

Pickers are specific kind of triggers used for picking a user, an image or a scope and send it in the data of is successTrigger.

URL Scheme

Flooz can be opened using a url scheme and in this url can be inserted Triggers that will be executed when the app his running and the user authenticated.

URL: flooz://

Notifications

In push notifications or internal notifications Triggers are used to handle what the app has to do when the user interacts with these notifications.

Credits

Flooz is owned and maintained by the Flooz SAS.

Security Disclosure

If you believe you have identified a security vulnerability with Flooz, you should report it as soon as possible via email to dev@flooz.me. Please do not post it to a public issue tracker.