Skip to content

Commit

Permalink
Merge pull request #54 from frontegg/multi-app-support-refactoring
Browse files Browse the repository at this point in the history
Refactored: Renamed FRONTEGG_APPLOCATION_ID with FRONTEGG_APPLICATION_ID
  • Loading branch information
alex-minaiev-frontegg authored Jul 24, 2024
2 parents b520429 + f87e54c commit 694565f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,20 +290,20 @@ This guide outlines the steps to configure your Android application to support m

### Step 1: Modify the Build.gradle file

Add `FRONTEGG_APPLOCATION_ID` buildConfigField into the `build.gradle` file:
Add `FRONTEGG_APPLICATION_ID` buildConfigField into the `build.gradle` file:

```groovy
def fronteggApplicationId = "your-application-id-uuid"
...
android {
...
buildConfigField "String", 'FRONTEGG_APPLOCATION_ID', "\"$fronteggApplicationId\""
buildConfigField "String", 'FRONTEGG_APPLICATION_ID', "\"$fronteggApplicationId\""
}
```

### Step 2: Modify the App File

Add `BuildConfig`.`FRONTEGG_APPLOCATION_ID` to `FronteggApp`.`init`.
Add `BuildConfig`.`FRONTEGG_APPLICATION_ID` to `FronteggApp`.`init`.

Example App.kt code:

Expand All @@ -321,7 +321,7 @@ class App : Application() {
BuildConfig.FRONTEGG_DOMAIN,
BuildConfig.FRONTEGG_CLIENT_ID,
this,
BuildConfig.FRONTEGG_APPLOCATION_ID, // here
BuildConfig.FRONTEGG_APPLICATION_ID, // here
)
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ android {

buildConfigField "String", 'FRONTEGG_DOMAIN', "\"$fronteggDomain\""
buildConfigField "String", 'FRONTEGG_CLIENT_ID', "\"$fronteggClientId\""
buildConfigField "String", 'FRONTEGG_APPLOCATION_ID', "\"$fronteggApplicationId\""
buildConfigField "String", 'FRONTEGG_APPLICATION_ID', "\"$fronteggApplicationId\""
}

buildTypes {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/frontegg/demo/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class App : Application() {
BuildConfig.FRONTEGG_DOMAIN,
BuildConfig.FRONTEGG_CLIENT_ID,
this,
BuildConfig.FRONTEGG_APPLOCATION_ID,
BuildConfig.FRONTEGG_APPLICATION_ID,
)
}
}

0 comments on commit 694565f

Please sign in to comment.