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

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:app_activity_launcher/app_activity_launcher.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final _app = AppActivityLauncher();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
          centerTitle: true,
        ),
        body: Center(
          child: ElevatedButton(
            onPressed: _openVibePlyr,
            child: const Text("Open VibePlyr"),
          ),
        ),
      ),
    );
  }

  _openVibePlyr() async {
    var res = await _app.openActivity(
        appId: "io.mediaon.vibeplyr",
        activity: "PlayerActivity",
        extras: {
          "url":
              "https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_1MB.mp4"
        });
    print(res);
  }
}
4
likes
140
pub points
73%
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