expo-splash-screen 0.25.0 → 0.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/splashscreen/NativeResourcesBasedSplashScreenViewProvider.kt +3 -5
- package/android/src/main/java/expo/modules/splashscreen/SplashScreenModule.kt +18 -17
- package/android/src/main/java/expo/modules/splashscreen/SplashScreenReactActivityLifecycleListener.kt +3 -4
- package/android/src/main/java/expo/modules/splashscreen/SplashScreenView.kt +2 -3
- package/android/src/main/java/expo/modules/splashscreen/singletons/SplashScreen.kt +0 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 0.26.1 — 2023-12-19
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 0.26.0 — 2023-12-12
|
|
18
|
+
|
|
19
|
+
### 💡 Others
|
|
20
|
+
|
|
21
|
+
- Removed 'The current activity is no longer available' warning on Android. ([#25608](https://github.com/expo/expo/pull/25608) by [@gabrieldonadel](https://github.com/gabrieldonadel))
|
|
22
|
+
|
|
13
23
|
## 0.25.0 — 2023-11-14
|
|
14
24
|
|
|
15
25
|
### 🛠 Breaking changes
|
package/android/build.gradle
CHANGED
|
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '0.
|
|
6
|
+
version = '0.26.1'
|
|
7
7
|
|
|
8
8
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
9
9
|
if (expoModulesCorePlugin.exists()) {
|
|
@@ -94,7 +94,7 @@ android {
|
|
|
94
94
|
namespace "expo.modules.splashscreen"
|
|
95
95
|
defaultConfig {
|
|
96
96
|
versionCode 17
|
|
97
|
-
versionName '0.
|
|
97
|
+
versionName '0.26.1'
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
+
@file:Suppress("UnusedImport") // this needs to stay for versioning to work
|
|
2
|
+
|
|
1
3
|
package expo.modules.splashscreen
|
|
2
4
|
|
|
3
5
|
import android.content.Context
|
|
4
6
|
import androidx.core.content.ContextCompat
|
|
5
7
|
|
|
6
8
|
// this needs to stay for versioning to work
|
|
7
|
-
|
|
8
|
-
import expo.modules.splashscreen.SplashScreenImageResizeMode
|
|
9
|
-
import expo.modules.splashscreen.SplashScreenViewProvider
|
|
10
|
-
// EXPO_VERSIONING_NEEDS_EXPOVIEW_R
|
|
11
|
-
/* ktlint-enable no-unused-imports */
|
|
9
|
+
// EXPO_VERSIONING_NEEDS_PACKAGE_R
|
|
12
10
|
|
|
13
11
|
/**
|
|
14
12
|
* Default implementation that uses native resources.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
package expo.modules.splashscreen
|
|
2
2
|
|
|
3
3
|
import expo.modules.kotlin.Promise
|
|
4
|
-
import expo.modules.kotlin.exception.Exceptions
|
|
5
4
|
import expo.modules.kotlin.modules.Module
|
|
6
5
|
import expo.modules.kotlin.modules.ModuleDefinition
|
|
7
6
|
import expo.modules.splashscreen.exceptions.HideAsyncException
|
|
@@ -18,25 +17,27 @@ class SplashScreenModule : Module() {
|
|
|
18
17
|
Name("ExpoSplashScreen")
|
|
19
18
|
|
|
20
19
|
AsyncFunction("preventAutoHideAsync") { promise: Promise ->
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
appContext.currentActivity?.let {
|
|
21
|
+
SplashScreen.preventAutoHide(
|
|
22
|
+
it,
|
|
23
|
+
{ hasEffect -> promise.resolve(hasEffect) },
|
|
24
|
+
{ m -> promise.reject(PreventAutoHideException(m)) }
|
|
25
|
+
)
|
|
26
|
+
} ?: run {
|
|
27
|
+
promise.resolve(false)
|
|
28
|
+
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
AsyncFunction("hideAsync") { promise: Promise ->
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
appContext.currentActivity?.let {
|
|
33
|
+
SplashScreen.hide(
|
|
34
|
+
it,
|
|
35
|
+
{ hasEffect -> promise.resolve(hasEffect) },
|
|
36
|
+
{ m -> promise.reject(HideAsyncException(m)) }
|
|
37
|
+
)
|
|
38
|
+
} ?: run {
|
|
39
|
+
promise.resolve(false)
|
|
40
|
+
}
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@file:Suppress("UnusedImport")
|
|
2
|
+
|
|
1
3
|
package expo.modules.splashscreen
|
|
2
4
|
|
|
3
5
|
import android.app.Activity
|
|
@@ -7,10 +9,7 @@ import expo.modules.core.interfaces.ReactActivityLifecycleListener
|
|
|
7
9
|
import expo.modules.splashscreen.singletons.SplashScreen
|
|
8
10
|
|
|
9
11
|
// this needs to stay for versioning to work
|
|
10
|
-
|
|
11
|
-
import expo.modules.splashscreen.SplashScreenImageResizeMode
|
|
12
|
-
// EXPO_VERSIONING_NEEDS_EXPOVIEW_R
|
|
13
|
-
/* ktlint-enable no-unused-imports */
|
|
12
|
+
// EXPO_VERSIONING_NEEDS_PACKAGE_R
|
|
14
13
|
|
|
15
14
|
class SplashScreenReactActivityLifecycleListener(activityContext: Context) : ReactActivityLifecycleListener {
|
|
16
15
|
override fun onContentChanged(activity: Activity) {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@file:Suppress("UnusedImport") // this needs to stay for versioning to work
|
|
2
|
+
|
|
1
3
|
package expo.modules.splashscreen
|
|
2
4
|
|
|
3
5
|
import android.annotation.SuppressLint
|
|
@@ -7,9 +9,6 @@ import android.widget.ImageView
|
|
|
7
9
|
import android.widget.RelativeLayout
|
|
8
10
|
|
|
9
11
|
// this needs to stay for versioning to work
|
|
10
|
-
/* ktlint-disable no-unused-imports */
|
|
11
|
-
import expo.modules.splashscreen.SplashScreenImageResizeMode
|
|
12
|
-
/* ktlint-enable no-unused-imports */
|
|
13
12
|
|
|
14
13
|
@SuppressLint("ViewConstructor")
|
|
15
14
|
class SplashScreenView(
|
|
@@ -39,7 +39,6 @@ object SplashScreen : SingletonModule {
|
|
|
39
39
|
successCallback: () -> Unit = {},
|
|
40
40
|
failureCallback: (reason: String) -> Unit = { Log.w(TAG, it) }
|
|
41
41
|
) {
|
|
42
|
-
|
|
43
42
|
SplashScreenStatusBar.configureTranslucent(activity, statusBarTranslucent)
|
|
44
43
|
|
|
45
44
|
val splashView = splashScreenViewProvider.createSplashScreenView(activity)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-splash-screen",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.1",
|
|
4
4
|
"description": "Provides a module to allow keeping the native Splash Screen visible until you choose to hide it.",
|
|
5
5
|
"main": "build",
|
|
6
6
|
"types": "build",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"license": "MIT",
|
|
35
35
|
"homepage": "https://docs.expo.dev/versions/latest/sdk/splash-screen/",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@expo/prebuild-config": "6.
|
|
37
|
+
"@expo/prebuild-config": "6.7.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"expo-module-scripts": "^3.0.0"
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"expo": "*"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "43f1b4f8a5a9bca649e4e7ca6e4155482a162431"
|
|
46
46
|
}
|