Commit 65160352 authored by 林生雨's avatar 林生雨

commit

parent c7850136
......@@ -5,7 +5,9 @@
<option name="TOOL_WINDOW_CONFIGURED_FILTER" value="Show only selected application" />
</component>
<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$/.idea/" />
<ignored path="$PROJECT_DIR$/.pub/" />
......@@ -73,7 +75,7 @@
<entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/repository/AlbumRepository.dart">
<provider selected="true" editor-type-id="text-editor">
<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>
<element signature="e#46#106#0" expanded="true" />
</folding>
......@@ -296,6 +298,7 @@
</component>
<component name="ToolWindowManager">
<frame x="673" y="-861" width="1440" height="811" extended-state="0" />
<editor active="true" />
<layout>
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.1509299" />
<window_info id="Captures" order="1" side_tool="true" />
......@@ -585,7 +588,7 @@
<entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/repository/AlbumRepository.dart">
<provider selected="true" editor-type-id="text-editor">
<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>
<element signature="e#46#106#0" expanded="true" />
</folding>
......
......@@ -25,9 +25,9 @@ import io.flutter.plugin.common.MethodChannel.MethodCallHandler
import io.flutter.plugin.common.MethodChannel.Result
import io.flutter.plugin.common.PluginRegistry.Registrar
import io.reactivex.disposables.CompositeDisposable
import java.io.File
import kotlin.collections.ArrayList
import kotlin.collections.HashMap
import java.io.File
class GengmeiFlutterPlugin : MethodCallHandler {
......@@ -98,6 +98,10 @@ class GengmeiFlutterPlugin : MethodCallHandler {
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");
val intent = Intent(MediaStore.ACTION_IMAGE_CAPTURE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { //如果在Android7.0以上,使用FileProvider获取Uri
......@@ -332,6 +336,9 @@ class GengmeiFlutterPlugin : MethodCallHandler {
map.put("path", it.second)
map.put("isVideo", "F")
map.put("folderName", "GengmeiAlbum")
Log.e("lsy", " ${map} ")
Log.e("lsy", " ${it.first} ")
Log.e("lsy", " ${it.second} ")
ImageRespository.getInstance().recordImageListMap.add(map)
ResultManager.getInstance().resultSuccess(gotoNativeCameraKey, map);
}, {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment