Mobile

AlternativeTo - Application Posted on Market


AlternativeTo is an Android client for the web service AlternativeTo.
AlternativeTo provides alternatives to popular softwares. Find out what are top alternatives for your favorite Browser or Antivirus.
Update 1 (10th September 2010):
- Added Filter by Platform and Filter by License
- Added capability to open website
I recently upload this application on Android Market. My intension is to figure out
1. Typical problems faced when writing android clients for web services or replicating web applications
2. Create Design Patterns and hopefully an Android Library to help write Android Clients
3. Share the same at Pune GTUG :)
Please visit AlternativeTo website for more details - http://alternativeto.net


Android Jumpstart - Win HTC Hero Phone






PUNE Google Technology User Group

Pune GTUG presents Android Jumpstart Seminar. A seminar where we would get people excited, thrilled and ready on Android Platform

The Objective about this seminar is as follows

  1. Introduce Android
  2. Introduce the building blocks and architecture
  3. Talk on Building an Application on Android comprising of all the building blocks


Lucky draw winner wins an HTC Hero phone from our esteemed sponsors Quick Office and Synerzip







Date and Time

21st November 2009, Saturday morning 10:00 am to 2:00 p.m

Venue

The Orbett Hotel - 1238/2, Apte Road, Deccan Gymkhana, Pune – 411004

Click here for Location on Google Maps

Registration

Registration is at the Venue. No preregistration of the event. There are no fees

Schedule

  • 10:00 a.m to 10:30 a.m – Registration
  • 10:30 a.m to 12:30 p.m – Seminar
  • 12:30 p.m to 2:00 p.m
  • Talk from QuickOffice + Synerzip for exciting Android Opportunities
  • Lucky Draw to give away HTC Hero Phone

Event is sponsored by Quick Office and Synerzip.


Here is the Presentation we will use for the Seminar

[googleapps domain="docs" dir="present/embed" query="id=ddcsc8qq_0c65pzxcm" width="410" height="342" /]

Why one has to use a Handler in Android?

Following is inferred from the documentation about a Handler

The handler is used to schedule a runnable on the message queue of the thread that created the handler. it is mostly used to schedule UI updates on the UI thread

The one think I could not understand why I can't use any thread to update UI.

I did some experiment for the same.

Here I tried to update a TextView after every 1 second for 50 seconds using a normal thread and it failed. I got an exception

package org.punegtug.sample;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.widget.TextView;

public class HandlerTest extends Activity {
private TextView textView = null;
private int index = 0;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setContentView(R.layout.main);
textView = (TextView) findViewById(R.id.textView);
textView.setText("index="+index);
}

/*
* (non-Javadoc)
*
* @see android.app.Activity#onPause()
*/
@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
}

/*
* (non-Javadoc)
*
* @see android.app.Activity#onResume()
*/
@Override
protected void onResume() {

Runnable runnable = new Runnable() {

@Override
public void run() {
index = 0;
while (index < 50) {

//Tried to access text from UI component textView
String text= textView.getText().toString();

//Directly tried to update UI in this thread
textView.setText("index="+index++);

try {
// do what you want to do before sleeping
Thread.currentThread().sleep(1000);// sleep for 1000 ms
// do what you want to do after sleeptig
} catch (InterruptedException ie) {
// If this thread was intrrupted by nother thread
}

}

}

};
Thread thread = new Thread(runnable);
thread.start();

}

}

But the following code with Handler worked

t android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.widget.TextView;

public class HandlerTest extends Activity {
private TextView textView = null;
private int index = 0;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setContentView(R.layout.main);
textView = (TextView) findViewById(R.id.textView);
textView.setText("index="+index);
}

/*
* (non-Javadoc)
*
* @see android.app.Activity#onPause()
*/
@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
}

/*
* (non-Javadoc)
*
* @see android.app.Activity#onResume()
*/
@Override
protected void onResume() {
final Handler handler = new Handler(new Handler.Callback() {

@Override
public boolean handleMessage(Message msg) {
textView.setText("index="+index++);
return false;
}
});
Runnable runnable = new Runnable() {

@Override
public void run() {
index = 0;
while (index < 50) {

//Tried to access text from UI component textView
String text= textView.getText().toString();

//Indirectly tried to update UI in this thread
handler.sendEmptyMessage(0);


try {
// do what you want to do before sleeping
Thread.currentThread().sleep(1000);// sleep for 1000 ms
// do what you want to do after sleeptig
} catch (InterruptedException ie) {
// If this thread was intrrupted by nother thread
}

}

}

};
Thread thread = new Thread(runnable);
thread.start();

}

}

So I could, one can not update a UI component in any other thread than UI thread. However, getting values from existing UI components in any thread (e.g textView.getText()) works fine.

Hence we need to use Handler.

Soon, I will send a post about Looper.

Android - Introductory Session

Getting Started with Android - 6th June 2009 - 4:00 p.m

Pune GTUG would be meeting on 6th June 2009 at 4:00 p.m at the below mentioned venue for the topic "Introduction to Android".

Venue
Dnyanvatsal Commercial Complex
Survey No. 23, Plot No. 189,
Karve Nagar,
Pune, India 411052
Contact no. - 9923085006
See on Google Map
http://www.synerzip.com

Agenda for this meet is as follows

  1. Brief History of Android
  2. Android Phones
  3. Android Experiments
  4. What is Android?
  5. What’s in new SDK
  6. Android Architecture in detail
  7. Application Fundamentals
  8. User Interface
  9. Resources and Assets
  10. Data Storage
  11. Content Providers
  12. Security and Permissions
  13. Developing Android Applications In Eclipse, with ADT
  14. First Android Application
  15. Further Reading
Speaker Bio - Sushrut Bidwai
  • Writing a book on Android (near future)
  • Leading a team of 15+ programmers in Nasik.
  • Works mainly on Java centric technologies and that too specifically on Google centric like GWT, Android, GAE for Java.
  • Provide information content to fellow developers through our blogs like androidcompetencycenter.com .
  • Worked with Persistent Systems and YagnaIQ (Pune based startup) at the start of career.
  • Rest of the things can be found on http://sushrutbidwai.com/about
 If you have any issues feel free to write to pune-gtug mailing list.