blob: dc698a851d5484e8ab331857565482a839c74976 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
package de.danoeh.antennapod.activity;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import android.app.AlertDialog;
import android.os.Bundle;
import de.danoeh.antennapod.preferences.UserPreferences;
/** Lets the user start the OPML-import process. */
public class OpmlImportFromIntentActivity extends OpmlImportBaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(UserPreferences.getTheme());
super.onCreate(savedInstanceState);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
try {
URL mOpmlURL = new URL(getIntent().getData().toString());
BufferedReader in = new BufferedReader(new InputStreamReader(mOpmlURL.openStream()));
startImport(in);
} catch (Exception e) {
new AlertDialog.Builder(this).setMessage("Cannot open XML - Reason: " + e.getMessage()).show();
}
}
@Override
protected boolean finishWhenCanceled() {
return true;
}
}
|