Skip to content

Commit 0e191f8

Browse files
authored
Updated sample app to support push (#623)
* Updated .gitignore * Removed .idea * Updated sample app to support push * Added README
1 parent 400e319 commit 0e191f8

File tree

8 files changed

+61
-74
lines changed

8 files changed

+61
-74
lines changed

sample/.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,32 @@ misc.xml
2222
deploymentTargetDropDown.xml
2323
render.experimental.xml
2424

25+
# User-specific configurations
26+
.idea/caches/
27+
.idea/libraries/
28+
.idea/shelf/
29+
.idea/workspace.xml
30+
.idea/tasks.xml
31+
.idea/.name
32+
.idea/compiler.xml
33+
.idea/copyright/profiles_settings.xml
34+
.idea/encodings.xml
35+
.idea/misc.xml
36+
.idea/modules.xml
37+
.idea/scopes/scope_settings.xml
38+
.idea/dictionaries
39+
.idea/vcs.xml
40+
.idea/jsLibraryMappings.xml
41+
.idea/datasources.xml
42+
.idea/dataSources.ids
43+
.idea/sqlDataSources.xml
44+
.idea/dynamic.xml
45+
.idea/uiDesigner.xml
46+
.idea/assetWizardSettings.xml
47+
.idea/gradle.xml
48+
.idea/jarRepositories.xml
49+
.idea/navEditor.xml
50+
2551
# Keystore files
2652
*.jks
2753
*.keystore

sample/.idea/.name

Lines changed: 0 additions & 1 deletion
This file was deleted.

sample/.idea/gradle.xml

Lines changed: 0 additions & 20 deletions
This file was deleted.

sample/.idea/misc.xml

Lines changed: 0 additions & 21 deletions
This file was deleted.

sample/.idea/vcs.xml

Lines changed: 0 additions & 13 deletions
This file was deleted.

sample/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
### Intercom sample app for Android
2+
3+
## Setup
4+
Follow the steps below to set up and run the sample app:
5+
1. Open the project in Android Studio
6+
2. Replace the `appId` and `apiKey` in `MainApplication.java` with your Intercom app ID and API Key
7+
3. Run the app
8+
9+
## Setup with push notifications
10+
1. Make sure you've setup a Firebase project with Intercom, see instructions [here](https://developers.intercom.com/installing-intercom/android/fcm-push-notifications/)
11+
2. Download the `google-services.json` file from Firebase and place it in the `app` folder
12+
3. Run the app
13+
4. Enable push permission from device's app settings
14+
5. Login with a user

sample/app/build.gradle

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,29 +47,25 @@ android {
4747
}
4848

4949
dependencies {
50-
implementation 'androidx.core:core-ktx:1.9.0'
51-
52-
def composeBom = platform('androidx.compose:compose-bom:2023.08.00')
50+
// Compose
51+
def composeBom = platform("androidx.compose:compose-bom:2023.10.01")
5352
implementation composeBom
54-
androidTestImplementation composeBom
55-
56-
implementation 'androidx.compose.material:material'
57-
implementation 'androidx.compose.ui:ui-tooling-preview'
58-
debugImplementation 'androidx.compose.ui:ui-tooling'
53+
implementation "androidx.compose.ui:ui"
54+
implementation "androidx.compose.material:material"
55+
implementation "androidx.compose.ui:ui-tooling-preview"
56+
debugImplementation "androidx.compose.ui:ui-tooling"
5957

58+
implementation 'androidx.core:core-ktx:1.12.0'
59+
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2'
6060
implementation 'androidx.activity:activity-compose:1.7.2'
61-
implementation("androidx.navigation:navigation-compose:2.7.1")
62-
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
61+
implementation("androidx.navigation:navigation-compose:2.7.6")
6362

6463
implementation "com.google.accompanist:accompanist-flowlayout:0.27.0"
6564

6665
implementation("androidx.datastore:datastore-preferences:1.0.0")
6766

6867
implementation("io.intercom.android:intercom-sdk:15.6.0")
69-
implementation("com.google.firebase:firebase-messaging:23.2.0")
70-
71-
testImplementation 'junit:junit:4.13.2'
72-
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
73-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
74-
androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
68+
implementation("com.google.firebase:firebase-messaging:23.1.0")
7569
}
70+
71+
apply plugin: 'com.google.gms.google-services'

sample/build.gradle

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
1+
buildscript {
2+
ext {
3+
composeMaterial = '1.3.1'
4+
}
5+
dependencies {
6+
classpath 'com.android.tools.build:gradle:8.1.1'
7+
classpath 'com.google.gms:google-services:4.3.15'
8+
}
9+
}
210
plugins {
3-
id 'com.android.application' version '8.1.1' apply false
4-
id 'com.android.library' version '8.1.1' apply false
511
id 'org.jetbrains.kotlin.android' version '1.8.22' apply false
612
}
713

0 commit comments

Comments
 (0)