Android 220+ libraries with GitHub

This having 220+ libraries. To gather all these, my lot of time and effects are included. 🙂

1496305434_android

 

https://github.com/vipulasri/Timeline-View -1

https://github.com/glomadrian/Grav
Grav is a library for android which allow you to make multiple animations based on points.

https://github.com/robertlevonyan/materialChipView

https://github.com/GreaseMonk/android-timetable-core

https://github.com/android-Infoedge/randomizer
Annotation based library which is used to generate random data.

https://github.com/Kelin-Hong/CalendarListView
A custom ListView combine with CalendarView which interactive each other.

https://github.com/PhilJay/MPAndroidChart

https://github.com/nisrulz/easydeviceinfo

https://github.com/BCsl/CursorWheelLayout
CursorWheelLayout is an Android library that allows view to be placed on a rotatable wheel.

https://github.com/Nightonke/BoomMenu -10

https://github.com/Nightonke/WoWoViewPager

https://github.com/vanniktech/Emoji

https://github.com/Devlight/NavigationTabBar

https://github.com/Devlight/InfiniteCycleViewPager

https://github.com/mikepenz/CrossfadeDrawerLayout
Add a 2-Step DrawerLayout to your application

https://github.com/Mauin/RxFingerprint

https://github.com/Tibolte/AgendaCalendarView

https://github.com/thorbenprimke/realm-mapview

https://github.com/H07000223/FlycoDialog_Master
An Android Dialog Lib simplify customization.

https://github.com/hanks-zyh/PasscodeView -20

https://github.com/hanks-zyh/PasscodeView
Fast and simple data storage library for Android NoSQL.

https://github.com/rajasharan/SearchableSpinner

https://github.com/JStumpp/awesome-android

https://github.com/sindresorhus/awesome

https://github.com/wasabeef/awesome-android-ui

https://github.com/Trinea/android-open-project

https://github.com/umano/AndroidSlidingUpPanel
This library provides a simple way to add a draggable sliding up panel

https://github.com/edubarr/header-decor
A couple of sticky header decorations for android’s recycler view.

https://github.com/sdsmdg/RotatingText
Rotating text is an Android library that can be used to make text switching painless and beautiful

https://github.com/ernestoyaquello/vertical-stepper-form -30
Vertical Stepper Form Library for Android.

https://github.com/drozdzynski/Steppers

https://github.com/1gravity/Android-RTEditor

https://github.com/Cleveroad/AdaptiveTableLayout

https://github.com/SalmanZach/SmartStickyHeader

Celebrate more with this lightweight confetti particle system 🎊
https://github.com/DanielMartinus/Konfetti

https://github.com/MartinRGB/GiftCard-Android

A memory leak detection library for Android and Java.
https://github.com/square/leakcanary

https://github.com/rjsvieira/floatingMenu

https://github.com/janishar/ParaCamera

https://github.com/tumblr/PermissMe -40

Conceal provides easy Android APIs for performing fast encryption and authentication of data.
https://github.com/facebook/conceal

https://github.com/ahmed-adel-said/PhotoEditorSDK

https://github.com/kannan-anbu/glazy-viewpager

https://github.com/vivian8725118/TimeLine

https://github.com/shchurov/HorizontalWheelView

https://github.com/developer-shivam/FeaturedRecyclerView

https://github.com/steelkiwi/cropiwa

https://github.com/Ekalips/ExpandableCardViewList/

https://github.com/juankysoriano/rainbow/

https://github.com/michelelacorte/SwipeableCard -50

https://github.com/sharish/CreditCardView

A well-designed local image and video selector for Android
https://github.com/zhihu/Matisse

https://github.com/mikepenz/MaterialDrawer

Powerful and flexible RecyclerAdapter
https://github.com/CymChad/BaseRecyclerViewAdapterHelper

https://github.com/thoughtbot/expandable-recycler-view

With Oblique explore new styles of displaying images
https://github.com/akshay2211/oblique

Library that makes it possible to read, edit and write CSV files
https://github.com/Cleveroad/AdaptiveTableLayout

https://github.com/Cleveroad?language=java

A place autocomplete search dialog which uses Google’s places API for finding results.
https://github.com/codemybrainsout/PlaceSearchDialog

Android Asynchronous Networking and Image Loading
https://github.com/koush/ion -60

Highly customizable library to generate beautiful triangle art views for android.
https://github.com/sdsmdg/trianglify

Android library for connecting multiple devices over bluetooth
https://github.com/pkarira/Androble

An awesome and customizable search dialog with built-in search options.
https://github.com/mirrajabi/search-dialog

Lets user choose between internal or external storage with just few lines of code.
https://github.com/codekidX/storage-chooser

Render After Effects animations natively on Android and iOS
https://github.com/airbnb/lottie-android

This library is a result of lots of research and experimentation to get video recording to work universally.
https://github.com/afollestad/material-camera

Date Range Picker is a Calender Picker View to show a Customized Date Range Picker with improved UI
https://github.com/savvisingh/DateRangePicker

The android library that provides a simple and customizable NumberPicker.
https://github.com/ShawnLin013/NumberPicker

Point camera at things to learn how to say them in a different language. Android app built with React Native.
https://github.com/vigzmv/what_the_thing

This is lib will help you to draw route maps between two point LatLng.
https://github.com/ar-android/DrawRouteMaps -70

Two step picker dialog for Android that helps you easily pick nested data on android.
https://github.com/aliab/Two-Step-Picker-Dialog

Use Customs Fonts in your Android project without adding any .ttf/.otf in Assests Folder.
https://github.com/Ishmeetsingh97/FontometricsLibrary

Dynamic control over vector drawables!
https://github.com/harjot-oberai/VectorMaster

An easy-to-use customisable show case view with circular reveal animation.
https://github.com/faruktoptas/FancyShowCaseView

greenDAO is a light & fast ORM solution for Android that maps objects to SQLite databases.
https://github.com/greenrobot/greenDAO

A new theme manager based off Sony’s Overlay Manager Service and Resource Runtime Overlay
https://github.com/substratum/substratum

Android ListView that mimics a GridView with asymmetric items. Supports items with row span and column span
https://github.com/felipecsl/AsymmetricGridView

https://github.com/volders/Badger

https://github.com/diogobernardino/williamchart

Video list auto playback made simple, specially built for RecyclerView
https://github.com/eneim/toro -80

You can drag and drop items between columns as well as drag and drop columns.
https://github.com/jakebonk/BoardView

An indicator with preview support that you can use in the ViewPager.
https://github.com/huseyinozer/TooltipIndicator

Android library to animate Floating Action Button to Bottom Sheet Dialog and filter-concept
https://github.com/Krupen/FabulousFilter

Turn your phone into a magic wand! The library is based on the accelerometer readings. To work correctly need to keep the phone screen up.
https://github.com/drfonfon/MagicWand

Automatically copy SMS verification code into the app
https://github.com/stfalcon-studio/SmsVerifyCatcher

Customizable Android full screen image viewer for Fresco library supporting “pinch to zoom” and “swipe to dismiss” gestures
https://github.com/stfalcon-studio/FrescoImageViewer

Easy social network authorization for Android. Supports Facebook, Twitter, Instagram, Google+, Vkontakte
https://github.com/stfalcon-studio/SocialAuthHelper

Springy is About Motion and Animation on Android platform, you can make smooth and clean property animations
https://github.com/SalmanZach/Springy_Facebook_Rebound

Interesting concept of products incrementation
https://github.com/steelkiwi/IncrementProductView

Cardslider is a controller that allows you to swipe through cards with pictures and accompanying descriptions.
https://github.com/Ramotion/cardslider-android -90

Making Camera for Android more friendly.
https://github.com/Fotoapparat/Fotoapparat

An infinite scrolling timeline to pick a date
https://github.com/badoualy/datepicker-timeline

Rich Android Path . :clown_face: Draw as you want, Animate much as you can .
https://github.com/tarek360/RichPath

Android Library that lights items for tutorials or walk-throughs etc…
https://github.com/TakuSemba/Spotlight

AndroidPhotoFilters aims to provide fast, powerful and flexible image processing instrument for creating awesome effects on any image media.
https://github.com/Zomato/AndroidPhotoFilters

DrawingView is a simple view that lets you draw on screen using your fingers and lets you save the drawings as images.
https://github.com/mukeshsolanki/DrawingView-Android

https://github.com/RameshBhupathi/ImagePicker-OLX

https://github.com/RameshBhupathi/PickerView

https://github.com/fabian7593/MagicalCamera

https://github.com/chawkiAmrouche/FoodOrderTraking -100

A custom circular rotating dial like picker for android.
https://github.com/moldedbits/android-dial-picker

https://github.com/Fotoapparat/FaceDetector

Contains an implementation of a button which transforms into a toolbar upon scroll. Based on Google’s Material Design guidelines
https://github.com/vpaliyX/Expandable-Action-Button

This library adds depth/thickness to views.
https://github.com/danielzeller/Depth-LIB-Android-

A simple file/ directory picker dialog for android
https://github.com/FirzenYogesh/FileListerDialog

Drop-down refresh, pull-ups, RefreshLayout, OverScroll, Android smart pull-down refresh frame, support cross-border rebound, with strong scalability, integrated dozens of cool headers and Footer.
https://github.com/scwang90/SmartRefreshLayout

It different from RecyclerView is that it’s two-dimensional(just like a Panel) and it pin the itemView of first row and first column in their original location.
https://github.com/Kelin-Hong/ScrollablePanel

Android custom calendar controls support left and right infinite sliding month month switch mark date display custom display jump to the specified date
https://github.com/MagicMashRoom/SuperCalendar

https://github.com/iammert/ExpandableLayout

https://github.com/ptrstovka/calendarview2 -110

An implementation of tap targets from the Material Design guidelines for feature discovery
https://github.com/KeepSafe/TapTargetView

A bitmap generator with tiling options and asynchronous ImageView loading.
https://github.com/Oyzuu/PatternPlaceholder-Android

https://github.com/gcacace/android-signaturepad

OpenStreetMap-Tools for Android
https://github.com/osmdroid/osmdroid

Additive animations for Android! An easy way to additively animate a huge number of properties.
https://github.com/wirecube/android_additive_animations

https://github.com/TakuSemba/MultiSnapRecyclerView

Automatically identify the border, manually adjust the selection, the use of perspective transformation and correction of corrections
https://github.com/pqpo/SmartCropper

RichEditor for Android is a beautiful Rich Text WYSIWYG Editor for Android.
https://github.com/wasabeef/richeditor-android

Backport of Android Transitions API for animations.
https://github.com/andkulikov/Transitions-Everywhere

A motion-driven animation framework for Android.
https://github.com/tumblr/Backboard -120

Gesture recognizers for Android
https://github.com/material-motion/gestures-android

This library provides common UI components such as MessageList, InputView. It supports common message type, such as text, image, audio, video, etc
https://github.com/jpush/aurora-imui

Sensor Data Logger is a dashboard for your device sensors. It plots charts that show the values of selected sensors in real-time, even from connected Android Wear devices.
https://github.com/Steppschuh/Sensor-Data-Logger

Play with sensor events & detect gestures in a snap
https://github.com/nisrulz/sensey

Steppers – Material Design Components for Android
https://github.com/fython/MaterialStepperView

The simplest navigation library for Android.
https://github.com/wealthfront/magellan

The API.AI Android SDK makes it easy to integrate speech recognition with API.AI natural language processing API on Android devices.
https://github.com/api-ai/apiai-android-client

PhotoView aims to help produce an easily usable implementation of a zooming Android ImageView.
https://github.com/chrisbanes/PhotoView

A rich text editor sample
https://github.com/Even201314/MRichEditor

A utility library for Android to schedule one-time or periodic jobs while your app is running. Currently, Android OS supports 3 types of scheduling APIs: Handler, AlarmManager and JobScheduler.
https://github.com/hypertrack/smart-scheduler-android -130

Launch a multi-select contact picker activity, useful for importing and inviting contacts to apps.
https://github.com/xbroak/MultiContactPicker

Simple audio recorder component for android
https://github.com/safetysystemtechnology/audio-recorder-button

Tinder like swipeable card view for Android
https://github.com/yuyakaido/CardStackView

Periodically tracking user’s location in the background
https://github.com/safetysystemtechnology/location-tracker-background

Functional calendar library for Android
https://github.com/yuyakaido/CouplesCalendar

A small customizable library useful to handle an gallery image pick action built-in your app.
https://github.com/andremion/Louvre

A well documented, high-level Android interface that makes capturing pictures and videos easy, addressing most of the common issues and needs.
https://github.com/natario1/CameraView

An example project / library of outside layout activity.
https://github.com/S64/android-outside-activity

AnyMaps allows you to use the same API for different maps providers without the need to adjust existing Google Maps implementation (apart from changing the package name).
https://github.com/car2go/AnyMaps

Markwon is a library for Android that renders markdown as system-native Spannables. It gives ability to display markdown in all TextView widgets (TextView, Button, Switch, CheckBox, etc), Notifications, Toasts, etc. No WebView is required.
https://github.com/noties/Markwon -140

Flubber is an elegant solution for making animations in Android. The library is developed and maintained by Appolica.
https://github.com/Appolica/Flubber

Barista introduces a discoverable API for the Espresso features. So, you and all the Android team will write instrumental tests with no effort.
https://github.com/SchibstedSpain/Barista

Add some Depth to your fragments
https://github.com/florent37/Depth

An android library which provides a compact calendar view much like the one used in google calenders.
https://github.com/SundeepK/CompactCalendarView

An advance Emoticons & GIF keyboard.
https://github.com/kevalpatel2106/EmoticonGIFKeyboard

This library is to take picture using camera without camera preview.
https://github.com/kevalpatel2106/android-hidden-camera

let you create circular progressbar in android
https://github.com/sparrow007/CircularProgressbar

Android library projects that provides easy to use and extensible Barcode Scanner views based on ZXing and ZBar.
https://github.com/dm77/barcodescanner

A collection of feature-complete stock layouts including: List, Grid, Staggered Grid, Spannable Grid
https://github.com/lucasr/twoway-view

A library for easily transitioning between sibling TextViews.
https://github.com/shazam/reflow-animator -150

SwipeBack is an android library that can finish a activity by using gesture.
https://github.com/gongwen/SwipeBackLayout

CustomizableCalendar is a library that allows you to create your calendar, customizing UI and behaviour
https://github.com/MOLO17/CustomizableCalendar

Customize view: Draw the magic dazzle background with Bézier. Custom View: The magic dazzle draws through the Bezier curve.
https://github.com/OCNYang/ContourView

Android Encryption and Decryption Toolkit.
https://github.com/GcsSloop/encrypt

Finding current location cannot be easier on Android !
https://github.com/florent37/RxGps

GarlandView seamlessly transitions between multiple lists of content.
https://github.com/Ramotion/garland-view-android

A Gauge View for Android. Total number of nicks on a full 360 degree scale.
https://github.com/Pygmalion69/Gauge

A simple android view for numeric progress selection
https://github.com/youkai-app/ProgressView

MultiFontView library can be used to select custom fonts for the view dynamically in your XML
https://github.com/shashkiranr/MultiFontView-Android

Simple OpenGL Shaders with the camera2 apis in Android 5.0+
https://github.com/googlecreativelab/shadercam -160

A fancy audio recorder lib for Android. Supports WAV format at 48kHz.
https://github.com/adrielcafe/AndroidAudioRecorder

Carousel Effect with ViewPager animation.
https://github.com/prashant31191/CarouselEffect

Android Place picker dependent on Google places, made a custom version so I could style it anyway I wanted for my current project, WIP
https://github.com/aliumujib/Nibo

SHAREthem library facilitates P2P file sharing and transfers between devices using WiFi Hotspot. Also an attempt to simulate popular SHAREit App functionality
https://github.com/Sriharia/SHAREthem

This is a “classic” TV EPG which works on tablets and phones and allows you to scroll in all directions (horizontal, vertical and diagonal).
https://github.com/korre/android-tv-epg

The library is a DrawerLayout-like ViewGroup, where a “drawer” is hidden under the content view, which can be shifted to make the drawer visible. It doesn’t provide you with a drawer builder.
https://github.com/yarolegovich/SlidingRootNav

Android library to simplify work with camera for video and photo with using different camera apis.
https://github.com/memfis19/Annca

Android solution which represents month and list calendar views.
https://github.com/memfis19/Cadar

An Android particle system library for displaying confetti!
https://github.com/jinatonic/confetti

Ticker is a simple Android UI component for displaying scrolling text. Ticker handles smooth animations between strings and also string resizing
https://github.com/robinhood/ticker -170

An extension to RecyclerView which will snap to child Views to the specified anchor, START, CENTER or END.
https://github.com/Dan-TD/SnappyRecyclerView

MapMe is an Android library for working with Maps. MapMe brings the adapter pattern to Maps, simplifying the management of markers and annotations.
https://github.com/TradeMe/MapMe

Leanback cards is a Widget library for use with Android TV applications. It provides an extended set of customisable content cards to enhance your User Interfaces.
https://github.com/hitherejoe/LeanbackCards

A simple layout with holes and separator for displaying ticket view.
https://github.com/santalu/ticket-view

A simple imageview which allows you to create diagonal cut views easily
https://github.com/santalu/diagonal-imageview

You can also implement high quality interactions by combining various animations. Now, you’re able to make anything you imagine.
https://github.com/muabe/Propose

Simple calendar control exercises, horizontal calendar support gesture sliding switch, jump month; vertical calendar selection interval range.
https://github.com/maning0303/MNCalendar

This will help to get how much time have passed. Useful in showing messages, notifications time and etc.
https://github.com/ChathuraHettiarachchi/TimeAgo

Simple android view to display gifs efficiently. You can start, pause and stop gifView. Example usages can be found in example project.
https://github.com/Cutta/GifView

Gorgeous Android Time and Date picker library inspired by the Timely app
https://github.com/code-mc/linear-time-picker -180

Video list auto playback made simple, specially built for RecyclerView
https://github.com/eneim/toro

Widget to calibrate sensors (Orientation). This Calibrator can be embedded in your own App.
https://github.com/xenione/calibrator-sensor

Dynamic-animation is a new module introduced in revision 25.3.0 of the Android Support Library. It provides a small set of classes for making realistic physics-based view animations.
https://github.com/graviton57/DynamicAnimationExample

It makes a preview from an url, grabbing all the information such as title, relevant texts and images. This a version for Android of my web link preview
https://github.com/LeonardoCardoso/Android-Link-Preview

EasyTableView is a light table view for Android. It has 4 modes: normal, fixWidth, fixHeight and fixWidthHeight. “Fix” means the width or height of cells are auto set, and can’t be edited.
https://github.com/huzenan/EasyTableView

Semi-circular sawtooth background dashed frame combination to achieve a simple coupon effect, can achieve some simple combination
https://github.com/dongjunkun/CouponView

An android project to convert short codes, emoticons, html entities, emoticons to emoji and vice-versa
https://github.com/wax911/android-emojify

With Scaling Layout scale your layout on user interaction.
https://github.com/iammert/ScalingLayout

Status Stories = Snapchat stories, Instagram stories, Whatsapp Statuses, Facebook Messenger Stories.
https://github.com/RahulJanagouda/StatusStories

Software keyboard open/close watcher for Android.
https://github.com/AzimoLabs/AndroidKeyboardWatcher – 190

A single adapter with multiple view types for the whole project
https://github.com/vivchar/RendererRecyclerViewAdapter

A View container that supports zooming and panning of View hierarchies, images and more.
https://github.com/natario1/ZoomLayout

A well documented, high-level Android interface that makes capturing pictures and videos easy, addressing most of the common issues and needs.
https://github.com/natario1/CameraView

A circular seekbar for Android, with a control knob!
https://github.com/harjot-oberai/Croller

Android Library that lights items for tutorials or walk-throughs
https://github.com/TakuSemba/Spotlight

A simple animation with tanslation or scale views written in Java.
https://github.com/AppliKeySolutions/OrionPreview

CountryCurrencyPicker is an android picker library for country and / or currency. You can implement it as fragment or dialog. It offers the option to search for country values and / or currency values. Inspired by country-picker-android and currency-picker-android
https://github.com/Scrounger/CountryCurrencyPicker

Android pagination for RecyclerView
https://github.com/NoNews/NoPaginate

An example project of sticky recyclerview.
https://github.com/S64/android-sticky-recycler

A utility library for Android to run jobs delayed in the background. Depending on the Android version either the JobScheduler, GcmNetworkManager or AlarmManager is getting used.
https://github.com/evernote/android-job – 200

Sliding-deck view for Android offer an intuitive and useful user interface widget. Your users will can perform swipe, quick review or stick the elements.
https://github.com/txusballesteros/sliding-deck

A highly customizable Android ViewGroup for displaying Chips (specified in the Material Design Guide).
https://github.com/tylersuehr7/chips-input-layout

Tinder for Dribbble design
https://github.com/ItsSelina/tribbble

A custom Android TextView that highlights social media lingo (#hashtags, @mentions, phone, emails, and urls).
https://github.com/tylersuehr7/social-text-view

AutoLinkTextView is TextView that supports Hashtags (#), Mentions (@) , URLs (http://), Phone and Email automatically detecting and ability to handle clicks.
https://github.com/armcha/AutoLinkTextView

Android developers should collect the following utils.
https://github.com/Blankj/AndroidUtilCode

Gravity View is an Android adaptation of Facebook instant articles. The concept behind the library is to utilize the motion sensors of an Android device and allow the end user to explore the product by rotating his device. It uses gyroscope motion sensor readings to scroll the image.
https://github.com/gofynd/gravity-view

This is a library which can you create a record button view in android
https://github.com/emrekose26/RecordButton

Live preview, edit and print functionality for View hierarchies. Supports PDF, PNG, JPEG.
https://github.com/natario1/ViewPrinter/

A ConstraintLayout group that allows for simple staggered animations.
https://github.com/blipinsk/StaggeredAnimationGroup -210

PaintView aims to painting on image(or not) with zooming and graging surpported, and the painting result can be shared.
https://github.com/LiuHongtao/PaintView

Simple Android library for permissions request. Consists of only one class.
https://github.com/NoNews/NoPermission

A CoordinatorLayout.Behavior which interacts with an AppBarLayout as a dependency for translating and scaling a specific View of your choice.
https://github.com/RanyAlbegWein/AppBarTranslateScaleBehavior

A light but powerful object mapping and SQL generator for Java/Kotlin/Android with RxJava and Java 8 support. Easily map to or create databases, perform queries and updates from any platform that uses Java.
https://github.com/requery/requery

Android Search Dialog Library
https://github.com/ajithvgiri/Search-Dialog

A swipe button for Android with a circular progress bar for async operations
https://github.com/shadowfaxtech/proSwipeButton

Login Page and dashboard concept with awesome transition animation
https://github.com/agusibrahim/LoginPageConcept

A reusable dialer implementation extracted from AOSP.
https://github.com/dialogs/android-dialer

android library MeteorView
https://github.com/hoanganhtuan95ptit/MeteorView

The Android implementation of Cards Menu Concept
https://github.com/DxTT/coolMenu -220

Cache support for any video player with help of single line
https://github.com/danikula/AndroidVideoCache

 

Advertisements

Android app programming detail structure

How do we write and build Android applications and what goes into them?

Start with installing Android studio and a brief overview of project and android structures, the separation of Java and XML, and the location of the app level build.gradle file.

Java – executed progrommatically at runtime. This is where we do the bulk of our programming, handling most of our app’s logic, interacting with the Android system, our stored data, make network calls, etc.

XML – layouts are parsed at compile time, save for things like relative positioning which are dependent on device type and can only be known only at runtime. XML should be kept as free of logic as possible. That being said, there are some attributes, like the onClick attribute, that blur these lines a bit, and some very powerful attributes for UI/UX that save us a lot of time as programmers, like collapsing toolbars with parallax, or handling View animations and transitions.

Gradle:
Gradle is the build system used to assemble the various pieces of our application and bundle (package) them into an apk (application package), which is analogous to an executable. The Android system runs .apk files. Gradle uses a scripting language called Groovy. You can dive really deeply into Android development without needing to become a Gradle expert or formally learn Groovy, so do not be afraid of this (initially) scary black box. It’s okay if the whole Gradle build process feels overwhelming and nerve-racking at first. In time you will gain confidence. Trust me.

Gradle tips to serve up right away, maybe even before Hello World, to help solve those terrifying seemingly arcane issues that can stop your app from building and running:
1. When you first create your new application, build and run it. Once you have a deployed a working build, you know your build.gradle files are properly configured. Now you have a safe base to work from and return to if you encounter problems and you absolutely cannot find a solution!
2. Changes will mostly be made to the app level build.gradle file, rarely to the project level. (The project level build.gradle is located in the root project folder, app level in the app folder). Changes you make will usually be for the inclusion of new libraries. Think of libraries as collections of methods that can be tailored to our needs, like making network calls or caching images, thereby reducing the need to for us to create everything from scratch. When you first start, the only thing you will really need to worry about is making sure that the app you are working with is compatible with your Android SDK Platforms and Tools. If you created the project yourself, chances are good that everything will work properly from the outset. If you’ve imported someone else’s project, then you’ll want to either install the version of the SDK they were working with (File->Settings->System Settings->Android SDK) or update the project’s build.gradle compileSdkVersion and buildToolsVersion to match the version of the Android SDK Platforms and Tools you have installed. You’ll need to change a few other things as well… targetSdkVersion should match compileSdkVersion and all library dependences in the dependencies{} block should begin with the same SDK version, for instance, if your compileSdkVersion is 25 and you’re using the appcompat support library, you’ll want to see something like, ‘com.android.support:appcompat-v7:25.3.1’
We’ll cover library dependencies later, but for now, just take a deep breathe and be confident that although Gradle may feel a bit mystical and magical at the moment, it won’t be long before you become comfortable making changes and adding useful libraries to your project.
3. Sometimes you need to Clean and Rebuild the project (Build->Clean, Build->Rebuild) before you redeploy to an emulator or your device. It’s often a good idea to pair this rebuild with an uninstall of the existing version of your application on your device before you redeploy.
4. If you’ve tried the steps above and you’re still having issues, copy and paste the non application package specific portions of a Gradle build error into a Google search and the first result will almost always be a helpful, detailed solution on Stack Overflow.

App resources: These are things like image, sound, and video files that your app may contain. These are often found in the res folder.

App Fundamentals:

The four components of an app provided by the Android framework. These are four separate access points into the app and each one is an equally valid starting point allowing for specific interactions.

Activities – our most common access point for a user’s interaction with our app. They are tightly coupled to the View (the layout and the XML), and will be full of Android specific code to gather and relay or process user input. A natural Controller for the MVC pattern.

Services – allow us to keep our apps running in the background to take care of longrunning operations after the user has exited our app (and even after all associated activies have been destroyed). IntentServices are a special subclass of Service that runs on a background thread rather than the application’s main thread, which means the user can still use your app when the IntentService is doing work. For regularly scheduled services like syncing with a cloud database targeting API 21+, using JobScheduler (or Firebase JobDispatcher) is recommended.

Broadcast Receivers – allow us to listen for, receive, and send systemwide messages, if necessary, even when our app is not running. Through broadcasts, we can interact with the system and with other applications.

Content Providers – provide us with an additional layer of abstraction between our app data stored in the file system, SQLite databases, in the cloud, or in any other persistent storage location. Content Providers also allow us to provide an access point to our data to other applications if we so desire, even allowing full read/write privileges. Content URIs (paths pointing to the data storage location) can be assigned even when our app isn’t running. Certain components of our app do need to be running in order to retrieve information from storage when a retrieval request is made by another authorized app, but the requesting app is able start the process for our app if it isn’t already running.

So how are these four components activated?
Intents. Either implicit (asks the system, “Is there an app that can handle this type of component?”) or explicit (tells the system, “Use this specific component of this specific application.”)

What is an Android Manifest?
The Android system can only start app components that are declared in our app’s manifest file, AndroidManifest.xml
Components are declared between the tags, and have intuitive tags:
Within these component tags, we specify their capabilities.
Outside of the tag, we declare our app’s permissions, features, and requirements. For instance, the is a very common inclusion if your app will be receiving or sending any information over the internet.

The Android Platform Architecture:
Great outline available at https://developer.android.com/guide/platform/index.html
Five layers in descending order:

5. App Layer. This is where our app runs. It is also where we find the System Apps which our app might commonly use an Intent to harness. Third party apps can become defaults if the user chooses, like when a user chooses to use Gmail rather than the default Email app.

4. Java API Framework. This is where the classes for the View system (UI) are housed, as well as Content Providers and various Managers for Activity, Location, Notification, etc. We instantiate these classes to get access to their methods. The View system, for instance, provides us with Views (and all of the special types of Views like TextViews that subclass the View class.

3. Android Runtime, as well as the Native C/C++ libraries.
Houses the ART (Android Runtime) and its core Java libraries, as well as Native C or C++ libraries like Webkit for browsers, Open GL ES for graphics, etc. We can access these Native libraries directly through the Android NDK, or sometimes through Java APIs provided by the Android framework. Sometimes third party engines, frameworks, or libraries function similarly, translating our managed Java code and calling the appropriate methods in the Native C/C++ libraries.

2. Hardware Abstraction Layer (HAL)
Audio, Camera, Sensors, etc. We go through the Java API Framework to get access to hardware functionality. The Android system takes care of loading the library modules for the specific hardware components.

1. Linux Kernel
Foundation of the Android platform, handles such things as concurrency, threading, low-level memory management, and hardware drivers.

The Activity Lifecycle:
https://developer.android.com/guide/components/activities/activity-lifecycle.html
Activity lauched-> onCreate() -> onStart() -> onResume() -> Activity runs in foreground until another activity is brought to foreground -> onPause() (if user returns to the activity from onPause, onResume is called) -> (activity is no longer visible) onStop() (if user navigates back to the activity, onRestart() is called, followed by onStart() and then onResume()) -> (activity is finishing or being destroyed by the system) onDestroy() -> Activity is shut down

We use Intents to move between activities, packaging extra information with the intent using the various putExtra() methods.

Some important pieces of the Android Framework:

Fragments:
These can add a lot of complexity to an application, so be sure before you begin using fragments that you actually require their functionality and you’ve weighed the costs of implementation. The goal is to make layouts more flexible and responsive across all devices. An activity might have two FrameLayouts, for instance, each capable of housing a fragment. Each fragment has its own XML layout file that gets inflated when the fragment is visible. On a phone, you might have one fragment visible at a time, hiding it in order to display the other, whereas on a tablet, you have the screen real estate to display both. Complications arise from the fact that fragments have their own lifecycles, tied to the launching activity’s lifecycle, but two fragments displayed on the same screen need not share the same launching activity. There is also the business of communicating between fragments, their activities, other fragments, and other activities. If you don’t have a solid understanding of how to build and implement an interface, using fragments may lead to a lot of frustration initially, but will ultimately teach you a lot, even if you don’t end up using them in all or even most of your Android projects and applications.

Loaders:
Using Loaders allows us to easily, efficiently, and asynchronously load data from a database (through our Content Provider!) or another data source into our the Views controlled by our Activity or Fragment. Loaders keep the UI thread of stuttering or locking up when we have a lot of data to retrieve and display. They also persist and cache the information they retrieve during rotation changes, reducing calls to our data source and they provide convenient callbacks through LoaderManager.LoaderCallbacks to notify our activity or fragment when our data is ready for use/display.

Content Provider / SQLite Database classes:
YourContract
YourDbHelper extends SQLiteOpenHelper
YourProvider extends ContentProvider

YourContract + YourDbHelper define the table and column names and create the SQLite Database
YourProvider provides access to the database’s Query, Insert, Update, and Delete methods

Schematic is a third party library that simplifies the creation of ContentProviders and SQLite Databases, reducing the need to write as much boilerplate code.

Awesome Libraries:
Networking: Volley / Retrofit
Image Loading and Caching: Glide / Picasso

Widgets:
AppWidgetProviderInfo – XML file, describes layout, update frequency, and AppWidgetProvider class name
YourAppWidgetProvider – Java class, extends AppWidgetProvider, allows your app to receive broadcasts from the system when its associated widget is created, updated, enabled, disabled, or deleted.

App Resources:
anim: tween animation (a series on transformations on a single image with an Animation)
drawable: bitmap (png or jpeg), nine patch (png), vector (svg), shape, layers, states, levels, scale, frame animation (sequence of images in order with an AnimationDrawable)
layout: xml layout files
menu: xml menu files
mipmap: launcher icon (usually png) – Specified in the manifest.
values: strings.xml, integers.xml, bools.xml, dimens.xml, arrays.xml, styles.xml, colors.xml..
xml: additional xml files (AppWidgetProviderInfo, Preference with tag)

Android-specific Java:
What is Context and why do I have to pass it around to everything?
Context is the current state of the application. It’s used to create new objects that need to know something about the application’s state, such as views, adapters, and listeners. The context is also needed to access common Android framework resources and to access components implicitly (without explicit instantiation).
You can get the context with getApplicationContext(), getContext(), getBaseContext(), or using the keyword ‘this’ when inside a class that extends from Context, which includes the Application, Acitivity, Service, and IntentService classes.
Other forms of Context:
You can call getActivity() or cast a context to an Activity if you specifically need an Activity object.
You can call getApplication() from an Activity or Service.

 

Ref: https://github.com/bonoj/Toybox/blob/master/Teaching%20Android

 

Android SDK got an update of ‘N’ preview channel

First preview channel of Android N was released by Android.

android sdk n preview

Here are a few APIs and features we want to highlight which are available as a part of the Android N Developer Preview today, with more to come as we continue developing the release:

Multi-window – A new manifest attribute called android:resizableActivity is available for apps targeting N and beyond. If this attribute is set to true, your activity can be launched in split-screen modes on phones and tablets. You can also specify your activity’s minimum allowable dimensions, preventing users from making the activity window smaller than that size. Lifecycle changes for multi-window are similar to switching from landscape to portrait mode: your activity can handle the configuration change itself, or it can allow the system to stop the activity and recreate it with the new dimensions. In addition, activities can also go into picture-in-picture mode on devices like TVs, and is a great feature for apps that play video; be sure to set android:supportsPictureInPicture to true to take advantage of this.

Direct reply notifications: The RemoteInput notification API, which was originally added for Android Wear, now works in N for phones and tablets. Using the RemoteInput API enables users to reply to incoming message notifications quickly and conveniently, without leaving the notification shade. Learn more here.

Bundled notifications – With N, you can use the Notification.Builder.setGroup() method to group notifications from the same app together – for example individual messages from a messaging app. Grouped notifications can be expanded into individual notifications by using a two-finger gesture or tapping the new expansion button. Learn more here.

Efficiency – We launched Doze in Marshmallow to save battery when your device is stationary. In N, Doze additionally saves battery whenever the screen turns off. If you’ve already adapted your app for Doze, e.g. by using the GCM high priority message for urgent notifications, then you’re set; if not, here’s how to get started. Also, we’re continuing to invest in Project Svelte, an effort to reduce the memory needs of Android so that it can run on a much broader range of devices, in N bymaking background work more efficient. If you use JobScheduler for background work, you’re already on the right track. If not, N is a good time to make that switch. And to help you out, we’re making JobScheduler even more capable, so now you can use JobScheduler to react to things like changes to content providers.

Improved Java 8 language support – We’re excited to bring Java 8 language features to Android. With Android’s Jack compiler, you can now use many popular Java 8 language features, including lambdas and more, on Android versions as far back as Gingerbread. The new features help reduce boilerplate code. For example, lambdas can replace anonymous inner classes when providing event listeners. Some Java 8 language features –like default and static methods, streams, and functional interfaces — are also now available on N and above. With Jack, we’re looking forward to tracking the Java language more closely while maintaining backward compatibility.