diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index fd1d0854..bf2bdcc7 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -156,5 +156,18 @@ THE SOFTWARE.
android:name="FilebrowserStartActivity"
android:theme="@style/BackActionBar" />
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/layout/audiopicker.xml b/res/layout/audiopicker.xml
new file mode 100644
index 00000000..680a9bd7
--- /dev/null
+++ b/res/layout/audiopicker.xml
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/values/untranslatable.xml b/res/values/untranslatable.xml
index 0f07b044..f55c6980 100644
--- a/res/values/untranslatable.xml
+++ b/res/values/untranslatable.xml
@@ -110,6 +110,7 @@ THE SOFTWARE.
+
diff --git a/src/ch/blinkenlights/android/vanilla/AudioPickerActivity.java b/src/ch/blinkenlights/android/vanilla/AudioPickerActivity.java
new file mode 100644
index 00000000..ab6a937b
--- /dev/null
+++ b/src/ch/blinkenlights/android/vanilla/AudioPickerActivity.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2014 Adrian Ulrich
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package ch.blinkenlights.android.vanilla;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.view.View;
+import android.view.Window;
+import android.widget.TextView;
+import android.widget.Button;
+
+
+public class AudioPickerActivity extends PlaybackActivity {
+
+ private Uri mUri;
+
+ @Override
+ public void onCreate(Bundle icicle) {
+ super.onCreate(icicle);
+
+ Intent intent = getIntent();
+ if (intent == null) {
+ finish();
+ return;
+ }
+
+ mUri = intent.getData();
+ if (mUri == null || mUri.getScheme().equals("file") == false) { // we do not support streaming
+ finish();
+ return;
+ }
+
+ requestWindowFeature(Window.FEATURE_NO_TITLE);
+ setContentView(R.layout.audiopicker);
+
+ TextView filePath = (TextView)findViewById(R.id.filepath);
+ filePath.setText(mUri.getLastPathSegment());
+
+ // Bind all 3 clickbuttons
+ Button cancelButton = (Button)findViewById(R.id.cancel);
+ cancelButton.setOnClickListener(this);
+ Button enqueueButton = (Button)findViewById(R.id.enqueue);
+ enqueueButton.setOnClickListener(this);
+ enqueueButton.setEnabled( PlaybackService.hasInstance() ); // only active if vanilla is still running
+ Button playButton = (Button)findViewById(R.id.play);
+ playButton.setOnClickListener(this);
+
+ }
+
+ @Override
+ public void onClick(View view)
+ {
+ int mode;
+
+ switch(view.getId()) {
+ case R.id.enqueue:
+ mode = LibraryActivity.ACTION_ENQUEUE;
+ break;
+ case R.id.play:
+ mode = LibraryActivity.ACTION_PLAY;
+ break;
+ default:
+ finish();
+ return;
+ }
+
+ String path = mUri.getPath();
+ PlaybackService service = PlaybackService.get(this);
+
+ QueryTask query = MediaUtils.buildFileQuery(path, Song.FILLED_PROJECTION);
+ query.mode = mode;
+
+ service.addSongs(query);
+ service.play();
+
+ finish();
+ }
+
+}