Skip to content

Commit 47adfb1

Browse files
committed
pwa integrated
1 parent f1c1bb8 commit 47adfb1

File tree

14 files changed

+29
-24
lines changed

14 files changed

+29
-24
lines changed

android/app/BUCK

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,21 @@ android_library(
3535

3636
android_build_config(
3737
name = "build_config",
38-
package = "com.staninfluencer",
38+
package = "com.rnapp",
3939
)
4040

4141
android_resource(
4242
name = "res",
43-
package = "com.staninfluencer",
43+
package = "com.rnapp",
4444
res = "src/main/res",
4545
)
4646

4747
android_binary(
48-
name = "staninfluencer",
48+
name = "rnapp",
4949
keystore = "//android/keystores:debug",
5050
manifest = "src/main/AndroidManifest.xml",
5151
package_type = "debug",
5252
deps = [
53-
":staninfluencer-code",
53+
":rnapp-code",
5454
],
5555
)

android/app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ android {
132132
compileSdkVersion rootProject.ext.compileSdkVersion
133133

134134
defaultConfig {
135-
applicationId "com.staninfluencer"
135+
applicationId "com.rnapp"
136136
minSdkVersion rootProject.ext.minSdkVersion
137137
targetSdkVersion rootProject.ext.targetSdkVersion
138138
versionCode 1

android/app/google-services.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
"client_info": {
9898
"mobilesdk_app_id": "1:104334188353:android:7bb81e479f0e449a4bcbc0",
9999
"android_client_info": {
100-
"package_name": "com.staninfluencer"
100+
"package_name": "com.rnapp"
101101
}
102102
},
103103
"oauth_client": [

android/app/src/main/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.staninfluencer">
2+
package="com.rnapp">
33

44
<uses-permission android:name="android.permission.INTERNET" />
55

android/app/src/main/java/com/staninfluencer/MainActivity.java renamed to android/app/src/main/java/com/rnapp/MainActivity.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.staninfluencer;
1+
package com.rnapp;
22

33
import android.os.Bundle;
44
import com.facebook.react.ReactActivity;
@@ -11,7 +11,7 @@ public class MainActivity extends ReactActivity {
1111
*/
1212
@Override
1313
protected String getMainComponentName() {
14-
return "staninfluencer";
14+
return "rnapp";
1515
}
1616
@Override
1717
protected void onCreate(Bundle savedInstanceState) {

android/app/src/main/java/com/staninfluencer/MainApplication.java renamed to android/app/src/main/java/com/rnapp/MainApplication.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.staninfluencer;
1+
package com.rnapp;
22

33
import android.app.Application;
44
import android.content.Context;
@@ -65,7 +65,7 @@ private static void initializeFlipper(
6565
We use reflection here to pick up the class that initializes Flipper,
6666
since Flipper library is not available in release mode
6767
*/
68-
Class<?> aClass = Class.forName("com.staninfluencer.ReactNativeFlipper");
68+
Class<?> aClass = Class.forName("com.rnapp.ReactNativeFlipper");
6969
aClass
7070
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
7171
.invoke(null, context, reactInstanceManager);
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<resources>
2-
<string name="app_name">staninfluencer</string>
2+
<string name="app_name">rnapp</string>
33
</resources>

android/settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
rootProject.name = 'staninfluencer'
1+
rootProject.name = 'rnapp'
22
include ':react-native-trusted-web-activity'
33
project(':react-native-trusted-web-activity').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-trusted-web-activity/android')
44
include ':react-native-trusted-web-activity'

app.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"name": "staninfluencer",
3-
"displayName": "stanInfluencer"
2+
"name": "rnapp",
3+
"displayName": "rnapp"
44
}

ios/staninfluencer/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<key>CFBundleDevelopmentRegion</key>
66
<string>en</string>
77
<key>CFBundleDisplayName</key>
8-
<string>staninfluencer</string>
8+
<string>rnapp</string>
99
<key>CFBundleExecutable</key>
1010
<string>$(EXECUTABLE_NAME)</string>
1111
<key>CFBundleIdentifier</key>

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "staninfluencer",
2+
"name": "rnapp",
33
"version": "0.0.1",
44
"private": true,
55
"scripts": {

src/navigation/StackNavigator.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const Routes=[
1919
const StackNavigator = () => {
2020
return (
2121
<Stack.Navigator
22-
initialRouteName="webview"
22+
initialRouteName="Home"
2323
>
2424
{
2525
Routes.map(i=>

src/screens/home/index.js

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import { useNavigation } from '@react-navigation/native';
22
import React, { useEffect, useState } from 'react';
3-
import {View, Text, StyleSheet, Image,Dimensions, ScrollView, FlatList} from 'react-native';
3+
import {View, Text, StyleSheet, TouchableOpacity, Image,Dimensions, ScrollView, FlatList} from 'react-native';
44
import { GRAY_COLOR, GREY_CITY, MIRAGE, PRIMARY_COLOR, SECONDARY_COLOR } from '../../constant/Color';
55
import {TEXT_PARA_BOLD} from '../../constant/TextStyles';
66

77

88
export default function HomeScreen() {
9+
const navigation = useNavigation();
910
return (
1011
<ScrollView style={styles.container}>
1112
<View
@@ -28,13 +29,17 @@ export default function HomeScreen() {
2829
<Text style={TEXT_PARA_BOLD}>Good Morning</Text>
2930
</View>
3031

31-
<View
32+
<TouchableOpacity
33+
onPress={()=>navigation.navigate("webview")}
3234
style={{
33-
flexDirection:"row"
35+
flexDirection:"row",
36+
backgroundColor:"#000",
37+
padding:20,
38+
borderRadius:8
3439
}}
3540
>
36-
37-
</View>
41+
<Text style={TEXT_PARA_BOLD} >launch PWA</Text>
42+
</TouchableOpacity>
3843
</View>
3944
<View>
4045
</View>

0 commit comments

Comments
 (0)