2015-09-04 02:15:03 +02:00
|
|
|
package org.schabi.newpipe;
|
|
|
|
|
|
|
|
import android.content.DialogInterface;
|
|
|
|
import android.content.Intent;
|
2015-09-15 20:11:42 +02:00
|
|
|
import android.content.SharedPreferences;
|
2015-09-04 02:15:03 +02:00
|
|
|
import android.net.Uri;
|
2015-09-21 21:12:48 +02:00
|
|
|
import android.os.Bundle;
|
2015-09-04 02:15:03 +02:00
|
|
|
import android.preference.PreferenceManager;
|
|
|
|
import android.support.v7.app.ActionBar;
|
|
|
|
import android.support.v7.app.AlertDialog;
|
|
|
|
import android.support.v7.app.AppCompatActivity;
|
|
|
|
import android.util.Log;
|
|
|
|
import android.view.Menu;
|
|
|
|
import android.view.MenuInflater;
|
|
|
|
import android.view.MenuItem;
|
|
|
|
import android.widget.ArrayAdapter;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by Christian Schabesberger on 18.08.15.
|
|
|
|
*
|
|
|
|
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
|
|
|
|
* DetailsMenuHandler.java is part of NewPipe.
|
|
|
|
*
|
|
|
|
* NewPipe 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.
|
|
|
|
*
|
|
|
|
* NewPipe 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 NewPipe. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2015-11-29 13:06:27 +01:00
|
|
|
|
|
|
|
class ActionBarHandler {
|
2015-09-04 02:15:03 +02:00
|
|
|
private static final String TAG = ActionBarHandler.class.toString();
|
2015-09-15 20:11:42 +02:00
|
|
|
private static final String KORE_PACKET = "org.xbmc.kore";
|
|
|
|
|
2015-10-15 23:25:53 +02:00
|
|
|
private String websiteUrl = "";
|
2015-09-04 02:15:03 +02:00
|
|
|
private AppCompatActivity activity;
|
2015-09-21 13:32:11 +02:00
|
|
|
private VideoInfo.VideoStream[] videoStreams = null;
|
2015-09-21 21:12:48 +02:00
|
|
|
private VideoInfo.AudioStream audioStream = null;
|
2015-09-04 02:15:03 +02:00
|
|
|
private int selectedStream = -1;
|
|
|
|
private String videoTitle = "";
|
|
|
|
|
2015-11-29 13:06:27 +01:00
|
|
|
private SharedPreferences defaultPreferences = null;
|
2015-11-14 12:47:21 +01:00
|
|
|
private int startPosition;
|
2015-09-15 20:11:42 +02:00
|
|
|
|
2015-11-29 13:06:27 +01:00
|
|
|
@SuppressWarnings("deprecation")
|
|
|
|
private class FormatItemSelectListener implements ActionBar.OnNavigationListener {
|
2015-09-04 02:15:03 +02:00
|
|
|
@Override
|
|
|
|
public boolean onNavigationItemSelected(int itemPosition, long itemId) {
|
|
|
|
selectFormatItem((int)itemId);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-10-29 17:56:35 +01:00
|
|
|
public ActionBarHandler(AppCompatActivity activity) {
|
|
|
|
this.activity = activity;
|
|
|
|
}
|
|
|
|
|
2015-11-29 13:06:27 +01:00
|
|
|
@SuppressWarnings({"deprecation", "ConstantConditions"})
|
2015-09-04 02:15:03 +02:00
|
|
|
public void setupNavMenu(AppCompatActivity activity) {
|
|
|
|
this.activity = activity;
|
2015-11-29 13:06:27 +01:00
|
|
|
try {
|
|
|
|
activity.getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
|
|
|
|
} catch(NullPointerException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
2015-09-04 02:15:03 +02:00
|
|
|
}
|
|
|
|
|
2015-11-29 13:06:27 +01:00
|
|
|
@SuppressWarnings("deprecation")
|
2015-09-21 21:12:48 +02:00
|
|
|
public void setStreams(VideoInfo.VideoStream[] videoStreams, VideoInfo.AudioStream[] audioStreams) {
|
|
|
|
this.videoStreams = videoStreams;
|
2015-09-04 02:15:03 +02:00
|
|
|
selectedStream = 0;
|
2015-11-02 19:57:47 +01:00
|
|
|
defaultPreferences = PreferenceManager.getDefaultSharedPreferences(activity);
|
2015-09-21 21:12:48 +02:00
|
|
|
String[] itemArray = new String[videoStreams.length];
|
2015-09-15 20:11:42 +02:00
|
|
|
String defaultResolution = defaultPreferences
|
2015-10-29 17:56:35 +01:00
|
|
|
.getString(activity.getString(R.string.defaultResolutionPreference),
|
|
|
|
activity.getString(R.string.defaultResolutionListItem));
|
2015-09-12 22:07:02 +02:00
|
|
|
int defaultResolutionPos = 0;
|
|
|
|
|
2015-09-21 21:12:48 +02:00
|
|
|
for(int i = 0; i < videoStreams.length; i++) {
|
2015-11-08 03:22:40 +01:00
|
|
|
itemArray[i] = MediaFormat.getNameById(videoStreams[i].format) + " " + videoStreams[i].resolution;
|
2015-09-21 21:12:48 +02:00
|
|
|
if(defaultResolution.equals(videoStreams[i].resolution)) {
|
2015-09-12 22:07:02 +02:00
|
|
|
defaultResolutionPos = i;
|
|
|
|
}
|
2015-09-04 02:15:03 +02:00
|
|
|
}
|
|
|
|
|
2015-11-29 13:06:27 +01:00
|
|
|
ArrayAdapter<String> itemAdapter = new ArrayAdapter<>(activity.getBaseContext(),
|
2015-09-04 02:15:03 +02:00
|
|
|
android.R.layout.simple_spinner_dropdown_item, itemArray);
|
|
|
|
if(activity != null) {
|
2015-09-12 22:07:02 +02:00
|
|
|
ActionBar ab = activity.getSupportActionBar();
|
2015-11-29 13:06:27 +01:00
|
|
|
assert ab != null : "Could not get actionbar";
|
|
|
|
ab.setListNavigationCallbacks(itemAdapter
|
|
|
|
, new FormatItemSelectListener());
|
|
|
|
|
2015-09-12 22:07:02 +02:00
|
|
|
ab.setSelectedNavigationItem(defaultResolutionPos);
|
2015-09-04 02:15:03 +02:00
|
|
|
}
|
2015-09-21 21:12:48 +02:00
|
|
|
|
|
|
|
// set audioStream
|
|
|
|
audioStream = null;
|
2015-11-02 19:57:47 +01:00
|
|
|
String preferedFormat = defaultPreferences
|
2015-10-29 17:56:35 +01:00
|
|
|
.getString(activity.getString(R.string.defaultAudioFormatPreference), "webm");
|
2015-09-21 21:12:48 +02:00
|
|
|
if(preferedFormat.equals("webm")) {
|
|
|
|
for(VideoInfo.AudioStream s : audioStreams) {
|
2015-11-08 03:22:40 +01:00
|
|
|
if(s.format == MediaFormat.WEBMA.id) {
|
2015-09-21 21:12:48 +02:00
|
|
|
audioStream = s;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if(preferedFormat.equals("m4a")){
|
|
|
|
for(VideoInfo.AudioStream s : audioStreams) {
|
2015-11-08 03:22:40 +01:00
|
|
|
if(s.format == MediaFormat.M4A.id &&
|
2015-10-15 23:25:53 +02:00
|
|
|
(audioStream == null || audioStream.bandwidth > s.bandwidth)) {
|
2015-09-21 21:12:48 +02:00
|
|
|
audioStream = s;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-12-20 01:08:12 +01:00
|
|
|
else {
|
|
|
|
Log.e(TAG, "FAILED to set audioStream value!");
|
|
|
|
}
|
2015-09-04 02:15:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
private void selectFormatItem(int i) {
|
|
|
|
selectedStream = i;
|
|
|
|
}
|
|
|
|
|
2015-11-29 13:06:27 +01:00
|
|
|
public void setupMenu(Menu menu, MenuInflater inflater) {
|
2015-09-04 02:15:03 +02:00
|
|
|
// CAUTION set item properties programmatically otherwise it would not be accepted by
|
|
|
|
// appcompat itemsinflater.inflate(R.menu.videoitem_detail, menu);
|
|
|
|
|
2015-10-29 17:56:35 +01:00
|
|
|
defaultPreferences = PreferenceManager.getDefaultSharedPreferences(activity);
|
2015-09-15 20:11:42 +02:00
|
|
|
|
2015-09-04 02:15:03 +02:00
|
|
|
inflater.inflate(R.menu.videoitem_detail, menu);
|
2015-09-15 20:11:42 +02:00
|
|
|
MenuItem castItem = menu.findItem(R.id.action_play_with_kodi);
|
2015-09-04 02:15:03 +02:00
|
|
|
|
2015-09-15 20:11:42 +02:00
|
|
|
castItem.setVisible(defaultPreferences
|
2015-12-20 01:31:31 +01:00
|
|
|
.getBoolean(activity.getString(R.string.showPlayWithKodiPreference), false));
|
2015-09-04 02:15:03 +02:00
|
|
|
}
|
|
|
|
|
2015-10-29 17:56:35 +01:00
|
|
|
public boolean onItemSelected(MenuItem item) {
|
2015-09-04 02:15:03 +02:00
|
|
|
int id = item.getItemId();
|
|
|
|
switch(id) {
|
|
|
|
case R.id.menu_item_share:
|
|
|
|
if(!videoTitle.isEmpty()) {
|
|
|
|
Intent intent = new Intent();
|
|
|
|
intent.setAction(Intent.ACTION_SEND);
|
2015-10-15 23:25:53 +02:00
|
|
|
intent.putExtra(Intent.EXTRA_TEXT, websiteUrl);
|
2015-09-04 02:15:03 +02:00
|
|
|
intent.setType("text/plain");
|
2015-10-29 17:56:35 +01:00
|
|
|
activity.startActivity(Intent.createChooser(intent, activity.getString(R.string.shareDialogTitle)));
|
2015-09-04 02:15:03 +02:00
|
|
|
}
|
2015-10-29 17:56:35 +01:00
|
|
|
return true;
|
2015-09-04 02:15:03 +02:00
|
|
|
case R.id.menu_item_openInBrowser: {
|
|
|
|
openInBrowser();
|
|
|
|
}
|
2015-10-29 17:56:35 +01:00
|
|
|
return true;
|
2015-09-04 02:15:03 +02:00
|
|
|
case R.id.menu_item_download:
|
|
|
|
downloadVideo();
|
2015-10-29 17:56:35 +01:00
|
|
|
return true;
|
2015-09-04 02:15:03 +02:00
|
|
|
case R.id.action_settings: {
|
2015-10-29 17:56:35 +01:00
|
|
|
Intent intent = new Intent(activity, SettingsActivity.class);
|
|
|
|
activity.startActivity(intent);
|
2015-09-04 02:15:03 +02:00
|
|
|
}
|
2015-09-15 20:11:42 +02:00
|
|
|
break;
|
|
|
|
case R.id.action_play_with_kodi:
|
|
|
|
playWithKodi();
|
2015-10-29 17:56:35 +01:00
|
|
|
return true;
|
2015-09-21 21:12:48 +02:00
|
|
|
case R.id.menu_item_play_audio:
|
|
|
|
playAudio();
|
2015-10-29 17:56:35 +01:00
|
|
|
return true;
|
2015-09-04 02:15:03 +02:00
|
|
|
default:
|
|
|
|
Log.e(TAG, "Menu Item not known");
|
|
|
|
}
|
2015-10-29 17:56:35 +01:00
|
|
|
return false;
|
2015-09-04 02:15:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public void setVideoInfo(String websiteUrl, String videoTitle) {
|
2015-10-15 23:25:53 +02:00
|
|
|
this.websiteUrl = websiteUrl;
|
2015-09-04 02:15:03 +02:00
|
|
|
this.videoTitle = videoTitle;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void playVideo() {
|
|
|
|
// ----------- THE MAGIC MOMENT ---------------
|
|
|
|
if(!videoTitle.isEmpty()) {
|
2015-10-29 17:56:35 +01:00
|
|
|
if (PreferenceManager.getDefaultSharedPreferences(activity)
|
2015-12-20 01:31:31 +01:00
|
|
|
.getBoolean(activity.getString(R.string.useExternalVideoPlayer), false)) {
|
2015-09-24 03:58:41 +02:00
|
|
|
|
|
|
|
// External Player
|
2015-09-04 02:15:03 +02:00
|
|
|
Intent intent = new Intent();
|
|
|
|
try {
|
|
|
|
intent.setAction(Intent.ACTION_VIEW);
|
2015-09-24 03:58:41 +02:00
|
|
|
|
2015-09-21 13:32:11 +02:00
|
|
|
intent.setDataAndType(Uri.parse(videoStreams[selectedStream].url),
|
2015-11-08 03:22:40 +01:00
|
|
|
MediaFormat.getMimeById(videoStreams[selectedStream].format));
|
2015-09-24 03:58:41 +02:00
|
|
|
intent.putExtra(Intent.EXTRA_TITLE, videoTitle);
|
|
|
|
intent.putExtra("title", videoTitle);
|
|
|
|
|
2015-10-29 17:56:35 +01:00
|
|
|
activity.startActivity(intent); // HERE !!!
|
2015-09-04 02:15:03 +02:00
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
2015-10-29 17:56:35 +01:00
|
|
|
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
2015-09-04 02:15:03 +02:00
|
|
|
builder.setMessage(R.string.noPlayerFound)
|
|
|
|
.setPositiveButton(R.string.installStreamPlayer, new DialogInterface.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
|
|
Intent intent = new Intent();
|
|
|
|
intent.setAction(Intent.ACTION_VIEW);
|
2015-10-29 17:56:35 +01:00
|
|
|
intent.setData(Uri.parse(activity.getString(R.string.fdroidVLCurl)));
|
|
|
|
activity.startActivity(intent);
|
2015-09-04 02:15:03 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
builder.create().show();
|
|
|
|
}
|
|
|
|
} else {
|
2015-09-24 03:58:41 +02:00
|
|
|
// Internal Player
|
2015-10-29 17:56:35 +01:00
|
|
|
Intent intent = new Intent(activity, PlayVideoActivity.class);
|
2015-09-04 02:15:03 +02:00
|
|
|
intent.putExtra(PlayVideoActivity.VIDEO_TITLE, videoTitle);
|
2015-09-21 13:32:11 +02:00
|
|
|
intent.putExtra(PlayVideoActivity.STREAM_URL, videoStreams[selectedStream].url);
|
2015-10-15 23:25:53 +02:00
|
|
|
intent.putExtra(PlayVideoActivity.VIDEO_URL, websiteUrl);
|
2015-11-14 12:47:21 +01:00
|
|
|
intent.putExtra(PlayVideoActivity.START_POSITION, startPosition);
|
|
|
|
activity.startActivity(intent); //also HERE !!!
|
2015-09-04 02:15:03 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
// --------------------------------------------
|
|
|
|
}
|
|
|
|
|
2015-11-14 12:47:21 +01:00
|
|
|
public void setStartPosition(int startPositionSeconds)
|
|
|
|
{
|
|
|
|
this.startPosition = startPositionSeconds;
|
|
|
|
}
|
|
|
|
|
2015-11-29 13:06:27 +01:00
|
|
|
private void downloadVideo() {
|
2015-09-04 02:15:03 +02:00
|
|
|
if(!videoTitle.isEmpty()) {
|
2015-11-08 03:22:40 +01:00
|
|
|
String videoSuffix = "." + MediaFormat.getSuffixById(videoStreams[selectedStream].format);
|
|
|
|
String audioSuffix = "." + MediaFormat.getSuffixById(audioStream.format);
|
2015-09-21 21:12:48 +02:00
|
|
|
Bundle args = new Bundle();
|
|
|
|
args.putString(DownloadDialog.FILE_SUFFIX_VIDEO, videoSuffix);
|
|
|
|
args.putString(DownloadDialog.FILE_SUFFIX_AUDIO, audioSuffix);
|
|
|
|
args.putString(DownloadDialog.TITLE, videoTitle);
|
|
|
|
args.putString(DownloadDialog.VIDEO_URL, videoStreams[selectedStream].url);
|
|
|
|
args.putString(DownloadDialog.AUDIO_URL, audioStream.url);
|
|
|
|
DownloadDialog downloadDialog = new DownloadDialog();
|
|
|
|
downloadDialog.setArguments(args);
|
|
|
|
downloadDialog.show(activity.getSupportFragmentManager(), "downloadDialog");
|
2015-09-04 02:15:03 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-29 13:06:27 +01:00
|
|
|
private void openInBrowser() {
|
2015-09-04 02:15:03 +02:00
|
|
|
if(!videoTitle.isEmpty()) {
|
|
|
|
Intent intent = new Intent();
|
|
|
|
intent.setAction(Intent.ACTION_VIEW);
|
2015-10-15 23:25:53 +02:00
|
|
|
intent.setData(Uri.parse(websiteUrl));
|
2015-09-04 02:15:03 +02:00
|
|
|
|
2015-10-29 17:56:35 +01:00
|
|
|
activity.startActivity(Intent.createChooser(intent, activity.getString(R.string.chooseBrowser)));
|
2015-09-04 02:15:03 +02:00
|
|
|
}
|
|
|
|
}
|
2015-09-15 20:11:42 +02:00
|
|
|
|
2015-11-29 13:06:27 +01:00
|
|
|
private void playWithKodi() {
|
2015-09-15 20:11:42 +02:00
|
|
|
if(!videoTitle.isEmpty()) {
|
|
|
|
try {
|
|
|
|
Intent intent = new Intent(Intent.ACTION_VIEW);
|
|
|
|
intent.setPackage(KORE_PACKET);
|
2015-10-15 23:25:53 +02:00
|
|
|
intent.setData(Uri.parse(websiteUrl.replace("https", "http")));
|
2015-10-29 17:56:35 +01:00
|
|
|
activity.startActivity(intent);
|
2015-09-15 20:11:42 +02:00
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
2015-10-29 17:56:35 +01:00
|
|
|
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
2015-09-15 20:11:42 +02:00
|
|
|
builder.setMessage(R.string.koreNotFound)
|
|
|
|
.setPositiveButton(R.string.installeKore, new DialogInterface.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
|
|
Intent intent = new Intent();
|
|
|
|
intent.setAction(Intent.ACTION_VIEW);
|
2015-10-29 17:56:35 +01:00
|
|
|
intent.setData(Uri.parse(activity.getString(R.string.fdroidKoreUrl)));
|
|
|
|
activity.startActivity(intent);
|
2015-09-15 20:11:42 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
builder.create().show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-09-21 21:12:48 +02:00
|
|
|
|
|
|
|
public void playAudio() {
|
2015-12-20 01:31:31 +01:00
|
|
|
|
|
|
|
boolean externalAudioPlayer = PreferenceManager.getDefaultSharedPreferences(activity)
|
|
|
|
.getBoolean(activity.getString(R.string.useExternalAudioPlayer), false);
|
2015-11-24 01:40:36 +01:00
|
|
|
Intent intent;
|
2015-12-20 21:28:07 +01:00
|
|
|
|
|
|
|
if (!externalAudioPlayer && android.os.Build.VERSION.SDK_INT >= 18)//internal music player: explicit intent
|
2015-11-24 01:40:36 +01:00
|
|
|
{
|
|
|
|
intent = new Intent(activity, BackgroundPlayer.class);
|
2015-12-03 15:39:51 +01:00
|
|
|
|
2015-11-24 01:40:36 +01:00
|
|
|
intent.setAction(Intent.ACTION_VIEW);
|
2015-12-20 01:08:12 +01:00
|
|
|
Log.i(TAG, "audioStream is null:" + (audioStream == null));
|
|
|
|
Log.i(TAG, "audioStream.url is null:"+(audioStream.url==null));
|
2015-11-24 01:40:36 +01:00
|
|
|
intent.setDataAndType(Uri.parse(audioStream.url),
|
|
|
|
MediaFormat.getMimeById(audioStream.format));
|
|
|
|
intent.putExtra(Intent.EXTRA_TITLE, videoTitle);
|
|
|
|
intent.putExtra("title", videoTitle);
|
|
|
|
activity.startService(intent);
|
2015-11-25 16:19:50 +01:00
|
|
|
} else {
|
|
|
|
intent = new Intent();
|
|
|
|
try {
|
|
|
|
intent.setAction(Intent.ACTION_VIEW);
|
|
|
|
intent.setDataAndType(Uri.parse(audioStream.url),
|
|
|
|
MediaFormat.getMimeById(audioStream.format));
|
|
|
|
intent.putExtra(Intent.EXTRA_TITLE, videoTitle);
|
|
|
|
intent.putExtra("title", videoTitle);
|
2015-11-24 01:40:36 +01:00
|
|
|
|
2015-11-25 16:19:50 +01:00
|
|
|
activity.startActivity(intent); // HERE !!!
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
|
|
|
builder.setMessage(R.string.noPlayerFound)
|
|
|
|
.setPositiveButton(R.string.installStreamPlayer, new DialogInterface.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
|
|
Intent intent = new Intent();
|
|
|
|
intent.setAction(Intent.ACTION_VIEW);
|
|
|
|
intent.setData(Uri.parse(activity.getString(R.string.fdroidVLCurl)));
|
|
|
|
activity.startActivity(intent);
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
|
|
Log.i(TAG, "You unlocked a secret unicorn.");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
builder.create().show();
|
|
|
|
Log.e(TAG, "Either no Streaming player for audio was installed, or something important crashed:");
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
2015-09-21 21:12:48 +02:00
|
|
|
}
|
2015-09-04 02:15:03 +02:00
|
|
|
}
|