Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShareExtend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李增强
ShareExtend
Commits
7d81759e
Commit
7d81759e
authored
4 years ago
by
Steve Gehrman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix2
parent
cc46a34d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
android/src/main/java/com/zt/shareextend/ShareExtendPlugin.java
...d/src/main/java/com/zt/shareextend/ShareExtendPlugin.java
+7
-2
No files found.
android/src/main/java/com/zt/shareextend/ShareExtendPlugin.java
View file @
7d81759e
...
@@ -66,6 +66,8 @@ public class ShareExtendPlugin implements MethodChannel.MethodCallHandler, Plugi
...
@@ -66,6 +66,8 @@ public class ShareExtendPlugin implements MethodChannel.MethodCallHandler, Plugi
}
}
private
void
share
(
List
<
String
>
list
,
String
type
,
String
sharePanelTitle
,
String
subject
)
{
private
void
share
(
List
<
String
>
list
,
String
type
,
String
sharePanelTitle
,
String
subject
)
{
ArrayList
<
Uri
>
uriList
;
if
(
list
==
null
||
list
.
isEmpty
())
{
if
(
list
==
null
||
list
.
isEmpty
())
{
throw
new
IllegalArgumentException
(
"Non-empty list expected"
);
throw
new
IllegalArgumentException
(
"Non-empty list expected"
);
}
}
...
@@ -85,7 +87,7 @@ public class ShareExtendPlugin implements MethodChannel.MethodCallHandler, Plugi
...
@@ -85,7 +87,7 @@ public class ShareExtendPlugin implements MethodChannel.MethodCallHandler, Plugi
}
}
}
}
ArrayList
<
Uri
>
uriList
=
new
ArrayList
<>();
uriList
=
new
ArrayList
<>();
for
(
String
path
:
list
)
{
for
(
String
path
:
list
)
{
File
f
=
new
File
(
path
);
File
f
=
new
File
(
path
);
Uri
uri
=
ShareUtils
.
getUriForFile
(
getContext
(),
f
);
Uri
uri
=
ShareUtils
.
getUriForFile
(
getContext
(),
f
);
...
@@ -117,7 +119,10 @@ public class ShareExtendPlugin implements MethodChannel.MethodCallHandler, Plugi
...
@@ -117,7 +119,10 @@ public class ShareExtendPlugin implements MethodChannel.MethodCallHandler, Plugi
private
void
startChooserActivity
(
Intent
shareIntent
,
String
sharePanelTitle
,
ArrayList
<
Uri
>
uriList
)
{
private
void
startChooserActivity
(
Intent
shareIntent
,
String
sharePanelTitle
,
ArrayList
<
Uri
>
uriList
)
{
Intent
chooserIntent
=
Intent
.
createChooser
(
shareIntent
,
sharePanelTitle
);
Intent
chooserIntent
=
Intent
.
createChooser
(
shareIntent
,
sharePanelTitle
);
if
(
uriList
!=
null
)
{
ShareUtils
.
grantUriPermission
(
getContext
(),
uriList
,
chooserIntent
);
ShareUtils
.
grantUriPermission
(
getContext
(),
uriList
,
chooserIntent
);
}
if
(
mRegistrar
.
activity
()
!=
null
)
{
if
(
mRegistrar
.
activity
()
!=
null
)
{
mRegistrar
.
activity
().
startActivity
(
chooserIntent
);
mRegistrar
.
activity
().
startActivity
(
chooserIntent
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment