Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on React-native android build #357

Open
kiran-bhalerao opened this issue Aug 14, 2023 · 5 comments
Open

Not working on React-native android build #357

kiran-bhalerao opened this issue Aug 14, 2023 · 5 comments

Comments

@kiran-bhalerao
Copy link

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
Copy link
Author

Datafeeds is undefined

@vanditmehta
Copy link

getting same issue

@Remato
Copy link

Remato commented Oct 24, 2023

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

@SlicedSilver
Copy link
Contributor

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).

@Remato
Copy link

Remato commented Oct 25, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants