Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
anawork-mobile-v2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dungtnguyen
anawork-mobile-v2
Commits
6bcd669d
Commit
6bcd669d
authored
Mar 24, 2025
by
Lê Hoàng Dương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] android
parent
484cdb64
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
7 deletions
+70
-7
build.gradle
android/app/build.gradle
+6
-6
app-release.aab
android/app/release/app-release.aab
+0
-0
AndroidManifest.xml
android/app/src/main/AndroidManifest.xml
+1
-1
MainActivity.kt
android/app/src/main/java/com/anawork/MainActivity.kt
+22
-0
MainApplication.kt
android/app/src/main/java/com/anawork/MainApplication.kt
+41
-0
No files found.
android/app/build.gradle
View file @
6bcd669d
...
...
@@ -74,16 +74,16 @@ def jscFlavor = 'org.webkit:android-jsc:+'
android
{
ndkVersion
rootProject
.
ext
.
ndkVersion
buildToolsVersion
rootProject
.
ext
.
buildToolsVersion
compileSdk
rootProject
.
ext
.
compileSdkVersion
buildToolsVersion
buildToolsVersion
compileSdk
34
namespace
"com.anawork_mobile"
defaultConfig
{
applicationId
"com.anawork
_mobile
"
applicationId
"com.anawork"
minSdkVersion
rootProject
.
ext
.
minSdkVersion
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
versionCode
1
versionName
"1.0"
versionCode
1
2
versionName
"1.0
.6
"
}
signingConfigs
{
debug
{
...
...
@@ -118,7 +118,7 @@ android {
dependencies
{
// The version of react-native is set by the React Native Gradle Plugin
implementation
(
"com.facebook.react:react-android"
)
implementation
'com.facebook.soloader:soloader:0.10.4'
//Fix Bad version of the SoLoader SDK
if
(
hermesEnabled
.
toBoolean
())
{
implementation
(
"com.facebook.react:hermes-android"
)
}
else
{
...
...
android/app/release/app-release.aab
0 → 100644
View file @
6bcd669d
File added
android/app/src/main/AndroidManifest.xml
View file @
6bcd669d
...
...
@@ -4,7 +4,7 @@
<uses-permission
android:name=
"android.permission.ACCESS_COARSE_LOCATION"
/>
<!-- Include only if your app benefits from precise location access. -->
<uses-permission
android:name=
"android.permission.ACCESS_FINE_LOCATION"
/>
<
uses-permission
android:name=
"android.permission.ACCESS_BACKGROUND_LOCATION"
/
>
<
!-- <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> --
>
<application
android:name=
".MainApplication"
android:label=
"@string/app_name"
...
...
android/app/src/main/java/com/anawork/MainActivity.kt
0 → 100644
View file @
6bcd669d
package
com.anawork_mobile
import
com.facebook.react.ReactActivity
import
com.facebook.react.ReactActivityDelegate
import
com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
import
com.facebook.react.defaults.DefaultReactActivityDelegate
class
MainActivity
:
ReactActivity
()
{
/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
override
fun
getMainComponentName
():
String
=
"anawork_mobile"
/**
* 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
=
DefaultReactActivityDelegate
(
this
,
mainComponentName
,
fabricEnabled
)
}
android/app/src/main/java/com/anawork/MainApplication.kt
0 → 100644
View file @
6bcd669d
package
com.anawork_mobile
import
android.app.Application
import
com.facebook.react.PackageList
import
com.facebook.react.ReactApplication
import
com.facebook.react.ReactHost
import
com.facebook.react.ReactNativeHost
import
com.facebook.react.ReactPackage
import
com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import
com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import
com.facebook.react.defaults.DefaultReactNativeHost
import
com.facebook.soloader.SoLoader
class
MainApplication
:
Application
(),
ReactApplication
{
override
val
reactNativeHost
:
ReactNativeHost
=
object
:
DefaultReactNativeHost
(
this
)
{
override
fun
getPackages
():
List
<
ReactPackage
>
=
PackageList
(
this
).
packages
.
apply
{
// Packages that cannot be autolinked yet can be added manually here, for example:
// add(MyReactNativePackage())
}
override
fun
getJSMainModuleName
():
String
=
"index"
override
fun
getUseDeveloperSupport
():
Boolean
=
BuildConfig
.
DEBUG
override
val
isNewArchEnabled
:
Boolean
=
BuildConfig
.
IS_NEW_ARCHITECTURE_ENABLED
override
val
isHermesEnabled
:
Boolean
=
BuildConfig
.
IS_HERMES_ENABLED
}
override
val
reactHost
:
ReactHost
get
()
=
getDefaultReactHost
(
applicationContext
,
reactNativeHost
)
override
fun
onCreate
()
{
super
.
onCreate
()
SoLoader
.
init
(
this
,
false
)
if
(
BuildConfig
.
IS_NEW_ARCHITECTURE_ENABLED
)
{
// If you opted-in for the New Architecture, we load the native entry point for this app.
load
()
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment