如何从javascript关闭andorid应用程序? [英] How to close andorid app from javascript?

查看:106
本文介绍了如何从javascript关闭andorid应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在使用HTML5和Javascript构建一个Android应用程序,我想添加一个关闭按钮来结束我的应用程序。我读到我可以通过使用Phonegap API来做,我安装了phonegap,我在硬盘上找不到phonegap.js。



还有另一种方式可以结束我的申请吗?我在哪里可以找到phonegap.js?



谢谢

Hello, I'm building an android app with HTML5 and Javascript, and I want to add a close button to end my application. I read that I can do by using Phonegap API, I installed phonegap and I cannot find the phonegap.js on my hard drive.

Is there another way to end my application? Where can I find phonegap.js?

Thank you

推荐答案

这是2个单独的问题。首先,您需要使用IDE正确配置PhoneGap。检查下载文件夹..然后通过正确检查这些文档来配置IDE:

在Eclipse for Android中开始使用PhoneGap [ ^ ]

http://phonegap.com/developer/ [ ^ ]



要退出应用,请执行以下代码:

Thats 2 separate questions. First you need to configure PhoneGap properly with your IDE. Check your Downloads folder.. then config with your IDE by checking these documentation properly:
Getting started with PhoneGap in Eclipse for Android[^]
http://phonegap.com/developer/[^]

To exit from your app do code like:
exitApp:function() {   
app.exitApp();
}





更多:

PhoneGap - 后退按钮上的android退出 [ ^ ]

在android phonegap中单击按钮时从应用程序退出? [ ^ ]


这篇关于如何从javascript关闭andorid应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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