Skip to content

Commit

Permalink
feat: add support to open sim profile settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Remon committed Oct 18, 2024
1 parent 816668a commit c7be4f9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ private static String convertAction(String action) {
return Settings.ACTION_LOCATION_SOURCE_SETTINGS;
case "action_application_details_settings":
return Settings.ACTION_APPLICATION_DETAILS_SETTINGS;
case "action_manage_all_sim_profiles_settings":
return Settings.ACTION_MANAGE_ALL_SIM_PROFILES_SETTINGS;
default:
return action;
}
Expand Down
12 changes: 12 additions & 0 deletions packages/android_intent_plus/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,13 @@ class ExplicitIntentsWidget extends StatelessWidget {
intent.launch();
}

void _openSimSettings() {
const AndroidIntent intent = AndroidIntent(
action: 'action_manage_all_sim_profiles_settings',
);
intent.launch();
}

void _openApplicationDetails() {
const intent = AndroidIntent(
action: 'action_application_details_settings',
Expand Down Expand Up @@ -304,6 +311,11 @@ class ExplicitIntentsWidget extends StatelessWidget {
'Tap here to open gmail app with details',
),
),
const SizedBox(height: 16),
ElevatedButton(
onPressed: () => _openSimSettings(),
child: const Text('Tap here to open sim profiles.'),
),
],
),
),
Expand Down

0 comments on commit c7be4f9

Please sign in to comment.