How to develop Firefox OS Apps

Are you a developer ? Do you want to develop Apps for  Firefox OS ? Here is a small walk through which will be helpful in getting you started with it. But before directly jumping into developing the App let’s first define what is Firefox OS.

Firefox OS (codenamed Boot2Gecko or B2G) is a mobile operating system based on Linux and Mozilla’s Gecko technology. It is built upon open web standards like HTML5, CSS3, and JavaScript.

Here is a screenshot of a Firefox OS device.

geeksphone

Though this new mobile OS is an emerging technology, it is quickly catching the eyes of users, developers, and critics. Now let’s get down to the development of the Apps.

Where to run and test my App:

1.. Firefox OS device to run your app and check how it’s working.

2. Simulator: If you are not having a Firefox OS device still you can run and check you App on the simulator. Simulator is an add-on which is used to test apps in a Firefox OS-like environment that looks and feels like a mobile phone. If you need here you can download the Simulator and install.

3. Firefox Browser :  If you are not having Simulator installed still you can check your app on the Firefox browser opening it in the mobile mode using Ctrl+Shift+M also you can check it in various sizes choosing the sizes given.

It was all about running and testing the app. Now Let’s start building an App.

There are two types of apps you can build: packed Apps which are essentially a zip file containing all of of an apps assets: HTML, CSS, JavaScript, images, manifest, etc or hosted Apps, which are basically a website wrapped in an app. You’ll need server hosting for a hosted app.

Here I will be building a small App to write something into an text field and output it on the screen.

App Manifest:

Every Firefox OS App contains a manifest file.

1. create a folder and inside it create a file named manifest.webapp and paste the following code.

{
“name”: “Hello World”,
“description”: “An appication to check the entered value”,
“launch_path”: “/index.html”,
“icons”: {
“128″: “/images.png”
},
“developer”: {
“name”: “Your name”,
“url”: “Your Blog site url”
},
“default_locale”: “en”
}

2. Create a file named index.html and paste the following code.

<!DOCTYPE html>
<html>
<head>
<title>My First App!</title>
</head>

<body>
<h1>Hello, World!</h1>
<br />
<input type=’text’ id=’myTextInput’ value=’Type something!’onclick=”this.value=”;” />
<button id=’myButton’>Click Me!</button>
<!– link to your javascript folder –>
<script src=’hello.js’></script>
</body>
</html>

3. create a file named hello.js and paste the following code.

var button = document.getElementById(‘myButton’);
var txtInput = document.getElementById(‘myTextInput’);
button.addEventListener(‘click’, function(){
var text = txtInput.value;
// Show alert box with this text
document.write(“You have successfully typed: <strong>”+text +”</strong> !!!”);
})

4. paste any image of size 128*128 pixels and name it images.png.

Now you are done with your code. To run your App open Simulator (go to Firefox browsers Tool->Web Developer->Firefox OS Simulator) and if you are having apps installed you will see a screen like this otherwise a blank screen.

simulatorscreen

5. Click Add Directory and add your manifest file to it. Now open the simulator by clicking the stopped button and your App is installed now. Slide left on your Simulator device and click on your app you will see a screen like this:

hello_worldType something and test it.

testingappWoohha!!! Now you are done with your first app. For making the user interface of your app stylish play with css and making the buttons alive play with JavaScript codes to make the mobile world wonderful. Thank you.

How to Bookmark a Page on Firefox OS

This article will help you create a bookmark with the built-in Firefox web browser on Firefox OS.
Creating a Bookmark

  1.  Tap on Image (Firefox browser).
  2. Go to the website you want to bookmark.
  • Take Twitter for example

Image3. Tap the star at the bottom of the browser to add a bookmark.

Image

4. Tap on Button Bookmark.

Image

  •  The website you want is now bookmarked!

How do I view and use my bookmarks?

  1. Open the browser by tapping on Image (Firefox browser).
  2. Tap on the URL bar.
  3. Tap on the  Bookmarks tab.

Image

4. You will see your list of bookmarked websites.

5. Tap on the bookmark if you would like to navigate to it.

Destiny Takes a man to Heaven

Yes, it’s true, believe or not but  history is always there as a proof. Whenever a bird flies in the sky, it doesn’t know where it will get the food.Sometimes it gets just at the starting of their journey, sometimes they have to spent their whole days starving for the food .These all are fate. These all are destiny.

But the question is How destiny supports a man ? Do the destiny travels the whole way to give a man comfort and pleasure ? I will say – Nah !!!! nooo. The man have to search for it. They have to strike their mind and finally it says to do some innovative, inspirational Karma. Now the point comes to Karma.

Hello!!! You better know what the Karma mean ? What the Karma says ? What the Karma does ? So do your Karma and believe in your destiny. It may vary from people to people , there may be a delay but finally you will land in the Heaven !!!

SpykeDestinyIsKarma(1)

Let’s talk about Mozilla Projects

Image

I know this is coming a quite late but every plan after execution needs review at its end point. The awareness towards Mozilla and Open web was started in Durgapur from Mozcafe@bcrec from 13th February, 2013. That event was successful. But to measure the success and growth in contribution towards Mozilla and its products from mozcafe@bcrec, we have hosted a event to teach the new contributors and invite them to join the Mozilla mission. We have hosted in Dr. B.Roy Engineering College, Durgapur on 17th Apr,2013.Here newbies were introduced how they can use IRC,mailing list etc as well as the basics of communication, collaboration and contribution of the Mozilla community. Almost 50+ people attended this event.
The agenda of the event was

Introduction to IRC
Introduction to mailing-lists
Tracking bugs on Bugzilla
Basics of Locamotion
Basics of SUMO and Localisation

First of all chandan began talking about out initiative and why this event is important for new contributor.Then we collected the interest(Localization,Code base,SUMO,Design) from the people and noted it down. Then We divided the group according to their interested .

After that, we showed these people how we can communicate in IRC using chatzilla,X-chat also told some basic commands about IRC. Gave them a demo chat session.
After that we came to mailing-lists. Here we showed them some rule i.e how to reply in mailing-list etc.
According to their interest , four groups have been formed —

Video Design and firefox flicks
Coding
SUMO
Localization
The first group was laid by umesh. He showed the interest how you can join firefox filcks competition . Also told some basics of design etc.
The second group was laid by Souradeep ,Apporve and Zubin . They told them how to tracking mozilla code base bugs,how to solve that bug via different languages like python , c etc. Approve told about webmaker tools. He and Zubin gave some demo sessions on Thimble, Popcorn Maker and X-Ray Goggles.
Third group was laid by me and Biraj. I showed them how to register in locamotion,how any one does translation via locamotion and Verbatim. Giving them some sample of rules how to do that.I talked about translation tools also showed some style guides for their native language. After that i talked about sumo i.e main features of sumo, how contributors work with that.I also formed a group for sumo interface localization project. Here is the etherpad

https://etherpad.mozilla.org/bcreclocalizatiuon

Later on few other contributor Sujith Reddy,Ashish Namdev, Aniket Deshpande, Ram Dayal Vaishanav, Ankit Gadgil joined the verbatim localization project and we are rocking there.

The 15th B’day celebration of Mozilla Firefox

IMG_0110
Yes, today is 31st of march and it is the time to remember that Mozilla is now 15 years old but always including new web advancements to make the web better and user friendly.

We all Mozilla lovers and contributos( Chandan kumar, Gaurav Kumar, Mritunjay kumar Singh, Biraj Karmakar, Umesh Agrawal, Abhishekh Singh, Manish Kumar and many more) from Dr. B. C. Roy Engineering college and NIT Durgapur were gathered at Evelyn Restaurant, Bidhannagar, Durgapur to participate in this grand completion of 15th years.

The event was started at 1 PM with the introduction of contributors and how they are involved with Mozilla. There were few new enthusiast also who were having eager to know about Mozilla community and how they can support the web.

After the introduction we celeberatd the B’day by slashing the cake . We had lunch after that and we had a review of previus Mozilla meet. We had decided to organize the ” Mozilla awareness and how to contribute in Mozilla” event in NIT Durgapur next week. After all we had a great fun and it was a nice meeting with enthusiastic Mozillians and event ended at 4 PM.

Mozilla Firefox 21 in hindi

This is another week after the successful completion of Sprint Session for Firefox OS localization in Hindi which was a great success in itself. That event was hosted on on 24th February 2013 and about 4000 submission were made that day. You have a look at Planning pad at the following link:

https://etherpad.mozilla.org/remo-firefox-os-in-hindi

Today (03rd March, 2013) we were again gathered from every corner of the country to repeat the history and it was a great success.
The vanue was
#india channel on irc.mozilla.org server
#indlinux Channel on irc.freenode.net server
mozilla.localmotion.org

The pootal server was at:

http://mozilla.locamotion.org

The event page for the sprint is:

https://reps.mozilla.org/e/firefox-hindi-localization-sprint/

The whole planning was done at

https://etherpad.mozilla.org/remo-firefox-hindi-localization-sprint

and the participants were:
Rajesh Ranjan, chandan Kumar,
Abhishek Potnis, Keshav Kumar,
Sayan Chowdhury, Suraj Kawade,
Gaurav Kumar Saurav Agrawal
and Amit Kumar Thakur(me)
It is truly said that “enthusiasm is the mother of effort, and without it nothing great was ever achieved”. All the members have given their best effort and with their great enthusiasm we performed very well and about 8000 submissions were made today.I have enjoyed participating in this session a lot and I would like to thank all the participants for their great efforts. Hope soon will join to another Mozilla project.

Hands on Android Developement

Android is one of the most popular operating system for mobile phones and tablets
such as windows is used for PCs. Android was built on Linux platform.It is maintained by google and comes in few different versions. If you want to become an android developer then there is a nice opportunity for you because there is a huge area of development in this operating system .

Before starting android development you should have knowledge of few basic things such as:
SDK: which is sort for software development kit is a programming package that enables a programmer to develop application for specific platform. Typically a SDK includes one or more API’s , programming tools and documentation.

API: Application programming Interface, is a set of routines , protocols,and tools for building software applications. A good API makes it easier to develop a program by providing all the building blocks.

Activity: An Activity represents a visual representation of the android application. Activity uses Views and Fragments to create the user interface to interact with the user.Fragments are component which run in context of an Activity.An app in made of more than one Activity.

View and View Group: Views are user interface widgets for example buttons or text fields. ViewGroup is also called Layout Managers.

Intents: Intents are asynchronous messages which allow the application to request functionality from other components of the android system eg. from services or Activities. Actually an Intent is an object that provides runtime binding between separate components( such as two Activities). The Intent represents an app’s “intent to do something”.
Android applications are primarily written in java programming. The java source files are converted to java class files by java compiler. The android SDK contains a tool called dx which convert java files into a .dex (Dalvik executable) file. All class files of an application are placed in one compressed .dex file.

Most of the developer practices android development on Eclipse .If you are new for Eclipse then you can download it from  http://www.eclipse.org/downloads and if you want to have android training then you can practice on http://www.developer.android.com   .Now enjoy android programming.