Skip to content

Commit 14533bd

Browse files
committed
Merge pull request #3 from tonsense/master
Make share Intent accept multiple URLs
2 parents 45ec0fe + 956dcac commit 14533bd

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/org/pyload/android/client/AddLinksActivity.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,14 @@ protected void onStart() {
5252
}
5353
String url = intent.getStringExtra("url");
5454
if (url != null){
55+
StringBuilder urls = new StringBuilder();
5556
Matcher m = Patterns.WEB_URL.matcher(url);
56-
if (m.find()) {
57-
url = m.group();
58-
EditText view = (EditText) findViewById(R.id.links);
59-
view.setText(url);
57+
while (m.find()) {
58+
urls.append(m.group() + "\n");
59+
}
60+
if(urls.length()>0) {
61+
EditText view = (EditText) findViewById(R.id.links);
62+
view.setText(urls.toString());
6063
}
6164
}
6265
String path = intent.getStringExtra("dlcpath");

0 commit comments

Comments
 (0)