如何在Android Air应用程序中通过as3打开Instagram页面? [英] how to open an Instagram page by as3 in android air application?

查看:95
本文介绍了如何在Android Air应用程序中通过as3打开Instagram页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

i want open an instagram page by clicking on a button in my app, for example "instagram/mypage" in Instagram app. whats the code?

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

我发现此代码打开了android设备的设置页面,如何更改即可在instagram应用上打开特定页面:

i found this code that open "setting" page of android device,how change it to open specific page on instagram app:

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));


推荐答案

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

You can use the Share ANE to do open the Instagram app to a specific page. The following works on Android and 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的开发商之一。

这篇关于如何在Android Air应用程序中通过as3打开Instagram页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆