It's been a few years since I've tried to create an Android application and since everything has moved away from Eclipse and now onto AS my old templates no longer work. I'm looking for tutorials that allow me to use my own custom html, css and Jquery, seeing as stuff like super.loadUrl("file:///android_asset/www/index.html"); don't seem to work anymore.
Are there any links or anything anyone can provide to get me started on creating non java dependant application?
If you want to make an app without using java you can start learning ionic framework https://ionicframework.com/
You can also go through Apache Cordova. It allows you to use standard web technologies such as HTML5, CSS3, and JavaScript for cross-platform development and you can also go with Xamarin that uses C# for cross-platform development.
You can also go through this tutorial for better understanding and for start learning from fresh :
Ionic tutorial https://www.youtube.com/watch?v=0jamhGf-8ww&list=PLYxzS__5yYQljbuGjaeugpqs9U07gS5P5
Cordova Tutorial https://www.youtube.com/watch?v=kqWZuEpHoSw&list=PLReL099Y5nRd9BNsMZwXvTDeqnfRMiGJy
Hope this will be helpful!!
Related
I want to develop application in android and iOS both.
But i am confuse between native development and development using react and node.js etc.
Please help me to choose (If possible specify reason).
P.S Here cost is not an issue.
If you need high performance and attractive UI and don't want to be blocked by some functionalities that may not br provided by cross platform, I recommend you to use native platform. But if your app doesn't need to be very attractive and doesn't need too much processing, then you can use cross-platform. Actually for many features you need to add plugins if you are building cross platform app and adding number of plugins makes your application slower.
OK, well there isn't much data to go on, but there are several options if you want to write cross platform apps.
There is:
Sencha Touch - HTML and JavaScript
PhoneGap - HTML, JavaScript and CSS
QT - C++ and QML
Appmethod - C++ and Object Pascal
Xamarin - C#
Visual Studio - looks like you can do C# or C++, or Unity for games.
and probably a lot more...
Why would you choose one of these instead of writing in the native language for the platform?
Well, the pros seem to outweigh the cons. If you are targeting several platforms, I would choose one of the options above, simply because you only have to write everything once. If you did it native for each platform, you would write everything twice or maybe three or even four times. Using one of the above tools will be much easier and save you time, and they might be just as seamless and workable as native development.
To simply answer your question, If you would like to be able to write your app once, and be able to manage all future updates by managing only one code base, do cross platform using one of the above tools. The only downside is that you might have to learn a new language (but with a place like Stack Overflow, learning new languages is pretty awesome). It will save you time in the long run.
I have a question about Android Studio: Does AS supports AngularJS code while designing XML files, e.g. for small animations or effects?
SUMMARY : NO
There is no way you can write Angular JS code while developing Android Native app. You can use Angular in a WebView (using js/html so), that's all.
AngularJS is a completely different technology than what is used in native Android apps. Native Android apps use Java and/or C for their code, which is compiled when you build the app. AngularJS is a framework for web development, running specifically on Javascript (a completely different technology than Java).
You can build apps without using native Java or C code, but there are tradeoffs. As noted in other answers, you can display webpage views as apps (using technologies like Cordova]), or use frameworks like React Native to write code in Javascript that then gets compiled to a native app. You could use AngluarJS in the webview instance, since it just displays a webpage, however not in something like React Native. I highly encourage you to check both of these (and other options) out, but keep in mind that they have their own limitations and tradeoffs – no one way is the "right" way to build an app.
In summary: No, AngularJS is a web technology, not a native app technology.
new answer = Yes... Sort of, you can do it with:
https://www.nativescript.org/
It translates javascript, angular and typescript code into native components!
Apparantly it's possible to use nativescript in Android Studio with:
https://docs.nativescript.org/runtimes/android/getting-started/hello-world
Android Does not support AngularJs. but still if you want to use you can use it in webview.
I just started learning Phonegap.
I went through this tutorials .
Now I got one question in my little mind..
I just want to know what are the tasks can not be done using phonegap for Android.
I searched a lot on this question but I found this kind solutions on pros and cons of phonegap, and those are not answers to satisfy my mind.
please anybody provide relevant solution.
Thank you in advance :)
In very simple words PhoneGap based on a native WebView with some Cordova API (A javascript bridge).
That means that you can call functions from the WebView to your native code and in oposite direction.So that means that you can do anything that the native can do.
Because you question is too abstract I would say again that you can do anything like native, but for functionality that is not appear in Cordova API you will need to implement buy yourself (native) using Javascript bridge (for Android and IOS).
I hope that satisfy your mind.
I'm trying out cocos2d-x and got to the point where I can build the Javascript samples for Android and run them inside a browser as well.
Now I want to create my own game, but coming from a HTML background, I'd rather use HTML tags with CSS than use Javascript to setup the user interface.
I've read about UIWebView which can display HTML-pages in an app, but I was wondering if anyone has ever done this in combination with Cocos2D-x ? And could this be transparent, to overlay a normal cocos2d-x screen in the app then?
If so, how could this be done?
You can use CCXWebview for that with Cocos2d-x. This extension is based on Cocos2d-x 2.0.4 and it seems to work also on Cocos2d-x 2.x with some modification.
However, if you want to use Cocos2d-x 3.0 for Android, you cannot use it because Cocos2d-x 3.0 uses NativeActivity, thus you cannot combine Android WebView on the Cocos2d-x screen.
EDITED
only problem is that I have little knowledge of Java or C++
... It would take me years to figure the Java and C++ things out :)
So why are you sticking to use Cocos2d-x??? Why don't you use Cocos2d-html5? It has same functionality as Cocos2d-x JavaScript binding and it uses HTML5 Canvas, so you can use DOM with it.
https://twitter.com/hyperandroid/status/311534580962295809 :
Cocoonjs can run Cocos2d-html5 games too.
I am rewriting an Android project, and I am stucked and sucked at making the GUI look like the way I wanted it too. It is easily achievable using HTML and CSS, I have done it with PhoneGap, CSS, HTML, JS, but it is kind of slow, so I want to do it native using Java.
(My background is C++ and some web programming stuff)
What I have been encountered so far is that the default GUI builder is not really pretty and I feel frustated almost every the time using it. And people recommend droiddraw in few other questions in Stackoverflow, but it also not resulting in pretty GUI as well.
What I want to have is some flexibility like HTML and CSS and from that I can execute native code.
I believe I can achieve GUIs like from the Facebook or Twitter client easily with HTML and CSS, but if i m going to do native using the SDK, I think I'm gonna need something like 1 month just to do the GUI.
So the questions would be:
Is there any GUI framework for Android SDK ? (More high level then the provided one)
How to render HTML/CSS that allows executing native code on interaction with its element.
Any suggestions welcome for any workflow.
And of course, Open Source solutions are preferable.
There are some projects for some iphone like widgets in android. You can find them seperately mostly in github, so I have not even seen a complete higher level widget library yet. But you can give appcelerator a try. You are writing html,css,js and it compiles to native code. I personally did not used it. It is a free software. Some people are happy with it, and some are not. You should read some experiences before beginning development. http://www.appcelerator.com/