mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-24 08:43:27 -04:00
register our app to handle meshtastic urls
This commit is contained in:
@@ -8,6 +8,7 @@ import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import android.content.pm.PackageManager
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.Menu
|
||||
@@ -215,6 +216,25 @@ class MainActivity : AppCompatActivity(), Logging,
|
||||
UIState.googleSignInClient = GoogleSignIn.getClient(this, gso);
|
||||
|
||||
*/
|
||||
|
||||
// Handle any intent
|
||||
handleIntent(intent)
|
||||
}
|
||||
|
||||
override fun onNewIntent(intent: Intent) {
|
||||
super.onNewIntent(intent)
|
||||
handleIntent(intent)
|
||||
}
|
||||
|
||||
/// Handle any itents that were passed into us
|
||||
private fun handleIntent(intent: Intent) {
|
||||
val appLinkAction = intent.action
|
||||
val appLinkData: Uri? = intent.data
|
||||
|
||||
// Were we asked to open one our channel URLs?
|
||||
if (Intent.ACTION_VIEW == appLinkAction && appLinkData != null) {
|
||||
debug("Asked to open a channel URL")
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
||||
Reference in New Issue
Block a user