From ef17aff0873f220d1b92b2cba7144f05db725ebd Mon Sep 17 00:00:00 2001 From: Alexandru Chircu Date: Thu, 26 Dec 2019 16:18:41 +0200 Subject: [PATCH 1/4] Dirty commit for appinvite; files need some cleanup --- play-services-appinvite-api | 1 + play-services-appinvite/build.gradle | 51 ++++++++ play-services-appinvite/gradle.properties | 34 +++++ .../src/main/AndroidManifest.xml | 18 +++ .../android/gms/appinvite/AppInvite.java | 41 ++++++ .../android/gms/appinvite/AppInviteApi.java | 36 ++++++ .../gms/appinvite/AppInviteInvitation.java | 117 ++++++++++++++++++ .../appinvite/AppInviteInvitationResult.java | 32 +++++ .../gms/appinvite/AppInviteReferral.java | 58 +++++++++ .../gms/appinvite/AppInviteApiBuilder.java | 40 ++++++ .../gms/appinvite/AppInviteApiImpl.java | 44 +++++++ .../gms/appinvite/AppInviteClientImpl.java | 35 ++++++ settings.gradle | 2 + 13 files changed, 509 insertions(+) create mode 120000 play-services-appinvite-api create mode 100644 play-services-appinvite/build.gradle create mode 100644 play-services-appinvite/gradle.properties create mode 100644 play-services-appinvite/src/main/AndroidManifest.xml create mode 100644 play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInvite.java create mode 100644 play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteApi.java create mode 100644 play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteInvitation.java create mode 100644 play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteInvitationResult.java create mode 100644 play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteReferral.java create mode 100644 play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteApiBuilder.java create mode 100644 play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteApiImpl.java create mode 100644 play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteClientImpl.java diff --git a/play-services-appinvite-api b/play-services-appinvite-api new file mode 120000 index 0000000..bc9b313 --- /dev/null +++ b/play-services-appinvite-api @@ -0,0 +1 @@ +extern/GmsApi/play-services-appinvite-api \ No newline at end of file diff --git a/play-services-appinvite/build.gradle b/play-services-appinvite/build.gradle new file mode 100644 index 0000000..be3d95e --- /dev/null +++ b/play-services-appinvite/build.gradle @@ -0,0 +1,51 @@ +/* + * 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) +} + +android { + compileSdkVersion androidCompileSdk() + buildToolsVersion "$androidBuildVersionTools" + + defaultConfig { + versionName getMyVersionName() + minSdkVersion androidMinSdk() + targetSdkVersion androidTargetSdk() + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + lintOptions { + disable 'InvalidPackage' + } +} + +dependencies { + api project(':play-services-base') + api project(':play-services-appinvite-api') +} diff --git a/play-services-appinvite/gradle.properties b/play-services-appinvite/gradle.properties new file mode 100644 index 0000000..a61eac6 --- /dev/null +++ b/play-services-appinvite/gradle.properties @@ -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 AppInvite Library +POM_DESCRIPTION=The Play Services Library module to access the AppInvite API + +POM_PACKAGING=aar + +POM_URL=https://github.com/microg/android_external_GmsLib + +POM_SCM_URL=https://github.com/microg/android_external_GmsLib +POM_SCM_CONNECTION=scm:git@github.com:microg/android_external_GmsLib.git +POM_SCM_DEV_CONNECTION=scm:git@github.com:microg/android_external_GmsLib.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 + diff --git a/play-services-appinvite/src/main/AndroidManifest.xml b/play-services-appinvite/src/main/AndroidManifest.xml new file mode 100644 index 0000000..8691798 --- /dev/null +++ b/play-services-appinvite/src/main/AndroidManifest.xml @@ -0,0 +1,18 @@ + + + + diff --git a/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInvite.java b/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInvite.java new file mode 100644 index 0000000..58e4f44 --- /dev/null +++ b/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInvite.java @@ -0,0 +1,41 @@ +/* + * 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.android.gms.appinvite; + +import android.os.Bundle; +import android.util.Log; + +import com.google.android.gms.common.api.Api; + +import org.microg.gms.appinvite.AppInviteApiBuilder; +import org.microg.gms.appinvite.AppInviteApiImpl; +import org.microg.gms.common.PublicApi; + + +@PublicApi +public final class AppInvite { + private static final String TAG = "GmsAppInvite"; + + public static final Api API = new Api(new AppInviteApiBuilder()); + + public static final AppInviteApi AppInviteApi = new AppInviteApiImpl(); + + + private AppInvite() { + Log.d(TAG, "AppInvite private constructor"); + } +} diff --git a/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteApi.java b/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteApi.java new file mode 100644 index 0000000..e59cea6 --- /dev/null +++ b/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteApi.java @@ -0,0 +1,36 @@ +/* + * 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.android.gms.appinvite; + +import android.os.Bundle; + +import android.app.Activity; + +import com.google.android.gms.common.api.Api; +import com.google.android.gms.common.api.GoogleApiClient; +import com.google.android.gms.common.api.PendingResult; +import com.google.android.gms.common.api.Status; + +import org.microg.gms.common.PublicApi; + + +@PublicApi +public interface AppInviteApi { + PendingResult convertInvitation (GoogleApiClient client, String invitationId); + + PendingResult getInvitation (GoogleApiClient client, Activity currentActivity, boolean launchDeepLink); +} \ No newline at end of file diff --git a/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteInvitation.java b/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteInvitation.java new file mode 100644 index 0000000..3b5d150 --- /dev/null +++ b/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteInvitation.java @@ -0,0 +1,117 @@ +/* + * 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.android.gms.appinvite; + +import org.microg.gms.common.PublicApi; + +import android.content.Intent; +import android.accounts.Account; +import android.net.Uri; +import android.util.Log; + +import java.util.Map; + + +@PublicApi +public final class AppInviteInvitation { + private static final String TAG = "GmsAppInviteInvitation"; + + public static String[] getInvitationIds (int resultCode, Intent result) { + Log.d(TAG, "getInvitationIds"); + return null; + } + + + public static final class IntentBuilder { + private static final String TAG = "GmsAppIIIntentBuilder"; + + public static final int MAX_CALL_TO_ACTION_TEXT_LENGTH = 20; + public static final int MAX_EMAIL_HTML_CONTENT = 512000; + public static final int MAX_MESSAGE_LENGTH = 100; + public static final int MIN_CALL_TO_ACTION_TEXT_LENGTH = 2; + + IntentBuilder(CharSequence title) throws NullPointerException { + Log.d(TAG, "Constructor"); + } + + public Intent build() throws IllegalArgumentException { + Log.d(TAG, "build"); + return null; + } + + public IntentBuilder setAccount(Account account) { + Log.d(TAG, "setAccount"); + return this; + } + + public IntentBuilder setAdditionalReferralParameters(Map params) { + Log.d(TAG, "setAdditionalReferralParameters"); + return this; + } + + public IntentBuilder setAndroidMinimumVersionCode(int versionCode) { + Log.d(TAG, "setAndroidMinimumVersionCode"); + return this; + } + + public IntentBuilder setCallToActionText(CharSequence callToActionText) throws IllegalArgumentException { + Log.d(TAG, "setCallToActionText"); + return this; + } + + public IntentBuilder setCustomImage(Uri imageUri) { + Log.d(TAG, "setCustomImage"); + return this; + } + + public IntentBuilder setDeepLink(Uri deepLink) { + Log.d(TAG, "setDeepLink"); + return this; + } + + public IntentBuilder setEmailHtmlContent(String htmlContent) throws IllegalArgumentException { + Log.d(TAG, "setEmailHtmlContent"); + return this; + } + + public IntentBuilder setEmailSubject (String subject) { + Log.d(TAG, "setEmailSubject"); + return this; + } + + public IntentBuilder setGoogleAnalyticsTrackingId(String trackingId) { + Log.d(TAG, "setGoogleAnalyticsTrackingId"); + return this; + } + + public IntentBuilder setMessage (CharSequence message) throws IllegalArgumentException { + Log.d(TAG, "setMessage"); + return this; + } + + public IntentBuilder setOtherPlatformsTargetApplication (int targetPlatform, String clientId) throws IllegalArgumentException { + Log.d(TAG, "setOtherPlatformsTargetApplication"); + return this; + } + + + public static @interface PlatformMode { + public static final int PROJECT_PLATFORM_ANDROID = 2; + public static final int PROJECT_PLATFORM_IOS = 1; + } + } +} \ No newline at end of file diff --git a/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteInvitationResult.java b/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteInvitationResult.java new file mode 100644 index 0000000..7d8e1f8 --- /dev/null +++ b/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteInvitationResult.java @@ -0,0 +1,32 @@ +/* + * 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.android.gms.appinvite; + +import com.google.android.gms.common.api.Result; +import com.google.android.gms.common.api.Status; + +import org.microg.gms.common.PublicApi; + +import android.content.Intent; + + +@PublicApi +public interface AppInviteInvitationResult extends Result { + public abstract Intent getInvitationIntent (); + + public abstract Status getStatus (); +} \ No newline at end of file diff --git a/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteReferral.java b/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteReferral.java new file mode 100644 index 0000000..9cc249d --- /dev/null +++ b/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteReferral.java @@ -0,0 +1,58 @@ +/* + * 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.android.gms.appinvite; + +import org.microg.gms.common.PublicApi; + +import android.content.Intent; +import android.util.Log; + + +@PublicApi +public class AppInviteReferral { + private static final String TAG = "GmsAppInviteReferral"; + + public static Intent addPlayStoreReferrerToIntent (Intent playStoreReferrerIntent, Intent referralIntent) { + Log.d(TAG, "addPlayStoreReferrerToIntent"); + return null; + } + + public static Intent addReferralDataToIntent (String invitationId, String deepLink, Intent referralIntent) { + Log.d(TAG, "addReferralDataToIntent"); + return null; + } + + public static String getDeepLink (Intent referralIntent) { + Log.d(TAG, "getDeepLink"); + return null; + } + + public static String getInvitationId (Intent referralIntent) { + Log.d(TAG, "getInvitationId"); + return null; + } + + public static boolean hasReferral (Intent referralIntent) { + Log.d(TAG, "hasReferral"); + return false; + } + + public static boolean isOpenedFromPlayStore (Intent referralIntent) { + Log.d(TAG, "isOpenedFromPlayStore"); + return false; + } +} \ No newline at end of file diff --git a/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteApiBuilder.java b/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteApiBuilder.java new file mode 100644 index 0000000..be4b4b1 --- /dev/null +++ b/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteApiBuilder.java @@ -0,0 +1,40 @@ +/* + * 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 org.microg.gms.appinvite; + +import android.content.Context; +import android.os.Looper; +import android.util.Log; + +import com.google.android.gms.appinvite.AppInvite; +import com.google.android.gms.common.api.AccountInfo; +import com.google.android.gms.common.api.GoogleApiClient; + +import org.microg.gms.common.api.ApiBuilder; +import org.microg.gms.common.api.ApiConnection; +import com.google.android.gms.common.api.Api; + + +public class AppInviteApiBuilder implements ApiBuilder{ + private static final String TAG = "GmsAppInviteApiBuilder"; + + @Override + public ApiConnection build(Context context, Looper looper, Api.ApiOptions.NoOptions options, AccountInfo accountInfo, GoogleApiClient.ConnectionCallbacks callbacks, GoogleApiClient.OnConnectionFailedListener connectionFailedListener) { + Log.d(TAG, "build"); + return new AppInviteClientImpl(context, options, callbacks, connectionFailedListener); + } +} diff --git a/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteApiImpl.java b/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteApiImpl.java new file mode 100644 index 0000000..cac064d --- /dev/null +++ b/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteApiImpl.java @@ -0,0 +1,44 @@ +/* + * 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 org.microg.gms.appinvite; + +import com.google.android.gms.appinvite.AppInviteApi; +import com.google.android.gms.appinvite.AppInviteInvitationResult; + +import com.google.android.gms.common.api.GoogleApiClient; +import com.google.android.gms.common.api.PendingResult; +import com.google.android.gms.common.api.Status; + +import android.app.Activity; +import android.util.Log; + + +public class AppInviteApiImpl implements AppInviteApi { + private static final String TAG = "GmsAppInviteApiImpl"; + + @Override + public PendingResult convertInvitation (GoogleApiClient client, String invitationId) { + Log.d(TAG, "convertInvitation"); + return null; + } + + @Override + public PendingResult getInvitation (GoogleApiClient client, Activity currentActivity, boolean launchDeepLink) { + Log.d(TAG, "getInvitation"); + return null; + } +} diff --git a/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteClientImpl.java b/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteClientImpl.java new file mode 100644 index 0000000..60129db --- /dev/null +++ b/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteClientImpl.java @@ -0,0 +1,35 @@ +/* + * 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 org.microg.gms.appinvite; + +import android.content.Context; +import android.util.Log; + +import com.google.android.gms.appinvite.AppInvite; +import com.google.android.gms.common.api.GoogleApiClient; +import com.google.android.gms.common.api.Api; + +import org.microg.gms.common.DummyApiConnection; + + +public class AppInviteClientImpl extends DummyApiConnection { + private static final String TAG = "GmsAppInviteClientImpl"; + + public AppInviteClientImpl(Context context, Api.ApiOptions.NoOptions options, GoogleApiClient.ConnectionCallbacks callbacks, GoogleApiClient.OnConnectionFailedListener connectionFailedListener) { + Log.d(TAG, "Constructor"); + } +} diff --git a/settings.gradle b/settings.gradle index a095f18..c44bec3 100644 --- a/settings.gradle +++ b/settings.gradle @@ -22,6 +22,7 @@ include ':play-services-cast-framework-api' include ':play-services-iid-api' include ':play-services-location-api' include ':play-services-wearable-api' +include ':play-services-appinvite-api' include ':play-services-api' include ':play-services-base' @@ -31,5 +32,6 @@ include ':play-services-iid' include ':play-services-location' include ':play-services-tasks' include ':play-services-wearable' +include ':play-services-appinvite' include ':play-services' -- GitLab From 93bf4940b636aa1dffce1ebc5b211d46b83cef8d Mon Sep 17 00:00:00 2001 From: Alexandru Chircu Date: Sun, 29 Dec 2019 01:40:15 +0200 Subject: [PATCH 2/4] Dirty files, need cleanup; implemented the RPC side of Firebase DynamicLinks --- firebase-dynamic-links-api | 1 + firebase-dynamic-links/build.gradle | 51 +++++++++++++++++++ firebase-dynamic-links/gradle.properties | 34 +++++++++++++ .../src/main/AndroidManifest.xml | 18 +++++++ settings.gradle | 2 + 5 files changed, 106 insertions(+) create mode 120000 firebase-dynamic-links-api create mode 100644 firebase-dynamic-links/build.gradle create mode 100644 firebase-dynamic-links/gradle.properties create mode 100644 firebase-dynamic-links/src/main/AndroidManifest.xml diff --git a/firebase-dynamic-links-api b/firebase-dynamic-links-api new file mode 120000 index 0000000..30d4bb0 --- /dev/null +++ b/firebase-dynamic-links-api @@ -0,0 +1 @@ +extern/GmsApi/firebase-dynamic-links-api \ No newline at end of file diff --git a/firebase-dynamic-links/build.gradle b/firebase-dynamic-links/build.gradle new file mode 100644 index 0000000..eee55e6 --- /dev/null +++ b/firebase-dynamic-links/build.gradle @@ -0,0 +1,51 @@ +/* + * 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) +} + +android { + compileSdkVersion androidCompileSdk() + buildToolsVersion "$androidBuildVersionTools" + + defaultConfig { + versionName getMyVersionName() + minSdkVersion androidMinSdk() + targetSdkVersion androidTargetSdk() + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + lintOptions { + disable 'InvalidPackage' + } +} + +dependencies { + api project(':play-services-base') + api project(':firebase-dynamic-links-api') +} diff --git a/firebase-dynamic-links/gradle.properties b/firebase-dynamic-links/gradle.properties new file mode 100644 index 0000000..77629fd --- /dev/null +++ b/firebase-dynamic-links/gradle.properties @@ -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 Library +POM_DESCRIPTION=The Firebase Library module to access the Dynamic Links API + +POM_PACKAGING=aar + +POM_URL=https://github.com/microg/android_external_GmsLib + +POM_SCM_URL=https://github.com/microg/android_external_GmsLib +POM_SCM_CONNECTION=scm:git@github.com:microg/android_external_GmsLib.git +POM_SCM_DEV_CONNECTION=scm:git@github.com:microg/android_external_GmsLib.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 + diff --git a/firebase-dynamic-links/src/main/AndroidManifest.xml b/firebase-dynamic-links/src/main/AndroidManifest.xml new file mode 100644 index 0000000..deafcd4 --- /dev/null +++ b/firebase-dynamic-links/src/main/AndroidManifest.xml @@ -0,0 +1,18 @@ + + + + diff --git a/settings.gradle b/settings.gradle index c44bec3..77c452b 100644 --- a/settings.gradle +++ b/settings.gradle @@ -23,6 +23,7 @@ include ':play-services-iid-api' include ':play-services-location-api' include ':play-services-wearable-api' include ':play-services-appinvite-api' +include ':firebase-dynamic-links-api' include ':play-services-api' include ':play-services-base' @@ -33,5 +34,6 @@ include ':play-services-location' include ':play-services-tasks' include ':play-services-wearable' include ':play-services-appinvite' +include ':firebase-dynamic-links' include ':play-services' -- GitLab From a8b6647d01f7ae94145cc32b7dd6d889726d019e Mon Sep 17 00:00:00 2001 From: Alexandru Chircu Date: Mon, 30 Dec 2019 13:08:40 +0200 Subject: [PATCH 3/4] Cleaned up 'Log's --- .../google/android/gms/appinvite/AppInvite.java | 2 +- .../gms/appinvite/AppInviteInvitation.java | 15 +-------------- .../android/gms/appinvite/AppInviteReferral.java | 6 ------ .../microg/gms/appinvite/AppInviteApiBuilder.java | 1 - .../microg/gms/appinvite/AppInviteApiImpl.java | 2 -- .../microg/gms/appinvite/AppInviteClientImpl.java | 1 - 6 files changed, 2 insertions(+), 25 deletions(-) diff --git a/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInvite.java b/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInvite.java index 58e4f44..5b63ebc 100644 --- a/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInvite.java +++ b/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInvite.java @@ -36,6 +36,6 @@ public final class AppInvite { private AppInvite() { - Log.d(TAG, "AppInvite private constructor"); + } } diff --git a/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteInvitation.java b/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteInvitation.java index 3b5d150..1dda9db 100644 --- a/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteInvitation.java +++ b/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteInvitation.java @@ -31,7 +31,6 @@ public final class AppInviteInvitation { private static final String TAG = "GmsAppInviteInvitation"; public static String[] getInvitationIds (int resultCode, Intent result) { - Log.d(TAG, "getInvitationIds"); return null; } @@ -45,66 +44,54 @@ public final class AppInviteInvitation { public static final int MIN_CALL_TO_ACTION_TEXT_LENGTH = 2; IntentBuilder(CharSequence title) throws NullPointerException { - Log.d(TAG, "Constructor"); + } public Intent build() throws IllegalArgumentException { - Log.d(TAG, "build"); return null; } public IntentBuilder setAccount(Account account) { - Log.d(TAG, "setAccount"); return this; } public IntentBuilder setAdditionalReferralParameters(Map params) { - Log.d(TAG, "setAdditionalReferralParameters"); return this; } public IntentBuilder setAndroidMinimumVersionCode(int versionCode) { - Log.d(TAG, "setAndroidMinimumVersionCode"); return this; } public IntentBuilder setCallToActionText(CharSequence callToActionText) throws IllegalArgumentException { - Log.d(TAG, "setCallToActionText"); return this; } public IntentBuilder setCustomImage(Uri imageUri) { - Log.d(TAG, "setCustomImage"); return this; } public IntentBuilder setDeepLink(Uri deepLink) { - Log.d(TAG, "setDeepLink"); return this; } public IntentBuilder setEmailHtmlContent(String htmlContent) throws IllegalArgumentException { - Log.d(TAG, "setEmailHtmlContent"); return this; } public IntentBuilder setEmailSubject (String subject) { - Log.d(TAG, "setEmailSubject"); return this; } public IntentBuilder setGoogleAnalyticsTrackingId(String trackingId) { - Log.d(TAG, "setGoogleAnalyticsTrackingId"); return this; } public IntentBuilder setMessage (CharSequence message) throws IllegalArgumentException { - Log.d(TAG, "setMessage"); return this; } public IntentBuilder setOtherPlatformsTargetApplication (int targetPlatform, String clientId) throws IllegalArgumentException { - Log.d(TAG, "setOtherPlatformsTargetApplication"); return this; } diff --git a/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteReferral.java b/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteReferral.java index 9cc249d..8d9d592 100644 --- a/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteReferral.java +++ b/play-services-appinvite/src/main/java/com/google/android/gms/appinvite/AppInviteReferral.java @@ -27,32 +27,26 @@ public class AppInviteReferral { private static final String TAG = "GmsAppInviteReferral"; public static Intent addPlayStoreReferrerToIntent (Intent playStoreReferrerIntent, Intent referralIntent) { - Log.d(TAG, "addPlayStoreReferrerToIntent"); return null; } public static Intent addReferralDataToIntent (String invitationId, String deepLink, Intent referralIntent) { - Log.d(TAG, "addReferralDataToIntent"); return null; } public static String getDeepLink (Intent referralIntent) { - Log.d(TAG, "getDeepLink"); return null; } public static String getInvitationId (Intent referralIntent) { - Log.d(TAG, "getInvitationId"); return null; } public static boolean hasReferral (Intent referralIntent) { - Log.d(TAG, "hasReferral"); return false; } public static boolean isOpenedFromPlayStore (Intent referralIntent) { - Log.d(TAG, "isOpenedFromPlayStore"); return false; } } \ No newline at end of file diff --git a/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteApiBuilder.java b/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteApiBuilder.java index be4b4b1..dbc491c 100644 --- a/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteApiBuilder.java +++ b/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteApiBuilder.java @@ -34,7 +34,6 @@ public class AppInviteApiBuilder implements ApiBuilder @Override public ApiConnection build(Context context, Looper looper, Api.ApiOptions.NoOptions options, AccountInfo accountInfo, GoogleApiClient.ConnectionCallbacks callbacks, GoogleApiClient.OnConnectionFailedListener connectionFailedListener) { - Log.d(TAG, "build"); return new AppInviteClientImpl(context, options, callbacks, connectionFailedListener); } } diff --git a/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteApiImpl.java b/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteApiImpl.java index cac064d..4ccfa9f 100644 --- a/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteApiImpl.java +++ b/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteApiImpl.java @@ -32,13 +32,11 @@ public class AppInviteApiImpl implements AppInviteApi { @Override public PendingResult convertInvitation (GoogleApiClient client, String invitationId) { - Log.d(TAG, "convertInvitation"); return null; } @Override public PendingResult getInvitation (GoogleApiClient client, Activity currentActivity, boolean launchDeepLink) { - Log.d(TAG, "getInvitation"); return null; } } diff --git a/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteClientImpl.java b/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteClientImpl.java index 60129db..22b37e2 100644 --- a/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteClientImpl.java +++ b/play-services-appinvite/src/main/java/org/microg/gms/appinvite/AppInviteClientImpl.java @@ -30,6 +30,5 @@ public class AppInviteClientImpl extends DummyApiConnection { private static final String TAG = "GmsAppInviteClientImpl"; public AppInviteClientImpl(Context context, Api.ApiOptions.NoOptions options, GoogleApiClient.ConnectionCallbacks callbacks, GoogleApiClient.OnConnectionFailedListener connectionFailedListener) { - Log.d(TAG, "Constructor"); } } -- GitLab From 34471938c097996cecccd6daa782bcdad286b92f Mon Sep 17 00:00:00 2001 From: Alexandru Chircu Date: Thu, 2 Jan 2020 17:56:56 +0200 Subject: [PATCH 4/4] Updated GmsApi commit id --- .gitmodules | 2 +- extern/GmsApi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 1e6e9c0..72e0b32 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "GmsApi"] path = extern/GmsApi url = https://gitlab.e.foundation/e/apps/GmsApi - branch = master + branch = dev diff --git a/extern/GmsApi b/extern/GmsApi index 2a43448..09bf949 160000 --- a/extern/GmsApi +++ b/extern/GmsApi @@ -1 +1 @@ -Subproject commit 2a43448e49dc0aec0d6c53c8a27dd58245fdaba6 +Subproject commit 09bf9494038ab53e0b86d8699db409b955fe3c0c -- GitLab