Menu
Who Do Is
  • Home
  • What
  • How
  • Is
  • Can
  • Are
  • Does
  • Do
  • Why
  • Who
  • Where
  • Which
  • Which
  • Should
  • Will
  • When
  • What’s
  • Did
Who Do Is

[ANSWERED] android – Blank screen on Loading document fom uri in Expo’s webview

Posted on November 14, 2022

Solution 1 :

You can try with Linking, as WebView is a view that display web pages inside your application.

import * as Linking from 'expo-linking';

Linking.openURL('https://download.microsoft.com/download/1/4/E/14EDED28-6C58-4055-A65C-23B4DA81C4DE/Financial%20Sample.xlsx');

Problem :

I am using Expo .
import { WebView } from "react-native-webview";
and imported webview like above i am trying to load a document file from some https url , it is working fine and loading the xls file in IOS but in android it giving a blank screen.

 <WebView
  originWhitelist={["*"]}
  source={{ uri: 'https://download.microsoft.com/download/1/4/E/14EDED28-6C58-4055-A65C-23B4DA81C4DE/Financial%20Sample.xlsx' }}
  onLoadEnd={() =>  console.log('end' +Platform.OS)}
  javaScriptEnabled={true}
  domStorageEnabled={true}
  useWebKit={true}
  style={styles.WebViewStyle}
  startInLoadingState={true}
/>

const styles = {  
  WebViewStyle: {
    flex: 1,
    marginLeft: 6,
    height: "50%",
    width: "97%"
  }
}

console.log of onLoadEnd is not coming for android but working fine for IOS.

Comments

Comment posted by Gaurav Dixit

Yes i can do this , but this doesn’t solve my purpose. I want to open the document in my app on new screen . My approach is working fine with IOS but i can’t figure out why not on android.

Comment posted by myinitialurl.com.br/arquivos

have you mentioned these props?

Comment posted by Gaurav Dixit

activityIndicatorLoadingView} startInLoadingState={true} /> yes but i am not having any use of onNavigationStateChange not used that

Comment posted by snack.expo.io/@gd_11/874548

Thanks for taking your time out for helping me . I have created a snak link for you so that you can understand what is happening actually . When you will run this you will find that it is working fine in IOS but not in android:

READ  [ANSWERED] android - Issues with Nested ExpandableListView in Kotlin
Powered by Inline Related Posts

Recent Posts

  • How can I play with my cat without toys?
  • What is a bag pipe band called?
  • Are Honda Civics actually fast?
  • Are Yankee candles toxic?
  • How do I pair my Michael Kors smartwatch with my Android?

Recent Comments

No comments to show.

Archives

  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuántas
  • ¿Cuánto
  • ¿Que
  • ¿Quién
  • 90” and 108” so you may have to round up to the nearest size.
  • and delete any Spotify folders from it. Once this is done
  • Android
  • Are
  • At
  • Bei
  • blink
  • C'est
  • Can
  • carbs
  • Comment
  • Did
  • Do
  • Does
  • During
  • For
  • Has
  • How
  • In
  • Is
  • Ist
  • Kann
  • Können
  • nouveau
  • On
  • or 108 inches.2020-08-03
  • Où
  • owning
  • Pourquoi
  • Puis-je
  • Quand
  • Quante
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • spiritual
  • tap the downward-facing arrow on the top left. A downward-facing arrow will appear underneath each song in the album; they'll turn green as the download completes.2020-07-28
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welcher
  • Welches
  • Welke
  • Wer
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Whose
  • Why
  • Wie
  • Will
  • Wo
  • Woher
  • you will receive two curtains each with the same measurements of width 66"" (168cm) x drop 54""(137cm).
  • you'll see a green downward-facing arrow next to each song.2021-02-26
©2023 Who Do Is | Powered by SuperbThemes & WordPress