diff --git a/CHANGELOG.md b/CHANGELOG.md
index 08c80570..b8282795 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,14 @@
+0.9.9.28 / 0.9.9.29 / 0.9.9.30
+---------------------
+- Retry rejected review by google due to new android auto support
+- Added podcast browser for Android Auto App
+
+0.9.9.27
+---------------------
+- Fix - #795 Adjust app icon to match new regulations
+- Fix - Fix validation of urls during manual account setup
+
+
0.9.9.26
---------------------
- Fix - #726 Add new feed fails
diff --git a/News-Android-App/src/main/AndroidManifest.xml b/News-Android-App/src/main/AndroidManifest.xml
index 4bacae04..0fe326ba 100644
--- a/News-Android-App/src/main/AndroidManifest.xml
+++ b/News-Android-App/src/main/AndroidManifest.xml
@@ -3,8 +3,8 @@
xmlns:tools="http://schemas.android.com/tools"
package="de.luhmer.owncloudnewsreader"
android:installLocation="internalOnly"
- android:versionCode="142"
- android:versionName="0.9.9.26">
+ android:versionCode="146"
+ android:versionName="0.9.9.30">
diff --git a/News-Android-App/src/main/app.svg b/News-Android-App/src/main/app.svg
new file mode 100644
index 00000000..6b1e216b
--- /dev/null
+++ b/News-Android-App/src/main/app.svg
@@ -0,0 +1,4 @@
+
+
diff --git a/News-Android-App/src/main/ic_launcher-web.png b/News-Android-App/src/main/ic_launcher-web.png
new file mode 100644
index 00000000..2c091ae0
Binary files /dev/null and b/News-Android-App/src/main/ic_launcher-web.png differ
diff --git a/News-Android-App/src/main/ic_launcher.svg b/News-Android-App/src/main/ic_launcher.svg
deleted file mode 100644
index 63343cb1..00000000
--- a/News-Android-App/src/main/ic_launcher.svg
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
\ No newline at end of file
diff --git a/News-Android-App/src/main/icon-background.svg b/News-Android-App/src/main/icon-background.svg
new file mode 100644
index 00000000..3ed4da87
--- /dev/null
+++ b/News-Android-App/src/main/icon-background.svg
@@ -0,0 +1,308 @@
+
+
+
diff --git a/News-Android-App/src/main/icon.xcf b/News-Android-App/src/main/icon.xcf
new file mode 100644
index 00000000..930cce64
Binary files /dev/null and b/News-Android-App/src/main/icon.xcf differ
diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/services/PodcastPlaybackService.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/services/PodcastPlaybackService.java
index 55138f96..2c758d51 100644
--- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/services/PodcastPlaybackService.java
+++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/services/PodcastPlaybackService.java
@@ -5,6 +5,7 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.media.AudioManager;
+import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
@@ -13,6 +14,8 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.support.v4.media.MediaBrowserCompat;
import androidx.media.MediaBrowserServiceCompat;
+
+import android.support.v4.media.MediaDescriptionCompat;
import android.support.v4.media.MediaMetadataCompat;
import androidx.media.session.MediaButtonReceiver;
import android.support.v4.media.session.MediaSessionCompat;
@@ -34,6 +37,8 @@ import java.util.concurrent.TimeUnit;
import de.luhmer.owncloudnewsreader.NewsReaderListActivity;
import de.luhmer.owncloudnewsreader.R;
+import de.luhmer.owncloudnewsreader.database.DatabaseConnectionOrm;
+import de.luhmer.owncloudnewsreader.database.model.RssItem;
import de.luhmer.owncloudnewsreader.events.podcast.NewPodcastPlaybackListener;
import de.luhmer.owncloudnewsreader.events.podcast.PodcastCompletedEvent;
import de.luhmer.owncloudnewsreader.events.podcast.RegisterVideoOutput;
@@ -41,6 +46,7 @@ import de.luhmer.owncloudnewsreader.events.podcast.SpeedPodcast;
import de.luhmer.owncloudnewsreader.events.podcast.TogglePlayerStateEvent;
import de.luhmer.owncloudnewsreader.events.podcast.WindPodcast;
import de.luhmer.owncloudnewsreader.model.MediaItem;
+import de.luhmer.owncloudnewsreader.model.PodcastFeedItem;
import de.luhmer.owncloudnewsreader.model.PodcastItem;
import de.luhmer.owncloudnewsreader.model.TTSItem;
import de.luhmer.owncloudnewsreader.services.podcast.MediaPlayerPlaybackService;
@@ -49,9 +55,36 @@ import de.luhmer.owncloudnewsreader.services.podcast.TTSPlaybackService;
import de.luhmer.owncloudnewsreader.view.PodcastNotification;
import static android.view.KeyEvent.KEYCODE_MEDIA_STOP;
+import static de.luhmer.owncloudnewsreader.database.DatabaseConnectionOrm.ParsePodcastItemFromRssItem;
public class PodcastPlaybackService extends MediaBrowserServiceCompat {
+ /** Declares that ContentStyle is supported */
+ public static final String CONTENT_STYLE_SUPPORTED = "android.media.browse.CONTENT_STYLE_SUPPORTED";
+
+ /**
+ * Bundle extra indicating the presentation hint for playable media items.
+ */
+ public static final String CONTENT_STYLE_PLAYABLE_HINT =
+ "android.media.browse.CONTENT_STYLE_PLAYABLE_HINT";
+
+ /**
+ * Bundle extra indicating the presentation hint for browsable media items.
+ */
+ public static final String CONTENT_STYLE_BROWSABLE_HINT =
+ "android.media.browse.CONTENT_STYLE_BROWSABLE_HINT";
+
+ /**
+ * Specifies the corresponding items should be presented as lists.
+ */
+ public static final int CONTENT_STYLE_LIST_ITEM_HINT_VALUE = 1;
+
+ /**
+ * Specifies that the corresponding items should be presented as grids.
+ */
+ public static final int CONTENT_STYLE_GRID_ITEM_HINT_VALUE = 2;
+
+
public static final String MEDIA_ITEM = "MediaItem";
private static final String TAG = "PodcastPlaybackService";
@@ -96,15 +129,68 @@ public class PodcastPlaybackService extends MediaBrowserServiceCompat {
@Nullable
@Override
public BrowserRoot onGetRoot(@NonNull String s, int i, @Nullable Bundle bundle) {
+ Bundle extras = new Bundle();
+ extras.putBoolean(CONTENT_STYLE_SUPPORTED, true);
+ extras.putInt(CONTENT_STYLE_BROWSABLE_HINT, CONTENT_STYLE_GRID_ITEM_HINT_VALUE);
+ extras.putInt(CONTENT_STYLE_PLAYABLE_HINT, CONTENT_STYLE_LIST_ITEM_HINT_VALUE);
+
return new MediaBrowserServiceCompat.BrowserRoot(
getString(R.string.app_name),// Name visible in Android Auto
- null);
+ extras);
}
@Override
public void onLoadChildren(@NonNull String s, @NonNull Result> result) {
Log.d(TAG, "onLoadChildren() called with: s = [" + s + "], result = [" + result + "]");
- result.sendResult(new ArrayList<>());
+
+ List mediaItems = new ArrayList<>();
+
+ DatabaseConnectionOrm dbConn = new DatabaseConnectionOrm(this);
+
+ if(!s.startsWith("FEED_")) {
+ for (PodcastFeedItem feed : dbConn.getListOfFeedsWithAudioPodcasts()) {
+ MediaDescriptionCompat.Builder desc =
+ new MediaDescriptionCompat.Builder()
+ .setMediaId("FEED_" + feed.mFeed.getId())
+ .setTitle(feed.mFeed.getFeedTitle())
+ .setSubtitle(feed.mPodcastCount + " podcasts");
+
+ if (feed.mFeed.getFaviconUrl() != null) {
+ desc.setIconUri(Uri.parse(feed.mFeed.getFaviconUrl()));
+ }
+
+ mediaItems.add(new MediaBrowserCompat.MediaItem(desc.build(), MediaBrowserCompat.MediaItem.FLAG_BROWSABLE));
+ }
+ } else {
+ Long feedId = Long.parseLong(s.substring(5));
+ for (PodcastItem item: dbConn.getListOfAudioPodcastsForFeed(this, feedId)) {
+ MediaDescriptionCompat.Builder desc =
+ new MediaDescriptionCompat.Builder()
+ .setMediaId("PODCAST_" + item.itemId)
+ .setTitle(item.title);
+
+ if (item.author != null) {
+ desc.setSubtitle(item.author);
+ }
+ if (item.favIcon != null) {
+ desc.setIconUri(Uri.parse(item.favIcon));
+ }
+
+ /*
+ //Song duration
+ Long duration = 100L;
+ Bundle songDuration = new Bundle();
+ songDuration.putLong(MediaMetadataCompat.METADATA_KEY_DURATION, duration);
+ desc.setExtras(songDuration);
+ */
+
+
+ mediaItems.add(new MediaBrowserCompat.MediaItem(desc.build(), MediaBrowserCompat.MediaItem.FLAG_PLAYABLE));
+ }
+ }
+
+
+ result.sendResult(mediaItems);
}
@Override
@@ -173,6 +259,7 @@ public class PodcastPlaybackService extends MediaBrowserServiceCompat {
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
+ Log.d(TAG, "onStartCommand() called with: intent = [" + intent + "], flags = [" + flags + "], startId = [" + startId + "]");
MediaButtonReceiver.handleIntent(mSession, intent);
if (intent != null) {
@@ -513,6 +600,25 @@ public class PodcastPlaybackService extends MediaBrowserServiceCompat {
private final class MediaSessionCallback extends MediaSessionCompat.Callback {
+ @Override
+ public void onPlayFromMediaId(String mediaId, Bundle extras) {
+ Log.d(TAG, "onPlayFromMediaId() called with: mediaId = [" + mediaId + "], extras = [" + extras + "]");
+
+ if(mediaId.startsWith("PODCAST_")) {
+ int podcastId = Integer.parseInt(mediaId.substring(8));
+ DatabaseConnectionOrm dbConn = new DatabaseConnectionOrm(PodcastPlaybackService.this);
+
+ RssItem rssItem = dbConn.getRssItemById(podcastId);
+ PodcastItem podcastItem = ParsePodcastItemFromRssItem(PodcastPlaybackService.this, rssItem);
+
+ Intent intent = new Intent(PodcastPlaybackService.this, PodcastPlaybackService.class);
+ intent.putExtra(PodcastPlaybackService.MEDIA_ITEM, podcastItem);
+ startService(intent);
+ }
+
+ super.onPlayFromMediaId(mediaId, extras);
+ }
+
@Override
public void onPlay() {
Log.d(TAG, "onPlay() called");
@@ -534,6 +640,7 @@ public class PodcastPlaybackService extends MediaBrowserServiceCompat {
@Override
public void onCommand(String command, Bundle extras, ResultReceiver cb) {
+ Log.d(TAG, "onCommand() called with: command = [" + command + "], extras = [" + extras + "], cb = [" + cb + "]");
if (command.equals(PLAYBACK_SPEED_FLOAT)) {
Bundle b = new Bundle();
b.putFloat(PLAYBACK_SPEED_FLOAT, currentPlaybackSpeed);
@@ -570,7 +677,7 @@ public class PodcastPlaybackService extends MediaBrowserServiceCompat {
@Override
public boolean onMediaButtonEvent(Intent mediaButtonEvent) {
- Log.d(TAG, mediaButtonEvent.getAction());
+ Log.d(TAG, "onMediaButtonEvent() called with: mediaButtonEvent = [" + mediaButtonEvent + "]");
if(mediaButtonEvent.hasExtra("android.intent.extra.KEY_EVENT")) {
KeyEvent keyEvent = mediaButtonEvent.getParcelableExtra("android.intent.extra.KEY_EVENT");
diff --git a/News-Android-App/src/main/res/drawable/ic_launcher_background.xml b/News-Android-App/src/main/res/drawable/ic_launcher_background.xml
index 7887d0e3..2408e30d 100644
--- a/News-Android-App/src/main/res/drawable/ic_launcher_background.xml
+++ b/News-Android-App/src/main/res/drawable/ic_launcher_background.xml
@@ -1,906 +1,74 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/News-Android-App/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/News-Android-App/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
index bbd3e021..c4a603d4 100644
--- a/News-Android-App/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ b/News-Android-App/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/News-Android-App/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/News-Android-App/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
index bbd3e021..c4a603d4 100644
--- a/News-Android-App/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ b/News-Android-App/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/News-Android-App/src/main/res/mipmap-hdpi/ic_launcher.png b/News-Android-App/src/main/res/mipmap-hdpi/ic_launcher.png
index b0e8d0b9..e47d0edb 100644
Binary files a/News-Android-App/src/main/res/mipmap-hdpi/ic_launcher.png and b/News-Android-App/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/News-Android-App/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/News-Android-App/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
new file mode 100644
index 00000000..fc0e041f
Binary files /dev/null and b/News-Android-App/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ
diff --git a/News-Android-App/src/main/res/mipmap-hdpi/ic_launcher_round.png b/News-Android-App/src/main/res/mipmap-hdpi/ic_launcher_round.png
index bc4d95e2..92b1337d 100644
Binary files a/News-Android-App/src/main/res/mipmap-hdpi/ic_launcher_round.png and b/News-Android-App/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/News-Android-App/src/main/res/mipmap-mdpi/ic_launcher.png b/News-Android-App/src/main/res/mipmap-mdpi/ic_launcher.png
index 7b6ecb17..370e561d 100644
Binary files a/News-Android-App/src/main/res/mipmap-mdpi/ic_launcher.png and b/News-Android-App/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/News-Android-App/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/News-Android-App/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
new file mode 100644
index 00000000..469aa9a3
Binary files /dev/null and b/News-Android-App/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ
diff --git a/News-Android-App/src/main/res/mipmap-mdpi/ic_launcher_round.png b/News-Android-App/src/main/res/mipmap-mdpi/ic_launcher_round.png
index f4b97f51..062cb43c 100644
Binary files a/News-Android-App/src/main/res/mipmap-mdpi/ic_launcher_round.png and b/News-Android-App/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/News-Android-App/src/main/res/mipmap-xhdpi/ic_launcher.png b/News-Android-App/src/main/res/mipmap-xhdpi/ic_launcher.png
index 63a408ac..7ddd23f7 100644
Binary files a/News-Android-App/src/main/res/mipmap-xhdpi/ic_launcher.png and b/News-Android-App/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/News-Android-App/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/News-Android-App/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
new file mode 100644
index 00000000..44d50dc8
Binary files /dev/null and b/News-Android-App/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ
diff --git a/News-Android-App/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/News-Android-App/src/main/res/mipmap-xhdpi/ic_launcher_round.png
index b605de01..075c05ad 100644
Binary files a/News-Android-App/src/main/res/mipmap-xhdpi/ic_launcher_round.png and b/News-Android-App/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/News-Android-App/src/main/res/mipmap-xxhdpi/ic_launcher.png b/News-Android-App/src/main/res/mipmap-xxhdpi/ic_launcher.png
index 184530f0..6edf42c7 100644
Binary files a/News-Android-App/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/News-Android-App/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/News-Android-App/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/News-Android-App/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
new file mode 100644
index 00000000..b6fffd31
Binary files /dev/null and b/News-Android-App/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ
diff --git a/News-Android-App/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/News-Android-App/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
index cc7ee7c3..24779d56 100644
Binary files a/News-Android-App/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and b/News-Android-App/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/News-Android-App/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/News-Android-App/src/main/res/mipmap-xxxhdpi/ic_launcher.png
index 7fec8b29..eb05a3eb 100644
Binary files a/News-Android-App/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/News-Android-App/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/News-Android-App/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/News-Android-App/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
new file mode 100644
index 00000000..ae9191be
Binary files /dev/null and b/News-Android-App/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ
diff --git a/News-Android-App/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/News-Android-App/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
index 1ee70235..22b765bc 100644
Binary files a/News-Android-App/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and b/News-Android-App/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/News-Android-App/src/main/web_hi_res_512.png b/News-Android-App/src/main/web_hi_res_512.png
deleted file mode 100644
index 13ac7a61..00000000
Binary files a/News-Android-App/src/main/web_hi_res_512.png and /dev/null differ