[android-developers] how to support multiple screen for map overlay?

2010-11-24 Thread dadada
hi all,

i have a map overlay for my map view. I have a few Path and Matrix
variables within the overlay.

when the project ran on other screen resolution, the map overlay did
not scale to the desire screen size.

How can i achieve that?

did i miss out something on 
http://developer.android.com/guide/practices/screens_support.html

Thanks!
bryan

-- 
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] how to support multiple screen for map overlay?

2010-11-24 Thread dadada
hi all,

i have a map overlay for my map view. I have a few Path and Matrix
variables within the overlay.

when the project ran on other screen resolution, the map overlay did
not scale to the desire screen size.

How can i achieve that?

did i miss out something on 
http://developer.android.com/guide/practices/screens_support.html

Thanks!
bryan

-- 
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] how to get back the image taken after Intent(MediaStore.ACTION_IMAGE_CAPTURE)

2010-10-07 Thread dadada
Hi all,

how do i get back the image taken from starting the
Intent(MediaStore.ACTION_IMAGE_CAPTURE)?

I need the image to be display as a thumbnail and also be attached to
email.

Thanks!
bryan

-- 
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] Re: how do i include Authorization: GoogleLogin auth=authorization_token into the httpclient?

2010-10-06 Thread dadada
ok .. i got it.

it should be

httpget.addHeader(Authorization, GoogleLogin auth= +auth);


On Oct 6, 11:35 am, dadada ytbr...@gmail.com wrote:
 hi,

 so i tried the following

  HttpGet httpget = new HttpGet(http://maps.google.com/maps/feeds/maps/
 default/full);
  httpget.addHeader(Authorization: GoogleLogin, auth=+authVal );

 where the authVal is the token retrieved previously.

 But I am getting the following error:

 Authentication error: Unable to respond to any
 of these challenges: {googlelogin=WWW-Authenticate: GoogleLogin
 realm=http://ww
 w.google.com/accounts/ClientLogin, service=local}
 W/System.err( 8462): org.apache.http.client.HttpResponseException:
 Missing auth
 token

 what am i doing wrong? thanks!

 On Oct 6, 11:21 am, dadada ytbr...@gmail.com wrote:



  hi

  how do i include Authorization: GoogleLogin auth=authorization_token
  into the httpclient?

  should i be doing :

   ListNameValuePair nameValuePairs = new
  ArrayListNameValuePair(1);
   nameValuePairs.add(new BasicNameValuePair(Authorization,
  GoogleLogin auth=authorization_token));  ??

  Thanks!
  bryan

-- 
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] map not api visible

2010-10-06 Thread dadada
hi all,

so i tried to update a google map through httprequest.

However, I get a  org.apache.http.client.HttpResponseException:
Forbidden.

The initial authorization gives a 200 OK. and I got my authtoken.

I then tried the url on a browser and i got a map not api visible. I
checked that the property api_visible is 0.

 I tried to create another map and make it public. The api_visible
property still remain 0.

How do i turn on this property or resolve these issues?

Has anybody update the google map using http request before?

Thanks!
bryan

-- 
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] Re: map not api visible

2010-10-06 Thread dadada
Thank you TreKing. I will post in the google map group.

At the meantime, I wonder is there someone out there who tried to use
http to update map. thanks

On Oct 6, 8:09 pm, TreKing treking...@gmail.com wrote:
 On Wed, Oct 6, 2010 at 5:41 AM, dadada ytbr...@gmail.com wrote:
  I then tried the url on a browser and i got a map not api visible. I
  checked that the property api_visible is 0.

   I tried to create another map and make it public. The api_visible property
  still remain 0.

 This does not sound Android-specific. You may have more luck in a different,
 online-Google-Maps-centric group or forum.

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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] limit the number of image to one for each swipe in android gallery

2010-10-06 Thread dadada
Hi,

In android gallery, is there a way to limit the number of image cover
to ONE for each swipe?

Right now, it is covering more than one.

thanks
Bryan

-- 
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] connecting to google map data api using http protocol

2010-10-05 Thread dadada
hi,

since the gdata doesn't work on android, i'm trying to use http
protocol.

Retrieving the map feed from this
http://maps.google.com/maps/ms?hl=enie=UTF8oe=UTF8num=200start=200vps=1jsv=282dmsa=33msid=106069377598790155454.0004720325247dc0c953aabauth=4caac8b6s7fLDxa4oy-0GX5xHS8iZJIEeWo,
using httpget is fine.

But if i want to update this map , how should i proceed using
httpPost?

I am still unsure  how to authenticate and set the appropriate headers
for httpPost after reading
http://code.google.com/apis/maps/documentation/mapsdata/developers_guide_protocol.html#Authenticating

can someone please give me some pointer?

thanks!

-- 
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] how do i include Authorization: GoogleLogin auth=authorization_token into the httpclient?

2010-10-05 Thread dadada
hi

how do i include Authorization: GoogleLogin auth=authorization_token
into the httpclient?

should i be doing :

 ListNameValuePair nameValuePairs = new
ArrayListNameValuePair(1);
 nameValuePairs.add(new BasicNameValuePair(Authorization,
GoogleLogin auth=authorization_token));  ??



Thanks!
bryan

-- 
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] Re: how do i include Authorization: GoogleLogin auth=authorization_token into the httpclient?

2010-10-05 Thread dadada
hi,

so i tried the following

 HttpGet httpget = new HttpGet(http://maps.google.com/maps/feeds/maps/
default/full);
 httpget.addHeader(Authorization: GoogleLogin, auth=+authVal );

where the authVal is the token retrieved previously.

But I am getting the following error:

Authentication error: Unable to respond to any
of these challenges: {googlelogin=WWW-Authenticate: GoogleLogin
realm=http://ww
w.google.com/accounts/ClientLogin, service=local}
W/System.err( 8462): org.apache.http.client.HttpResponseException:
Missing auth
token

what am i doing wrong? thanks!

On Oct 6, 11:21 am, dadada ytbr...@gmail.com wrote:
 hi

 how do i include Authorization: GoogleLogin auth=authorization_token
 into the httpclient?

 should i be doing :

  ListNameValuePair nameValuePairs = new
 ArrayListNameValuePair(1);
  nameValuePairs.add(new BasicNameValuePair(Authorization,
 GoogleLogin auth=authorization_token));  ??

 Thanks!
 bryan

-- 
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] how do i add the content view behind gridview?

2010-10-04 Thread dadada
hi all,

how do i add the content view behind gridview?

i could only addContentView on top of gridview.

I setContentView() of the gridview for the activity.

Thanks!

bryan

-- 
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] a good way to do screen cast on android

2010-10-04 Thread dadada
hi all,

is there a good way to do screen cast on android?

what do you guys use to replace the cursor? i'm looking for a
simfinger alternative. is there something for android?

anybody tried http://code.google.com/p/androidscreencast/? is it
good?

thanks!
bryan

-- 
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] how do i draw a semicircle using a path?

2010-09-27 Thread dadada
hi,

how do i draw a semicircle using a path?

thanks,
bryan

-- 
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] http post and get request for updating map

2010-09-27 Thread dadada
hello,

i want to post data onto google map. since there's no gdata for
android, i reckon that i have to do it through http post and get which
i am not good at.

is there some reference code for doing http post and get request?

Both the url to the map and xml are the same
http://maps.google.com/maps/ms?ie=UTF8hl=envps=1jsv=260doe=UTF8msa=0output=georssmsid=106069377598790155454.0004720325247dc0c953a

I guess it should be regarding the content type. Should i be calling
get http on this url to retrieve the xml? and then modify the xml file
and do a post http request to this same url again?

Can someone please advise me?

Thanks

-- 
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] global variable accessible by mapactiivty and activity

2010-09-22 Thread dadada
hi all,

what is the best way to pass data between map activity and activity?

basically the passed data is an array of coordinate.

is it possible to create a global variable that is accesible by both
mapactivity and activity?

or should i use parcelable?

thanks!
Bryan

-- 
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] Re: map can't load at specific places

2010-09-21 Thread dadada
All the map tiles don load at home.

Internet and google map app is working. Just my app's map tiles aren't
loading. I can get my location update.  Strange.

The overlay is drawn without connectivity. I don't think connectivity
is the problem here.

I am on 3G.



On Sep 21, 12:27 pm, TreKing treking...@gmail.com wrote:
 On Mon, Sep 20, 2010 at 10:34 PM, dadada ytbr...@gmail.com wrote:
  It only happen at home. When i go to my office, it will work fine.

 That sounds like you simply have bad coverage in your home. Are you on 3G or
 Wifi? Does other internet-related functionality work at home (like your
 browser)?

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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] map can't load at specific places

2010-09-20 Thread dadada
hi,

something strange about my map. it doesn't load at specific location.
The map view has a custom overlay where i draw some path on it.

can some advise me what is wrong? below is the logcat:


W/MapActivity( 7383): Recycling dispatcher
com.google.googlenav.datarequest.datarequestdispatc...@449759d0
V/MapActivity( 7383): Recycling map object.
D/AK8973  (   64): Compass Start
I/Maps.MyLocationOverlay( 7383): Request updates from gps
I/Maps.MyLocationOverlay( 7383): Request updates from network
I/MapActivity( 7383): Handling network change notification:CONNECTED
E/MapActivity( 7383): Couldn't get connection factory client
D/( 7383): sensorChanged (0.0, -51.0, -9.0)
I/ActivityManager(   85): Displayed activity
com.example.aed/.map.Map_Form3: 359 ms (total 359 ms)

I/Resources( 6816): Loaded time zone names for en_US in 136ms.
W/ResponseProcessCookies( 6816): Cookie rejected: [version: 0][name:
GX][value:
DQAAAKcAAADd95py3zcFbtQok2_w_egnqGJyPhA2uKES00wHkhZJvpBhbb057sKZRjJA9lpxFuZzYkXIMx-
G5oWuSlTOzCUokaCmqdk-6ludCQ8aI9roT30-
CLLOmuz5yEz2Jc2zojSGKR4lOrfGTytEL3yLl3b9sgz3vEOSxY1TNxCgbR5ASC0c_IferaPaXC2_E0oPZXdmzsZf7NGvWIONgii_eO6h_xjVxx0YguYE1iZ6XoMTSA]
[domain: mail.google.com][path: /proxy/gmail/mail][expiry: Tue Oct 05
00:19:23 GMT+08:00 2010]. Illegal domain attribute mail.google.com.
Domain of origin: android.clients.google.com
W/ResponseProcessCookies( 6816): Cookie rejected: [version: 0][name:
GX][value: DQAAAKgAAAClm3_ZUp-
W1qhykUNHNpT0PKaw4pZdmIUUah2zzf3ug4al8dxLJeIppsfG_CS7EzM3bq3i1sd9pMkrv1Yl0Qu44cflMCRkj6T-
H0yKWegBUZgvtUiBuiObgedKXOiiMTmnDjUKdUvQNa9W2V17dqyBapf2iy4nZetXQyzzJTvpTW1QyWYSKhoJiIGxk-
DmO_7cKmSJ4vl4yxeBTvaCNCH7XtqQanr0PRRq8UBGT3DrEg][domain:
mail.google.com][path: /proxy/gmail/mail][expiry: Tue Oct 05 00:19:24
GMT+08:00 2010]. Illegal domain attribute mail.google.com. Domain
of origin: android.clients.google.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


[android-developers] Re: map can't load at specific places

2010-09-20 Thread dadada
The map tile doesn't load. However, the overlay ( some path and
control) is drawn. with the default enabled-compass drawn too.

It only happen at home. When i go to my office, it will work fine.


On Sep 21, 12:51 am, TreKing treking...@gmail.com wrote:
 On Mon, Sep 20, 2010 at 11:24 AM, dadada ytbr...@gmail.com wrote:
  can some advise me what is wrong?

 You haven't really provided enough information to help you.

 For starters, you may want to try elaborating on what it doesn't load
 means and what the specific location is.

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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] is there a way to make drawable clickable?

2010-09-19 Thread dadada
hi all,

i am using drawable and translateobject to create animation on camera
overlay.


how do i get clickable drawable object?

should i be using drawable?

thanks!

bryan

-- 
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] what is the basic idea of sensor driven animation

2010-09-16 Thread dadada
Hi all,

I want to do a sensor driven animation ( like AR)  where by i use
azimuth to control the flowing of drawable in the camera overlay.

right now, i have the sensor reading ready on camera. I can drawable
on the camera overlay.

However, I am not sure how can the sensor data to be used to control
the animation?

i looked at the animatedrawable in apidemo,

should i be calling translate animation everytime i get a new sensor
reading?

   Animation an = new TranslateAnimation(0, 100, 0, 200);
an.setDuration(2000);
an.setRepeatCount(-1);
an.initialize(10, 10, 10, 10);


mDrawable = new AnimateDrawable(dr, an);
an.startNow();

-- 
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] Re: How to calculate distance between to city (dynamically)

2010-09-16 Thread dadada
you can also use 'haversine' formula. google it. you need two
geopoint.

On Sep 16, 3:36 pm, Rocky rkjhaw1...@gmail.com wrote:
 Hi Shashidhar,

 Thanks dear...

 On Thu, Sep 16, 2010 at 12:56 PM, Shashidhar shashi.zep...@gmail.comwrote:





  Have a look at this

 http://developer.android.com/reference/android/location/Location.html...[]%29http://developer.android.com/reference/android/location/Location.html...

  http://developer.android.com/reference/android/location/Location.html...
  -Shashidhar

  On Thu, Sep 16, 2010 at 12:45 PM, RKJ (Android developer) 
  rkjhaw1...@gmail.com wrote:

  Hi All,

  I want to calculate the distance between 2 city, whatever user
  mention.

  Example -
  Default City - 1st City - New York or New Delhi, London Seoul anything
  User Put     - 2nd City - California

  Need - to calculate distance between California to New York  or London

  Welcome any hints
  --RKJ

  --
  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.comandroid-developers%2Bunsubs
   cr...@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 post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs 
  cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Thanks  Regards

 Rakesh Kumar Jha
 Software Developer
 Symphony Services Corp (India) Pvt Ltd
 Bangalore
 (O) +918030273740
 (R) +919886336619

-- 
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] how to create colored multicolumn listview

2010-09-16 Thread dadada
hi,

do I use the imageview as the skin of the colored listview or is there
better ways to create them?

thanks.

bryan

-- 
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] should i be reusing the same location manager?

2010-09-14 Thread dadada
Hi all,

I have a few activities within an app.

Should i be reusing the same location manager or should i call
(LocationManager) this.getSystemService(Context.LOCATION_SERVICE) for
each new activities?

Thanks
Bryan

-- 
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] path appearing twice on map canvas

2010-09-14 Thread dadada
hi all,

I have a Main_Overlay class that extends Overlay.

I added This overlay to the mapview and override the Draw method as of
below:

public void draw(android.graphics.Canvas canvas, MapView mapView,
boolean shadow )
{
 mPath = new Path();
 mPath.moveTo(0, -240);
 mPath.lineTo(-50, -100);
 mPath.lineTo(0, -150);
 mPath.lineTo(50, -100);
 mPath.close();

Paint paint2 = new Paint();
paint2.setStyle(Paint.Style.FILL);
paint2.setAlpha(80);


mPaint.setAntiAlias(true);
mPaint.setColor(Color.RED);
mPaint.setStyle(Paint.Style.FILL);
mPaint.setAlpha(40);

int w = canvas.getWidth();
int h = canvas.getHeight();
int cx = w / 2;
int cy = h / 2;

canvas.translate(cx, cy);

canvas.drawPath(mPath, mPaint);

}



However, the path is shown twice on the map canvas. One near the 0,0.
The other is at the bottom right hand corner.

When i draw it on normal canvas, only one path is shown.

Can Someone please advise?

Thanks!
Bryan

-- 
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] path appearing twice on map canvas

2010-09-14 Thread dadada
Hi all,

I have a Main_Overlay that extends Overlay.

Inside Main_Overlay i override the draw method:



public void draw(android.graphics.Canvas canvas, MapView mapView,
boolean shadow )
{
 mPath = new Path();
 mPath.moveTo(0, -240);
 mPath.lineTo(-50, -100);
 mPath.lineTo(0, -150);
 mPath.lineTo(50, -100);
 mPath.addCircle(0, 0, 240, Path.Direction.CW);
 mPath.close();

Paint paint2 = new Paint();
paint2.setStyle(Paint.Style.FILL);
paint2.setAlpha(80);


mPaint.setAntiAlias(true);
mPaint.setColor(Color.RED);
mPaint.setStyle(Paint.Style.FILL);
mPaint.setAlpha(40);

int w = canvas.getWidth();
int h = canvas.getHeight();
int cx = w / 2;
int cy = h / 2;

canvas.translate(cx, cy);

canvas.drawPath(mPath, mPaint);

}




However, the path is drawn twice. First at 0,0 and then the other at
the bottom right hand side. While it is only drawn once on normal
canvas.

Can somebody please advise me on this?

Thanks
Bryan

-- 
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] how do i get the sensor data on mapoverlay?

2010-09-14 Thread dadada
hi all,

since map overlay is not activity, how do i get the sensor data so
that i can draw on the map overlay? like the direction arrow.

Thanks!
Bryan

-- 
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] Re: path appearing twice on map canvas

2010-09-14 Thread dadada
Thanks for the reply TreKing.

Is there a way to prevent the second drawing?

or simply how do i draw on the overlay so that there's only one path?

Thanks again.
On Sep 14, 10:41 pm, TreKing treking...@gmail.com wrote:
 On Tue, Sep 14, 2010 at 3:46 AM, dadada ytbr...@gmail.com wrote:
  Can somebody please advise me on this?

 From the documentation:
 Draw the overlay over the map. This will be called on all active overlays
 with shadow=true, to lay down the shadow layer, *and then again on all
 overlays with shadow=false*.

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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] Re: path appearing twice on map canvas

2010-09-14 Thread dadada
You are fast! just wanted to reply! saw your a thread
http://groups.google.com/group/android-developers/browse_thread/thread/2b004ab18bd7544e/131b5b435520e047,
that you replied.

Thanks TreKing! =)

On Sep 15, 12:34 am, TreKing treking...@gmail.com wrote:
 On Tue, Sep 14, 2010 at 11:28 AM, dadada ytbr...@gmail.com wrote:
  Is there a way to prevent the second drawing?

 If (!shadow) ...

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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] Re: how do i get the sensor data on mapoverlay?

2010-09-14 Thread dadada
public int size() {
return(items.size());
}
}
}
On Sep 14, 11:05 pm, TreKing treking...@gmail.com wrote:
 On Tue, Sep 14, 2010 at 4:27 AM, dadada ytbr...@gmail.com wrote:
  since map overlay is not activity

 What is your map overlay contained in?

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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] Re: how do i get the sensor data on mapoverlay?

2010-09-14 Thread dadada
oops. Crashes i meant.

Thanks for the tip. Now, the sensor values reaches the overlay. But
the overlay isn't redrawing.

I tried to call the draw() from Map_Form by passing a new canvas ,
same mapview and true for shadow. But it doesn't cause the overlay
redraw.

Do you have any idea what is wrong?

Thanks again TreKing.

On Sep 15, 12:48 am, TreKing treking...@gmail.com wrote:
 On Tue, Sep 14, 2010 at 11:45 AM, dadada ytbr...@gmail.com wrote:
  map overlay sits in Map_form which extends mapactivity.

 Bingo.

    But it crushes.

 Is that like pwns?

 Assuming you meant crashes, the stack trace of where it crashes would be
 useful information.

   Below is my code for Map_Form:

 I'm not sifting through all of that.

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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] Toast not changing on mapactivity

2010-09-14 Thread dadada
Hello,

I tried to update my mapactivity with toast as the sensor data
changes.

However, my first Toast appears and it never change despite detecting
changes in sensor values.

What could be the reason?

Below is the snippet of my SensorListener:
Can someone please give me some advices! Thanks!

 private final SensorListener mListener = new SensorListener()
{
public void onSensorChanged(int sensor, float[] values)
{
if(-values[0]  0  -values[0]  -1){
Toast.makeText(getApplicationContext(), 
walkForward,
Toast.LENGTH_SHORT).show();
}else if(-values[0]  1  -values[0]  -90){
Toast.makeText(getApplicationContext(), 
walkForward,
Toast.LENGTH_SHORT).show();
}else if(-values[0]  -90  -values[0]  -91){
Toast.makeText(getApplicationContext(), right,
Toast.LENGTH_SHORT).show();
}else if(-values[0]  -91  -values[0]  -180){
Toast.makeText(getApplicationContext(), 
walkBack,
Toast.LENGTH_SHORT).show();
}else if(-values[0]  -180  -values[0]  -181){
Toast.makeText(getApplicationContext(), 
walkBack,
Toast.LENGTH_SHORT).show();
}else if(-values[0]  -181  -values[0]  -270){
Toast.makeText(getApplicationContext(), 
walkBack,
Toast.LENGTH_SHORT).show();
}else if(-values[0]  -270  -values[0]  -271){
Toast.makeText(getApplicationContext(), left,
Toast.LENGTH_SHORT).show();
}else if(-values[0]  -271  -values[0]  -360){
Toast.makeText(getApplicationContext(), 
walkForward,
Toast.LENGTH_SHORT).show();
}
if (Config.LOGD) {
Log.d(, sensorChanged ( + values[0] + ,  +
values[1] + ,  + values[2] + ));
}
if(overlay!= null) overlay.setValue(values);
map.invalidate();
}
public void onAccuracyChanged(int sensor, int accuracy){}
};

-- 
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] Re: how do i get the sensor data on mapoverlay?

2010-09-14 Thread dadada
Thanks TreKing for the suggestion.

it works.

On Sep 15, 2:34 am, TreKing treking...@gmail.com wrote:
 On Tue, Sep 14, 2010 at 1:07 PM, dadada ytbr...@gmail.com wrote:
  But the overlay isn't redrawing.

 Try invalidating your MapView. You seldom, if ever, want to call draw
 yourself.

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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] how do i draw the direction arrow on the map

2010-09-13 Thread dadada
hi all,

question as above.

right now, i am creating a class extending mylocationoverlay.

then, i override the draw method.

is this the correct method?

because after i rewrote the draw method, the map tile cannot render.

please advise. Thanks!

bryan

-- 
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] Re: is there a way to access the system camera?

2010-09-13 Thread dadada
thank you that what i wanted. Thanks Taylor.

On Sep 11, 1:13 am, Taylor Perkins taylo...@gmail.com wrote:
 Check out the intents that allow you to access system function.

 I think the one you are talking about is the following:

 Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

 startActivityForResult(intent,0);



 On Thu, Sep 9, 2010 at 12:46, dadada ytbr...@gmail.com wrote:
  hi all,

  i saw some application that can use the system camera instead of
  having just a blank camera preview?

  ie, the camera preview is the same as the default android camera
  application with full control.

  how do i access that?

  Thank you.

  --
  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.comandroid-developers%2Bunsubs 
  cr...@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 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] Re: canvas woe

2010-09-13 Thread dadada
Thanks Kostya. it works.

So I everytime i onDraw(),

i will create new path() and of course .reset().

Thank you.

On Sep 12, 11:33 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Seems like you apply transformations to mPath over and over again, without
 resetting. Try moving the code that constructs mPath so it gets created from
 scratch every time through, as a temporary test. If this works, consider
 keeping the path constant, applying the transform at canvas level.

 --
 Kostya Vasilyev --http://kmansoft.wordpress.com

 12.09.2010 18:53 пользователь dadada ytbr...@gmail.com написал:

 thanks for your reply.

 I changed this part to

        if (mValues != null) {
               matrix.reset();

 matrix.setRotate(-mValues[0]);
 mPath.transform(matrix);}

 However, the transformation still goes infinitely. what should be the
 correct method ? thanks!

 On Sep 9, 6:08 am, Kostya Vasilyev kmans...@gmail.com wrote:

  Matrix transformation methods are...
  08.09.2010 15:19 пользователь dadada ytbr...@gmail.com написал:

  hello all,

  i used matrix to rotate instead of the canvas.

  However, the result isn't what...

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers g...

-- 
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] Re: how do i draw the direction arrow on the map

2010-09-13 Thread dadada
i didn't mean that compass that you can enable.

i mean some graphical arrow that i can draw on top of the map.

it will stay on top irregardless of zoom level.

the direction arrow will show the bearing to my destination.

then should it be the Overlay class?

Yes i am really lost what should i do.


On Sep 13, 10:38 pm, TreKing treking...@gmail.com wrote:
 On Mon, Sep 13, 2010 at 3:35 AM, dadada ytbr...@gmail.com wrote:
  question as above.

 What is the direction arrow? You mean the indicator on the
 MyLocationOverlay that Google Maps shows?

   right now, i am creating a class extending mylocationoverlay.

  then, i override the draw method.

  is this the correct method?

 Sure. You also probably want to call 
 this:http://code.google.com/android/add-ons/google-apis/reference/index.html

  because after i rewrote the draw method, the map tile cannot render.

 Map tiles have nothing to do with the MyLocationOverlay. You're doing
 something else wrong.

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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] how do i launch google street view from app

2010-09-13 Thread dadada
hi all,

question as above.

I cannot find anything in the sdk regarding google street view.

do we launch it from the web?

please advise. thanks.

-- 
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] Re: how do i launch google street view from app

2010-09-13 Thread dadada
oops thanks treking!

On Sep 13, 11:23 pm, TreKing treking...@gmail.com wrote:
 On Mon, Sep 13, 2010 at 10:18 AM, dadada ytbr...@gmail.com wrote:
  I cannot find anything in the sdk regarding google street view.

 Really?http://developer.android.com/guide/appendix/g-app-intents.html

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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] is there a way to retrieve the latest image taken using system camera?

2010-09-12 Thread dadada
hi all,

so i have an intent that use the system camera. so after i taken the
photo, it brings me back my application.

I want to display the image (just taken) as a thumbnail. How do i
retrieve that latest image from MediaStore.Images.Thumbnails.

thanks!
bryan

-- 
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] Re: canvas woe

2010-09-12 Thread dadada
thanks for your reply.

I changed this part to

if (mValues != null) {
   matrix.reset();
   matrix.setRotate(-mValues[0]);
   mPath.transform(matrix);
   }

However, the transformation still goes infinitely. what should be the
correct method ? thanks!


On Sep 9, 6:08 am, Kostya Vasilyev kmans...@gmail.com wrote:
 Matrix transformation methods are cumulative. If you wish to apply absolute
 transformation values, you need to reset the matrix to identity first.

 --
 Kostya Vasilyev --http://kmansoft.wordpress.com

 08.09.2010 15:19 пользователь dadada ytbr...@gmail.com написал:

 hello all,

 i used matrix to rotate instead of the canvas.

 However, the result isn't what i expected. The path just rotate
 infinitely without stopping.

 below is my code. it is a modification of the compass.java in
 apidemo.  can someone please give me some advice on this?

 import android.content.Context;
 import android.graphics.*;
 import android.hardware.SensorListener;
 import android.hardware.SensorManager;
 import android.os.Bundle;
 import android.util.Config;
 import android.util.Log;
 import android.view.View;
 import android.view.animation.AccelerateInterpolator;
 import android.view.animation.Animation;

 public class Compass extends GraphicsActivity {

    private static final String TAG = Compass;

        private SensorManager mSensorManager;
    private SampleView mView;
    private float[] mValues;

    private final SensorListener mListener = new SensorListener()
    {
        public void onSensorChanged(int sensor, float[] values)
        {
            if (Config.LOGD) Log.d(TAG, sensorChanged ( + values[0]
 + ,  + values[1] + ,  + values[2] + ));
            mValues = values;
            if (mView != null) {
                mView.invalidate();
            }
        }
        public void onAccuracyChanged(int sensor, int accuracy)
        {
            // TODO Auto-generated method stub

        }
    };

   �...@override
    protected void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        mSensorManager =
 (SensorManager)getSystemService(Context.SENSOR_SERVICE);
        mView = new SampleView(this);
        setContentView(mView);
    }

   �...@override
    protected void onResume()
    {
        if (Config.LOGD) Log.d(TAG, onResume);
        super.onResume();
        mSensorManager.registerListener(mListener,
                        SensorManager.SENSOR_ORIENTATION,
                        SensorManager.SENSOR_DELAY_GAME);
    }

   �...@override
    protected void onStop()
    {
        if (Config.LOGD) Log.d(TAG, onStop);
        mSensorManager.unregisterListener(mListener);
        super.onStop();
    }

    private class SampleView extends View {
        private Paint   mPaint = new Paint();
        private Path    mPath = new Path();
        private boolean mAnimate;
        private long    mNextTime;
        private Matrix matrix = new Matrix();

        public SampleView(Context context) {
            super(context);
            // Construct a wedge-shaped path
            mPath.moveTo(0, -50);
            mPath.lineTo(-20, 60);
            mPath.lineTo(0, 50);
            mPath.lineTo(20, 60);
            mPath.close();
            matrix.postScale(10, 10);
        }

       �...@override protected void onDraw(Canvas canvas) {

                Paint paint2 = new Paint();
                paint2.setColor(Color.BLUE);
            paint2.setStyle(Paint.Style.FILL);
                paint2.setAlpha(120);

                Paint paint3 = new Paint();
                paint3.setColor(Color.GREEN);
            paint3.setStyle(Paint.Style.FILL);
                paint3.setAlpha(200);

                Paint paint4 = new Paint();
                paint4.setColor(Color.GRAY);
            paint4.setStyle(Paint.Style.FILL);
                paint4.setAlpha(120);

                Paint paint5 = new Paint();
                paint5.setColor(Color.GRAY);
                paint5.setStyle(Paint.Style.FILL_AND_STROKE);
                paint5.setAlpha(120);

            Paint paint = mPaint;
            canvas.drawColor(Color.WHITE);

            paint.setAntiAlias(true);
            paint.setColor(Color.RED);
            paint.setStyle(Paint.Style.FILL);
            paint.setAlpha(120);

            int w = canvas.getWidth();
            int h = canvas.getHeight();
            int cx = w / 2;
            int cy = h / 2;

            canvas.translate(cx, cy);
            if (mValues != null) {
                matrix.setRotate(-mValues[0]);
                mPath.transform(matrix);
 //                canvas.rotate(-mValues[0]);
            }
            canvas.drawPath(mPath, mPaint);
            String str = ;
            String direction = ;
            if (mValues != null) {
                str = Azimuth:  + Float.toString(-mValues[0]);

                if(-mValues[0]  0  -mValues[0]  -1){
                        direction = Direction: North

[android-developers] Re: is there a way to implement screenshot functionality in android

2010-09-11 Thread dadada
then why can iphone support screen shot but android cannot?

does anyone know of a workaround? i just need to capture the part of
the image that the user is viewing.(after they try to zoom in or
out).

thanks!

On Sep 10, 10:06 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Sep 10, 2010 at 9:53 AM, dadada ytbr...@gmail.com wrote:
  question as above!

 This is not supported, for security reasons. There are apparently ways
 you can get something to work if you root your phone. And, of course,
 you can do screenshots from outside your phone using DDMS.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Android Training in London:http://skillsmatter.com/go/os-mobile-server

-- 
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] java issues in mac and window

2010-09-11 Thread dadada
hi all,


So i opened my android project(from win7 environment) in my mac.

then i have these java problems :

@Override
public void onFocusChange(View v, boolean hasFocus) {
// TODO Auto-generated method stub

}



@Override
public void onLocationChanged(Location location) {


@Override
public void onClick(View v)
{



removing those @override notation solve the issues. why is this
happening in the first place?

who is right? mac or window

thanks!

-- 
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] is there a way to implement screenshot functionality in android

2010-09-10 Thread dadada
hi all,

question as above!

thanks
bryan

-- 
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] is there a way to access the system camera?

2010-09-09 Thread dadada
hi all,

i saw some application that can use the system camera instead of
having just a blank camera preview?

ie, the camera preview is the same as the default android camera
application with full control.

how do i access that?

Thank you.

-- 
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] canvas woe

2010-09-08 Thread dadada
hi all,

i tried the sample compass app in apidemo. When there's a new reading
in azimuth, i write the reading on canvas. However, the canvas is set
to rotate when new reading comes in, to simulate the rotation of the
compass arrow.

Is there an alternative to just rotate the bitmap rather than the
canvas. there don seems to have rotate method on bitmap or path.

any advices?

/bryan

-- 
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] Re: canvas woe

2010-09-08 Thread dadada
){
direction = Direction: West;
}else if(-mValues[0]  -271  -mValues[0]  -360){
direction = Direction: North West;
}
}
canvas.drawText(str, 0, 100, mPaint);
canvas.drawText(direction, 0, 110, mPaint);

canvas.drawCircle(0, 200, 20, paint2);
canvas.drawCircle(0, 200, 4, paint3);
canvas.drawCircle(0, 200, 30, paint4);
canvas.drawCircle(0, 200, 50, paint4);




}

@Override
protected void onAttachedToWindow() {
mAnimate = true;
super.onAttachedToWindow();
}

@Override
protected void onDetachedFromWindow() {
mAnimate = false;
super.onDetachedFromWindow();
}
}


}



On Sep 8, 4:18 pm, dadada ytbr...@gmail.com wrote:
 hi all,

 i tried the sample compass app in apidemo. When there's a new reading
 in azimuth, i write the reading on canvas. However, the canvas is set
 to rotate when new reading comes in, to simulate the rotation of the
 compass arrow.

 Is there an alternative to just rotate the bitmap rather than the
 canvas. there don seems to have rotate method on bitmap or path.

 any advices?

 /bryan

-- 
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