pub fn with_activity<F, R>(f: F) -> Result<R>Expand description
Invokes the given closure f with the current JNI environment
and the current activity.
Returns None upon error, including:
- If the function that gets the current activity and JNI environment has not been set.
- If the current JNI environment cannot be obtained.