RSS

Category Archives: Android

let's forge !! ()

let's forge !! ()

welcome all ,

sure you are wondering what’s Forge !!
Forge is a Cross-platform app framework  which enables you to create native apps for multiple platforms from a single HTML5 codebase.

Here are a few benefits of Forge:

    • ** Single code base
    • ** Ability to generate mobile applications for Android and iPhone
    • ** Ability to generate browser extensions for Chrome, Safari, Firefox, and IE
    • ** Rapid development
    • ** Reduced maintenance costs

 

It doesn’t require to write any line of  java or objective-c or learn any platform-specific APIs.
now let’s get started

 

    1.  Download the development environment
              ** To use Forge, you will first need to sign up for the service at https://trigger.io/forge/
      •  download the Forge development environment and unzip it to any directory .

 

    1.  For Win users >> run go.bat
      • ** for linux and MAC users >> from the terminal change the directory to wherever you extracted the zip file run source  go.sh

 

    1.  Creating your first app
               ** by now u should have a command terminal look something like that.

 

(forge-environment)

** HINT ** if u want to keep each of your apps separated u should use another directory for them

mkdir “../test-apps”
cd “../test-apps”

now we are in a separated directory , let’s create the app

forge create
after that you will be prompted to enter the app name , your user-name , password and that’s it you are done 🙂

you can switch to the app directory and try run your index page named index.html Now if u wanna start your app as an extension to chrome , or Firefox add-on or android , iphone app >> let’s move to another level i would prefer to start it as an extension to chrome .

by now u should see src  directory under the app directory , this is where all the extensions will be placed

inside , u should see “config.jsonwhich automatically generated and holds all the settings for the extension .

 

1- Create a file called background.js” inside the “src” directory and add the following code
     window.alert(‘Hello Chrome’);

2- Open config.json and add this file to the background_files array
     “background_files”: [“background.js”],

3- Building and load Chrome Extensions Using Forge

** Navigate to the directory where you extracted the build tools from the terminal

** Windows users run go.bat. OSX/Linux users run source go.sh

** Run forge build.

** When the build finishes take a look inside the development directory and you should see your generated Chrome extension

** Open the Chrome browser and go to chrome:extensions.

** If Developer mode isn’t already enabled click the [+] button at the top right.

** Click Load unpacked extension.

** Navigate to the development directory which contains the generated extension.

** Select the chrome folder and click OK.

** You should see ‘Hello Chrome’ alert window as soon as the extension has loaded.

>> NOTE  <<
only the “Get Started” apps are FREE , more pricing here >> https://trigger.io/pricing/

>> REFERENCE <<
https://trigger.io/

 

 

The Weekly Harvest – الحصاد الأسبوعي-

The Weekly Harvest – الحصاد الأسبوعي-

السلام عليكم ، الحصاد الأسبوعي

The Weekly Harvest 😉

Playing with the User Interface in Android Part-3- by – Marwa AboShall

JDO ” Write once , persist everywhere “ – by – Yomna.M.Hafez

Software Engineering – by – Gamal Azmy

Linux Power User #BeBasata – by – Maggy Hesham

Java Programming : let’s Master (7II) – by – Omar Ezz

 

Playing With The User Interface In Android Part 3!

Playing With The User Interface In Android Part 3!

Today we’ll add some new things to the App user interface that we have created before , look at the previous two topics about Playing with the user Interface in Android.

Part one , Part Two.

First , we’ll add the ScrollView Layout to our application to let you use the Scroll in your UI .

To add the scroll to your layout , you have to type the following xml code on your xml file : signup.xml

The Second Thing , we’ll add some radio  Buttons , Check Buttons and Time Picker ..

here is the full xml Code of signup view :-

 

 

 

 

 

 

 

 

 

 

 

here is the code that will display the Time Picker :

That’s all ..Thank You!

 
 

Tags:

Playing with the User Interface in Android -Part2!

Playing with the User Interface in Android -Part2!

Hi there , The last time we have created the user Interface Of our Android Application . We created many screens and Views , today we will learn how to connect between them!..

First , we have to create two more Activities : SignUpForm Activity class and LogInForm Activity Class . We will set signup.xml as the layout of SignUpForm Activity and set the login.xml as the layout of LogInForm Activity ..

 

The Code of SignUpForm.java :

The Code of LogInForm,java :

We will notice from the previous codes that setContentView(R.layout.login); or setContentView(R.layout.signup); >> setContentView is used to set the layout and the view of the screen using (R.layout.layoutName)..

The Code of CATaZineActivity.java :

//The previous class set : main.xml using ( R.layout.main )as the layout of the this Activity ..

Then, create two buttons signUpButton ,logInButton that we will use to go to the signUp Form and LogInForm . Create two OnClick Methods , both of them use the intent to transfer from view to another. one method for SignUp Button and one for LogIn Button , so you can go to any view just by Clicking on a Button!..

The last thing you have to do is to define the activities in AndroidManiFest.xml by adding the Following xml code Lines to your it :


The full code of AndroidManiFest.xml File :

Now , try to press signUp Button >> you will go to SignUp Form and press LogIn Button you will go to LogIn Form ..

That’s all , Thanks! ..

 
Leave a comment

Posted by on February 25, 2012 in Android, Featured, SmartPhones Development