0

I want to open website in React-Native app with below requirements:

  1. Open website from app
  2. Select appropriate record from list
  3. Click on Edit button
  4. Edit appropriate details
  5. Click on Save button

Above is requirement to provide user better experience from app rather than going to website and do multiple clicks. How to achieve above in React-Native?

PS: We used to use WebBrowserControl in desktop windows app for above requirement and want to replicate same in React-Native android app.

1

1 Answer 1

0

You have to do the same things what you have done in the web part. Just you have to inject the JavaScript code to a webview. Webview will help you to open the website and then you have to inject the JavaScript code based on certain conditions and you can achieve the same as web. More you can read here :-

Sign up to request clarification or add additional context in comments.

8 Comments

Thanks for your reply. The requirement I mentioned is just 1% of total processing. Actual process is quite complex and lengthy wherein I need to open website, login with user credentials, search for records, select multiple records, perform operation on 1 record at a time, validate rules and finally submit data. Is there any better way like document.getElementById('txtusername'.).value = 'user', document.getElementById('txtpassword'.).value = 'password' and document.getElementById('submitbutton').click()?
the code which you have done in web part will help you here,,,,that's what i have told...You need to perform these actions after opening the webview in react native and then inject the JavaScript code to the webview based on conditions. It is possible to do in react native
I tried sample code from facebook.github.io/react-native/docs/webview.html in online editor like codesandbox.io and snack.expo.io. However, both shows blank preview for both URL and static HTML in WebView. Do you have any idea about what am I missing?
use webview as child and make a view parent with style equal to flex:1....you are missing there
@Ramesh accept the answer if it works for you thanks :)
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.