简体   繁体   English

适用于带有Google Maps的Android导航应用程序的Java与HTML5

[英]Java vs. HTML5 for Android Navigation App with Google Maps

I want to develop a navigation app like "Find my Car" or something. 我想开发一个导航应用程序,例如“ Find my Car”之类。 For the navigation and the map i want to use the google maps api. 对于导航和地图,我想使用Google Maps API。
Now i must decide, which language i want to use. 现在,我必须决定要使用哪种语言。 Java vs. HTML5. Java与HTML5。
I'm more familiar with Java, but in the Google Maps API documentation, it would be easier to develop with HTML5, is it? 我对Java较为熟悉,但是在Google Maps API文档中,使用HTML5开发会更容易,对吗?

The application must run on a android phone. 该应用程序必须在Android手机上运行。 So what is better to use: Java, which i'm more familiar, or with HTML5, which (i think) is easier to use in combination with Google Maps. 因此,最好使用什么:我更熟悉的Java或HTML5(我认为)更易于与Google Maps结合使用。

Hope you can help me, i must decide me in approximately one hour. 希望您能帮助我,我必须在大约一小时内决定我。

Generally, I would not say that the answer is always Java. 通常,我不会说答案总是Java。 It actually depends on your needs, like always. 像往常一样,它实际上取决于您的需求。

The great thing when you use HTML5 (you could try PhoneGap: http://phonegap.com/ ) is that it will work on multiple different systems, whereas a native Android app won't. 使用HTML5(您可以尝试PhoneGap: http//phonegap.com/ )的好处是,它可以在多个不同的系统上运行,而本机Android应用程序则不能。

On the other hand, in a native App, you will be able to access to the whole Android API, and it will be more powerful as well. 另一方面,在本机应用程序中,您将可以访问整个Android API,并且功能也更加强大。

As a conclusion, if you need a powerful app processing images in real time, you want a native application. 结论是,如果您需要功能强大的应用程序实时处理图像,则需要本机应用程序。 But if you want something simple that could easily be rendered in HTML5 and you potentially will create the same application on a different system (say, IOS), then HTML5 will make you earn precious time. 但是,如果您希望简单的东西可以很容易地用HTML5呈现,并且有可能在不同的系统(例如IOS)上创建相同的应用程序,那么HTML5将使您获得宝贵的时间。

And in the case where there is not a clear "good" way to follow, simply choose the one in which you are more comfortable: as long as you can create an application that answer your needs, it will be the most productive way. 并且在没有明确的“好的”方法遵循的情况下,只需选择一种您更舒适的方法即可:只要您可以创建一个满足您需求的应用程序,这将是最有效的方法。

And always keep in mind that it is possible to include a "WebView" in an Android native app, which means that you can have best of both worlds. 始终牢记,可以在Android本机应用程序中包含“ WebView”,这意味着您可以兼得两全。

In your very situation, it seems that Android already has some nice features for using Maps (most probably better than the HTML5 version). 在您所处的情况下,Android似乎已经具有一些使用Maps的不错的功能(最有可能比HTML5版本更好)。 That might help your decision. 那可能会帮助您做出决定。

if you're developing an app (not game) in Android the answer is always Java! 如果您要在Android中开发应用程序(而非游戏),那么答案总是Java! Always! 总是!

and implementing maps in Android in its native Java is as simple as 1.2.3 https://developers.google.com/maps/documentation/android/ 在Android中以本机Java来实现地图就像1.2.3 https://developers.google.com/maps/documentation/android/

Language, IDE, platform ... everything is tool. 语言,IDE,平台……一切都是工具。 What will you use depend on the needs of your application. 您将使用什么取决于应用程序的需求。 I work with both techniques. 我同时使用两种技术。 When you'll develop an application that uses many resources linked to hardware (eg accelerometer, gps...), it is advisable that you use a native language, it saves battery and you has the maximum advantage of the device, gaining in performance. 当您开发一个使用许多与硬件链接的资源的应用程序时(例如,加速度计,gps ...),建议您使用本机语言,这样可以节省电池,并且可以最大程度地利用设备,从而提高性能。

Now if you'll develop an application that uses few hardware resources, the most interesting solution is HTML5 (example: PhoneGap, SenchaTouch, Titanium, etc..). 现在,如果您要开发使用很少硬件资源的应用程序,那么最有趣的解决方案是HTML5(例如:PhoneGap,Sen​​chaTouch,Titanium等)。

In my years of experience, before deciding how to develop I wonder what I will develop, so as to see which one best meets my need! 在我多年的经验中,在决定如何发展之前,我想知道我会发展什么,以便确定哪一个最能满足我的需求!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM