Run a native app with a web app on PhoneGap - java

my question is: Is posible to run a native app using a web app developed on phonegap?, I need to make that, I was reading about is necessary create a plugin to connect with other native app, but I'm starting to programming over phonegap I still don't understand much, and need to create that. But I need some very explicit.
Thanks.

Yes, you can create a PhoneGap native plugin that will enable you to create custom functionality in native code, and expose that to your PhoneGap applications via PhoneGap's native-to-JavaScript bridge. For more information about plugins and example of how to implement them check this tutorial:
http://www.adobe.com/devnet/html5/articles/extending-phonegap-with-native-plugins-for-android.html

Related

Google App Engine and Python Connected Project

Currently I am using Eclipse and I am trying to implement a Python Backend/API for an Android App on Google App Engine.
I see you can generate an App Engine Backend using Google Eclipse Plugins but from I see it can only be generated in Java. Is there a way to generate an App Engine Backend in Python?
Would it be better to create a Python App Engine Project and define all the API associated with the App in that project and just make calls through another project that houses the app itself?'
Just looking for some clarification as to how the best way to organize and implement this type of project.
The eclipse plugin is Java only. However you can use your favorite IDE to work with app engine and it works really fine. If you do like eclipse, add the app engine libraries to your project. And create a run configuration as follows:
${project_loc} or some other flags
More info here: https://developers.google.com/appengine/articles/eclipse
Please note that you can use the App Engine console to lauch/stop your project and code using your favorite IDE too, there is no need to configure eclipse to launch (it is just more comfortable to do so)

Run native code in Phonegap (Java Android)

I need to generate pulses to create a frequency from my android device (to communicate to arduino via the audio jack, but this is not important). Natively, java allows us to do that as explained here.
Unfortunately this is impossible to do via javascript, so I need to run this native code in my app through Javascript.
I'm a complete ignorant about "running Java from JS", so, can you suggest me a tutorial where to learn from, or help me somehow?
You need to write an Android plugin for this, Phonegap Android Plugin is the phonegap API documentation for writing a plugin. You need to call your Android Plugin through JavaScript.
Here is a Sample PhoneGap plugin for Android

using jquery mobile with java, is it possible?

I need to know how to use the jquery mobile with java coding in the same application, so I can merge some features not available in the jquery platform to make some advanced android application.
appreciate your responses.
First don't listen personne3000, apparently he never touched Phonegap.
It can be done with jQuery Mobile if you use it with Phonegap. Phonegap, while working as a wrapper for HTML5/JS/CSS will give you access to native JAVA code (Android only of course). Phonegap will give you access to the wide range of mobile phone compatibilities ranging from camera, sound record up to creating native tab bar for your app.
Here you will find a "iOS Getting started" tutorial for Phonegap/Cordova and here's an Android tutorial.
Here you can find basic Phonegap/Cordova API reference and this is just a basic list, much more can be found in 3rd party plugin list here.
In case you can't find functionality you need you can create your own plugin and here you will find a Phonegap plugin tutorial for Android platform. In case you are going to use an older version of Phonegap (pre Cordova) here's an older plugin creation tutorial.
I don't think you can directly use jQuery mobile to develop your app. However, you can :
Develop an Android application using Phonegap or Cordova in HTML5/Javascript, and use jQuery mobile, but you won't have access to Java
Use WebViews to display webpages with Javascript included. You might want to look at the addJavascriptInterface method.
Javascript and Java can't be mixed just like that in an application : they work very differently.

How do I integrate a java client with an android application

Ok just to give a background I have a WCF service and I've made a client for it in java using MyEclipse 10.0. Now basically the client needs to reside on an android device and it just struck me that I might not be able to port it. I have absolutely no experience (of course I've got the HelloWorld app running though) with working on android. Also what I had in mind was that I'd create an applet in java for the client but I'm presuming awt wont work in android. I've seen that the android toolkit for designing an app is quite good so I dont mind working with it. But all that is bothering me is how do I integrate the java client which includes a lot of imported class especially from the javax.xml package. Any suggestions on how I can move forward will be welcome. Thank you!
No worries. Android SDK is an extension of Java core SDK. So you can use any class from Java by importing the Libraries (Jar files) in Android Project. Unless the library is any hardware specific it will work well with Android too. (Not all, Most of them).
For example if you use an API to call a web service in Java, you can use the same in Android by adding that Library to your Application.

Is it possible to develop for Android on Android?

Lately I've been doing a lot of web development on my Droid via ssh using the ConnectBot app and a few other apps for reference. I've also been doing a lot of Android development back home in eclipse, and I wondered: would it be possible to develop and test my android projects right on my phone? All I can do at the moment is either write the code via ssh and then open it later with eclipse to finish it up, or remotely use eclipse via LogMeIn Ignition or VNC. Does anyone know a native way to do what I'm trying to do, preferably offline?
Try AIDE. I use it because it supports Eclipse projects. https://play.google.com/store/apps/details?id=com.aide.ui
Not sure if this hits the target you're looking for, but The Scripting Layer for Android (formerly known as the Android Scripting Environment) is available and has a lot of power available to it.
Scripting Layer for Android (SL4A,
formerly known as Android Scripting
Environment or ASE) brings scripting
languages to Android by allowing you
to edit and execute scripts and
interactive interpreters directly on
the Android device. These scripts have
access to many of the APIs available
to full-fledged Android applications,
but with a greatly simplified
interface that makes it easy to get
things done.
Scripts can be run interactively in a
terminal, in the background, or via
Locale. Python, Perl, JRuby, Lua,
BeanShell, JavaScript, Tcl, and shell
are currently supported, and we're
planning to add more. See the SL4A
Video Help playlist on YouTube for
various demonstrations of SL4A's
features.
I found DroidScript. It's a quite powerful JavaScript interpreter thats based on the Rhino-library. It can import every Java-package and even create activities for starting from the launcher. The URL is http://droidscript.se for the Live-Editor with which you can edit scripts online and send them to your phone, and the droidscript-app has an editor, too but it cant save at the moment, i think. DroidScript is Open-Source and embeddable in an own app, I think. More info on news of DroidScript are found on droidscript.blogspot.com.
check out JAVAIDEDROID on the market
You can if you have a remote linux machine that you normaly develop on.
ssh into the machine with some ssh app.
edit the code with some console text editor (vim for example).
build the application with ant
copy the generated apk into the android phone and install it
repeat from point 2.
Good luck!
I really don't know if it's possible, but to do it, you should:
"Install" java inside Android.
"Install" ant
run ant debug
Check this link for more instructions.
PS: Please let us know if you could do it :)

Categories

Resources