You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code to open a browser on Android would be something like this:
from android content import Intent
from android.net import Uri
intent = Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"))
context.startActivity(intent)
However, Android doesn't provide any public way to get a context unless you already have a reference to a UI object. Within Chaquopy, we already have a reference to the global Application context. But in order to upstream this to CPython, we'd need to get the context in JNI using something like this:
Although ActivityThread is a hidden class, the relevant methods are all marked with @UnsupportedAppUsage, which means Google is aware that applications are using them, so they haven't blocked them.
The text was updated successfully, but these errors were encountered:
The code to open a browser on Android would be something like this:
However, Android doesn't provide any public way to get a context unless you already have a reference to a UI object. Within Chaquopy, we already have a reference to the global Application context. But in order to upstream this to CPython, we'd need to get the context in JNI using something like this:
Although ActivityThread is a hidden class, the relevant methods are all marked with
@UnsupportedAppUsage
, which means Google is aware that applications are using them, so they haven't blocked them.The text was updated successfully, but these errors were encountered: