Welcome to Delicate template
Header
Just another WordPress site
Header

This is a summay of the tricks I have learned making an application called courseApp project.  This application was developed in the Mobile Information Systems that I took at University of Oslo. Eclipse is a very good tool to use for Android development. To start with you need to download Andriod SDK. After installing both of these(and ofcourse Java Development Kit, JDK which is a pre-requirement for both of these), you need to make Eclipse and Android SDK talk together. This is done by a plugin called “ADT plugin for Eclipse” from Google. You can read more about how to install this plugin by clicking hereIn case of Android SDK installation(the exe file) doesn’t recognize JDK on your computer, you can simply download the zip file and extract it. Don’t forget appending that folder to the %PATH% environment variable. Now some more tips follows :

background color for your layout :
add the following code to your layout XML code(#ff32cf is the color code)

android:background="#ff23cf"

Background Image for your layout :
1- Add the image you want to the layout folder of your project.
2- Add the following code to your layout XML code

android:background="@drawable/bbg"

EditText features :
one of the features I want to talk about is android:singleLine which is very useful. If you want to get some info from the user, this text box is a good tool to use, but make sure you set the SingleLine variable to true. If not if they paste a 20 lines of text by mistake your whole GUI gets out of shape. Also if you want to use this for example to write an email text, then this should be set to false as you want it to contain several lines. The good thing about several lines EditText is that they do have scrolling function.

<EditText ... android:singleLine="true">//Single Line box for getting email address
</span><span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre;"><EditText ... android:singleLine="false">//Multi Line box for getting email text

in case you want limit the number of lines of an EditText:

<span style="font-family: monospace; font-size: 12px; line-height: 18px; white-space: pre;"><EditText android:layout_width="fill_parent"</span>
<pre><code>            android:layout_height="wrap_content" android:gravity="center"
android:singleLine="false" android:lines="5"
android:layout_marginLeft="10dip" android:layout_marginRight="10dip"
/></code><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px; white-space: normal;">

 

Simple Item List :
Setting up a simple Item list with an already filled Arrayadapter.


static final String[] COUNTRIES = new String[] {"Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra","Angola", "..."}
<pre>setListAdapter(new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, COUNTRIES));
getListView().setTextFilterEnabled(true);</pre>

Drop Down List :
In Android drop down list is a little bit complicated to give value to. You first need to add one Spinner to your layout and then connect it to

 String[] Countries = { "India", "France", "Japan", "China", "U.S" };

// //////////////////Countries Spinner/////////////////////////////////
SpinnerCountries = (Spinner) findViewById(R.id.Spinner01);

// //////////////////////////////////////////////////////////////
// create an arrayAdapter an assign it to the spinner
AdapterCountries = new ArrayAdapter<CharSequence>(this,
android.R.layout.simple_spinner_item);
AdapterCountries
.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
SpinnerCountries.setAdapter(AdapterCountries);

int lenCountries = Countries.length;

for (int i = 0; i < lenCountries; i++) {
// test += Areas[i] + "\n";
AdapterCountries.add(Countries[i]);
}

source

Disabling the Landscape Mode :
You have two ways to do this, either in the code, or in the XML layout file :

XML :

</span><span style="font-family: monospace; font-size: 12px; line-height: 18px; white-space: pre;"><activity android:name=".SomeActivity"</span>
<pre>
<pre><code>              android:label="@string/app_name"
android:screenOrientation="portrait"></code>

OR in the code :

[/java]

setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);     //  Fixed Portrait orientation[/java]

Layouts in Android :
LinearLayout :
LinearLayout aligns all children in a single direction — vertically or horizontally, depending on how you define the orientation attribute. All children are stacked one after the other, so a vertical list will only have one child per row, no matter how wide they are, and a horizontal list will only be one row high (the height of the tallest child, plus padding). A LinearLayout respects margins between children and the gravity (right, center, or left alignment) of each child.

TableLayout :
TableLayout positions its children into rows and columns. TableLayout containers do not display border lines for their rows, columns, or cells. The table will have as many columns as the row with the most cells. A table can leave cells empty, but cells cannot span columns, as they can in HTML.

RelativeLayout
RelativeLayout lets child views specify their position relative to the parent view or to each other (specified by ID). So you can align two elements by right border, or make one below another, centered in the screen, centered left, and so on. Elements are rendered in the order given, so if the first element is centered in the screen, other elements aligning themselves to that element will be aligned relative to screen center. Also, because of this ordering, if using XML to specify this layout, the element that you will reference (in order to position other view objects) must be listed in the XML file before you refer to it from the other views via its reference ID.

On Thursday I hold one of the most difficult presentations of my life. I was representing Robotica Osloensis, a student community which I am deputy chairman of, at Ignite Oslo. I talked about Rapid Prototyping which we use as our main method at Robotica in our projects. Ignite is a style of presentation where participants are given five minutes to speak on a subject accompanied by 20 slides. Each slide is displayed for 15 seconds, and slides are automatically advanced. The Ignite format is similar to Pecha Kucha, which features 20 slides displayed for 20 seconds each.

The Ignite Oslo was a very nice event. They had 5 minutes presentations about different topics which were very interesting. Presentations about art, film making, music composition with applications on iPad, 3D printing, air balloons and fashion, etc. It was pretty stressful when it came to my turn. The whole idea of 15 seconds intervals and having a lot to say about a subject that actually belongs to the nerd world made me very nervous. Thanks to my friends Magnus Lange and Ole Jacob, who helped me both about the content and preparing in advance for the presentation, I was well prepared. Also I should thank my friends who came there to support me when I was actually holding the presentation. My presentation can be downloaded by clicking here.

courseApp

February 18th, 2011 | Posted by Shahab in My Projects | My Studies | Shahab | UiO - (0 Comments)

This is a school project for a course(INF5261 – Development of mobile information systems and services) I take at department of Informatics at University of Oslo. courseApp is an android mobile application which allows the users(students at University of Oslo) to add their courses to this application and respectivley receive the latest updates about the course on their cellphone. We also are thinking about integerating the time & place of the courses with the students android calender. We have plans for further development of this application but this is all dependent on if we can get access to the database in StudentWeb. If we do so we would be able to let students add courses to navigate through the courses and join the course by just one touch click …

We have thought to have following functionalities on our program(numbers show also priority).

  1. My courses
  2. Latest messages on course page
  3. Warning on Email
  4. Integration with Android Calender
  5. Friends taking same course

read more about our project at Our Wonder Document.

People innvolved :

  • Akbar(Shahab) Faghihi Mughaddam – shahabfm( at )usit.uio.no
  • Shahab Bakhtiyari Saravan – shahabb( at )ifi.uio.no
  • Ummair Tahir - ummairt( at )ifi.uio.no
  • Piraba Kaugathasan - pirabak( at )ifi.uio.no

As the programming phase is almost finished, we have entered the design phase. We are working on our 3D design and plan to buy tracking belts and sprocket wheels. At the same time we are discussing the sponsorship of the project with RobotShop.com & hope we receive a positive answer from them. You can read full reports on our activities & have full access to our codes and designs on Super Crawler worklog at Robotica Osloensis forum or the project weblog.

Bilde

As the one in projects manager in Robotica Osloensis student robotic community, I am leading the summer project 2010 called Super Crawler. After planning and team building for the summer projects, my team members & I have made a very good progress up to now & we are working with full speed. The programming of the micro-controllers & the navigation program in Java has finished.  Right now Design team isworking on design & we are searching for the right design and materials for our super crawler. We should soon start video-streaming part as well and then we are finished with the first phase of super crawler :-)

Super Crawler weblog : http://supercrawler.blogspot.com/
Super Crawler worklog : http://robotica.ifi.uio.no/forum/viewtopic.php?f=8&t=5

Subprojects in Super Crawler :

  • Design / Redesign : Magnus, Shahab F., Andrei
  • Micro-controller Programming : Puya, Jonas, Ole Marius, Shahab F., Magnus
  • Navigation Program : Shahab F., Jonas, Shahab B.
  • Video Streaming : Jonas, Ole Marius, Shahab F.

Design -> SolidWorks
Micro-Controller -> Arduino boards
Video Streaming -> Not Decided
Navigation(Control) program -> Java

UiOToolbar 0.2, small update

April 28th, 2009 | Posted by Shahab in Shahab - (0 Comments)

UioToolbar Version 0.2 is available. For downloading you can click here. There are few small improvments and the most usefull one is that by pressing Enter key the user would see the search result at university of Oslo’s database and not Google which is not the main purpose of making this toolbar.

UiOToolbar project …

April 27th, 2009 | Posted by Shahab in Shahab - (0 Comments)

UiOToolbar is a mini project of mine and is developed to be used by few users at my work. This toolbar is a Firefox toolbar and is developed by Javascript codes. You can download the file by clicking here.

UiOToolbar

UiOToolbar 0.1

The toolbar has number of buttons which makes daily surfing easier for staffs at university of Oslo. The buttons would give the user the power to search directly from the toolbar in universities(UiO) database. User can also search both Google and Google images database directly from the toolbar.

UiOToolbar

UiOToolbar

I should mention that this is not an official University of Oslo pakcage and it was just developed locally by me to help some of my colleagues.

Earth Hour 2009

March 30th, 2009 | Posted by Shahab in Others | Photography | Shahab - (1 Comments)
Earth Hour project took place on 28th of March all around the world in 375 cities and 1,000,000,000 people took part in it. On this day people turned off their lights for one hour at 20:30 their own local time to show politicians how much they do care about being Green. On 28th I voted for earth as many others did all around the earth. It’s beautiful that despite our differences how much we care about our old cradle, Earth…

This is my philosophy project about Descartes meditations and how it effected our world and meditation afterwards. The post comes in a post afterwards and you can also download the ZIP file by clicking here. The essay discusses the way Descartes new fundemental unit(I think, therefore I exist) changed our point of view and guided humanity to individualism.