Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

Commit

Permalink
Add an update notification
Browse files Browse the repository at this point in the history
  • Loading branch information
HaarigerHarald committed Dec 18, 2015
1 parent cf310aa commit 57ff456
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Expand Up @@ -7,12 +7,14 @@
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.text.method.LinkMovementMethod;
import android.util.SparseArray;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;

import java.io.File;
Expand Down Expand Up @@ -72,11 +74,14 @@ private void getYoutubeDownloadUrl(String youtubeLink) {
public void onUrisAvailable(String videoId, String videoTitle, SparseArray<YtFile> ytFiles) {
mainProgressBar.setVisibility(View.GONE);
if (ytFiles == null) {
finish();
TextView tv = new TextView(DownloadActivity.this);
tv.setText(R.string.app_update);
tv.setMovementMethod(LinkMovementMethod.getInstance());
mainLayout.addView(tv);
return;
}
formatsToShowList = new ArrayList<YtFragmentedVideo>();
for (int i = 0, itag = 0; i < ytFiles.size(); i++) {
formatsToShowList = new ArrayList<>();
for (int i = 0, itag; i < ytFiles.size(); i++) {
itag = ytFiles.keyAt(i);
YtFile ytFile = ytFiles.get(itag);

Expand Down
2 changes: 2 additions & 0 deletions advancedDownloader/src/main/res/values/strings.xml
Expand Up @@ -3,5 +3,7 @@

<string name="app_name">YouTube Download</string>
<string name="error_no_yt_link">Not a valid YouTube link!</string>
<string name="app_update">Couldn\'t extract URLs you may need an update:
<a href="https://github.com/HaarigerHarald/android-youtubeExtractor/releases/latest">latest GitHub release</a></string>

</resources>

0 comments on commit 57ff456

Please sign in to comment.