如何在 android air 应用程序中通过 as3 打开 Instagram 页面?

how to open an Instagram page by as3 in android air application?

我想通过单击我的应用程序中的按钮打开一个 Instagram 页面,例如 Instagram 应用程序中的 "instagram/mypage"。 代码是什么?

mybuttun.addEventListener(MouseEvent.CLICK, open_instagram_page);
function open_instagram_page(event:MouseEvent)
{
    //what should i write here?
}

我发现这段代码可以打开 android 设备的 "setting" 页面,如何更改它以在 Instagram 应用程序上打开特定页面:

var url:String = ("intent:#Intent;" +
                  "action=android.intent.action.MAIN;" +
                  "category=android.intent.category.LAUNCHER;" +
                  "component=com.android.settings/.Settings;" +
                  "end");
navigateToURL(new URLRequest(url));

您必须选择 Air Native Extension (ANE),
这很简单,首先验证 Instagram 是否已安装,然后为此目的编写本机代码并让 AIR 在 AS3 和 Android 机器之间进行通信。

本机代码可以是 Java(对于 Android)和 Objective-c(对于 IOS)

开始看一看this official tutorial
在 ANE

周围还有另一个 Documentation

您可以使用 Share ANE 将 Instagram 应用程序打开到特定页面。以下适用于 Android 和 iOS:

var app:Application = new Application( "com.instagram.android", "instagram://" );

var options:ApplicationOptions = new ApplicationOptions();
options.action = ApplicationOptions.ACTION_VIEW;
options.data = "http://instagram.com/_u/distriqt";
options.parameters = "user?username=distriqt";

if (Share.service.applications.isInstalled( app ))
{
    Share.service.applications.launch( app, options );
}

我是这个 ANE 的开发者之一。