app_activity_launcher 0.0.2 copy "app_activity_launcher: ^0.0.2" to clipboard
app_activity_launcher: ^0.0.2 copied to clipboard

PlatformAndroid

A plugin to open external apps in a specific activity, with extras

app_activity_launcher #

A Flutter plugin for launching external apps and activities on Android. With this plugin, you can easily start external apps, start specific activities within apps, open the device's app store for a given app, and pass data to external apps.

Features #

  • Start an external app
  • Start an external app in a specific activity
  • Open the device app market for a given appId
  • Pass extras to external apps

Getting Started #

To use this plugin, add app_activity_launcher as a dependency in your pubspec.yaml file.

dependencies:
  app_activity_launcher: ^0.0.2

Start an external app #

import 'package:app_activity_launcher/app_activity_launcher.dart';

var _app = AppActivityLauncher()
await _app.openApp(appId: "com.example.app"); // returns false if there was an error

Start an external app in a specific activity #

import 'package:app_activity_launcher/app_activity_launcher.dart';

var _app = AppActivityLauncher()
await _app.openActivity(appId: "com.example.app", activity: "MainActivity");

Open the device app store for a given appId #

import 'package:app_activity_launcher/app_activity_launcher.dart';

var _app = AppActivityLauncher()
await _app.openMarket(appId: "com.example.app");

Pass extras to external apps #

import 'package:app_activity_launcher/app_activity_launcher.dart';

var _app = AppActivityLauncher()
Map<String, String> extras = {
  "url": "https://example.com/videos/master.mp4"
};
await _app.openActivity(appId: "com.example.app", activity: "PlayerActivity", extras : extras);

Contribute #

If you find any bugs or have a feature request, please open an issue on GitHub. Pull requests are welcome!

3
likes
120
pub points
61%
popularity

Publisher

unverified uploader

A plugin to open external apps in a specific activity, with extras

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on app_activity_launcher