Android application vs Html 5 pages - General Questions and Answers

I have some requirements for an android application, Since java development will take time, I am trying to figure out if I should code the application using Html5)
1. It should submit some fields from the mobile device to a web application
2. It should be able to capture pictures using camera/gallery and submit to the server/web application
3. It should retrieve some info from the web application and display it (I know that write JavaScript to fetch info from the web application using Ajax)
Can I achieve this using a bunch of Html page running on the mobile phone, or I need to write a designated android/Java application?
Thank you for your help.

shark669 said:
I have some requirements for an android application, Since java development will take time, I am trying to figure out if I should code the application using Html5)
1. It should submit some fields from the mobile device to a web application
2. It should be able to capture pictures using camera/gallery and submit to the server/web application
3. It should retrieve some info from the web application and display it (I know that write JavaScript to fetch info from the web application using Ajax)
Can I achieve this using a bunch of Html page running on the mobile phone, or I need to write a designated android/Java application?
Thank you for your help.
Click to expand...
Click to collapse
You'll have to use Android SDK to build an app, that requires at least Java and C++.
Sent from my SM-S903VL using Tapatalk

Not only ^^, but you'll also have to learn php if you want it to be purely html, since html can't do all that.

Server side I'm ok, I know java, I am asking about client side
Seems like camera interaction is possible with html 5
https://www.html5rocks.com/en/tutorials/getusermedia/intro
Submission to the server is just simple form submit,
And reading from server is possible with Ajax,

Related

running application in C on mobile phone with Android

Hello !
SUMMARY: How to run pocketsphinx_continuous on mobile phone with Android, and how to do it with simulator of mobile phone with Android. PocketSphinx can be downloaded for free here, for both Linux and Windows: http://cmusphinx.sourceforge.net/html/download.php .
Click to expand...
Click to collapse
------------------------------------------------------------------------------------------------------------
SHORT EXPLANATION
I'd like to create application for mobile phone and server such that:
1. User runs application on mobile phone with Android, this application uses PocketSphinx. It is Automatic Speech Recognition software for devices like mobile phones, written in C. Somebody told me that "Pocketsphinx is used successfully on Symbian with minimal effort". (However I think Android may be better choice). My knowledge about Android is limited but I know something about CMU Sphinx. Can you help me, please, to run this PocketSphinx on Android? I also need to find simulator of mobile phone with Android. I have already found Wireless Toolkit and I tried to use this emulator, however I think it doesn't allow to run simulation of mobile phones with Android. (By the way I am limited in my project to mobile phone of the price up to about 160 euro; which Android version would be best for my application?).
2. This application communicates with the user. The users speaks digits and some other words (dictionary is about fifteen words, I can create language and acoustic models, as well as formal grammar in CMU Sphinx, with the use of SphinxTrain). The application recognizes those digits.
3. Based on this talk, mobile phone sends information about results of recognition to the server. I can do it in Java for CLDC/MIDP with httpconnection, POST method on the mobile phone side and with Tomcat on server. I think this httpconnection must be possible not only in Java ME, but also in Android C. But this is thing which will bother me later, now I'd like to run pocketsphinx_continuous on Android and try to modify it according to my needs.
Summing up, what I'd like to know is how to run demo pocketsphinx_continuous on mobile phone with Android, and how to do it with simulator of mobile phone with Android. (I've got Wireless Toolkit but I think it is not capable of running Android). PocketSphinx can be downloaded for free here, for both Linux and Windows: http://cmusphinx.sourceforge.net/html/download.php . There are two ways of installing it in Ubuntu. First is to unpack it (it is tar.gz), enter its directory and type "./configure", "make", "sudo make install". The other, different, is written in README file, i.e. run autogen.sh, "./configure", "make clean all", "make test", "make install". The result should be, among many other files, javadoc in doc directory.
------------------------------------------------------------------------------------------------------------
LONG EXPLANATION
What is required to give me some advices is written above. So if you don't want / don't have time to read the whole text, just above explanation is enough. But let me say about other possible approaches which I try to do. Those are worse than what I explained above, but I also tried them.
CMU Sphinx contains SphinxTrain to create acoustic model. It has got some different recognizers (also called decoders), those are PocketSphinx, Sphinx4 and some other. PocketSphinx is written in C and is for devices like mobile phones. Sphinx4 is Java application for PCs because it requires better hardware. There is good tutorial about using SphinxTrain with Sphinx4. It is here: http://www.speech.cs.cmu.edu/sphinx/tutorial.html . There is no similar tutorial for PocketSphinx. However with some knowledge about Android and C it is possible to run it on Android. The other approach than PocketSphinx, is using this Sphinx4. However it requires connection between mobile phone and server, sending audio data from cellular phone to server. It can be done with Skype, but there is still problem on server side with redirecting sound from Skype to Sphinx4. So you see there are two different approaches. One is to run speech recognition on mobile phone with PocketSphinx and Android. The other is speech recognition on server with Sphinx4. There are some ways to follow this second option. One is Skype on both server and mobile phone. (But there is problem with redirecting speech from Skype to Sphinx4). The other is too expensive Digium card. The third one is IVR, but I still look for good open-source IVR software. All of those three ways of second option involve Sphinx4. It was much easier to create application with Sphinx4. It is for PCs, not embedded devices, because it requires better device, extensive floating point math and some other things. But it has much better documentation than PocketSphinx. But I want to use PocketSphinx because I don't need to pay to anybody for access to mobile internet in order to send data through internet for application like Skype. The access to internet is required only for short time to send little text data with httpconnection, POST method. This is why I'd like you to help me, please, with running pocketsphinx_continuous on simulator of PocketSphinx on mobile phone with Android. (By the way, I see I've got installed S60 Developer Tools -> 3rd Edition FP1 SDK -> MIDP -> Emulator).
Summing up in a list, those are in CMU Sphinx:
I. SphinxTrain, which I can use to create files needed for speech recognition
II. decoders which use speech input and some files which I create with SphinxTrain, to follow speech recognition (input speech + files from SphinxTrain = are used by decoder)
II-1. PocketSphinx, written in C, for devices like mobile phones
II-2. Sphinx3, written in C, for PCs, actually the best developed
II-3. Sphinx4, written in Java, for PCs, with the best documentation
II-4. Some other, older versions
Those are possible approaches of solving my task:
I. Speech recognition on mobile phone with PocketSphinx. This is much better way than [II].
Problems: 1. running PocketSphinx on mobile phone with Android. 2. simulating mobile phone with Android on PC. I also thought that maybe I should consider Meamo, what do you think about it? Or use things different than CMU Sphinx, e.g. Simon, HTK, Julius. I looked at those other ASR engines and I think PocketSphinx may be best choice.
II. Speech recognition on server with Sphinx4. There are some different ways of establishing voice connection between mobile phone and server.
II-1. ordinary call from mobile phone to server; server has got Digium card. Disadvantage: Digium card is expensive.
II-2. to use Skype on both mobile phone and server. Problem: redirecting of sound from Skype to Sphinx4 and vice versa.
II-3. can you think about any other ways? I found that Asterisk may be useful.
Greetings !
Summing up, what I'd like to know is how to run demo pocketsphinx_continuous on mobile phone with Android
Click to expand...
Click to collapse
First step would be to setup a toolchain and compile the prog for android
or statically linked with uClibc.
Then push it onto your device and test if it works as expected.
You can also push it onto the android emulator that comes with the sdk.
Just my 2 cents...
Thank you very much!
Can you give me any links to tutorials which can be useful for me?
By the way I know how to create my own application in Sphinx4 and I know how to run demo in PocketSphinx, but I've got some difficulties with creating my own application for PocketSphinx. So if you can have a look at PocketSphinx http://cmusphinx.sourceforge.net/html/download.php and tell me which files I need to have to create new project for PocketSphinx, I would be greatful. I mean that for Sphinx4 the only what I need to do is to enter S:\tutorial\sphinx4-1.0beta3-src\src\apps\edu\cmu\sphinx\demo\helloworld and create my own ...\demo\my_application, and inside it analogically to what is here ...\demo\helloworld. In the case of PocketSphinx, to run the application, I need to enter S:\tutorial\pocketsphinx\doc and run pocketsphinx_continuous. So I check what I've got in this file and I cannot see what files and where I need to have in order to create new project. I uploaded directory doc with pocketsphinx_continuous here: http://www.speedyshare.com/files/19429494/doc.7z
Greetings and thanks once more !
Rough outline: You'll need the Android SDK and NDK, both of which are available from http://developer.android.com/. The NDK will allow you to compile C code. You'll need to wrap the C core in a Java layer to make it accessible to the rest of the Android system. The SDK also includes an emulator, which I believe you've asked for if I understand you right.
I haven't actually attempted this, so that's about all the help I can be, but there is sample code included with the NDK that should get you started.
Thanks for your answer !
I check the google and see that NDK is term of Android, because I knew only SDK abbreviation. I assume NDK is especially for porting (like porting PocketSphinx for Android). So am I right that with this NDK I don't need to change code of PocketSphinx? I think it would be too easy .
There also other question which I've got. It is not strictly connected with Symbian but there wouldn't be any need for porting if I won't solve this problem. I've got my application in Sphinx4. There are also examplary appications for Sphinx4 and PocketSphinx. I can run demos from PocketSphinx (as explained in first post), as well as demos from Sphinx4. I can change source code of demos from Sphinx4 to perform my task. I'd like to do similar thing with PocketSphinx, but even if it should be easy task, I cannot do it. In Sphinx4 it is much simpler because all source files are in one directory. In PocketSphinx it is done in somehow different way. (http://cmusphinx.sourceforge.net/html/download.php). Without ability to move my application from Sphinx4 there is no need for me to port this PocketSphinx to Symbian.
Greetings !
johnyjj2 said:
I assume NDK is especially for porting (like porting PocketSphinx for Android). So am I right that with this NDK I don't need to change code of PocketSphinx? I think it would be too easy .
Click to expand...
Click to collapse
NDK is used to write software for Android devices that are compiled natively to the platform -- for now, this usually means ARM. Java as you probably realize is a bytecode intermediate language that the java virtual machine converts to native calls at runtime. This means that Java is generally platform independent whereas your C code is not.
JNI as used with the NDK is the Java Native Interface (or something to that effect). It allows you to call code that has been compiled for a specific processor from Java. This means that you could put heavily optimized super fast calculations in a native library and call them from your Java app.
It could also mean, that you've more or less written your entire application in some native code, and then you have written a java shim that has enough code to initiate and start your native software. Beware, there be dragons here.
The fact that you CAN do this, doesn't mean you SHOULD. There are a lot of benefits to using the android platform and specifically using the android way of writing applications. Concepts like views, activities, intents, etc., greatly simplify how an Android device interacts with other Android devices and provides a consistent and powerful framework.
For something like SCUMMVM, it is a game (platform) that is very linear in design; you are either actively playing it, or it is on pause. How other applications are running while using SCUMMVM is inconsequential. It sounds like you have very different requirements.
Thanks for answer!
Isn't that link (http://cmusphinx.svn.sourceforge.net/viewvc/cmusphinx?view=rev&revision=9470) simply trying to copy engine library to Symbian, without effect? Only enginge won't help, there is also need to write from zero code which will use this library. So it looks like there is still long way to have it working. Do I understand it properly?
Greetings!

[Q] Mobile Development

Hi Guys,
This is my 1st thread so please feel free to inform me if this thread is in the wrong forum .
I currently have a task to create a web application that can be accessed using the browser in the mobile i.e. iPhone, Android and Windows Mobile.
I have done the basic thing using Java J2EE and the web application is working just fine. However, I have some doubts.
1. In my web app, I have a jQuery autocomplete and jQuery calendar, will this work in all the mobile browsers? I know that jQuery has its own jQuery Mobile but as of now, I just wanted to use the same codes with my web application.
2. Later on, once this web app is working fine, we may start working on the native apps i.e. Android native apps, iPhone native apps and etc. Is there any framework or tools that I can use that will work on all the devices i.e. sharing a single common source codes instead of multiple version of source codes?
Thanks.
David

Google API for Java

I'm relatively new to programming and am currently learning Java.
Google provides their API in Java for their various products. I downloaded it, followed the instructions to use ANT to get it all ready to go, but I'm stuck on how to actually start using it. I can't get their libraries to import into my programs using the JVM compiler. It just says a bunch of, "that package doesn't exist", and things of that nature. I can't even get Google's sample code to load any of the API packages.
How does one actually use the API once it's all extracted and in the C:\Program Files\Java\gdata folder? Can I not use the JVM compiler? I had to use ANT to set it all up... does that mean I have to somehow use ANT to use the API? I'm a little confused.
If somebody could write up a step-by-step on how to start using the API, that would be so awesome.
thesecondsfade said:
I'm relatively new to programming and am currently learning Java.
Google provides their API in Java for their various products. I downloaded it, followed the instructions to use ANT to get it all ready to go, but I'm stuck on how to actually start using it. I can't get their libraries to import into my programs using the JVM compiler. It just says a bunch of, "that package doesn't exist", and things of that nature. I can't even get Google's sample code to load any of the API packages.
How does one actually use the API once it's all extracted and in the C:\Program Files\Java\gdata folder? Can I not use the JVM compiler? I had to use ANT to set it all up... does that mean I have to somehow use ANT to use the API? I'm a little confused.
If somebody could write up a step-by-step on how to start using the API, that would be so awesome.
Click to expand...
Click to collapse
Judging from your post, you seem to be referring to the GData APIs. It's worth noting that Google is pushing Google APIs Client Library for Java for all new Google JSON APIs.
These APIs + samples are built with Maven2 and are pretty easy to setup.
Also judging from your post, you might want to get up to speed with basic java stuff like project setup in your IDE (Eclipse / IntelliJ ?), Build tools (Maven / ANT). Learn those things first before getting into the Google APIs. Go to the maven site and see how you can build a simple project. See how to import that project in Eclipse, and checkout the Maven plugin for Eclipse.
Most of the samples for Google APIs Client Library for Java (ex: The Books API Sample) provide step by step instructions on how to get things up and running (starting with checking out the code from the google versioning control to building it and running the sample on your environment).
Hijacking this threat a bit, but I'm also learning about APIs, Facebook and Twitter in particular.
With regard to android and java, I've done the tutorial for logging into facebook and posting basic status update but don't really understand the code; which parts are the API?
Really appreciate it if you could point me to another thread or site that explains how to use the API. I'm stuck on how to create a method that does event creation for facebook.
Thanks in advance!

WIndows Phone 7 Browser as IOS\Android\Desktop

All -
I am trying to write a Web Browser application for Windows Phone 7 and I am able to create a general browser application (not that hard) but the specific site that I am writing the application for does not technically "Support" Windows Phone 7. What I want to do is to have the Windows Phone 7 browser somehow make the site think that it is an Android, IOS, or Desktop machine so the site can be viewed on windows phone. Currently I am just using the general Navigate argument to display the site in a browser control but have not seen any properties to change for the browser to control to tell it what to show the page as, any help would be greatly appreciated. I am doing all of my dev work in VS 2010.
Thank you,
John
You need to set the User-Agent header to a user-agent string used by one of the other browsers. There are a few apps that already do this., incidentally.
jbailey1882 said:
All -
I am trying to write a Web Browser application for Windows Phone 7 and I am able to create a general browser application (not that hard) but the specific site that I am writing the application for does not technically "Support" Windows Phone 7. What I want to do is to have the Windows Phone 7 browser somehow make the site think that it is an Android, IOS, or Desktop machine so the site can be viewed on windows phone. Currently I am just using the general Navigate argument to display the site in a browser control but have not seen any properties to change for the browser to control to tell it what to show the page as, any help would be greatly appreciated. I am doing all of my dev work in VS 2010.
Thank you,
John
Click to expand...
Click to collapse
The Navigate() method accepts a parameter for user agent string. But will only work for initial page requests, not for clicked links from within the webbrowser content.

app development for LAN and internet

I am new to today's device apps. However have taken a big project which I am not sure is deliverable!! I want to develop two cross-platform application (desktop-windows/mac/android, mobile-windows,iOS/iPAD/IPOD etc), lets call them site-access and remote-access.
LAN(Option1, site-access) Front end: HTML/CSS/JavaScript Database:H2 Database access language:GO programming language webserver/web application server: Go programming language server running on a pc in company (company server). I am hoping that I could use JavaScript to trigger some functions/libraries in GO to query H2 database? Will it really work like that?
LAN(Option2) Front end:HTML/CSS/JavaScript Database:H2 webserver/application server:Apoche Tomcat database access language: Java servlet/Node.js
In this case, I am hoping that I would use javascript to communicate with node.js running in back end that will then communicate with Apoche Tomcat over servlet. Will it work?
remote-access (hosted on google app engine) Front-end:HTML5/CSS3/JavaScript Employee seamlessly easily use remote-access icon on devices to connect to company server- backend running under architecture 1/2 above- and access files off company server? I am hoping that I could use some additional database access conditions for remote-access app using GO programming language to design simple login features? I am sorry about my naivety in web-development. But your input will surely put me in the right direction. Thank you

Categories

Resources