GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - arindamxd/kotlin-development: Kotlin Development Practices (Android)

BranchesTags
Open more actions menu

Latest commit

 

History

109 Commits
109 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/ISSUE_TEMPLATE
.github/ISSUE_TEMPLATE
 
 
.idea
.idea
 
 
app
app
 
 
documentation
documentation
 
 
gradle/wrapper
gradle/wrapper
 
 
.gitignore
.gitignore
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

Kotlin Everywhere

Kotlin Development Practises (Android)

Open Source Love License


1. App Link ↗

Handling Android App Links (Deep linking)

Secure and specific, Seamless user experience, Android Instant Apps support, Engage users from Google Search

Manifest

<intent-filter android:autoVerify="true" tools:targetApi="m">
      <action android:name="android.intent.action.VIEW" />
  
      <category android:name="android.intent.category.DEFAULT" />
      <category android:name="android.intent.category.BROWSABLE" />
  
      <data
            android:host="arindamxd.github.io"
            android:path="/main"
            android:scheme="https" />
</intent-filter>

Activity/Fragment (Kotlin)

override fun onCreate(savedInstanceState: Bundle?) {
      super.onCreate(savedInstanceState)
      
      // ATTENTION: This was auto-generated to handle app links.
      val appLinkIntent = intent
      val appLinkAction = appLinkIntent.action
      val appLinkData = appLinkIntent.data
}

App Link URL

  • https://arindamxd.github.io/main
  • https://arindamxd.github.io/payment

2. Kotlin Training ↗

#30DaysOfKotlin

  • Day 1: Synthetics
  • Day 2: Null-safety
  • Day 3: Null-check
  • Day 4: Sealed Class ↗
  • Day 5: .use Extension
  • Day 6: Mask Credit Card Number
  • Day 7: Grocery Shopping
  • Day 8: Immutability
  • Day 9: Partition
  • Day 10: Replace Deprecated Functions
  • Day 11: Short and Group
  • Day 12: Tail Recursion
  • Day 13: Two Same Class Name
  • Day 14: Vetoable
  • Day 15: Serialization
  • Day 16: Sorted By Functions
  • Day 17: Sequences
  • Day 18: Time Stamp & Zones Parsing
  • Day 19: Delegation over Inheritance
  • Day 20: Infix Function
  • Day 21: Kotlin-Java Inter Operation
  • Day 22: Destructuring Declarations
  • Day 23: Operator Overloading
  • Day 24: Jvm Static
  • Day 25: Spread

3. Dynamic & Pinned Shortcuts ↗

Handling Dynamic & Pinned Shortcuts (Package)

Although you can publish up to five shortcuts (static and dynamic shortcuts combined) at a time for your app, most launchers can only display four. However, there is no limit to the number of pinned shortcuts to your app that users can create. Even though your app cannot remove pinned shortcuts, it can still disable them.

  • Manifest: Meta Data
  • Shortcut: XML
  • Activities: OldActivity, NewActivity

4. Activity Alias Element ↗

Understanding Activity Aliases in Android To Preserve Your Launchers

So, in order to keep the shortcut on the home screen, even after the change in the Launcher Activity name, we use the concept of Activtiy-Alias.

  • Manifest: <activity-alias> LaunchActivity

5. Material Dark Theme ↗

Implementing Dark Mode Theme in Android

Some of the most common benefits of a dark theme include conserving battery power for devices with OLED screens, reducing eye strain, and facilitating use in low-light environments. Starting with Android Q, users are now able to switch their device into dark theme via a new system setting, which applies to both the Android system UI and apps running on the device.

  • Helper: ThemeHelper
  • Activity: DayNightActivity

6. Coroutine Image Loader (COIL) ↗

An image loading library for Android backed by Kotlin Coroutines.

  • Fast: Coil performs a number of optimizations including memory and disk caching, downsampling the image in memory, re-using Bitmaps, automatically pausing/cancelling requests, and more.
  • Lightweight: Coil adds ~1500 methods to your APK (for apps that already use OkHttp and Coroutines), which is comparable to Picasso and significantly less than Glide and Fresco.
  • Easy to use: Coil's API leverages Kotlin's language features for simplicity and minimal boilerplate.
  • Modern: Coil is Kotlin-first and uses modern libraries including Coroutines, OkHttp, Okio, and AndroidX Lifecycles.

  • Activity: CoilActivity

7. The Bubble API (Android Q Preview) ↗

Bubbles are a new preview feature in Android Q, which let users easily multi-task from anywhere on their device.

Note: Bubbles are currently enabled for all users in the Q developer previews. In the final release, Bubbles will be available for developer use only.

  • Bubbles take up screen real estate and cover other app content. You should only send a notification as a bubble if it is important enough such as ongoing communications, or if the user has explicitly requested a bubble for some content.
  • Note that the bubble can be disabled by the user. In that case, a bubble notification is shown as a normal notification. You should always make sure your bubble notification works as a normal notification as well.
  • Processes that are launched from a bubble (such as activities and dialogs) appear within the bubble container. This means a bubble can have a task stack. Things can get complicated if there is a lot of functionality or navigation within your bubble. We recommend keeping the functionality as specific and light-weight as possible.

  • Manifest: <activity>
  • Activity: BubbleActivity

7. Caching with RxJava Operators ↗

Implement Caching in Android using RxJava Operators

First, we need to understand why caching is useful? Caching is very useful in the following situations:

  • Reduce network calls: We can reduce the network calls by caching the network response.

  • Fetch the data very fast: We can fetch the data very fast if it is cached.

  • Activity:


Find this project useful ? ❤️

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

TODO

Add many more features and bug fixes.

Contact - Let's become friends

  • Twitter
  • Linkedin
  • GitHub

License

   Copyright (C) 2019 Arindam Karmakar, Android Open Source Project

   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.

Contributing to Advanced Android Training

All pull requests are welcome, make sure to follow the contribution guidelines when you submit pull request.

About

Kotlin Development Practices (Android)

arindamxd.github.io/

Topics

activity-aliasesadvancedandroidandroid-trainingapp-linkscoildark-themedaynightdeep-linkingdynamic-shortcutskotlinmaterial-themepinned-shortcuts

Resources

Readme
Apache-2.0 license

Code of conduct

Code of conduct

Contributing

Contributing
Activity

Stars

12 stars

Watchers

4 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.