小编zid*_*ryi的帖子

What's the difference between gradlewAssembleRelease, gradlewInstallRelease, and gradlew bundleRelease and when to use which?

When I want to upload an Android application to the Play Store, which one should I use?

I have tried the above but I am still confused about which one is the most effective?

./gradlew assembleRelease
./gradlew installRelease
./gradlew bundleRelease
Run Code Online (Sandbox Code Playgroud)

I expect the best way to do the above.

java android kotlin react-native

27
推荐指数
1
解决办法
1万
查看次数

当用户注销 React Native 应用程序时,如何删除 Firebase Cloud Messaging Token?

我使用 React Native FCM 进行消息传递,当用户注销应用程序时,我想删除 FCM 令牌,以便用户不会再次收到通知。

下面是我的注销代码。

_signOutAsync = async () => {
    this.logoutEvent()
    API.post('customer/auth/logout', null, {
      headers: {
        Authorization:
          'Bearer ' + (await AsyncStorage.getItem(Config.ACCESS_TOKEN))
      }
    }).then((response) => {
      console.log(response)
    })
    this.clearData()
  }
Run Code Online (Sandbox Code Playgroud)

谢谢。

android ios firebase react-native firebase-cloud-messaging

5
推荐指数
1
解决办法
1万
查看次数

如何在反应原生的终止应用程序中检测应用程序?

当应用程序被用户杀死时,我想从 API 更改状态数据。

我曾尝试使用 componentWillUnmount 在应用程序关闭时更改数据,我也使用 AppState

  _handleAppStateChange = (nextAppState) => {
    if (
      this.state.appState.match(/inactive|background/) &&
      nextAppState === 'active'
    ) {
      console.log('App has come to the foreground!')
    }
    this.setState({ appState: nextAppState })
  }


Run Code Online (Sandbox Code Playgroud)

我希望当应用程序被用户杀死时,它可以自动更改状态。

javascript android react-native

4
推荐指数
2
解决办法
7812
查看次数

你如何在气泡聊天下渲染物品时间反应原生天才聊天?

我使用 React Native Gifted Chat 创建 UI 聊天,我想在气泡聊天下渲染聊天时间和符号。

我想要像这样的图像: 在此处输入图片说明

我曾尝试使用渲染消息,但没有成功,请帮忙。

javascript chat react-native react-native-gifted-chat

3
推荐指数
1
解决办法
2640
查看次数