Skip to content
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

缺少kotlin版本的demo #940

Open
inkCrazy opened this issue Apr 15, 2024 · 1 comment
Open

缺少kotlin版本的demo #940

inkCrazy opened this issue Apr 15, 2024 · 1 comment

Comments

@inkCrazy
Copy link

inkCrazy commented Apr 15, 2024

"jcore-react-native": "^2.1.6",
"jpush-react-native": "^3.0.6",
"react": "18.2.0",
"react-native": "0.73.6",

MainActivity.kt里面先不要调用jCoreModule.setAuth(false)不知道怎么写了
@inkCrazy
Copy link
Author

import com.facebook.react.bridge.ReactContext
import com.facebook.react.bridge.ReactApplicationContext
import cn.jiguang.plugins.core.JCoreModule

override fun onCreate(savedInstanceState: Bundle?) {
val reactContext = getReactNativeHost().getReactInstanceManager().getCurrentReactContext() as ReactApplicationContext?;
val jCoreModule = JCoreModule(reactContext);
//先不要授权极光推送
jCoreModule.setAuth(false);
super.onCreate(null)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant