Questions tagged [react-android]
102 questions
2
votes
3 answers
AsyncStorage not working on release but working on debug (React Native)
"@react-native-async-storage/async-storage": "1.15.5",
"react": "17.0.1",
"react-native": "0.64.2",
Here's how I use my Async
fetch('',{
... //codes here
.then((response) => response.json())
.then((responseJson) => {
…

Ginxxx
- 1,602
- 2
- 25
- 54
2
votes
1 answer
React native based SDK
I am trying to create a react based SDK, (i.e) I will be having an Android/iOS package which will be the entry point for an App and will be using react code for using existing business logic. I am able to see React's AppRegistry.registerComponent as…

Manish Waran
- 90
- 10
2
votes
1 answer
React-Native Image rendering on different android devices based on their DPI
I am new to react-native and trying to render images on different android device based on the DPI. Need Help with it.
Code for getting DPI of device is -
import {PixelRatio} from 'react-native';
const PDI = PixelRatio.get();
var…
2
votes
1 answer
Okhttp error during React Navtive GET request
Receiving this error during an otherwise valid GET request in a react-native project.
2020-08-11 12:12:54.163 7301-7498/com.cigna.mobile.mycigna.debug E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher
Process: com.cigna.mobile.mycigna.debug,…

dhanimay
- 23
- 3
2
votes
0 answers
Not able to track lead sources from campaign links in react native
I am using this npm for analytics events. All the events are tracking as expected.
My issue is with respect to capturing the lead source. Most of the sources are coming as (direct) or (not set).
I have used the following code snippet inside manifest…

Pruthvi
- 590
- 4
- 22
2
votes
2 answers
How to set boundaries for react native MapView?
I have integrated react native map with my latest react native application.In the map i want to set boundaries to the map. The official document suggests the method
setMapBoundaries but it requires the argument like this northEast: LatLng,…

Sajith
- 713
- 6
- 21
2
votes
2 answers
sorting the items in the flatList
In my react native application, I am showing services that are offered by my office and the location of those services in a flatlist. I am also showing the miles of the service from the persons current address in that same flatlist. I want those…

Anjali
- 2,540
- 7
- 37
- 77
2
votes
2 answers
calculating distance in React Native
I want to get the distance from my current location to destination. I do have the Longitude and latitude of the destination in my JSON file. How can I get the longitude and latitude of my current location so that I can calculate the distance between…

user54967
- 25
- 2
- 8
2
votes
1 answer
undefined is not object React Native
I am getting well known error undefined is not an object when trying to call this.refs from the context of navigationOptions.
Better if I explain with code:
static navigationOptions = ({ navigation, screenProps }) => ({
headerTitle: 'my…

Mizlul
- 1
- 7
- 41
- 100
2
votes
1 answer
Using native Android view in ReactNative: Constructor ReactImageView in class ReactImageView cannot be applied to given types
Attempting to create an Android view to use in ReactNative later on.
This is the code that I wrote following the official tutorial, but I'm still getting some troubles compiling.
Here is the error message that I get:
Error:(15, 53) error:…

mm24
- 9,280
- 12
- 75
- 170
2
votes
2 answers
React-Native: How to make image array
I have a screen on which I want to have 4 images.
How can I make it so that when I click on the image it goes to the next one from the array (I suppose that's how it would be made). I also wanted to have buttons to go to the next image or go back…

TheNewbie
- 323
- 2
- 9
- 22
1
vote
1 answer
1
vote
0 answers
How do I load asset in android?
I am new to react-native and I need to build an react-native module for the purpose of using TensorFlow Lite to STT and TTS.
I created the react-native module with the create-react-native-library library.
Here is the command for create the…

Ma Zheng
- 11
- 2
1
vote
1 answer
React Native Flatlist Error onViewableItemsChanged
I have a horizontal scrolling flatlist in my app. But onViewableItemsChanged keeps throwing an error. 'Changing onViewableItemsChanged on the fly is not supported.' I write the codes below. Please help me!
const flatListRef = useRef(null);
const…

ttars
- 69
- 6
1
vote
0 answers
How can create react native build and share to my client, I am trying to share the apk-debug.apk file but its showing run react-native start error
I am building a react native app [ for some reasons I am not using expo for this project ] ..
So I built apk and it does created successful built one for debug and one for release.
In my phone I installed that same app but not by sharing that file…

faijan memon
- 183
- 1
- 9