Android app in HTML - android

I've looked at this doc: http://developer.android.com/guide/webapps/webview.html
It seems it might be attractive strategy to use HTML/Javascript to get:
result faster (I can use my browser to create a prototype very quickly, just updating my page in the browser, and not waiting for emulator to be update my changes)
avoid to to learn Android API too deep (but use what I know HTML/CSS/JS instead)
reuse my code, putting it to iOS, BlackBerry (not only Android)
The only question I have.. Is whether someone already did it for real? Because tutorials that I've found - just show how to print 'Hello world!' message in simple HTML.
But what would be more interesting to get is 'how it works with embedded database' in android,
OR better say, as an example what I mean:
How to handle JS' "onClick" to get some data stored to db?
UPDATE:
Yeah.. there are a lot of PRODUCTS. But what if I need just a storage support (need to put and read data from db). no need anything sophisticated like camera support. What I really want to avoid is:
waiting for Emulator updated
write simple and easy components and layout in HTML to get instant result (it seems more natural for me, even though I'm Java Dev.. but it's lame to wait for result building and waiting when working with UI)
I'm looking for someone's existing experience to avoid addition complexity and time gaps between builds/tries while working with UI.

Look into Phonegap to convert HTML, CSS, and JS code into a native phone app for android or iOS. Very useful as it puts a web wrapper around the web code to run it natively on your phone. This should solve storage issues as well, lots of documentation around for phonegap, be sure to check it out!

I just released http://www.protocoder.org under MIT license, give it a try! Its meant to basically do what you mention in the first point (prototype fast), and on the second avoid to learn the Android API to deeply.
Its still a young project but I hope it will grow really fast :)

Related

Importing Artificial Neural Networks in Android App

This might sound a bit of a stupid question, but I'm doing a project where I'm using an ANN to diagnose Sepsis in patients using various vital signs as inputs. The aim is to then develop an Android app that allows a user to put in the inputs and will return a risk score (% likelihood of sepsis, etc)
I'm constructing my ANN using Matlab (using their pattern recognition network wizard), and I'm using MIT App Inventor 2 to build the App itself.
Where I'm struggling, is understanding how one would actually put the ANN into the app. Can anyone explain how this works to me, or even just point me in some vague direction?
There is a matlab-compatible programming language called Octave, and it works on Android as well. You might want to take a look at it, it's called addi.
Matlab/Octave is great for scientific prototyping. Once you enter the realm of mobile applications, the best option is to re-write the libraries in Java. It could be painful but with a proper design you will be able to scale your app without depending in Matlab/Octave hacks.
If this absolutely positively has to be present on Android, on the phone itself, the straightforward way to do this is to write the software in Java and then write the Android GUI around it.
But does the software absolutely need to be on the phone? Maybe. But if not, why not make the Android part a client that communicates with a more powerful and flexible remote server? The server can implement in whatever language it likes.

Android User Interaction

I'm about to start developing my first Android application, I have been reading through the developer documentation, but am unclear on how user interactions are handled.
As a front end developer, I use alot of css/jquery to create rich and interactive user interfaces.
I see that Android has it's own version of stylesheets, which seem pretty straight forward, but I am left wondering how I can replace something like js/jquery. Is it possible to use JQ mobile for native Android apps? Is there a replacement to this? Does android's UI handle this?
I'm a little confused.
Yes, it is still possible to heavily leverage your js/jquery skills and create a solid Android application that provides a rich user interface which is primarily js.
This will obviously depend greatly on what kind of application you're writing however if you own a website that delivers rich web content to end users and you'd like to replicate this in an Android application then you should take a look at webviews. They should support most of what you're trying to do in js or JQuery and it would be a quick process to mock up a test app to see if it meets you needs. I have run into a few quirks when replicating some interactive d3js visualizations which required extra tweaking before working properly on mobile devices.
I expect these minor issues will be ironed out in the next few releases of Android. Kitkat is going to include webviews that are based on Chromium which will include an updated version of the javascript engine. Your best bet is to just test it out, the amount of Java code required for a mock application is quite minimal.

jQquery Mobile site project for categorised notes - sanity check please?

I am asking for your advice and a sanity check, please. For a couple of years I have thought about building a mobile site for my own purposes (initially) that will allow me consistent interface on the web and on a mobile phone. My initial target is Android 4 and above.
The central idea is to make notes via web interface. It is easy to
edit on a full PC. Basic formatting is necessary - bold, italic,
lists. I should have some basic editing / adding capability from the phone.
Possibly I might need to add images. This at a later stage.
I will need to use tables.
View these categorised notes on my phone when I need to access that information quickly.
Information should be searchable.
I should be able to categorise that information both hierarchically and by labels.
On the phone the last copy of the information should be available even when there is no internet access. That is the key bit of this project - clear, well structured information, easily available when needed.
So far I have done some 7 websites 6 - 9 years ago and this year I did a responsive design interface with jQuery and HTML5. I have access to Apache on a linux hosting site. I have looked into jQuery Mobile. I think jQuery mobile should be great for my front-end. From my past work with LAMP servers I think I have to have a database backend to this project. What I have looked into so far suggests that the best would be to invest some time in learning Ruby on Rails (which looks very interesting to me) and use that as a back end interface with a database. What database I should use, I don't know. I have in the past used mySQL, also programmed Access and a bit DB2. I have heard a lot of good stuff about postgres. However considering the mobile phone, I think I should go with SQLite probably? What should be the general mechanism for updating the phone from the net?
How does the above look?
Maybe there are some projects which already do something like this?
I don't think I should use some big CMS systems with their bloat and all, because I really want this thing to work for me. Same goes for generic note taking systems such as Evernote. So I am wanting to build it from the ground up, unless there is some similar lightweight project that I could build upon. I am not in a particular hurry, but I am about to get started soon.
A great type of answer for me would be one which tells what major components I should use for this project. It also would be good to know if I am overlooking some important bits.
I appreciate that what I am asking is a large question, but I am not expecting a Wikipedia in response. A sanity check and pointers in the right direction is what I need.
Thank you for your time and thoughts.
What a wall of text... 1.-7. are all achievable by using jquery mobile and HTML5 and a good database architecture as backend. I don't see any BIG problems in your idea. What database you use is up to you, your requirements are not that special, that it would require some specialized product. Any established database backend should do the job.
For updating the content on your phone take a look on HTML Offline Cache and implement an update feature in your Frontend.

UI feel and look in Titanium, PhoneGap compared to native

I am about to decide which way to push our smartphone development.
I have read numerous articles about these technologies. I have also created test apps, but wanted to be 100% sure that I get this right.
I am not able to create EXACTLY the same look and feel like native app in PhoneGap because it runs in WebView Controler. And the webish look and feel is as far as I will get with this tech. correct?
(In the example app I have created with PG, the look might be similar, but there is a delay when i click on buttons and the animation is not so fluent as in native apps)
Latest Titanium seems to have changed its approach to WebView, to remedy that lack of look and feel of native apps. My question is (I havent tested this myself). Can I create EXACTLY the same look and feel of an native app with Titanium?
EXACTLY is the key word. I mean can a person tell a difference if app was created with Titanium? because I can definitely tell that app was created with PG.
Final goal is the UX, ppl sense this things, and on smartphones anything that is webish and is suppose to be appish is a bad UX i believe.
Thanks
Compared to PG Titanium is more Native like UI experience but it's kinda problematic for Android.Since it's originally intended for IOS.
Titanium for Android is pretty buggy and can mess you up and the thing that you have to come up with workarounds and if you cant find any then you are stuck.
But if you are okay with that and i can easily advise that Titanium is way to go though it's nearly native (not exactly) which close to exactly.I dont think an average user would understand Titanium .
2) yes, since titanium uses the original UI. your javascript code is wrapped to native Objective c code that creates native elements. only constraint is that your are not as flexible as with real native code written by yourself. but you can write native modules and add them to your projekt. so you're able to expand your project with custom UI too.

projecting / starting medical information app on Android

I would like to create a custom open source information management application, that I could adapt to practical needs of a psychiatrist. (and also would really like to avoid inventing the wheel). Could someone advise me what would be a good way to start? I have some amateur programming experience (see below), but I have little experience with java and eclipse (which I have set up with Android SDK plugin on my linux PC).
What I would like to achieve is a simple app where I could relatively easily re-program/rearrange information presenting screens. I would like the major development stages to be something like:
Basic framework of the app is done Main information is added
through the programming environment
basic formatting (bold, color, lists) should be supported
I imagine this would be through HTML/CSS markup Hierarchical (not
too deep) screens with concise information about conditions,
treatments; easy, not too cumbersome navigation is a must.
Possibility to attach own notes from android device
on every piece of information (e.g. on medical condition, on medication,
list of differential diagnoses, etc)
A desktop application that allows for easy adding and editing
of the content
initially could be even sqlite manager or something similar
possibility for adding images,
possibility to add rating scales, which would calculate scores
maybe also possibility to print through some android print driver
* in essence I envision this as a sort of an integrated website with a relatively simple database behind it (sqlite?) running on android. My models would be epocrates and medscape apps, but the content would be more specific to everyday psychiatric practice. It would include aspects of psychological therapies as well.
In about a years time, I think, the content would be interesting enough to see whether the app should go on the market.
My (limited) experience:
I am a MD - a Psychiatrist. I have some amateur development experience (php, html, css, Perl, bash, sed, sql, Access and some time ago - AS/400). I would like to start an app that I could modify as I go - in order to have the most useful info at my fingertips, when I need it in my work. I have considered some databases (e.g. HandDB) but my experience with them is that you get very constricted with their user interface and this hinders fast information retrieval when you need it. Adding information can be clumsy as well.
Why I am asking for help here
Most of tasks above seem pretty standard. I imagine that people with lots of programming experience here, probably would be able to point me towards some information that would help me to get started.
Many thanks for considering this :)
Are you going to develop this app? Everything you mentioned can be easily done by reading the android documentation. Although if its you doing the coding i recommend buying a book
You will find a lot of samples and other support in the android doc
Printing can be also setup using Google Cloud print
If you want to open source your application you can always use google code.
You have asked a really broad question here. But i guess the above information is good to get you started.

Categories

Resources