0
Hello I have a problem a little weird... I have an apk generated in release mode with signature everything ok,but when I install in my cell a Xiomi 7 on the home screen does not redenrize the flatlist where I search the data via JSON on an external server... I installed in 3 cell phones where have been used Debugging and not one of them worked being the other Xiome redmiNote 8 e uma Assus... Ai leaves for the weird thing rsrs, installing the APK in other phones the flatlist works searching the data and rendering them as encoded in my index.
Any idea what it is will be welcome...
//
const [filteredDataSource, setFilteredDataSource] = useState([]);//filtrando dados do json
const [listars, setListars] = useState([]);//array do json
const[isLoading, setIsLoading] = useState(false);//reload view
useEffect(() => {
setIsLoading(true);
fetch('http://serverteste:8092/json/')
.then((response) => response.json())
.then((responseJson) => {
setFilteredDataSource(responseJson);
setListars(responseJson);
})
.catch(() => Alert.alert('Erro ao buscar Acessos'))
.finally(() => setIsLoading(false));
}, []
);
My flatList
<View style={styles.container}>
{isLoading ? (
<View style={[styles.containerAcrt, styles.horizontal]}>
<ActivityIndicator
animating = {true}
color = '#bc2b78'
size = "large"
/>
</View>
): (
<FlatList
data={filteredDataSource}
keyExtractor={(item, index) => index.toString()}
renderItem={ItemView}
/>
)
}
</View>
Here is a print of the rendered flatlist on a clean cell phone never used debugging or used for development |
This is the application screen print on my mobile phone |
---|---|
Remarks:
- Regarding server-side permissions has already been checked and this is all ok...
- The tests done on my mobile phones were in networks different from the local network where the server is hosted so it already rules out any conflict of IP range.
- when I run application in mode DEBUG works normally.
from already I thank that power gives a light of what can be...
Possibly related: Phonegap application does not request ajax with HTTP protocol, only with HTTP s [closed]
– Icaro Martins