-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
References to getCurrentActivity make it impossible to build an InputMethodService on Android #7762
Comments
I've submitted this to Stack Overflow and put up a bounty for a solution or work around: |
What's the problem you're facing? Are you getting an error message? A crash? Why would a reference to |
The problem is that this code from https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/DialogModule.java always returns null.
Because this always returns null: (from https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java)
So, when this code for the onHostResume runs it always fails the assert and stops running. My React Native code is running inside of a keyboard so the 'CurrentActivity' is usually another application. |
|
Looks like this was added:
in 2fc0f40 Perhaps this will fix my issue? |
Reviewed By: foghina Differential Revision: D3475896 fbshipit-source-id: d8e5d7734974132307a85d21e4c1602327a479fa
Hi there! This issue is being closed because it has been inactive for a while. But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/references-to-getcurrentactivity-make-it-impossible-to-build-an-inputmethodservice-on-android Product Pains has been very useful in highlighting the top bugs and feature requests: Also, if this issue is a bug, please consider sending a pull request with a fix. |
Still waiting o a fix. Is there any intention of supporting android non-app services? If not I'll move on, but I already have this keyboard in the iOS app store and really wish I could push out an android version. |
Any updates on this issue ? |
I'm trying to build a custom keyboard with React-Native on Android. They are implemented with a InputMethodService and thus it is really hard to provide an rnplay for. I've tracked things down to the following code in the DialogModule.class file
Here is how I'm setting up my SimpleIME
The text was updated successfully, but these errors were encountered: