【问题标题】:Launching Android Netflix App while entering Credentials Using Another test App使用另一个测试应用程序输入凭据时启动 Android Netflix 应用程序
【发布时间】:2021-04-12 21:03:29
【问题描述】:

我有一个 Netflix 登录应用程序,用户可以在其中输入 Netflix ID 和密码,然后登录页面将用户重定向到 Netflix Android 应用程序。我在将 Netflix ID 和密码从我的应用程序传递到 Netflix 应用程序时遇到问题。到目前为止,我只能从我的测试应用程序启动 Netflix 应用程序。请帮我解决这个问题。

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

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

class MyApp extends StatefulWidget {
@overrideMyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}

Color containerColor = Colors.red;

@override
Widget build(BuildContext context) {
return MaterialApp(
    home: Scaffold(
        appBar: AppBar(
          title: const Text('Netflix Sign-In App'),
        ),
        body: SingleChildScrollView(
          child: Container(
            child: Column(
              children: <Widget>[
                Container(
                  child: Form(
                    child: Column(
                      children: <Widget>[
                        Container(
                          child: TextFormField(
                            decoration: InputDecoration(
                                labelText: 'Email',
                                prefixIcon: Icon(Icons.email)),
                          ),
                        ),
                        Container(
                          child: TextFormField(
                            decoration: InputDecoration(
                              labelText: 'Password',
                              prefixIcon: Icon(Icons.lock),
                            ),
                            obscureText: true,
                          ),
                        ),
                        SizedBox(height: 20),
                        RaisedButton(
                          padding: EdgeInsets.fromLTRB(70, 10, 70, 10),
                          onPressed: () async {
                            await LaunchApp.openApp(
                              androidPackageName: 'com.netflix.mediaclient',
                              iosUrlScheme: 'nflx://',
                              //appStoreLink:
                              //'itms-apps://itunes.apple.com/us/   app/pulse-secure/id945832041',
                              // openStore: false
                            );
                          },
                          child: Text('SIGN-IN',
                              style: TextStyle(
                                  color: Colors.white,
                                  fontSize: 20.0,
                                  fontWeight: FontWeight.bold)),
                          color: Colors.blue,
                          shape: RoundedRectangleBorder(
                            borderRadius: BorderRadius.circular(20.0),
                          ),
                        )
                      ],
                    ),
                  ),
                ),
              ],
            ),
          ),
        )));
}

}

【问题讨论】:

  • 我构建这个应用程序的主要重点是自动化登录过程,用户应该能够使用我的应用程序登录到其他应用程序。点击一下。
  • I'm facing issue in passing the Netflix Id And Password 什么问题?您可以编辑您的问题并向其添加必要的更新。
  • 我可以使用我的应用(使用上述代码)打开另一个应用,但是如何将用户凭据从我的应用传递到另一个应用。

标签: android flutter dart


【解决方案1】:

external_app_launcher 没有 API 可以将数据传递给应用程序,我认为您应该尝试firebase dynamic link

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-06-10
    • 1970-01-01
    • 1970-01-01
    • 2015-03-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-11
    相关资源
    最近更新 更多