AndroidNote

=Tools and IDE=
 * Java SDK
 * Android SDK
 * IntelliJ / Eclipse with ADT / Android Studio

SDK Versions

 * Android platform changes click
 * Android versions click

Command Line Usage

 * android command line usage click

IDE
For Android Studio/InteliJ,
 * condition on break point
 * 1) right click on break point
 * "Pass count"
 * "Remove once hit"
 * "Condition"

Git

 * Git Graph sandbox

Signing

 * App-signing click

=UI Architecture=
 * Google Guide to App Architecture click test approach


 * The Difference Between MVC, MVP and MVVM Design Patterns linkedin
 * difference between patterns stackoverflow
 * mvp vs mvvm click
 * UI architecture mvc mvvm mvp
 * Mantis Mvp github
 * TheMVP
 * Beam


 * Android Architecture Patterns florina.muntenescu
 * Model-View-Controller part1
 * Model-View-Presenter part2
 * Model-View-ViewModel part3
 * ViewModel exposes events and states


 * MVVM A non-reactive introduction click
 * MVVM Clean Architecture Tutorial for Android: Getting Started click

MVVM

 * MVVM architecture, ViewModel and LiveData
 * part1 Intro
 * part2 Dependency injection
 * part3 AndroidX
 * MVVM with clean architecture click
 * Architecture examples click architecture-components-samples
 * Multiple navigations click
 * From Observable Fields to LiveData click

Clean Architecture

 * Clean architecture raywhenderlich
 * SOLID Single Responsibility, Open-closed, Liskov Substitution, Interface Segregation and Dependency Inversion.

=Fundamentals=
 * Activity and Fragment

Layouts
Keep reading at click
 * LinearLayout
 * Relative Layout
 * Recycler View
 * List View
 * Grid View

Constraint Layout
Use ConstraintLayout instead of adding multiple/nested LinearLayout into UI.
 * implementation 'com.android.support.constraint:constraint-layout:1.1.2'
 * <android.support.constraint.ConstraintLayout
 * app:layout_constraintStart_toStartOf="parent"

GridLayout

 * compile 'com.android.support:gridlayout-v7:25.2.0'
 * compile 'com.android.support:appcompat-v7:25.2.0'
 * fit screen width XML android:layout_columnWeight="1" on each child
 * fit screen with columnSpec.weight = 0 from android.support.v7.widget.GridLayout.LayoutParams

Recycler View
Use RecyclerView instead of adding hundreds of Views to your UI.
 * Working with Recycler View click
 * project dependency
 * define layout with android.support.v7.widget.RecyclerView
 * row model class
 * row model layout
 * adapter - which extends RecyclerView.Adapter;
 * onCreateViewHolder - inflates layout;
 * onBindViewHolder - sets data.
 * invoke prepareData in Activity#onCreate to add data to the list via notifyDataSetChanged
 * do not forget to set layout manager e.g. recyclerView.setLayoutManager(new LinearLayoutManager(getContext));
 * add Divider
 * recyclerView.addItemDecoration(new DividerItemDecoration(this, LinearLayoutManager.VERTICAL));


 * Stateful recyclerview StatefulRecyclerView.java
 * How to save recycler view scroll position click

Activities
Start reading from activity lifecycle.

Declaring Activity
Activity must be declared to be listed/invoked.

Starting Activity
Activity can be invoked by explicit intent or implicit intent.

Life Cycle
Reference http://developer.android.com/reference/android/app/Activity.html
 * 1) resumed
 * 2) paused
 * 3) stopped

Splash Screen

 * Splash Screens the Right Way click

Fragments
Start reading fragments
 * Test fragment click

Multi Backstacks

 * BottomNavigationView api design
 * On Android, revisiting a section resets the app, returning the user to its top-level screen.
 * On iOS, when a user revisits a section they return to where they left off in that section, such as a detail screen.
 * Backstacks with BottomNavigationView stackoverflow
 * NavHostFragment api migrate

Lifecycles

 * activity and fragment lifecycles click
 * activity and view-model lifecycles click

Dialogues

 * Start reading dialogs alert-dialogue-builder dialogue-fragment
 * Showing dialogs in Android with fragments click
 * Android DialogFragment click
 * Custom dialogue with curve shape click
 * Dialogue with custom view mkyong example
 * Material design # padding click

sendOrderedBroadcast
Same Intent will be delivered to multiple Receivers (with specified string-permission) in order of the priorities (from high to low).

sendStickyBroadcast

 * permission: "android.permission.BROADCAST_STICKY"
 * Intent you are sending stays around after the broadcast is complete.
 * others can quickly retrieve that data through the return value of registerReceiver(BroadcastReceiver, IntentFilter).

By Manifest Xml
Broadcast Receivers registered this way are always active and will receive Broadcast Intents even when the application has been killed or has not been started.

By Code
A Receiver registered programmatically will respond to Broadcast Intents only when the application component it is registered within is running.

Test Services

 * Test your service click

Stoppping Services

 * stopSelf(int)
 * stopService(int)

Notifying User

 * Toast
 * Notification

Data Binding

 * Data Binding Library dev-droid codelabs
 * dataBinding { enabled = true }
 * implementation 'com.android.support:support-v4:27.1.1'
 * Data binding click
 * DataBinding in RecyclerView click
 * Click event examples click
 * app:drawerListener="@{fragment.drawerListener} click

Binding via XML Layout

 * 1) Instantiate binding class
 * 2) * for activity SomeBinding binding = DataBindingUtil.setContentView(this, R.layout.some_activity);
 * 3) * for fragment SomeBinding binding = SomeBinding.inflate(layoutInflater, viewGroup, false);
 * 4) * for view instance SomeBinding binding = (ProfileActivityBinding) DataBindingUtil.bind(view);
 * 5) Consume binding class
 * 6) * binding.name.setText("some text");
 * 7) * binding.email.setText("some@email.com");

Binding via Variables in Data

 * 1) Optional data value
 * Apply to UI - value is applied after a redraw, e.g. a scroll
 * or call  to apply immediately.
 * 1) Optional data value
 * Apply to UI - value is applied after a redraw, e.g. a scroll
 * or call  to apply immediately.
 * or call  to apply immediately.

Dependency Injection

 * android dependency injection click

Compound View

 * 1) public class MyCompoundView extends LinearLayout
 * 2) LayoutInflater inflater = (LayoutInflater) getContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

Customer View

 * 1) public class MyView extends View

Resources

 * Alternative Resource click

=Testing=
 * Testing Apps on Android click
 * Fundamentals of Testing click
 * Robolectric click
 * Idling Resource click

UI Testing

 * codelab integration test click mockDebug is demonstrated here
 * testing components click

=Cookbook=

TDD

 * Robolectric click github
 * Robolectric Shadow
 * Mockito click
 * Orchestrator
 * Mockito click
 * Espresso
 * Espresso beyond the basics click

Build

 * Android Build System click

Fragment and Activity
Communication between fragment and activity
 * Good Old Way and Lambda Way click
 * 8 ways to communicate between Fragment and Activity click

Views

 * View
 * ViewGroup
 * Fragment
 * Activity

Text

 * TextInputLayout and TextInputEditText journaldev text-fields
 * text-fields examples from material.io click

Layouts

 * FrameLayout
 * LinearLayout
 * RelativeLayout
 * GridLayout
 * ConstraintLayout

TabLayout

 * TabLayout click
 * Creating Swipe Views with Tabs - developer.android.com click
 * Android Material Design working with Tabs - androidhive click

Retrofit
@Headers("Cache-Control: max-age=640000") @GET("/tasks") Call> getTasks; @GET("/tasks") Call> getTasks(@Header("Content-Range") String contentRange);
 * Headers
 * Add custom header click
 * Static Header
 * Dynamic Header

Bluetooth
Reference
 * 1) Bluetooth Permissions
 * 2) Setting Up Bluetooth
 * 3) Finding Devices
 * 4) Querying paired devices
 * 5) Discovering devices
 * 6) Connecting Devices
 * 7) Connecting as a server
 * 8) Connecting as a client
 * 9) Managing a Connection
 * 10) Working with Profiles
 * 11) Vendor-specific AT commands
 * 12) Health Device Profile

JNI

 * store in keys.c click

KeyStore
Key store does not store content but only stores key.
 * Using AdroidKeyStore for secure user password storage click

App Links

 * Handling Android App Links click
 * Enable link to app click
 * Verify app links click
 * Create app links click
 * Add Android App Links click
 * Web side json generator click
 * SHA256 generator click

Alternative Resources

 * Alternative Resources click
 * res/layout/mylayout.xml      (Default)
 * res/layout-v4/mylayout.xml   (Android 1.6)
 * res/layout-v11/mylayout.xml  (Android 3.0)

Lottie Animation

 * java docs 3.3.0

Cloud Messaging

 * GCM click deprecated and removed by 11-April-2019
 * FCM click

Project Management

 * Project overview click
 * Add a module for a new device click
 * Create an Android library click

Flavours and Build Types

 * Two dimensions of flavours click
 * flavorDimensions "stage", "mode"
 * Advanced flavouring part1 part2 part3 flavourful library part4 part5
 * basic functionality in the main/ source folder
 * "debug" build type to be located in the src/debug/java/ read more
 * Dependency for flavour
 * freeAppImplementation project(":mylibrary") // Adds the local "mylibrary" module as a dependency to the "freeApp" flavor
 * testImplementation ..
 * androidTestImplementation .. read more
 * Gradle plugin flavour document click

=Tutorials=
 * http://www.google.com/events/io/2010/sessions.html
 * The World of ListView
 * Some dev's blog cheese factory

Tool Bar

 * Setting Up the App Bar click
 * extends AppCompatActivity
 * Prevent native action-bar from loading 

=Publish App=

Google Play Store

 * Signature click

=References=
 * Professional Android 4 Application, 2012, Wrox toc

Interview Questions

 * Android Interview Questions Cheat Sheet part1
 * Android Interview Questions github