Skip to content

Instantly share code, notes, and snippets.

@bagus-Arya
Last active December 23, 2024 13:33
Show Gist options
  • Save bagus-Arya/ffc22596630e6ccc0d217d8e8f067470 to your computer and use it in GitHub Desktop.
Save bagus-Arya/ffc22596630e6ccc0d217d8e8f067470 to your computer and use it in GitHub Desktop.
https://blog.expo.dev/expo-sdk-48-ccb8302e231

Note

MD file doc. Install react native without framework.

Reset cache

npx expo start --reset-cache
press a | open Android 

Instaling react native without framework

npx @react-native-community/cli@latest init NamaProject

after finished go to NamaProject/android run ./gradlew clean then ./gradlew build. On root folder npm start

Expo build

build android and ios folder

npx expo prebuild 

reset gradle, navigate to folder android then type on terminal :

./gradlew clean
./gradlew build 

expo check

npx expo install --check
npx expo install --fix

expo instaling npx expo upgrade or npx install-expo-modules@latest

Initialing expo app

npx create-expo-app@latest StickerSmash 
cd StickerSmash

Build steps

build configure

eas build:configure

build apk for android

eas build --platform android --profile preview

Android Studio

unzip tar file
execute the /{android-studio}/bin/./studio.sh
after 
open second time : cd /{location-android-studio}/bin/.studio or [@username ~ bin ]:$ ./studio 

Android manifest xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
  <uses-permission android:name="android.permission.CAMERA"/>
  <uses-permission android:name="android.permission.INTERNET"/> // make http accessible for api request
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
  <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
  <uses-permission android:name="android.permission.VIBRATE"/>
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
  <queries>
    <intent>
      <action android:name="android.intent.action.VIEW"/>
      <category android:name="android.intent.category.BROWSABLE"/>
      <data android:scheme="https"/>
    </intent>
  </queries>
  <application 
    android:name=".MainApplication" 
    android:label="@string/app_name" 
    android:icon="@mipmap/ic_launcher" 
    android:roundIcon="@mipmap/ic_launcher_round" 
    android:allowBackup="true" 
    android:theme="@style/AppTheme" 
    android:usesCleartextTraffic="true" // make http accessible for api request
    android:supportsRtl="true">
    <meta-data android:name="expo.modules.updates.ENABLED" android:value="false"/>
    <meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
    <meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
    <activity android:name=".MainActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:exported="true" android:screenOrientation="portrait">
      <intent-filter>
        <action android:name="android.intent.action.MAIN"/>
        <category android:name="android.intent.category.LAUNCHER"/>
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <category android:name="android.intent.category.BROWSABLE"/>
        <data android:scheme="moca"/>
        <data android:scheme="com.user_name.app_name"/>
      </intent-filter>
    </activity>
  </application>
</manifest>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment