[英]Worklight(6.1v) hybrid app - need to open other application from my app
[英]How to open the pre installed app from the another hybrid application using worklight and ionic framework
我需要打开在另一个混合应用程序的按钮单击事件触发时应在移动设备中安装的位智应用程序。 我对此一无所知。
对于此要求,我必须使用Worklight 6.3和离子框架。
任何帮助表示赞赏。
您的要求与Ionic无关。
您也没有提到这是用于Android还是iOS。
无论如何,您可以查看以下“常规”混合项目: https : //www.dropbox.com/s/6fgtjhzgvl6p9n0/OpenExternalApplication.zip?dl=0
它包含在iOS中打开现有(已安装)应用程序(Waze)所需的本机代码。
部分代码:
- (void)openApp:(CDVInvokedUrlCommand*)command {
NSString *wazeAppURL = @"waze://";
NSString *mapsAppURL = @"maps://";
BOOL canOpenURL = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:wazeAppURL]];
NSString *url = canOpenURL ? wazeAppURL : mapsAppURL;
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
NSString *responseString =
[NSString stringWithFormat:@"OK"];
CDVPluginResult *pluginResult =
[CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:responseString];
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.