Skip to content

Commit 553bf70

Browse files
committed
Adding an interface library for Firebase Installations SDK
1 parent faf40bb commit 553bf70

File tree

4 files changed

+103
-0
lines changed

4 files changed

+103
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Copyright 2018 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
16+
plugins {
17+
id 'firebase-library'
18+
}
19+
20+
firebaseLibrary.publishJavadoc = false
21+
22+
android {
23+
compileSdkVersion project.targetSdkVersion
24+
defaultConfig {
25+
minSdkVersion project.minSdkVersion
26+
targetSdkVersion project.targetSdkVersion
27+
versionName version
28+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
29+
}
30+
compileOptions {
31+
sourceCompatibility JavaVersion.VERSION_1_8
32+
targetCompatibility JavaVersion.VERSION_1_8
33+
}
34+
testOptions {
35+
unitTests {
36+
includeAndroidResources = true
37+
}
38+
}
39+
}
40+
41+
dependencies {
42+
implementation 'com.google.android.gms:play-services-tasks:17.0.0'
43+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version=17.1.1
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright 2019 Google LLC -->
3+
<!-- -->
4+
<!-- Licensed under the Apache License, Version 2.0 (the "License"); -->
5+
<!-- you may not use this file except in compliance with the License. -->
6+
<!-- You may obtain a copy of the License at -->
7+
<!-- -->
8+
<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
9+
<!-- -->
10+
<!-- Unless required by applicable law or agreed to in writing, software -->
11+
<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
12+
<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -->
13+
<!-- See the License for the specific language governing permissions and -->
14+
<!-- limitations under the License. -->
15+
16+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
17+
package="com.google.firebase.installations.interop" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Copyright 2019 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
package com.google.firebase.installations;
16+
17+
import com.google.android.gms.tasks.Task;
18+
19+
/**
20+
* This is an interface of {@code FirebaseInstallations} that is only exposed to 2p via component
21+
* injection.
22+
*
23+
* @hide
24+
*/
25+
public interface FirebaseInstallationsApi {
26+
27+
/**
28+
* Async function that returns a globally unique identifier of this Firebase app installation.
29+
* This is a url-safe base64 string of a 128-bit integer.
30+
*/
31+
Task<String> getId();
32+
33+
/** Async function that returns a auth token(public key) of this Firebase app installation. */
34+
Task<String> getAuthToken();
35+
36+
/**
37+
* Async function that deletes this Firebase app installation from Firebase backend. This call
38+
* would possibly lead Firebase Notification, Firebase RemoteConfig, Firebase Predictions or
39+
* Firebase In-App Messaging not function properly.
40+
*/
41+
Task<Void> delete();
42+
}

0 commit comments

Comments
 (0)