• Stars
    star
    614
  • Rank 70,479 (Top 2 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created about 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

FlatBuffer : Android Sample Application

FlatBuffer Android Sample Application

This app shows how fast flat buffer works when we compare it with json.

My Personal Blog - amitshekhar.me - High-quality content to learn Android concepts.

FlatBuffers Vs JSON

FlatBuffer is too much faster than JSON.

Try Fast Android Networking Library for easy and fast networking

Another awesome library for debugging databases and shared preferences.

How to start with flatBuffers

$ git clone https://github.com/google/flatbuffers.git
$ cd flatbuffers
  • Run the command on the basis of your platform
$ cmake -G "Unix Makefiles"
$ cmake -G "Visual Studio 10"
$ cmake -G "Xcode"
  • now build for your platform as usual. This should result in a flatc executable
  • Now create your schema file with extension .fbs. Guide to write a schema can be found here.And also have your sample json file.
$ ./flatc -j -b schema.fbs sample.json
  • This will create few java file and one bin file. Java files are like model(POJO for flatBuffer) of your json.Place the java files in your application package and bin file in raw folder(bin file is only for testing as it is converted to byte that is to be passed to flatbuffer for testing).
  • Now we have to get flatbuffer jar file.
$ cd flatbuffers
$ cd java
$ mvn install
// This will download all the dependencies.
$ cd target
  • Here you will get the flatbuffers-java-1.3.0-SNAPSHOT.jar file that you have to put it in your libs folder of android project.
  • For rest you can see my sample project.

Major steps:

  • Prepare your schema.fbs.
  • Have a sample json.
  • Build flatBuffer google project to generate your java files to be used in main application.
  • Generate java files.

Find this project useful ? ❤️

  • Support it by clicking the button on the upper right of this page. ✌️

You can connect with me on:

Read all of my blogs here.

License

   Copyright (C) 2022 Amit Shekhar

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

More Repositories

1

android-interview-questions

Your Cheat Sheet For Android Interview - Android Interview Questions and Answers
Java
10,914
star
2

Android-Debug-Database

A library for debugging android databases and shared preferences - Make Debugging Great Again
Java
8,343
star
3

from-java-to-kotlin

From Java To Kotlin - Your Cheat Sheet For Java To Kotlin
Java
6,100
star
4

Fast-Android-Networking

🚀 A Complete Fast Android Networking Library that also supports HTTP/2 🚀
Java
5,649
star
5

RxJava2-Android-Samples

RxJava 2 Android Examples - How to use RxJava 2 in Android
Java
4,964
star
6

go-backend-clean-architecture

A Go (Golang) Backend Clean Architecture project with Gin, MongoDB, JWT Authentication Middleware, Test, and Docker.
Go
3,702
star
7

PRDownloader

PRDownloader - A file downloader library for Android with pause and resume support
Java
3,210
star
8

awesome-android-complete-reference

Here I list down all of the high-quality blogs that I publish on my website.
Java
2,827
star
9

android-developer-roadmap

Android Developer Roadmap - A complete roadmap to learn Android App Development
Java
2,730
star
10

ridesharing-uber-lyft-app

Ride-Sharing Uber Lyft Android App - Learn to build a ride-sharing Android Taxi Clone App like Uber, Lyft - Open-Source Project
Kotlin
1,451
star
11

AndroidTensorFlowMachineLearningExample

Android TensorFlow MachineLearning Example (Building TensorFlow for Android)
Java
1,431
star
12

Kotlin-Coroutines-Android-Examples

Moved to https://github.com/amitshekhariitbhu/Learn-Kotlin-Coroutines
1,028
star
13

awesome-android-things

A curated list of awesome android things tutorials, libraries and much more at one place
Java
957
star
14

Android-TensorFlow-Lite-Example

Android TensorFlow Lite Machine Learning Example
Java
742
star
15

iOS-Viper-Architecture

This repository contains a detailed sample app that implements VIPER architecture in iOS using libraries and frameworks like Alamofire, AlamofireImage, PKHUD, CoreData etc.
Swift
709
star
16

GlideBitmapPool

Glide Bitmap Pool is a memory management library for reusing the bitmap memory
Java
589
star
17

MVVM-Architecture-Android

MVVM architecture using Kotlin, Dagger, Retrofit, Coroutines, Flow, StateFlow, and etc.
Kotlin
517
star
18

AndroidTensorFlowMNISTExample

Android TensorFlow MachineLearning MNIST Example (Building Model with TensorFlow for Android)
Java
460
star
19

Learn-Kotlin-Flow

Learn Kotlin Flow by real examples for Android
Kotlin
368
star
20

Learn-Kotlin-Coroutines

Learn Kotlin Coroutines by real examples for Android
Kotlin
315
star
21

RxJava3-Android-Examples

RxJava 3 Android Examples - Migration From RxJava 2 to RxJava 3 - How to use RxJava 3 in Android
Kotlin
289
star
22

NYBus

NYBus (RxBus) - A pub-sub library for Android and Java applications
Java
285
star
23

Android-MVP-Sample-Application

Android MVP Sample Application
Java
260
star
24

SnapHelperExample

SnapHelper Example for Android Application
Java
248
star
25

best-android-tutorials

Best Free Android Tutorials
155
star
26

android-mvp-basic-sample

Android MVP Basic Sample
Java
147
star
27

RxJavaPriorityScheduler

RxPS - RxJavaPriorityScheduler - A RxJava Priority Scheduler library for Android and Java applications
Java
144
star
28

Kotlin-Networking

Kotlin Networking - An elegant networking library written in Kotlin
Kotlin
98
star
29

Android-Shimmer-Example

An example project to demonstrate how to use Shimmer in your Android application
Kotlin
60
star
30

AppLock

Android Application for app lock
Java
39
star
31

android-online-course

Android Online Course
23
star
32

Android-HotFix

Android HotFix Library For On The Fly Bug Fix. Bug fix without updating APK.
Java
22
star
33

Floatingview

Java
8
star
34

WordSuggestions

WordSuggestions
C++
2
star
35

amitshekhariitbhu

A repository to add a README.md to my GitHub profile
1
star