Create Android App using responsive website

Hey guys, so you want to make a android app but not sure about how to go about it.

The easiest way to do it, is by opening a responsive website inside the app. For this we are using react native framework so will follow the download and installation instructions from react native official website.

  1. use official websites steps to open your app in the simulator or actual device

  2. now to open a website inside a view component of react native app we need to install webview component

npm i react-native-webview

3. once the webview component installed, find the file App.tsx in your project and replace the content with following code

import React from 'react';
import {SafeAreaView} from 'react-native';
import {WebView} from 'react-native-webview';

function App(): React.JSX.Element {
  return (
    <SafeAreaView style={{flex: 1}}>
      <WebView source={{uri: 'https://your-responsive-website.com'}} />
    </SafeAreaView>
  );
}

export default App;

replace https://your-responsive-website.com with an actual website

4. refresh the app in simulator or actual device and the website should open.

5. this app can be deployed to play store, read instructions here

0
Subscribe to my newsletter

Read articles from Samarth Srivastava directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Samarth Srivastava
Samarth Srivastava