This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@file:Suppress("TooManyFunctions", "ComplexMethod", "ComplexMethod", "ComplexMethod") | |
package com.tawrid.helper.coroutines.extensions | |
import android.content.ContentUris | |
import android.content.Context | |
import android.database.Cursor | |
import android.database.DatabaseUtils | |
import android.net.Uri | |
import android.os.Environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id 'com.android.application' | |
id 'kotlin-android' | |
id 'kotlin-kapt' | |
id 'kotlin-parcelize' | |
id 'dagger.hilt.android.plugin' | |
} | |
dependencies { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun getDeviceSerial(applicationContext: Context): String? { | |
var serialNumber: String? | |
try { | |
val c = Class.forName("android.os.SystemProperties") | |
val get = c.getMethod("get", String::class.java) | |
serialNumber = get.invoke(c, "gsm.sn1") as String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ES6 import statement, we import the entire react library to a variable called react | |
import React from 'react'; | |
// When you use these new tags, instead of html tags, then when they rendered, they | |
// will rendered to native components on mobile platforms, and not a browser components like in React.. | |
// View is the container, Text is like TextView | |
// App registry is important to register views in the screen | |
import { | |
View, | |
Text, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In Manifest file: | |
<uses-permission android:name="android.permission.CAMERA"/> | |
In the build.gradle(Module): | |
/** | |
* dependency to request the runtime permissions. | |
*/ | |
implementation "com.karumi:dexter:5.0.0" | |
In the Code: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First of all, add this libraries to the module gradle: | |
implementation 'com.google.ar.sceneform.ux:sceneform-ux:1.8.0' | |
implementation 'com.karumi:dexter:5.0.0' | |
# Second go to the Manifest and add this lines: | |
<uses-permission android:name="android.permission.CAMERA"/> | |
<uses-feature android:name="android.hardware.camera.ar" android:required="true"/> | |
<application> |