forked from microg/GmsCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement API for AppInvite and Firebase Dynamic Links
- Loading branch information
1 parent
ed68a94
commit 94de371
Showing
18 changed files
with
411 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright 2019 e Foundation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
apply plugin: 'com.android.library' | ||
|
||
String getMyVersionName() { | ||
def stdout = new ByteArrayOutputStream() | ||
if (rootProject.file("gradlew").exists()) | ||
exec { commandLine 'git', 'describe', '--tags', '--always', '--dirty'; standardOutput = stdout } | ||
else // automatic build system, don't tag dirty | ||
exec { commandLine 'git', 'describe', '--tags', '--always'; standardOutput = stdout } | ||
return stdout.toString().trim().substring(1) | ||
} | ||
|
||
group = 'org.microg' | ||
version = getMyVersionName() | ||
|
||
android { | ||
compileSdkVersion androidCompileSdk() | ||
buildToolsVersion "$androidBuildVersionTools" | ||
|
||
defaultConfig { | ||
versionName getMyVersionName() | ||
minSdkVersion androidMinSdk() | ||
targetSdkVersion androidTargetSdk() | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
} | ||
|
||
dependencies { | ||
api project(':play-services-basement') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# | ||
# Copyright 2019 e Foundation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
POM_NAME=Firebase Dynamic Links API | ||
POM_DESCRIPTION=Interfaces and objects for IPC between Firebase Library and microG | ||
|
||
POM_PACKAGING=aar | ||
|
||
POM_URL=https://github.com/microg/android_external_GmsApi | ||
|
||
POM_SCM_URL=https://github.com/microg/android_external_GmsApi | ||
POM_SCM_CONNECTION=scm:[email protected]:microg/android_external_GmsApi.git | ||
POM_SCM_DEV_CONNECTION=scm:[email protected]:microg/android_external_GmsApi.git | ||
|
||
POM_LICENCE_NAME=The Apache Software License, Version 2.0 | ||
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt | ||
POM_LICENCE_DIST=repo | ||
|
||
POM_DEVELOPER_ID=alexandruchircu | ||
POM_DEVELOPER_NAME=Alexandru Chircu | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
~ Copyright (C) 2019 e Foundation | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<manifest package="org.microg.gms.firebase.dynamiclinks.api"/> |
3 changes: 3 additions & 0 deletions
3
...ic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/DynamicLinkData.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package com.google.firebase.dynamiclinks.internal; | ||
|
||
parcelable DynamicLinkData; |
12 changes: 12 additions & 0 deletions
12
...s-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/IDynamicLinksCallbacks.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.google.firebase.dynamiclinks.internal; | ||
|
||
|
||
import com.google.firebase.dynamiclinks.internal.DynamicLinkData; | ||
import com.google.firebase.dynamiclinks.internal.ShortDynamicLink; | ||
|
||
import com.google.android.gms.common.api.Status; | ||
|
||
interface IDynamicLinksCallbacks { | ||
void onStatusDynamicLinkData(in Status status, in DynamicLinkData dldata) = 0; | ||
void onStatusShortDynamicLink(in Status status, in ShortDynamicLink sdlink) = 1; | ||
} |
12 changes: 12 additions & 0 deletions
12
...nks-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/IDynamicLinksService.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.google.firebase.dynamiclinks.internal; | ||
|
||
|
||
import com.google.firebase.dynamiclinks.internal.IDynamicLinksCallbacks; | ||
|
||
import android.os.Bundle; | ||
|
||
|
||
interface IDynamicLinksService { | ||
void getInitialLink(IDynamicLinksCallbacks callback, String var2) = 0; | ||
void func2(IDynamicLinksCallbacks callback, in Bundle var2) = 1; | ||
} |
3 changes: 3 additions & 0 deletions
3
...c-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/ShortDynamicLink.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package com.google.firebase.dynamiclinks.internal; | ||
|
||
parcelable ShortDynamicLink; |
3 changes: 3 additions & 0 deletions
3
...se-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/Warning.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package com.google.firebase.dynamiclinks.internal; | ||
|
||
parcelable Warning; |
57 changes: 57 additions & 0 deletions
57
...ic-links-api/src/main/java/com/google/firebase/dynamiclinks/internal/DynamicLinkData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* Copyright (C) 2019 e Foundation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.firebase.dynamiclinks.internal; | ||
|
||
|
||
import org.microg.safeparcel.AutoSafeParcelable; | ||
import org.microg.safeparcel.SafeParceled; | ||
|
||
import android.os.Bundle; | ||
import android.net.Uri; | ||
|
||
|
||
public class DynamicLinkData extends AutoSafeParcelable { | ||
@SafeParceled(1) | ||
public final String dynamicLink; | ||
|
||
@SafeParceled(2) | ||
public final String deepLink; | ||
|
||
@SafeParceled(3) | ||
public final int minVersion; | ||
|
||
@SafeParceled(4) | ||
public final long clickTimestamp; | ||
|
||
@SafeParceled(5) | ||
public final Bundle extensionBundle; | ||
|
||
@SafeParceled(6) | ||
public final Uri redirectUrl; | ||
|
||
public DynamicLinkData() { | ||
dynamicLink = new String(); | ||
deepLink = new String(); | ||
minVersion = 0; | ||
clickTimestamp = 0; | ||
extensionBundle = new Bundle(); | ||
redirectUrl = Uri.EMPTY; | ||
} | ||
|
||
|
||
public static final Creator<DynamicLinkData> CREATOR = new AutoCreator<DynamicLinkData>(DynamicLinkData.class); | ||
} |
50 changes: 50 additions & 0 deletions
50
...c-links-api/src/main/java/com/google/firebase/dynamiclinks/internal/ShortDynamicLink.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright (C) 2019 e Foundation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.firebase.dynamiclinks.internal; | ||
|
||
|
||
import com.google.firebase.dynamiclinks.internal.Warning; | ||
|
||
import org.microg.safeparcel.AutoSafeParcelable; | ||
import org.microg.safeparcel.SafeParceled; | ||
|
||
import android.net.Uri; | ||
import java.util.List; | ||
import java.util.ArrayList; | ||
|
||
|
||
public class ShortDynamicLink extends AutoSafeParcelable { | ||
@SafeParceled(1) | ||
public final Uri shortLink; | ||
|
||
@SafeParceled(2) | ||
public final Uri previewLink; | ||
|
||
@SafeParceled(3) | ||
public final List<Warning> warnings; | ||
|
||
|
||
public ShortDynamicLink() { | ||
shortLink = Uri.EMPTY; | ||
previewLink = Uri.EMPTY; | ||
|
||
warnings = new ArrayList<>(); | ||
} | ||
|
||
|
||
public static final Creator<ShortDynamicLink> CREATOR = new AutoCreator<ShortDynamicLink>(ShortDynamicLink.class); | ||
} |
38 changes: 38 additions & 0 deletions
38
...se-dynamic-links-api/src/main/java/com/google/firebase/dynamiclinks/internal/Warning.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright (C) 2019 e Foundation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.firebase.dynamiclinks.internal; | ||
|
||
|
||
import org.microg.safeparcel.AutoSafeParcelable; | ||
import org.microg.safeparcel.SafeParceled; | ||
|
||
|
||
public class Warning extends AutoSafeParcelable { | ||
@SafeParceled(1) | ||
private int versionCode = 1; | ||
|
||
@SafeParceled(2) | ||
public final String message; | ||
|
||
|
||
public Warning() { | ||
message = null; | ||
} | ||
|
||
|
||
public static final Creator<Warning> CREATOR = new AutoCreator<Warning>(Warning.class); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright 2019 e Foundation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
apply plugin: 'com.android.library' | ||
|
||
String getMyVersionName() { | ||
def stdout = new ByteArrayOutputStream() | ||
if (rootProject.file("gradlew").exists()) | ||
exec { commandLine 'git', 'describe', '--tags', '--always', '--dirty'; standardOutput = stdout } | ||
else // automatic build system, don't tag dirty | ||
exec { commandLine 'git', 'describe', '--tags', '--always'; standardOutput = stdout } | ||
return stdout.toString().trim().substring(1) | ||
} | ||
|
||
group = 'org.microg' | ||
version = getMyVersionName() | ||
|
||
android { | ||
compileSdkVersion androidCompileSdk() | ||
buildToolsVersion "$androidBuildVersionTools" | ||
|
||
defaultConfig { | ||
versionName getMyVersionName() | ||
minSdkVersion androidMinSdk() | ||
targetSdkVersion androidTargetSdk() | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
} | ||
|
||
dependencies { | ||
api project(':play-services-basement') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# | ||
# Copyright 2019 e Foundation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
POM_NAME=Play Services Internal AppInvite API | ||
POM_DESCRIPTION=Interfaces and objects for IPC between Play Services Library and Play Services Core | ||
|
||
POM_PACKAGING=aar | ||
|
||
POM_URL=https://github.com/microg/android_external_GmsApi | ||
|
||
POM_SCM_URL=https://github.com/microg/android_external_GmsApi | ||
POM_SCM_CONNECTION=scm:[email protected]:microg/android_external_GmsApi.git | ||
POM_SCM_DEV_CONNECTION=scm:[email protected]:microg/android_external_GmsApi.git | ||
|
||
POM_LICENCE_NAME=The Apache Software License, Version 2.0 | ||
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt | ||
POM_LICENCE_DIST=repo | ||
|
||
POM_DEVELOPER_ID=alexandruchircu | ||
POM_DEVELOPER_NAME=Alexandru Chircu | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
~ Copyright (C) 2019 e Foundation | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<manifest package="org.microg.gms.appinvite.api"/> |
Oops, something went wrong.