Mobile Development - atabegruslan/Notes GitHub Wiki

Building Blocks

Java Kotlin Flutter ReactNative
Tutorials Recap/Beginner Language , For Android Flutter Expo , ReactNative
EventListener OnClickListener
Fragment Fragment Fragment
ActionBar ActionBar
RecyclerView RecyclerView RecyclerView
RecyclerView & Search RecyclerView & Search RecyclerView & Search
HTTP RetroFit 1.9 vs 2.0 , HTTP Libs , GsonConverterFactory
RetroFit 1.9 Get , RetroFit 2.0 Get RecyclerView & RetroFit , Tutorials RecyclerView & Chopper
RecyclerView & RetroFit & MultiMedia RecyclerView & RetroFit & MultiMedia
HTTP Requests with Auth HTTP Requests with Auth HTTP Request , HTTP Requests with Auth
OkHttp3 Get , OkHttp3 Post MultiPart OkHttp3 HTTP
Volley Volley DIO
Speech Speech Speech
Google Android Maps API Map
Cloud Messaging FCM
Login
Social Media Signup Google SignIn , FireBase Google SignIn , FB SignIn
WebView & Email WebView & Email WebView & Email
App Link App Link App Link https://github.com/atabegruslan/Notes/wiki/App-Links#in-react-native
Device Admin
Service
HotSpot
InApp Purchase
Pay
PlayStore
Google Analytics
Dependency Injection
Dagger Simplest Demo Simplest Demo
Thread Options
AsyncTask Bad AsyncTask
Executor
ReactiveX, Illustration RxJava , RxJava Retrofit
Coroutine X Coroutine
JetPack AndroidX Tutorial , JetPack Tutorial
LifeCycle
ViewModel Orientation - Old Way , Orientation - ViewModel
LiveData LiveData
ROOM ROOM & CRUD
MVVM Repo Archi MVVM ROOM Retrofit MVVM ROOM Retrofit Dagger2 Coroutines

Tutorials

Concepts

Necessary Basics

Install & Delete Android Studio:

https://github.com/atabegruslan/Notes/blob/main/notes/android/complete_uninstall.pdf

AndroidX:

android.* : packages that are bundled with the Android operating system
androidx.* : packages that are packaged with your app's APK
https://stackoverflow.com/questions/51280090/what-is-androidx

AndroidX = Existing support libraries (re-organized) + JetPack. (JetPack is made of androidx.* libraries.)

Storage Options:

File sdCard = Environment.getExternalStorageDirectory();
File dir = new File (sdCard.getAbsolutePath() + "/dir1/dir2");
dir.mkdirs();
File file = new File(dir, "filename");
FileOutputStream f = new FileOutputStream(file);

Display quality:

OS:

Just like Java runs on JVM, Android runs on Dalvik VM.
Android's DexCode is like Java ByteCode

Gradle stuff:

https://github.com/atabegruslan/Notes/tree/main/notes/android/Gradle

Build variants:

Build Type: debug, release
Flavour: eg: Free, paid
Build variants: Build Types & Flavours.

Components:

App components are the essential building blocks of an Android app.
Each component is an entry point through which the system or a user can enter your app.
Some components depend on others.

There are four different types of app components:

  1. Activities - With UI, foreground.
  2. Services - Can block, same thread. No UI, Background. Can spawn a new thread within a service. Used for eg polling, play music, DB CRUD.
  3. Thread - Don't block. Foreground or background. Preferably use if delay is >=2s. (If >5s, OS will prompt to kill)
  4. Broadcast receivers - Listen for an broadcast intent (like the phone ringing, or an SMS is received)

Phone convo recorder

Old GcmReceiver

Content providers - In front of DB/storage.

Intent:

Intent: A messaging object. It requests an action to be performed by another app component.
Intent Filter: Tells app's components (eg activity) which intent to respond to.
Other apps can potentially start that activity with the right intent.
https://stackoverflow.com/questions/6578051/what-is-an-intent-in-android/1

  • Explicit intent - Component to Component.
  • Implicit intent - Component into another app, eg send mail.

  • Pending intent - Component into another app. The other app can exec it in the future, even if the calling component is gone. The other app exec it with the same permissions.

IntentService - related to Service on a different thread.

https://github.com/atabegruslan/Notes/blob/main/notes/android/intent_service.pdf

Context:

Lifecycle:

Activity:

Fragment:

Notifications

View

Terminology:

ViewGroup is subclass of View. Views can hold Views and ViewGroups.
ViewGroups are Layouts.
Widgets extends View. Widgets are eg Button, TextView, etc...

Orientation:

Lock Screen Orientation - in manifest: android:screenOrientation="portrait"

Strings:

<string-array name="xxx"><item>string1</item> can be used in strings.xml to store a long array. Java arrays are used to store short arrays.

Layout Types:

Linear Layout - forms

Relative Layout - all view pos rel to each other

Table Layout - table. Cant scroll

GridView - two-dimensional, scrollable grid. Thumbnail gallery. Adapter pull content into this view

ListView - scrollable items. eg menu. Adapter pull content into this view

AbsoluteLayout enables you to specify the exact location of its children.

FrameLayout is a placeholder on screen that you can use to display a single view.

TabLayout - 1 activity many panes

Obfuscation:

DexGuard and ProGuard are for obfuscation
https://www.guardsquare.com/en/blog/proguard-vs-dexguard

Keys:

Versions:

https://youtu.be/O0UwUF2DgQc

HAXM:

Hardware Accelerated Execution Manager, accelerates emulator.

https://github.com/atabegruslan/Notes/blob/main/notes/android/haxm.pdf

Mobile detection from web

⚠️ **GitHub.com Fallback** ⚠️