Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

Tuesday, November 10, 2015

Phonegap: your first easy mobile app.....

Here we see how to make a first simple mobile app starting to the real funny "Pokemon Fusion" web page realized by Alex Onsager and you find by clicking here....(http://pokemon.alexonsager.net/)

We will do a simple import(by an html iframe) of the page of Pokemon Fusion.
We will write only a single code row.
We will do a simple test to try how PhoneGap works.....

At the and we have an .apk file to install on our android phone

Prerequisites: PhoneGap development kit correctly installed on your pc... an android phone correcty connected and recognized by your pc(and phonegap).

Step 1: open a prompt and create a working directory(mkdir pokemonfusion_test)
Step 2: move under your working dir: cd pokemonfusion_test
Step 3: create a simple PhoneGap test project: phonegap create test
Step 4: move under www directory and open index.html for editing it....
Step 5: remove from the body tag element all its content and paste this
        <iframe src="http://pokemon.alexonsager.net/" style="width:100%; height:100%;">
        <script type="text/javascript" src="cordova.js"></script>
        <script type="text/javascript" src="js/index.js"></script>
the last two rows are already existent in the file.......
So those three rows will be the only content of the body tag.....
Save and close the file.
Step 6: deploy all on your android phone(or your local emulator....): phonegap run android

After few minutes Pokemon Fusion will be displayed on your android system......
Your application will installed with "Hello World
" name. And its icon will be the default icon for test application.

All it's done, you can download by here:




Or checkout via SVN under this: svn+ssh://svn.code.sf.net/p/pokemonfusion/code
Access by anonymous user with no password.
If you have a svn client type this:
svn checkout svn://svn.code.sf.net/p/pokemonfusion/code/ pokemonfusion-code 

You can find here the project of the phonegap application as you see in this post.

Bye.....

Thursday, September 27, 2012

Developing an Android application with Eclipse.... Step 1 - Install the develop environment

After the never ended post of some months ago... here....
now we re-try to write a more complete article on starting to develop an app for Android using Eclipse, on a Debian distribution.

Well, we are on a Debian 6.0.4 squeeze, and we ensure to have a sun java installed and ready to use, please refer here.

After we provide to download and install eclipse, from eclipse downloads page, the "Eclipse IDE for Java EE Developers" version is good.
At the moment we have downloaded the "Juno (4.2) Packages".

From developer.android.com site download the right sdk for your operative system.
In this case we have a linux system, so we have downloaded(from http://developer.android.com/sdk/index.html) the archive file with our sdk:
http://dl.google.com/android/android-sdk_r20.0.3-linux.tgz

Provides to explode the two archive files.

Now we go under Android Sdk Installation folder, go into tools and opening a terminal,
launch the command:
./android sdk 
 
A window will prompted to you for show what the available packages to download. 
We suggest to flag Tools, Android API(currently the latest is the 4.1)and Extras.
At the end of the installation close the window.
Start Eclipse application, and go to.....:
Help > Install New Software
and add one between the following lines
http://dl-ssl.google.com/android/eclipse/
https://dl-ssl.google.com/android/eclipse/
 
Flag the checkbox with "Development Tools"....
 
..and install them(...the tools.....).
 
At the end of Development tools installation you need to restart eclispe.

When eclipse restart it will ask to you where is android sdk installation path
or to proceed to a new installation,
well you now can browse and point to our Android sdk installation.
Fine!!! You have completed the development environment installation.
In the next step we see how to starts to write an android application!!!
Bye...