Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am sabs231 on github.
  • I am sabs231 (https://keybase.io/sabs231) on keybase.
  • I have a public key ASAT8jp0ByOXaz2IpxvRgj9rVdkxxSK6oyJP9monAzn45Qo

To claim this, I am signing this object:

@sabs231
sabs231 / AndroidManifest.xml
Created September 7, 2022 18:33
Deep links crash course - Part 2: Deep links from Zero to Hero
<!--AndroidManifest.xml-->
<activity
android:name=".LocationsActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="geo" />
</intent-filter>
// MainActivity.kt
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.main)
val intentAction: String? = intent?.action
val intentData: Uri? = intent?.data
}
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
// must store the new intent unless getIntent()
// will return the old one
setIntent(intent)
val action: String? = intent?.action
val data: Uri? = intent?.data
}
<!--AndroidManifest.xml-->
<!--Make sure you explicitly set android:autoVerify to "true"-->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<!-- If a user clicks on a shared link that uses the "http" scheme,
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="https"/>
<data android:host="example.com"/>
<data android:path="/example-path"/>
</intent-filter>
import android.net.Uri
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Surface
import androidx.compose.material.Text
import androidx.compose.ui.Modifier
gradle signingReport
Variant: debug
Config: debug
Store: /Users/iamsabs/.android/debug.keystore
Alias: AndroidDebugKey
MD5: 11:1B:5B:1B:CB:C9:58:CB:7E:1E:DD:0D:54:82:FC:FB
SHA1: 73:DE:15:3D:4F:BA:FB:35:B8:EF:FF:1C:5D:41:7C:E6:5B:27:21:02
SHA-256: B0:4E:29:05:4E:AB:44:C6:9A:CB:D5:89:A3:A8:1C:FF:09:6B:45:00:C5:FD:D1:3E:3E:12:C5:F3:FB:BD:BA:D3