-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* upgrade expo to 50. * expo install --fix * expo prebuild to re-generate android & ios projects. * bump minSdkVersion to 26 & disable Jetifier. * update iOS simulator to iPhone 14. * upgrade RN SDK to beta.17 * fix typescript issue. * revert iOS simulator changes.
- Loading branch information
1 parent
57520ff
commit 10d1d3d
Showing
24 changed files
with
2,069 additions
and
1,545 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 0 additions & 75 deletions
75
.../android/app/src/debug/java/com/example/stripeterminalreactnative/ReactNativeFlipper.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 0 additions & 65 deletions
65
...ple-app/android/app/src/main/java/com/example/stripeterminalreactnative/MainActivity.java
This file was deleted.
Oops, something went wrong.
61 changes: 61 additions & 0 deletions
61
example-app/android/app/src/main/java/com/example/stripeterminalreactnative/MainActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package com.example.stripeterminalreactnative | ||
|
||
import android.os.Build | ||
import android.os.Bundle | ||
|
||
import com.facebook.react.ReactActivity | ||
import com.facebook.react.ReactActivityDelegate | ||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled | ||
import com.facebook.react.defaults.DefaultReactActivityDelegate | ||
|
||
import expo.modules.ReactActivityDelegateWrapper | ||
|
||
class MainActivity : ReactActivity() { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
// Set the theme to AppTheme BEFORE onCreate to support | ||
// coloring the background, status bar, and navigation bar. | ||
// This is required for expo-splash-screen. | ||
setTheme(R.style.AppTheme); | ||
super.onCreate(null) | ||
} | ||
|
||
/** | ||
* Returns the name of the main component registered from JavaScript. This is used to schedule | ||
* rendering of the component. | ||
*/ | ||
override fun getMainComponentName(): String = "main" | ||
|
||
/** | ||
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] | ||
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled] | ||
*/ | ||
override fun createReactActivityDelegate(): ReactActivityDelegate { | ||
return ReactActivityDelegateWrapper( | ||
this, | ||
BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, | ||
object : DefaultReactActivityDelegate( | ||
this, | ||
mainComponentName, | ||
fabricEnabled | ||
){}) | ||
} | ||
|
||
/** | ||
* Align the back button behavior with Android S | ||
* where moving root activities to background instead of finishing activities. | ||
* @see <a href="https://developer.android.com/reference/android/app/Activity#onBackPressed()">onBackPressed</a> | ||
*/ | ||
override fun invokeDefaultOnBackPressed() { | ||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.R) { | ||
if (!moveTaskToBack(false)) { | ||
// For non-root activities, use the default implementation to finish them. | ||
super.invokeDefaultOnBackPressed() | ||
} | ||
return | ||
} | ||
|
||
// Use the default back button implementation on Android S | ||
// because it's doing more than [Activity.moveTaskToBack] in fact. | ||
super.invokeDefaultOnBackPressed() | ||
} | ||
} |
80 changes: 0 additions & 80 deletions
80
...-app/android/app/src/main/java/com/example/stripeterminalreactnative/MainApplication.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.