This repository was archived by the owner on Feb 22, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +34
-1
lines changed
android/src/main/java/io/flutter/plugins/androidintent Expand file tree Collapse file tree 5 files changed +34
-1
lines changed Original file line number Diff line number Diff line change 1+ ## 0.3.3+1
2+
3+ * Added "action_application_details_settings" action to open application info settings .
4+
15## 0.3.3
26
37* Added "flags" option to call intent.addFlags(int) in native.
Original file line number Diff line number Diff line change @@ -29,6 +29,19 @@ for it in the plugin and use an action constant to refer to it. For instance:
2929
3030` 'action_location_source_settings' ` translates to ` android.settings.LOCATION_SOURCE_SETTINGS `
3131
32+ ` 'action_application_details_settings' ` translates to ` android.settings.ACTION_APPLICATION_DETAILS_SETTINGS `
33+
34+ ``` dart
35+ if (platform.isAndroid) {
36+ final AndroidIntent intent = AndroidIntent(
37+ action: 'action_application_details_settings',
38+ data: 'package:com.example.app', // replace com.example.app with your applicationId
39+ );
40+ await intent.launch();
41+ }
42+
43+ ```
44+
3245Feel free to add support for additional Android intents.
3346
3447The Dart values supported for the arguments parameter, and their corresponding
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ private String convertAction(String action) {
4646 return Settings .ACTION_SETTINGS ;
4747 case "action_location_source_settings" :
4848 return Settings .ACTION_LOCATION_SOURCE_SETTINGS ;
49+ case "action_application_details_settings" :
50+ return Settings .ACTION_APPLICATION_DETAILS_SETTINGS ;
4951 default :
5052 return action ;
5153 }
Original file line number Diff line number Diff line change @@ -142,6 +142,14 @@ class ExplicitIntentsWidget extends StatelessWidget {
142142 intent.launch ();
143143 }
144144
145+ void _openApplicationDetails () {
146+ final AndroidIntent intent = const AndroidIntent (
147+ action: 'action_application_details_settings' ,
148+ data: 'package:io.flutter.plugins.androidintentexample' ,
149+ );
150+ intent.launch ();
151+ }
152+
145153 @override
146154 Widget build (BuildContext context) {
147155 return Scaffold (
@@ -186,6 +194,12 @@ class ExplicitIntentsWidget extends StatelessWidget {
186194 'Tap here to open Location Settings Configuration' ,
187195 ),
188196 onPressed: _openLocationSettingsConfiguration,
197+ ),
198+ RaisedButton (
199+ child: const Text (
200+ 'Tap here to open Application Details' ,
201+ ),
202+ onPressed: _openApplicationDetails,
189203 )
190204 ],
191205 ),
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: android_intent
22description : Flutter plugin for launching Android Intents. Not supported on iOS.
33author :
Flutter Team <[email protected] > 44homepage : https://github.com/flutter/plugins/tree/master/packages/android_intent
5- version : 0.3.3
5+ version : 0.3.3+1
66
77flutter :
88 plugin :
You can’t perform that action at this time.
0 commit comments