Questions tagged [react-native-android]

1

votes
0

answer
227

Views

implement bluetooth connection for all smartphone users in react-native

I want to scan and connect devices using Bluetooth in React-Native. I tried react-native-ble-manager and react-native-ble-plx plugins. But I have a problem these plugins connected to special devices that have peripheral mode enabled. Look this answer. Question: How can I implement Bluetooth for all...
Murthy Satya
1

votes
0

answer
132

Views

Could not invoke GoogleAnalyticsBridge.trackScreenView

I got a new Mac and cloned our project repo, but I'm getting this error even though I didn't change anything in the code. The same code that my colleagues use (even if they clone a new one) and my old Windows laptop and can be built successfully. It got me to think if my versions are wrong? Here are...
Compaq LE2202x
1

votes
1

answer
612

Views

Change Picker placeholder alignment in React native

I tried to change text alignment to right for picker but it seems there is no way to change. this.setState({ language: itemValue })}> I need something like following pic:
Nima
1

votes
1

answer
1.1k

Views

Flatlist onEndReached endless loop

I am using state to store the following data. state = { refresh: true, isFetching: true, showLoadingBottom: false, data: [] }; on componentDidMount I manually call a function _fetchData which loads data into this.state.data. When the flatlist is scrolled to the end it fires _fetchData twice which en...
Jude Fernandes
1

votes
2

answer
408

Views

Reloading an animation React-native-animatable library

guy's I'm using the react-native-animatable library. Basically, when I load my app the animation runs, however, when I go to another tab and return to the initial page the animation doesn't run anymore. I think it's because it' doesn't get reloaded anymore and I was wondering how to reload a compone...
Re-Angelo
1

votes
3

answer
282

Views

React Native Error when `run-android`

I installed all dependencies and libs like the instructions on https://facebook.github.io/react-native/docs/getting-started.html Everything is fine. But when i try to run react-native run-android i throws me errors (see screenshot) HAXM is installed on my machine as well. What can i do to run it on...
pkberlin
1

votes
0

answer
129

Views

Animate SVG React Native

I am trying to modify the height of a rectangle in svg. First of all my svg is correctly displayed before i use the Animated api. Then i try to bind a height variable to the SVG as So : render() { let AnimatedRectangle = Animated.createAnimatedComponent(Rect); let {height} = this.state return ( );}...
Aria Groult
1

votes
1

answer
610

Views

Re Render Tab Navigator onPress React Navigation

when i'm using stack navigator only. the screen get re render every time when i navigate to another screen. so how to do the same thing with tab navigator? every time i press the tab menu(favorite)? Screenshot: Code: const RootStack = StackNavigator( { Home: { screen: Home, navigationOptions: { head...
Gus Nando
1

votes
3

answer
40

Views

React Native hangs when I create a child component

Sorry for the dummy question, but I'm really stuck. I created a very simple react-native app using these instructions. Then I changed App.js to be import React from 'react'; import {AppRegistry, Button, View } from 'react-native'; class RootView extends React.Component { state = { showFoo: false...
stillwaiting
1

votes
0

answer
179

Views

React Native: RN-Material-Dropdown not displaying (iOS)

I'm trying to use the lib react-native-material-dropdown in iOS, running on a iPad Air, but the dropdown is not showing on the screen. I've tried to input a marginTop with a negative value and a value to width, but nothing works. Follow the code of my class and the versions that I'm using: RN versi...
Wallace Blend
1

votes
1

answer
62

Views

React Native - Android views overlapping on launch

In my App.js I currently have this code in the render function which conditionally renders two stack navigators (React Navigation). The code works and render fine in iOS. It also works on Android, but for some reason on both cases it'll show the both views overlapping each other for a fraction of a...
200gSoft
1

votes
0

answer
340

Views

How to properly import PermissionsAndroid from react-native?

I'm actually trying to make use of react-native-camera, but I keep running into an error on line 14: https://github.com/react-native-community/react-native-camera/blob/master/src/handlePermissions.js#L14 where const granted = await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.CAMERA, {...
John M.
1

votes
0

answer
84

Views

How to do realtime form validation in react native android

These are the features i want to implement. *when typing any thing in input fields if there any error it should be display at real time. *If any input field is not validate then submit button should be in a untouchable state.
1

votes
0

answer
438

Views

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzuw;

My app is successfully build but unable to open my app its getting crashed. I checked the logcat and saw below mention error. My android/gradle.build file contains classpath 'com.android.tools.build:gradle:3.1.2' and classpath 'com.google.gms:google-services:3.2.1' java.lang.NoClassDefFoundError: F...
Sadhu
1

votes
0

answer
127

Views

FirebaseMessagingService not firing callbacks

I wrote a code with a FirebaseMessagingService to read notifications. The app is part android and part react-native. PROBLEM: The FirebaseMessagingService onCreate() is getting called but the onMessageReceived callback is not firing even when the app is in the foreground. Moreover, the notification...
Thanatos
1

votes
2

answer
31

Views

Project with Native Code required?

I'm reading some docs and it is stated explicitly that 'Project with Native Code Required'. I'm also poking around several apps on Github, but is there a way to check if it was created using react-native init or is native code? What does 'project with native code' actually mean?
Kar
1

votes
1

answer
220

Views

react-native RECEIVE_SMS android permission always results 'never_ask_again'

I am requesting multiple permissions. All are working fine except receive sms where the result is always 'never_ask_again'. The following is the code I am trying: _getPermissions = async () => { try { const resuts = await PermissionsAndroid.requestMultiple([ PermissionsAndroid.PERMISSIONS.ACCESS_FI...
noshusan
1

votes
0

answer
68

Views

fork react-native (with native modules) component locally

im new with react native. have a project , helloworld root/ /android/ /ios/ /node_modules/ /githubLib1/ /android/... /ios/... ... /src/ ... so my question is how can i fork 'githublib1' to 'githublib2' and place it to a root level and then connect to a react native ? i did copy and place on root but...
1

votes
0

answer
252

Views

React Native: Lottie Animations flicker on Android, but not iOS

I've built a custom component called 'CircleLoader' which plays a Lottie animation when it is visible. It serves as a loading animation. Everything works great on iOS, but on Android, the animation flickers. The screen IN THE SIMULATOR AND ON A REAL DEVICE goes between black and the animation itself...
tman091
1

votes
2

answer
2.1k

Views

React native: TypeError: Network Request Failed

when I try to run the code below in chrome console the code works and I get alert in the browser but when I try to run the same code in react native it gives an error: 'TypeError: Network Request Failed'. //Code makeRequest(){ fetch('http://localhost:3000/') .then(response => response.json()) .then(...
Syed.bcc
1

votes
0

answer
28

Views

Android GIF borderRadius without overlayColor

All of my gifs are on non-solid backgrounds. The only way to get GIFs to respect borderRadius right now is to use a hack called overlayColor per: Rounded corner issue with GIF image in react native android https://github.com/facebook/react-native/issues/11363 Does anyone have any other solution? ove...
Noitidart
1

votes
0

answer
666

Views

Execution failed for task ':app:mergeDebugResources'. react native, currently trying to run on Android

I am trying to run my react native application on Android and when I try react-native run-android I get the following error: * What went wrong: Execution failed for task ':app:mergeDebugResources'. > Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: I h...
BRDroid
1

votes
0

answer
286

Views

Sending Events to JavaScript from android react-native RCTDeviceEventEmitter

I am trying to receive an event from android side on location update. Here is my code: package com.prop; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.location.Location; import android.supp...
Niraj Pradhan
1

votes
0

answer
331

Views

Restrict Pan Responder Movement in React Native

Hi I am creating a React Native App and using PanResponder in it. Everything works fine but I want to restrict the movement of element to always stay inside the screen. At the moment if we swipe horizontally or vertically, it goes outside the screen. Here is my code class CourseEditScreen extends Co...
Rajan Benipuri
1

votes
0

answer
242

Views

Realm in React Native - TypeError while not using JS Debugging

I am Currently developing an app in react-native in which I would like to create a Database on the device as well. I found a good library Realm to use as a Database storage in my app but I am having error in running it. App works fine when I activate Debug JS remotely Fails and gives error TypeErr...
Ahsan Ahmed
1

votes
0

answer
356

Views

How to backup/restore SQLite database in React native

I am using andpor/react-native-sqlite-storage for managing SQLite database in React native. Now I want to backup all my database into a encrypted file then restore this at later time. I know how to do this in android but don't know how to implement this in react native. if it is in android below co...
Vinayak B
1

votes
1

answer
377

Views

Says please attach method to this component

I'm new to react native and i'm trying to send some data to my API,basically a POST request,added a button and trying to call the fetch request using that,but i'm not sure what am i doing wrong in this ?? It says 'Please attach method to this component' in the log,let me know if i'm doing anything w...
Venky
1

votes
0

answer
42

Views

Some static images fail to render on Android

I have a simple app that shows a list of content that I can tap into and view more detail about that content. I'm experiencing a strange issue where in Release mode on a SM Galaxy S7, the static images I attempt to load are not always rendering. Note: This ONLY happens on a physical device, release...
justColbs
1

votes
2

answer
224

Views

react native ActivityIndicator is not rotating/animating

React Native version: 0.55 i have the following code in a screen in a react native app: And for some unknown reason, the ActivityIndicator is NOT rotating. It shows as static and start animating ONLY AFTER any state change occurs on the screen. any idea why?
Zorox
1

votes
2

answer
173

Views

React-Native asking for access for photos/files/media? ( I am using redux-persist with AsyncStorage ? )

Is it possible to avoid that permissions as users are giving negative reviews on PlayStore on my app because of those permissions? I am using redux-persist to save user data in AsyncStorage. Is there any way to avoid this without removing AsyncStorage?
jsartisan
1

votes
0

answer
202

Views

wix navigation drawer doesn't change screen

Basically I'm trying to navigate using the drawer , as follow : Drawer import React, { PureComponent } from 'react'; import { Navigation } from 'react-native-navigation'; import { List, ListItem } from 'react-native-elements'; const list = [ { title: 'Home', icon: 'av-timer' }, { title: 'Training',...
Abanoub
1

votes
0

answer
690

Views

React-Native-firebase Push notifications(android) doesnt display the 'body' of the request on the background or when app is closed

Notifications work great on the foreground , I get both the console.log and the action to navigate . On the background They get displayed ,I get the console.log and action to navigate when I press to open them , but this time the body of my notification is undefined.I can only see the 'data' that I...
sod.heretic
1

votes
0

answer
410

Views

React Navigation transparent bar missing title and buttons on android

I'm building a React Native app with React Navigation 2.5.x. I have a transparent navigation bar. On iOS everything is fine, but on Android the title, back button and any barButton I put there is missing. The navigation options is defined like this: const navigationOptions = { headerStyle: { border...
Johan Nordberg
1

votes
0

answer
368

Views

How to use camera in webview react native?

I'm trying to capture image from a webview in react native and then display the same on my html page. Problem: I cannot access camera and save images from webview. Solution: I am capturing and saving the images using react-native-camera. Next Problem: I want to display this above saved image in my w...
Vivek
1

votes
0

answer
735

Views

React Native App Icon Not Showing As Specified in Res Folder

I have been working with react native for quite a while. I am having this weird issue with the application icon. I am only targeting Android for now. I have replaced the ic_launcher.png in all 'android/app/src/main/res/mipmap-*' folders. After deploying the app on emulator or a real device the app...
Murtaza Shehabi
1

votes
0

answer
93

Views

Cannot resolve symbol PermissionListener in react-native-image-picker

import com.facebook.react.modules.core.PermissionListener; Cannot resolve symbol PermissionListener. friends i am a newbie in react-native and getting this issue in react-native-image-picker. i have added api 'com.facebook.react:react-native:0.20.1' in my gradle file. any solution friends?
Hiren Kuvadiya
1

votes
1

answer
238

Views

TypeError: Cannot read property 'LENGTH_LONG' of undefined

I am doing jest testing in react native and I have used snackbar in my project. While executing jest i am getting this error.'LENGTH_LONG' is inbuilt variable in snackbar. I am posting where i have used 'LENGTH_LONG' variable and error message. Anyone please help me out jest 'login' FAIL __tests__...
krupanand kk
1

votes
0

answer
459

Views

Opening an App inside Another App Using Deep Linking with Custom Url React native(Andorid)

Am new to React-native. We are trying to implement a react-native App in which a button will be provided so that whenever a user clicks on the button he will be directed to play store if the app is not installed. If the App is already installed on the button click he should be able to open the app w...
unknown
1

votes
2

answer
367

Views

why can't create new app in react native

I'm beginner in react-native and I doing steps in a website of react-native and the app is working right, but after doing some update npm i [email protected] --save npm i [email protected] --save react-native upgrade after that, I can't create any project by react-native init projectName I get this...
Amr
1

votes
0

answer
272

Views

How to place components above React Native Modal?

I'm developing an app using React Native. Right now, I have a FAB button which I'm using the react-native-circular-action-menu and I'm using the React Native Modal to open a modal. The problem is the Modal occupies the entire screen and I placed a View inside of the Modal component to adjust the wid...
user2672399

View additional questions