Skip to content

Commit 949347b

Browse files
committed
Android Tickets Demo App initial commit
1 parent 5291067 commit 949347b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1167
-4
lines changed

README.md

+17-4
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,33 @@ This is an example integration of the Ticketmaster Ignite SDK, Tickets framework
88
* iOS Source (Tickets SDK): https://github.com/ticketmaster/iOS-TicketsDemoApp
99

1010
## Demo App Screenshots
11-
11+
![](/Users/l.burgos/Desktop/Workspace/Android/Android-TicketsDemoApp/screenshots/sample_integration_app_1.jpg)
12+
![](/Users/l.burgos/Desktop/Workspace/Android/Android-TicketsDemoApp/screenshots/sample_integration_app_2.jpg)
13+
![](/Users/l.burgos/Desktop/Workspace/Android/Android-TicketsDemoApp/screenshots/sample_integration_app_4.jpg)
1214

1315

1416
## Getting Started
15-
16-
17+
1. Open Android-TicketsDemoApp in Android Studio
18+
1. This will also download all the required libraries
19+
2. Update local.properties with your own API key, Team Name and colors, available from https://developer.ticketmaster.com/explore/
20+
`config.consumer_key="consumer_key"`
21+
`config.team_name="team_name"`
22+
`config.branding_color="#color"`
23+
3. Build and Run
1724

1825
# Example Code
1926

2027
## Configuration
21-
28+
Update your API key, team name and branding colors in local.properties
29+
Authentication SDK is configured using the settings in local.properties.
30+
Tickets SDK inherits it's configuration from Authentication SDK
2231

2332
## Presentation
33+
There is one way to present the Tickets SDK:
34+
35+
Generate the EventsFragment from TicketsSDKClient and add it to your view.
2436

37+
Basic example in TicketsSDKHostActivity.kt
2538

2639
## Authentication
2740

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
apply plugin: 'com.android.application'
2+
apply plugin: 'kotlin-android'
3+
apply plugin: 'kotlin-kapt'
4+
5+
6+
android {
7+
compileSdkVersion 33
8+
defaultConfig {
9+
applicationId "com.ticketmaster.sampleintegration.demo"
10+
minSdk 26
11+
targetSdk 33
12+
versionCode 1
13+
versionName "1.0"
14+
15+
Properties properties = new Properties()
16+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
17+
18+
// Tickets SDK Setup
19+
def consumerKey = properties.getProperty('config.consumer_key')
20+
def teamName = properties.getProperty('config.team_name')
21+
def brandingColor = properties.getProperty('config.branding_color')
22+
buildConfigField("String", "CONSUMER_KEY", "$consumerKey")
23+
buildConfigField("String", "TEAM_NAME", "$teamName")
24+
buildConfigField("String", "BRANDING_COLOR", "$brandingColor")
25+
}
26+
27+
buildTypes {
28+
release {
29+
minifyEnabled false
30+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
31+
}
32+
}
33+
compileOptions {
34+
sourceCompatibility JavaVersion.VERSION_1_8
35+
targetCompatibility JavaVersion.VERSION_1_8
36+
}
37+
kotlinOptions {
38+
jvmTarget = '1.8'
39+
}
40+
}
41+
42+
//Resolution strategy that force the use of the corresponding libraries that causes duplicity
43+
configurations.all {
44+
resolutionStrategy.force 'androidx.legacy:legacy-support-v4:1.0.0'
45+
resolutionStrategy.force 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.10'
46+
}
47+
48+
dependencies {
49+
implementation 'androidx.core:core-ktx:1.10.1'
50+
implementation 'androidx.appcompat:appcompat:1.6.1'
51+
implementation 'com.google.android.material:material:1.9.0'
52+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
53+
//Dependencies libraries needed for tickets and authentication sdks.
54+
implementation 'androidx.compose.material:material:1.4.3'
55+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
56+
//Tickets SDK
57+
implementation 'com.ticketmaster.tickets:secure-entry:1.2.7'
58+
implementation 'com.ticketmaster.tickets:tickets:3.0.0'
59+
//Accounts SDK
60+
implementation 'com.ticketmaster.accounts:authentication:3.0.1'
61+
}

app/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile

app/src/main/AndroidManifest.xml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
package="com.ticketmaster.sampleintegration.demo">
5+
6+
<application
7+
android:allowBackup="true"
8+
android:icon="@mipmap/ic_launcher"
9+
android:label="@string/app_name"
10+
android:roundIcon="@mipmap/ic_launcher_round"
11+
android:theme="@style/AppTheme"
12+
tools:replace="android:theme">
13+
14+
<activity android:name=".TicketsSdkHostActivity"
15+
android:screenOrientation="portrait"
16+
android:exported="true"
17+
android:theme="@style/AppTheme"
18+
tools:ignore="LockedOrientationActivity">
19+
<intent-filter>
20+
<category android:name="android.intent.category.LAUNCHER" />
21+
<action android:name="android.intent.action.VIEW" />
22+
<action android:name="android.intent.action.MAIN" />
23+
</intent-filter>
24+
</activity>
25+
26+
<!-- Activity that will be launched when requesting LoginIntent-->
27+
<activity
28+
android:name="com.ticketmaster.authenticationsdk.internal.modernaccounts.presentation.ModernAccountsLoginScreen"
29+
android:screenOrientation="portrait"
30+
android:exported="true"
31+
android:launchMode="singleInstance">
32+
<intent-filter>
33+
<action android:name="android.intent.action.VIEW" />
34+
<category android:name="android.intent.category.DEFAULT" />
35+
<category android:name="android.intent.category.BROWSABLE" />
36+
<data android:scheme="@string/app_tm_modern_accounts_scheme" />
37+
<data android:scheme="psdkprodscheme" />
38+
<data android:scheme="psdkqascheme" />
39+
<data android:scheme="psdkpreprodscheme" />
40+
<data android:scheme="psdktm" />
41+
<data android:scheme="psdkschemecommon" />
42+
<data android:scheme="psdkqaschemecommon" />
43+
<data android:scheme="psdkpreprodschemecommon" />
44+
</intent-filter>
45+
</activity>
46+
</application>
47+
48+
</manifest>

app/src/main/ic_launcher-web.png

13.4 KB
Loading

0 commit comments

Comments
 (0)