diff options
Diffstat (limited to 'taler-kotlin-android/src')
-rw-r--r-- | taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt b/taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt index ceb5ead..72740df 100644 --- a/taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt +++ b/taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt @@ -43,6 +43,9 @@ import androidx.core.content.ContextCompat.getSystemService import androidx.fragment.app.Fragment import androidx.navigation.NavDirections import androidx.navigation.fragment.findNavController +import com.github.pedrovgs.lynx.LynxActivity +import com.github.pedrovgs.lynx.LynxConfig +import com.github.pedrovgs.lynx.model.TraceLevel import net.taler.lib.common.Version fun View.fadeIn(endAction: () -> Unit = {}) { @@ -90,6 +93,13 @@ fun Context.isOnline(): Boolean { } } +fun Context.showLogViewer() { + val lynxActivityIntent = LynxActivity.getIntent(this, LynxConfig().apply { + maxNumberOfTracesToShow = 1500 // higher numbers seem to break share functionality + }) + startActivity(lynxActivityIntent) +} + fun Intent.isSafe(context: Context): Boolean { return context.packageManager.queryIntentActivities(this, MATCH_DEFAULT_ONLY).isNotEmpty() } |