Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
flutter_plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林生雨
flutter_plugin
Commits
65160352
Commit
65160352
authored
Oct 28, 2019
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
c7850136
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
workspace.xml
.idea/workspace.xml
+6
-3
GengmeiFlutterPlugin.kt
...om/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt
+8
-1
No files found.
.idea/workspace.xml
View file @
65160352
...
@@ -5,7 +5,9 @@
...
@@ -5,7 +5,9 @@
<option
name=
"TOOL_WINDOW_CONFIGURED_FILTER"
value=
"Show only selected application"
/>
<option
name=
"TOOL_WINDOW_CONFIGURED_FILTER"
value=
"Show only selected application"
/>
</component>
</component>
<component
name=
"ChangeListManager"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"5be6bbb5-7d6e-4540-a24f-d2b3bf78b3ba"
name=
"Default Changelist"
comment=
""
/>
<list
default=
"true"
id=
"5be6bbb5-7d6e-4540-a24f-d2b3bf78b3ba"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt"
afterDir=
"false"
/>
</list>
<ignored
path=
"$PROJECT_DIR$/.dart_tool/"
/>
<ignored
path=
"$PROJECT_DIR$/.dart_tool/"
/>
<ignored
path=
"$PROJECT_DIR$/.idea/"
/>
<ignored
path=
"$PROJECT_DIR$/.idea/"
/>
<ignored
path=
"$PROJECT_DIR$/.pub/"
/>
<ignored
path=
"$PROJECT_DIR$/.pub/"
/>
...
@@ -73,7 +75,7 @@
...
@@ -73,7 +75,7 @@
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/repository/AlbumRepository.dart"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/repository/AlbumRepository.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"207"
>
<state
relative-caret-position=
"207"
>
<caret
line=
"40"
column=
"23"
lean-forward=
"true"
selection-start-line=
"40"
selection-start-column=
"23"
selection-end-line=
"40"
selection-end-column=
"23"
/>
<caret
line=
"40"
column=
"23"
selection-start-line=
"40"
selection-start-column=
"23"
selection-end-line=
"40"
selection-end-column=
"23"
/>
<folding>
<folding>
<element
signature=
"e#46#106#0"
expanded=
"true"
/>
<element
signature=
"e#46#106#0"
expanded=
"true"
/>
</folding>
</folding>
...
@@ -296,6 +298,7 @@
...
@@ -296,6 +298,7 @@
</component>
</component>
<component
name=
"ToolWindowManager"
>
<component
name=
"ToolWindowManager"
>
<frame
x=
"673"
y=
"-861"
width=
"1440"
height=
"811"
extended-state=
"0"
/>
<frame
x=
"673"
y=
"-861"
width=
"1440"
height=
"811"
extended-state=
"0"
/>
<editor
active=
"true"
/>
<layout>
<layout>
<window_info
content_ui=
"combo"
id=
"Project"
order=
"0"
visible=
"true"
weight=
"0.1509299"
/>
<window_info
content_ui=
"combo"
id=
"Project"
order=
"0"
visible=
"true"
weight=
"0.1509299"
/>
<window_info
id=
"Captures"
order=
"1"
side_tool=
"true"
/>
<window_info
id=
"Captures"
order=
"1"
side_tool=
"true"
/>
...
@@ -585,7 +588,7 @@
...
@@ -585,7 +588,7 @@
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/repository/AlbumRepository.dart"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/AlbumModel/repository/AlbumRepository.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"207"
>
<state
relative-caret-position=
"207"
>
<caret
line=
"40"
column=
"23"
lean-forward=
"true"
selection-start-line=
"40"
selection-start-column=
"23"
selection-end-line=
"40"
selection-end-column=
"23"
/>
<caret
line=
"40"
column=
"23"
selection-start-line=
"40"
selection-start-column=
"23"
selection-end-line=
"40"
selection-end-column=
"23"
/>
<folding>
<folding>
<element
signature=
"e#46#106#0"
expanded=
"true"
/>
<element
signature=
"e#46#106#0"
expanded=
"true"
/>
</folding>
</folding>
...
...
android/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt
View file @
65160352
...
@@ -25,9 +25,9 @@ import io.flutter.plugin.common.MethodChannel.MethodCallHandler
...
@@ -25,9 +25,9 @@ import io.flutter.plugin.common.MethodChannel.MethodCallHandler
import
io.flutter.plugin.common.MethodChannel.Result
import
io.flutter.plugin.common.MethodChannel.Result
import
io.flutter.plugin.common.PluginRegistry.Registrar
import
io.flutter.plugin.common.PluginRegistry.Registrar
import
io.reactivex.disposables.CompositeDisposable
import
io.reactivex.disposables.CompositeDisposable
import
java.io.File
import
kotlin.collections.ArrayList
import
kotlin.collections.ArrayList
import
kotlin.collections.HashMap
import
kotlin.collections.HashMap
import
java.io.File
class
GengmeiFlutterPlugin
:
MethodCallHandler
{
class
GengmeiFlutterPlugin
:
MethodCallHandler
{
...
@@ -98,6 +98,10 @@ class GengmeiFlutterPlugin : MethodCallHandler {
...
@@ -98,6 +98,10 @@ class GengmeiFlutterPlugin : MethodCallHandler {
private
fun
gotoNativeCamera
(
providerString
:
String
)
{
private
fun
gotoNativeCamera
(
providerString
:
String
)
{
val
file1
=
File
(
"${Environment.getExternalStorageDirectory()}/GengmeiAlbum"
);
if
(!
file1
.
exists
())
{
file1
.
mkdirs
()
}
nativeImage
=
File
(
Environment
.
getExternalStorageDirectory
(),
"/GengmeiAlbum/GengmeiAi${System.currentTimeMillis()}.jpg"
);
nativeImage
=
File
(
Environment
.
getExternalStorageDirectory
(),
"/GengmeiAlbum/GengmeiAi${System.currentTimeMillis()}.jpg"
);
val
intent
=
Intent
(
MediaStore
.
ACTION_IMAGE_CAPTURE
);
val
intent
=
Intent
(
MediaStore
.
ACTION_IMAGE_CAPTURE
);
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
N
)
{
//如果在Android7.0以上,使用FileProvider获取Uri
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
N
)
{
//如果在Android7.0以上,使用FileProvider获取Uri
...
@@ -332,6 +336,9 @@ class GengmeiFlutterPlugin : MethodCallHandler {
...
@@ -332,6 +336,9 @@ class GengmeiFlutterPlugin : MethodCallHandler {
map
.
put
(
"path"
,
it
.
second
)
map
.
put
(
"path"
,
it
.
second
)
map
.
put
(
"isVideo"
,
"F"
)
map
.
put
(
"isVideo"
,
"F"
)
map
.
put
(
"folderName"
,
"GengmeiAlbum"
)
map
.
put
(
"folderName"
,
"GengmeiAlbum"
)
Log
.
e
(
"lsy"
,
" ${map} "
)
Log
.
e
(
"lsy"
,
" ${it.first} "
)
Log
.
e
(
"lsy"
,
" ${it.second} "
)
ImageRespository
.
getInstance
().
recordImageListMap
.
add
(
map
)
ImageRespository
.
getInstance
().
recordImageListMap
.
add
(
map
)
ResultManager
.
getInstance
().
resultSuccess
(
gotoNativeCameraKey
,
map
);
ResultManager
.
getInstance
().
resultSuccess
(
gotoNativeCameraKey
,
map
);
},
{
},
{
...
...
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