如何嵌入I-码头服务器到Android应用程序? [英] How to embed i-jetty server into android application?

查看:137
本文介绍了如何嵌入I-码头服务器到Android应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好:我想我-码头集成到一个Android应用程序,而不是周围的其他方式。有没有人包括之前的i-码头,并把它到Android 2.1或2.2下运行?

Hi: I want to integrate i-jetty into an Android application and not the other way around. Has anyone included i-jetty before and got it to run under Android 2.1 or 2.2?

推荐答案

我成功设法I-码头融入我的应用程序,任何人在那里谁仍然希望这样做。

I successfully managed to integrate I-Jetty into my application, for anyone out there who is still hoping to do so.

所以基本上我所做的是我下载的是I-码头源$ C ​​$ c和进口它作为日食Maven项目。然后,我添加一个模块到父pom.xml中指向一个web应用Maven的模块,我做了:

So basically what I did is I downloaded the i-jetty source code and imported it as a maven project in eclipse. Then I added a module to the parent pom.xml that points to a webapp maven module I made:

<modules>
   <module>i-jetty-server</module>
   <module>i-jetty-ui</module>
   <module>webapp</module>
</modules>

和上市的i码头父为母的Web应用程序模块的pom.xml:

and listed the i-jetty-parent as the parent in the webapp module's pom.xml:

<parent>
  <groupId>org.mortbay.ijetty</groupId>
  <artifactId>ijetty-parent</artifactId>
  <version>3.2-SNAPSHOT</version>
</parent>

然后,我复制了所有我的Andr​​oid应用程序文件到i-码头-UI Maven的模块(包括所有的源文件和资源)。那么你只需要改变的i-码头AndroidManifest.xml文件,包括所有的新的活动,改变'启动'的活动,以自己的应用程序的启动活动,并删除

Then I copied all my android application files into the i-jetty-ui maven module (including all source files and resources). Then you just change the i-jetty AndroidManifest.xml file to include all your new activities and change the 'startup' activity to your own application's launch activity, and remove the

   <intent-filter>
       <action android:name="android.intent.action.MAIN" />
       <category android:name="android.intent.category.LAUNCHER" />
   </intent-filter>

从IJetty活动的声明。

from the IJetty activity declaration.

就这样,你必须运行在自己原来的我,码头的应用程序! 让我知道如果你需要更多的细节,我这里假设你已经看过成源$ C ​​$ c和有行家有基本的了解。

And thus you have the original i-jetty application running within your own! Let me know if you need more details, I assumed here you have looked into the source code and have a basic understanding of maven.

这篇关于如何嵌入I-码头服务器到Android应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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