Skip to content

Commit bdefac5

Browse files
committed
adding a new activity for handling Send intent
1 parent 194a85e commit bdefac5

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,19 @@
8383
</intent-filter>
8484
</activity>
8585

86+
<activity
87+
android:name=".activities.SaveAsActivity"
88+
android:label="@string/save_as">
89+
<intent-filter>
90+
<action android:name="android.intent.action.SEND" />
91+
<category android:name="android.intent.category.DEFAULT" />
92+
93+
<data android:mimeType="text/plain" />
94+
<data android:mimeType="image/*" />
95+
<data android:mimeType="video/*" />
96+
</intent-filter>
97+
</activity>
98+
8699
<activity
87100
android:name=".activities.SettingsActivity"
88101
android:label="@string/settings"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.simplemobiletools.filemanager.pro.activities
2+
3+
import android.content.Intent
4+
import android.os.Bundle
5+
import com.simplemobiletools.commons.extensions.toast
6+
import com.simplemobiletools.filemanager.pro.R
7+
8+
class SaveAsActivity : SimpleActivity() {
9+
override fun onCreate(savedInstanceState: Bundle?) {
10+
super.onCreate(savedInstanceState)
11+
setContentView(R.layout.activity_save_as)
12+
13+
if (intent.action == Intent.ACTION_SEND && intent.extras?.containsKey(Intent.EXTRA_STREAM) == true) {
14+
15+
} else {
16+
toast(R.string.unknown_error_occurred)
17+
finish()
18+
}
19+
}
20+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:id="@+id/activity_save_as_holder"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent">
6+
7+
</RelativeLayout>

0 commit comments

Comments
 (0)