Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Wednesday, October 17, 2012

Creating Simple Android Application

Today I am going to start with How to make a Simple Application in Android. Before Starting It we must be clear about some aspects related to Android Development. As We already know now from previous post about Setting up of Android SDK with Eclipse. So We will uncover the basic file hierarchy of Android App.

Starting of Android Application. 

  • Open Up your Eclipse. Then go to File - > New Project - > Android Project. A dialog box will be opened up as shown.
New Android Project
  • Now you have to fill some details. Like Project Name, Project Location. After Clicking Next you will be asked to Select for API version. Select According to your requirement.
  • After then Enter Package name like if your application name is sample. Then Package can be com.simple. Check for Activity automatic creation as it is needed. After finishing Project is now created and you will have a hierarchical view just like below (if we have created application named test).
Hierarchical View of Application

Various Files In Android

  • src :- This folder contains the main core Activity file for the application being created. And the major work of coding goes into this folder.
  • gen:- These are automatic generated configuration file that will be used by the system.
  • res:- The Main designing part goes here in this folder. Here in various folders like drawable-hdpi and similar named folders hold the various images to be used by the application. Next it contains the folder layout where you will be defining the layout for different views of your application.
  • values:- This sub folder of res holds the different string.xml and other files for handling the data that will be referred in time to time in the application that is being developed.
  • AndroidManifest.xml will hold the values like the permission granting for internet access and some other system related requirements that will be additional.

Project Development

TestActivity is the file in case of application test where we will be spending most of our time in performing coding. The pre generated code for this particular file is as below. (Remember Android Programming is nothing but JAVA programming with API's and Android Additional services.)
So, If one knows java it is not going to be difficult to learn AP (Android Programming).


So in the next post we will come to the actual coding of this test application. Till then Good Byee!!





Saturday, October 13, 2012

Setting up Android with Eclipse


Eclipse is most widely used when it comes to use for Android Development. Following are the various phases that has to be done in order to install it and make necessary changes to setup with Android SDK .

Download and Install JDK
Download and install the latest JDK (JDK 1.6 Update 18) from JDK download page
Download and Install Eclipse IDE
Download and install Eclipse Classic 3.5 (Galileo) from Eclipse download page. You can also use the  Java or RCP version of Eclipse.
Download and Install Android SDK Starter Package
The Android SDK starter package includes only a single component, the latest version of the SDK Tools. Included in that component is a tool called Android SDK and AVD Manager that you can use to download other components from the SDK repository site.
  • Download the latest Android SDK  starter package  from the SDK download page.
  • Unpack the archive to a suitable location on your machine. By default, the SDK files are unpacked into a directory named  android-sdk- . For example, on Windows platform the directory will be android-sdk-windows.

Android SDK
Add Android Platforms to Your SDK
To add one or more Android platforms (for example, Android 1.6 or Android 2.1) to your SDK, use the Android SDK and AVD Manager, included in the SDK starter package. It is recommended  to download multiple platforms, so that you can build your application on the lowest version you want to support, but test against higher versions that you intend the application to run on.
  • Launch the Android SDK and AVD Manager on Windows by executing SDK Setup.exe at the root of the SDK directory. On Mac OS X or Linux, execute the android tool in the /tools/ folder.
  • On Available Packages menu, select the platforms to download (1.1 to 2.1).

If you find error on HTTP SSL while fetching the repository url , try to use http instead of https by checking the Force https://… sources to be fetched using http://… option on Settings menu.

Download and Installing Eclipse. Download it From here http://www.eclipse.org/downloads/

Download and Install ADT Plugin
To install  the ADT Plugin, you can take advantage of the Eclipse remote update feature. By setting up a remote update site, you can easily download, install, and check for ADT updates. Alternatively, you can download the latest ADT to your development computer as a local site archive.
  • Launch Eclipse, then select Help –> Install New Software.
  • In Available Software dialog, click Add
  • Enter a name for the remote site (ex: Android Plugin) in the Name field and in the Locationfield, enter this URL:
    https://dl-ssl.google.com/android/eclipse/
    and then click OK. If you have trouble acquiring the plugin, you can try using ‘http’  instead of  ’https’  in the URL.

Select the checkbox next to Developer Tools, which will automatically select the nested toolsAndroid DDMS and Android Development Tools and then click Next.
  • On the next dialog, click Next to read and accept the license agreement and install any dependencies, then click Finish.
  • Restart Eclipse
  • To check whether the ADT has been installed correctly, try to create a new project by selectFile > New > Project., you shoud find Android Project listed on project wizard.


Friday, November 4, 2011

How to get back ubuntu panel with default icons

Once the Terminal window opens, enter the following command at the prompt:

gconftool-2 – -shutdown

(Note: There should be no spaces between the two dashes before shutdown.)

EDIT – Reader nickrud has suggested a better method instead of shutting down gconfd. Instead use the following command (thanks nickrud!)

gconftool – -recursive-unset /apps/panel

(Remember: There should be no spaces between the two dashes before shutdown.)

Then enter the next command:

rm -rf ~/.gconf/apps/panel

And enter one more command:

pkill gnome-panel

That's it!

Both top and bottom panels will appear (if missing) with their default settings. Now you can customize them to your preference and get on with using Ubuntu.

Monday, September 20, 2010

Convert Your Ubuntu10.04 into a Complete MacBook's Look

Now you can change the Graphics of your Linux(Ubuntu10.04) into a Complete MacBook's Look just with some simple commands given below.Mac OS X Transformation Pack. Similar to Mac4Lin but dedicated to Ubuntu Linux. It can also be used in other OS based on Debian/GTK. Package includes all necessary system components to mimic Mac OS X appearance on Ubuntu Linux.
Important: While Running these commands you will be asked to do changes on your current working Environment.
Mac Ubuntu

Installation:








wget https://downloads.sourceforge.net/project/macbuntu/macbuntu-10.04/v2.0/Macbuntu-10.04.tar.gz -O /tmp/Macbuntu-10.04.tar.gz
tar xzvf /tmp/Macbuntu-10.04.tar.gz -C /tmp
cd /tmp/Macbuntu-10.04/ 
$ ./install.sh

Monday, August 9, 2010

Install an RPM Package on Ubuntu Linux

Installing software on Ubuntu usually entails using Synaptic or by using an apt-get command from the terminal. Unfortunately, there are still a number of packages out there that are only distributed in RPM format.


There’s a utility called Alien that converts packages from one format to the other. This doesn’t always mean that an rpm will work on your system, though. You will need to install some prerequisite software packages in order to install alien, however. These packages include gcc and make.
Run this command to install alien and other necessary packages:
sudo apt-get install alien dpkg-dev debhelper build-essential
To convert a package from rpm to debian format, use this command syntax. The sudo may not be necessary, but we’ll include it just in case.
sudo alien packagename.rpm
To install the package, you’ll use the dpkg utility, which is the internal package management tool behind debian and Ubuntu.
sudo dpkg -i packagename.deb
The package should now be installed, providing it’s compatible with your system.

Sunday, August 8, 2010

Red Eye Removal using Gimp

See an example of red eyed picture over here::
chris  and tori with red eyes
Launch GIMP and then open your photo. Select the rectangle tool.
    gimp  rectangle tool
    Draw a rectangle around the red eyes.
gimp  rectangle tool selecting red eyes
Now select Filters -> Enhance -> Red Eye Removal…
    gimp filter  for removing red eye
    The Red Eye Removal tool will pop up. Use the Threshold scroll bar to adjust the eye color as you see fit. Click OK when you’re done.
gimp  red eye removal threshold
The changes will be applied to your photo.
    gimp  red eye removal
    Use the Zoom feature if you need to remove red eyes from someone who also has red hair (or a wig
    ) that’s getting in the way. You can even select one eye at a time.
      gimp  red eye removal closeup
      And the finished product –
      no  more red eyes

Sunday, August 1, 2010

Problems during Compilation of LaTeX files

Hello to all, I am sorry for not posting this message earlier. But when Now I prepared my synopsis and make its template and send to others then I came to know that i forgot to tell about how to include extra packages to be used in LaTeX file.

For that you just need to create directory structure as shown below in your home folder:
/home/username/texmf/tex/latex
and after that now you have to install extra packages. Note down .sty file error which terminal gives you when you are compiling your .tex file. Now search the Internet for that .sty file named package like if I have demo.sty file error then I will look for demo latex package. After you download this package you need to install it on the system. Just placed the folder(demo say) under latex folder. Then go to terminal & type:
$sudo -s
#cd /texmf/tex/latex
#texhash demo(in place of demo you can have package name)
That's it file will be updated and your package will be installed.

Wednesday, June 23, 2010

Using pdfscreen package in LaTeX

Today i am going to discuss with you that how you are able to get both print form and screen viewable document by changing single option in this pdfscreen package. You just need to include following code in preamble part:-

\documentclass[a4paper,11pt]{article}
\usepackage{xspace,colortbl}
\usepackage[screen,panelleft,gray,paneltoc,sectionbreak]{pdfscreen}
\margins{.75in}{.75in}{.75in}{.75in}
\screensize{6.25in}{8in}
\overlay{lightsteelblue.pdf }
\begin{document}
in the very third line if you change screen to print format it will make a form called print which acts as your report format.
\screensize is used when you need to view it on your screen or in short you can say that you want to make presentation.
\sectionbreak is used so that a pagebreak can be inserted in your screen view after you write each section.
If you want to view example click on PRINT and SCREEN
But let me clear you one thing if you are going to compile it on texmaker it will surely give you problem you may try but each time you will not get desired
output see my output which i got when i was using texmaker SEE.
So, from my this experience i will prefer to use console mode for tex compilation rather than gui softwares for compiling tex files.
So, follow the same command which i discussed on the JUNE 4 i.e.
using command $pdflatex file.tex
Then you will get desired output. Also preferably use Acro reader in ubuntu to view your pdf files.