ソースを参照

1、商品分享

2、Android 权限
tags/0.0.2+3
PH2 4年前
コミット
ae2441295e
3個のファイルの変更30行の追加25行の削除
  1. +5
    -21
      example/android/app/src/main/AndroidManifest.xml
  2. +21
    -1
      example/android/app/src/profile/AndroidManifest.xml
  3. +4
    -3
      lib/pages/goods_share_page/goods_share_page.dart

+ 5
- 21
example/android/app/src/main/AndroidManifest.xml ファイルの表示

@@ -3,26 +3,12 @@
xmlns:tools="http://schemas.android.com/tools"
package="cn.zhios.zhiying_base_widget_example">

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />

<application
android:name="io.flutter.app.FlutterApplication"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:usesCleartextTraffic="true"
tools:replace="android:name">
<activity android:name=".WebActivity" />
<activity
android:name=".TestActivity"
android:theme="@style/Theme.AppCompat.NoActionBar">
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.MAIN" />-->

<!-- <category android:name="android.intent.category.LAUNCHER" />-->
<!-- </intent-filter>-->
</activity>
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
@@ -44,14 +30,12 @@
android:resource="@drawable/launch_background" />
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
android:resource="@style/NormalTheme" />
</activity>
<activity android:name="com.yalantis.ucrop.UCropActivity" android:theme="@style/Theme.AppCompat.NoActionBar"/>
<!--
Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java
-->
<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:theme="@style/Theme.AppCompat.NoActionBar" />
<!-- Don't delete the meta-data below. This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />


+ 21
- 1
example/android/app/src/profile/AndroidManifest.xml ファイルの表示

@@ -3,5 +3,25 @@
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>

<!-- 网络 状态变化等信息 -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<!-- IMEI等基础信息 -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.Manifest.permission.READ_PHONE_STATE" />

<!-- 授权 发现jd app -->
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />

<!-- 静态化资源 -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.CAMERA" />
<!-- 相机 -->
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
</manifest>

+ 4
- 3
lib/pages/goods_share_page/goods_share_page.dart ファイルの表示

@@ -47,9 +47,10 @@ class _GoodsShareContainerState extends State<_GoodsShareContainer>

@override
void initState() {
String d = widget.model['data'];
Map<String, dynamic> data =
Map<String, dynamic>.from(convert.jsonDecode(d));
// String d = widget.model['data'];
// Map<String, dynamic> data =
// Map<String, dynamic>.from(convert.jsonDecode(d));
Map<String, dynamic> data = widget.model;
Logger.debug(data['share_url_args'].toString());
_bloc = BlocProvider.of<GoodsShareBloc>(context);
_bloc.loadData('taobao', data['share_url_args']);


読み込み中…
キャンセル
保存