草庐IT

react-route

全部标签

android - 使用 react-native [Android] 启动邮件应用程序

有没有办法在Android上使用Linking启动邮件应用程序。重点是方案(深层链接)消息:仅适用于iOS。这是一个在iOS上工作但在Android上不工作的小例子:Linking.canOpenURL('message:0').then(supported=>{if(!supported){console.log('Can\'thandleurl');}else{returnLinking.openURL('message:0');}});许多官方/非官方帖子都在谈论ActivityIntent或方案mailto:但我不想写电子邮件。我想打开邮件应用程序,而不是用户可以查看我发送给他

android - 在 Android 设备上运行 github 上的 React Native 项目

背景:我关注了this教程并在我的设备上成功运行了它,现在我正在尝试运行github上的其他ReactNative项目,但到目前为止还没有成功。问题陈述:我要运行this在我的Android设备上进行项目。有关于在模拟器上运行它的明确说明,但我似乎无法弄清楚如何在Android设备上运行它。编辑:我已经按照说明成功运行了示例应用程序。现在要在模拟器中运行项目,应遵循以下步骤:.cdreact-native./gradlew:Examples:Movies:android:app:installDebug./packager/packager.sh现在我正在寻找直接在设备上运行此示例的步

android - Android中如何绑定(bind)React Native的图片资源?

我用react-nativebundle--entry-file"index.android.js"--platform"android"--bundle-output"./assets/index.android.bundle"--verbose将JScodebundle打包放入assets中,可以但是本map片资源无法显示,本map片资源位于./App/Img/文件夹下,并且用于:consticon1=require('./App/Img/slider.png');我怎样才能bundle这些资源文件,以便我可以生成一个运行的apk。 最佳答案

android - React Native map 加载位置

我正在尝试使用react-native-maps模块制作一个应用程序。我可以通过navigator.geolocation.watchPosition获取设备位置,我还使用内置于showUserLocation属性中的map。我怎样才能实现加载时的map会转到用户位置。看不到整个世界,也看不到硬编码的初始位置。编辑:这是我的react-native-map元素。该区域设置为硬编码初始位置,我想将其更改为始终在用户位置加载。this.setState({initialPosition:region})}onLongPress={this.mapOnPress}showsUserLocat

android - list 合并失败。添加并链接 react-native-device-info 后

list合并失败:来自[com.android.support:cardview-v7:25.3.1]AndroidManifest.xml:24的属性元数据#android.support.VERSION@valuevalue=(26.0.1):9-31也存在于[com.android.support:support-v4:26.1.0]AndroidManifest.xml:28:13-35value=(26.1.0)。建议:在AndroidManifest.xml:26:9-28:38处的元素中添加'tools:replace="android:value"'以进行覆盖。RNv0

android - 在一个 react-native 项目中使用 google map 和 FCM

我想在一个ReactNative项目中使用googlemap和FCM,首先我在项目中添加了FCM,一切正常,但是当我添加googlemap时,我遇到了一个错误:我在谷歌上搜索了很多,有很多我尝试过的答案,但没有一个对我有用,例如:https://github.com/firebase/FirebaseUI-Android/issues/1230,谁来帮帮我。我将提供我的项目的一些屏幕截图,如果您需要其他东西,请告诉我。 最佳答案 Note:I'musingthelatestversionofreact-native(v0.56.0)

javascript - React Native - 如何在返回上一页时刷新 FlatList?

我将尝试解释我的情况:我有2个页面/屏幕SreenA.js:......ScreenB.js:...ThisbuttonforbacktoScreenA...我想要实现的目标:WhenipressbackbuttoninscreenB,myappwillbacktoscreenA.WhenicomebacktoscreenA,ineedtorefreshtheFlatList.(eachtimeibacktoscreenA).我如何在AndroidNative中实现这种情况?Iaddthissectiontohelpyoutomoreunderstandwhatchallengeifa

android - React Native - 在包 'appComponentFactory' 中找不到属性 'android' 的资源标识符

我遇到了一个问题,每当我尝试使用react-nativerun-android进行构建时,构建都会失败并出现以下错误。\?\E:\projects\deets-mobile-cp\android\app\build\intermediates\manifests\full\release\AndroidManifest.xml:88:AAPT:Noresourceidentifierfoundforattribute'appComponentFactory'inpackage'android'FAILURE:Buildfailedwithanexception.Whatwentwron

android - 选择器 react 缓慢 - 有时在开始下一个 Activity 之前根本不触发

我定义了这个选择器:它与这个按钮一起使用:onTouch事件包括:publicbooleanonTouch(Viewv,MotionEventevent){finalintactionPerformed=event.getAction();finalintwidgetID=v.getId();if(actionPerformed==MotionEvent.ACTION_UP){switch(widgetID){caseR.id.filter_button_back:{this.finish();break;}}}returnfalse;}这个按钮的作用是退出当前Activitythis

android - 全文未显示在 react native 的警报对话框中

我试图在用户点击按钮时显示警告对话框。我正在尝试如下onPressButton(){Alert.alert(strings.tour_end);}strings.tour_end是“太棒了!希望您喜欢我们的产品之旅!享受这个应用程序。我们为您准备了一些激动人心的优惠!”这就是它在alert中的显示方式。这是react-native中的错误吗? 最佳答案 您已根据警报API将完整消息作为警报标题传递。alert(title,message?,buttons?,options?,type?)喜欢下面alert("Great..!",st