diff --git a/play-services-cast/build.gradle b/play-services-cast/build.gradle
new file mode 100755
index 00000000..85ea138a
--- /dev/null
+++ b/play-services-cast/build.gradle
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2013-2015 microG Project Team
+ *
+ * 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
+ }
+}
+
+dependencies {
+ api project(':play-services-base')
+ api project(':play-services-cast-api')
+}
diff --git a/play-services-cast/gradle.properties b/play-services-cast/gradle.properties
new file mode 100755
index 00000000..937fcc06
--- /dev/null
+++ b/play-services-cast/gradle.properties
@@ -0,0 +1,34 @@
+#
+# Copyright 2013-2016 microG Project Team
+#
+# 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 Cast Library
+POM_DESCRIPTION=The Play Services Library module to access the Cast 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=mar-v-in
+POM_DEVELOPER_NAME=Marvin W
+
diff --git a/play-services-cast/src/main/AndroidManifest.xml b/play-services-cast/src/main/AndroidManifest.xml
new file mode 100755
index 00000000..7e14f394
--- /dev/null
+++ b/play-services-cast/src/main/AndroidManifest.xml
@@ -0,0 +1,18 @@
+
+
+
+
diff --git a/play-services-cast/src/main/java/com/google/android/gms/cast/Cast.java b/play-services-cast/src/main/java/com/google/android/gms/cast/Cast.java
old mode 100644
new mode 100755
diff --git a/play-services-cast/src/main/java/com/google/android/gms/cast/CastPresentation.java b/play-services-cast/src/main/java/com/google/android/gms/cast/CastPresentation.java
new file mode 100755
index 00000000..cfc55685
--- /dev/null
+++ b/play-services-cast/src/main/java/com/google/android/gms/cast/CastPresentation.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2013-2017 microG Project Team
+ *
+ * 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.cast;
+
+import android.annotation.TargetApi;
+import android.app.Presentation;
+import android.content.Context;
+import android.view.Display;
+
+@TargetApi(17)
+public class CastPresentation extends Presentation {
+ public CastPresentation(Context outerContext, Display display) {
+ super(outerContext, display);
+ }
+
+ public CastPresentation(Context outerContext, Display display, int theme) {
+ super(outerContext, display, theme);
+ }
+}
diff --git a/play-services-cast/src/main/java/com/google/android/gms/cast/CastRemoteDisplay.java b/play-services-cast/src/main/java/com/google/android/gms/cast/CastRemoteDisplay.java
old mode 100644
new mode 100755
diff --git a/play-services-cast/src/main/java/com/google/android/gms/cast/CastRemoteDisplayApi.java b/play-services-cast/src/main/java/com/google/android/gms/cast/CastRemoteDisplayApi.java
new file mode 100755
index 00000000..5c053581
--- /dev/null
+++ b/play-services-cast/src/main/java/com/google/android/gms/cast/CastRemoteDisplayApi.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2013-2017 microG Project Team
+ *
+ * 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.cast;
+
+import com.google.android.gms.common.api.GoogleApiClient;
+import com.google.android.gms.common.api.PendingResult;
+
+public interface CastRemoteDisplayApi {
+ PendingResult startRemoteDisplay(GoogleApiClient apiClient, String applicationId);
+
+ PendingResult stopRemoteDisplay(GoogleApiClient apiClient);
+}
diff --git a/play-services-cast/src/main/java/com/google/android/gms/cast/CastRemoteDisplayLocalService.java b/play-services-cast/src/main/java/com/google/android/gms/cast/CastRemoteDisplayLocalService.java
new file mode 100755
index 00000000..dbc4108a
--- /dev/null
+++ b/play-services-cast/src/main/java/com/google/android/gms/cast/CastRemoteDisplayLocalService.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2013-2017 microG Project Team
+ *
+ * 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.cast;
+
+import android.app.Service;
+import android.content.Intent;
+import android.os.IBinder;
+
+public class CastRemoteDisplayLocalService extends Service {
+ @Override
+ public IBinder onBind(Intent intent) {
+ return null;
+ }
+}
diff --git a/play-services-cast/src/main/java/org/microg/gms/cast/CastApiClientBuilder.java b/play-services-cast/src/main/java/org/microg/gms/cast/CastApiClientBuilder.java
old mode 100644
new mode 100755
diff --git a/play-services-cast/src/main/java/org/microg/gms/cast/CastApiImpl.java b/play-services-cast/src/main/java/org/microg/gms/cast/CastApiImpl.java
new file mode 100755
index 00000000..bb95565e
--- /dev/null
+++ b/play-services-cast/src/main/java/org/microg/gms/cast/CastApiImpl.java
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2013-2017 microG Project Team
+ *
+ * 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.cast;
+
+import com.google.android.gms.cast.ApplicationMetadata;
+import com.google.android.gms.cast.Cast;
+import com.google.android.gms.cast.LaunchOptions;
+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 java.io.IOException;
+
+// TODO
+public class CastApiImpl implements Cast.CastApi {
+ @Override
+ public int getActiveInputState(GoogleApiClient client) {
+ return 0;
+ }
+
+ @Override
+ public ApplicationMetadata getApplicationMetadata(GoogleApiClient client) {
+ return null;
+ }
+
+ @Override
+ public String getApplicationStatus(GoogleApiClient client) {
+ return null;
+ }
+
+ @Override
+ public int getStandbyState(GoogleApiClient client) {
+ return 0;
+ }
+
+ @Override
+ public double getVolume(GoogleApiClient client) {
+ return 0;
+ }
+
+ @Override
+ public boolean isMute(GoogleApiClient client) {
+ return false;
+ }
+
+ @Override
+ public PendingResult joinApplication(GoogleApiClient client) {
+ return null;
+ }
+
+ @Override
+ public PendingResult joinApplication(GoogleApiClient client, String applicationId, String sessionId) {
+ return null;
+ }
+
+ @Override
+ public PendingResult joinApplication(GoogleApiClient client, String applicationId) {
+ return null;
+ }
+
+ @Override
+ public PendingResult launchApplication(GoogleApiClient client, String applicationId, LaunchOptions launchOptions) {
+ return null;
+ }
+
+ @Override
+ public PendingResult launchApplication(GoogleApiClient client, String applicationId) {
+ return null;
+ }
+
+ @Override
+ public PendingResult launchApplication(GoogleApiClient client, String applicationId, boolean relaunchIfRunning) {
+ return null;
+ }
+
+ @Override
+ public PendingResult leaveApplication(GoogleApiClient client) {
+ return null;
+ }
+
+ @Override
+ public void removeMessageReceivedCallbacks(GoogleApiClient client, String namespace) throws IOException {
+
+ }
+
+ @Override
+ public void requestStatus(GoogleApiClient client) throws IOException {
+
+ }
+
+ @Override
+ public PendingResult sendMessage(GoogleApiClient client, String namespace, String message) {
+ return null;
+ }
+
+ @Override
+ public void setMessageReceivedCallbacks(GoogleApiClient client, String namespace, Cast.MessageReceivedCallback callbacks) throws IOException {
+
+ }
+
+ @Override
+ public void setMute(GoogleApiClient client, boolean mute) throws IOException {
+
+ }
+
+ @Override
+ public void setVolume(GoogleApiClient client, double volume) throws IOException {
+
+ }
+
+ @Override
+ public PendingResult stopApplication(GoogleApiClient client) {
+ return null;
+ }
+
+ @Override
+ public PendingResult stopApplication(GoogleApiClient client, String sessionId) {
+ return null;
+ }
+}
diff --git a/play-services-cast/src/main/java/org/microg/gms/cast/CastClientImpl.java b/play-services-cast/src/main/java/org/microg/gms/cast/CastClientImpl.java
old mode 100644
new mode 100755
diff --git a/play-services-cast/src/main/java/org/microg/gms/cast/CastRemoteDisplayApiClientBuilder.java b/play-services-cast/src/main/java/org/microg/gms/cast/CastRemoteDisplayApiClientBuilder.java
old mode 100644
new mode 100755
diff --git a/play-services-cast/src/main/java/org/microg/gms/cast/CastRemoteDisplayApiImpl.java b/play-services-cast/src/main/java/org/microg/gms/cast/CastRemoteDisplayApiImpl.java
new file mode 100755
index 00000000..4f47a90d
--- /dev/null
+++ b/play-services-cast/src/main/java/org/microg/gms/cast/CastRemoteDisplayApiImpl.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2013-2017 microG Project Team
+ *
+ * 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.cast;
+
+import com.google.android.gms.cast.CastRemoteDisplay;
+import com.google.android.gms.cast.CastRemoteDisplayApi;
+import com.google.android.gms.common.api.GoogleApiClient;
+import com.google.android.gms.common.api.PendingResult;
+
+public class CastRemoteDisplayApiImpl implements CastRemoteDisplayApi {
+ @Override
+ public PendingResult startRemoteDisplay(GoogleApiClient apiClient, String applicationId) {
+ return null;
+ }
+
+ @Override
+ public PendingResult stopRemoteDisplay(GoogleApiClient apiClient) {
+ return null;
+ }
+}