[android-developers] Re: how to set a shortcut key to launch an activity ?

2013-08-08 Thread shihab Shuvro
Hello shapnil,
how are you? I am facing a problem to lunch an activity when the shortcut 
key is pressed like open a number pad press *123 will fire my application. 
any idea?  

thanks in Advance.

On Wednesday, October 21, 2009 11:13:14 AM UTC+6, swapnil wrote:

 Hello,
   how to set a shortcut key to launch an activity ?  Lets say I have an 
 app TestApp. I want to set a shortcut key (e.g alt + T ) to launch 
 activity of TestApp. Is there any way to set such shortcuts to android apps 
 ?

 Thanks in advance. 

 -- 
 ...Swapnil

 || Hare Krishna Hare Krishna Krishna Krishna Hare Hare ||
 || Hare RamaHare Rama   Rama   RamaHare Hare ||


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Get GPS Location in a Broadcast Receiver.

2011-10-09 Thread shihab Shuvro
hi, i m new in android.

i want to get GPS  Loction  in a broadcast receiver .

but it shows error .my code is here.

public void onReceive(Context context, Intent intent) {

  LocationManager locManager = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);
// erros in getSystemService method
LocationListener locListener = new MyLocationListener();
locManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,
locListener);

Location loc=
locManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
  Log.d( **location**,  location+loc.getLatitude());

}

question 1. Is it possible to get GPS Location data in Broadcast
receiver.?
2.  Another alternative way i tried so far, use a service which
invokes in Broadcast receiver. the service can get GPS data .but how i
get it in Broadcast receiver ??

Plz help me.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Using Google weather api in android (can't parse Xml correctly)

2011-09-19 Thread shihab Shuvro
hi, i m trying to use google weather api. it sends an xml . but i cant
Parse the xml data.

here, u can see the xml . to click the url :

http://www.google.com/ig/api?weather=New%20York,%20USA

~~~ i use below method to get xml data but i can't .

NodeList nodes = doc.getElementsByTagName(weather);

for (int i = 0; i  nodes.getLength(); i++) {
HashMapString, String map = new HashMapString, 
String();

Element e = (Element)nodes.item(i);

map.put(city, City + XMLfunctions.getValue(e, city));
map.put(ForeCast , Fore_cast Date: +
XMLfunctions.getValue(e, forecast_date));
mylist.add(map);
}


ListAdapter adapter = new SimpleAdapter(this, mylist ,
R.layout.main,
new String[] { city, ForeCast },
new int[] { R.id.item_title,
R.id.item_subtitle });



 here i use hash map .. but that doesn't matter ..

~~~ i want t use the below tag data which is above link.

*   current_conditions

condition data=Mostly Cloudy/
temp_f data=63/
temp_c data=17/
humidity data=Humidity: 65%/
icon data=/ig/images/weather/mostly_cloudy.gif/
wind_condition data=Wind: NE at 12 mph/

/current_conditions


* thanks in advance...

shihab@gmail.com

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en