Android useful functions
Covert java code to kotlin in android studio ref - java-source-file-to-kotlin Menu > Tools > Kotlin > Show Kotlin Bytecode Click on the Decompile button Copy the java code
Search for a command to run...
Covert java code to kotlin in android studio ref - java-source-file-to-kotlin Menu > Tools > Kotlin > Show Kotlin Bytecode Click on the Decompile button Copy the java code
Log //use logd shortcut //use this to debug code Log.d("main","error") //print exception in logs try { val a = 5/0; } catch (e : Exception) { Log.e("main","zero error",e) } //use class name for logs var...

Toggle Overview - It is used to turn on or off features for users remotely. If it is enabled, the user will be able to see the feature otherwise the feature will not be visible to the user. eg - Suppose there is a feature that asks the user their nam...
Code Commit We generally commit code with jeera ticket no. So that it is easy to track. Feature Development Suppose you want to add a new feature to the app. You can create a new branch from develop and give a name as feature or bugfix keyword - jeer...

references - neogcamp print your name console.log("abhinesh chandra"); take input and print output var readlineSync = require('readline-sync'); var userName = readlineSync.question('May I have your name?'); console.log(userName); concatenation cons...
One, Two, and Three-dimensional array int[] result = new int[list.size()]; int[][] twoD_arr = new int[10][20]; int[][][] threeD_arr = new int[10][20][30]; int[] intCode = {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1}; int[][] DIRECTIONS = {...

Best Practice while writing unit tests for a class follow the same package structure. eg - data -> local -> className then in androidTest data -> local -> classNameTest Annotations -_@RunWith(AndroidJUnit4::class) - These tests don't run in core ja...
Room implementation "androidx.room:room-runtime:2.3.0" kapt "androidx.room:room-compiler:2.3.0" //id "kotlin-kapt" implementation "androidx.room:room-ktx:2.3.0" androidTestImplementation "androidx.room:room-testing:2.3.0" coroutines implementation '...
Unit Testing It is used to refer to simple tests. like - simple business logic test independent of any fragment or activity. Library Used testImplementation "com.google.truth:truth:1.0.1" use import com.google.common.truth.Truth.assertThat inst...