charting-library-examples icon indicating copy to clipboard operation
charting-library-examples copied to clipboard

Not working on React-native android build

Open kiran-bhalerao opened this issue 2 years ago • 5 comments

Its not working when create android build "expo": "49.0.7", "react-native": "0.72.3", "react-native-webview": "13.2.2"

Showing blank white screen. but working on android emulator.

To Reproduce

create android apk build and run on physical device.

kiran-bhalerao avatar Aug 14 '23 08:08 kiran-bhalerao

Datafeeds is undefined

kiran-bhalerao avatar Aug 14 '23 13:08 kiran-bhalerao

getting same issue

vanditmehta avatar Aug 25 '23 09:08 vanditmehta

I have the same problem, it works normally on iOS, but on android it doesn't work.

When I change my HTML to something like

<!DOCTYPE html>
<html>
	<head>
		<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
		<meta http-equiv="X-UA-Compatible" content="IE=Edge">
	</head>

	<body>
             <h1>Hello World</h1>
	</body>
</html>

it works perfectly on Android, but the example doesn't work. @SlicedSilver Do you know what it could be?

I don't know if there is any permission, or if there is any additional HTML tag

Remato avatar Oct 24 '23 00:10 Remato

Have you copied all the files to correct directories? https://github.com/tradingview/charting-library-examples/tree/master/react-native#how-to-start---android

The files are copied to different directories for iOS and Android.

To get a more concrete answer on what the issue is, you should connect the developer tools to the web view and see what the errors are (you may need to refresh the page).

SlicedSilver avatar Oct 24 '23 08:10 SlicedSilver

Hi Mark, I managed to solve it!

For the next people who are going to integrate charting-library with Android and are testing in a simulator, when using Webview make sure to add the androidLayerType property

If it's set to hardware like me

androidLayerType="hardware"

just change it to:

androidLayerType="software"

this should fix the problem.

Remato avatar Oct 25 '23 05:10 Remato