[android-beginners] Google Maps Data API and ClientLogin

2009-07-04 Thread Theo K

Hi all,
i'm trying oh so desperately hard to access the google maps data api
from within an Android app.  I authenticate by using the ClientLogin
method (by the way, is this the best way to authenticate from within
Android applications?) and i receive an AuthID just fine.
Unfortunately, when i try to get map feeds, i get an Internal Error
or a status 500 from the server.  I can see that the AuthID that i'm
providing is just fine, because if i provide a random garbage in the
Authorization: GoogleLogin auth= header, then i get a token invalid
error.  Can anyone provide any insight into this?
Has anyone else accessed one of the Google Services successfuly, by
using the ClientLogin?
Here's my code, if it helps anyone answer my question, or to perhaps
resolve an unrelated question:

try {
URL url = new 
URL(http://maps.google.com/maps/feeds/maps/default/
full);
HttpURLConnection connection = (HttpURLConnection)
url.openConnection();

//conn.setRequestProperty(Content-Type, 
application/x-www-form-
urlencoded);
connection.setRequestProperty(Authorization, 
GoogleLogin auth=
+ authID);

connection.setAllowUserInteraction(false);
connection.setDoOutput(false);
connection.setDoInput(true);
connection.setRequestMethod(GET);

//read inputstream here
InputStream in;
try{
  connection.connect();
  in = connection.getInputStream();

}
catch( IOException e ){
   BufferedReader reader = new BufferedReader(new
   
InputStreamReader(connection.getErrorStream()));
  String line;
  String totalError = ;
  while ((line = 
reader.readLine()) != null) {
  totalError = 
totalError + line;
  }
  return totalError;
}

byte[] array=new byte[1024];
in.read(array,0,1024);
String result=new String(array);
connection.disconnect();
in.close();

return result;

}
catch( IOException e ){
// handle the error here

return message is: + e.getMessage();
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] ERROR Resource entry main is already defined.

2009-07-04 Thread Michael Dorin

I have been playing with HelloGridview, and basically got it to work
with new png files.
However, I decided to change the layout...main.xml, and made a mistake.
Now I can't put it back!

This file main.out.xml keeps showing up and I keep getting
ERROR Resource entry main is already defined.

I recopy exactly the mail.xml file from teh example, yet I continue to
get the error.
Any ideas?

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



[android-beginners] Re: Map Application is not running in emulator

2009-07-04 Thread Raphael

On Sat, Jun 27, 2009 at 2:00 AM, moonmoonmoon...@gmail.com wrote:

 I am working on a map application which can be access by android
 emulator in eclipse and java.
 please tell the code for the eclipse3.3 and android 1.5 and adt0.8
 plz help me

You need to update to the latest ADT (0.9.2) to use Android 1.5.
Follow the instructions here:
  http://d.android.com/sdk/1.5_r2/installing.html

R/

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



[android-beginners] Re: HTC Magic and Eclipse

2009-07-04 Thread Raphael

On Mon, Jun 29, 2009 at 3:31 AM, Crocoluciano.brous...@gmail.com wrote:

 Hi all,

 I've followed the procedure to install my HTC Magic to launch my apps
 on.

 the procedure seams went well

 since now i've this output when i prompt adb devices :

 List of devices attached
 HT93WKF03753    device

 The procedure on Android developper says after to launch run as usual
 and i will be able to see my real device + my previous emulator BUT
 i'm not proposed with my Device :(  it still always only the emulator
 visible.

I don't understand your issue: the list you gave above shows your device.

R/



 Thank you for your helps.


 Croco

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



[android-beginners] Re: Eclipse Project Wizard

2009-07-04 Thread Raphael

Looks like the ADT plugin is not correctly installed on your Eclipse install.
Make sure you are using a compatible version of Eclipse (3.3 or 3.4,
Java or RCP flavors, *not* Classic) and try to remove and reinstall
the latest ADT 0.9.2

R/

On Tue, Jun 30, 2009 at 2:16 AM, PlaceboKidplaacebo...@gmail.com wrote:

 This doesn't help, cause I don't have Android option in Window 
 Customize Perspective :(

 On May 9, 4:36 am, Raphael r...@android.com wrote:
 Doofus, did that solve your issue?

 If you have installed ADT via Eclipse and still don't see the Android
 Project wizard, try this:

 1- File  New  Other. You should see a category Android  Android Project

 2- Window  Customize Perspective. In the Shortcut tab, make sure
 Android is checked. On some of my eclipse installs, this is not
 checked after I install ADT and the wizard don't appear in the File 
 New menu. Checking that solves it.

 R/

 On Fri, May 1, 2009 at 9:24 AM, Doofuss jkmcge...@gmail.com wrote:

  I seem to have followed all the steps correctly, dowloaded, unzipped
  android sdk 1.5, set enviornment variable with path to the tools
  directory, installed eclipse and have the android development tools
  installed there.  However, I am not getting anything that actually has
  the word Android from anywhere in the File-- New Project--

  It just has type filter text in the Wizards box, and then  under
  that says project...

  Am I supposed to type Android in there?  That is not what the
  directions in the Dev Guide under Creating an Android Project
  indicate.

  I do have the DDMS stuff showing up...and at one point was able to see
  the emulater stuff, but can't seem to get back there now
  Any advice out there for me?

 


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



[android-beginners] OpenIntent Simulator - Get black screen when selecting SensorSimulator

2009-07-04 Thread jstoezel

Hi,

I am trying to run the openintent sensor simulator on Windows XP, SDK
1.5, (Google API).

I get a black screen whenever I open the sensorsimulator application
on my emulator, while it looks like I should get a screen asking me
for an IP address.

They are numerous reports of this issue on the openintent website, but
nobody seems to have an anser there.
Anybody knows what should be done to fix this issue?

Thanks,
Jean

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



[android-beginners] switch between GPS and Networkprovider

2009-07-04 Thread mnish

Hi,

I wanted to know how to switch beteen GPS and Network  providers.

Iam now busy with making a program that shows the location of the
phone holder on the google map. I want to make use of both the GPS
provider and the network provider. I prefer using gps. When gps is not
temporarily unavailable then the program chooses for the network
provider. But when the gps is available again I want the program to
use the gps again.

At this moment my program is only able to switch to network provider
when gps is not available but it cant check whether gps is back again.
here is how it is done:

@Override
public void onStatusChanged(String provider, int status,
Bundle b) {
   if (status == LocationProvider.OUT_OF_SERVICE) {

lm.requestLocationUpdates
(LocationManager.NETWORK_PROVIDER,
mInterval, 0, this);

}

else if(status ==
LocationProvider.TEMPORARILY_UNAVAILABLE){

lm.requestLocationUpdates
(LocationManager.NETWORK_PROVIDER,
mInterval, 0, this);
}
}

Could someone please tell me how to check the status of the gps while
the location manager is using the Network provider?

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



[android-beginners] Re: adb is not detecting my new android phone

2009-07-04 Thread N3vik

Anyone got any ideas?

Thanks
Kevin

On Jul 2, 9:35 am, N3vik rose.ke...@gmail.com wrote:
 Hi

 I have two G1 phone's, the first one got wet and no longer gets a
 signal so I had to buy another :(

 My problem is adb does not detect my new phone :(  It can detect my
 old phone ok, but not the new one.

 Running adb devices with my old phone connected shows my old phone,
 but with my new phone I just get an empty list.

 I'm using Windows Vista.  Before people tell me to install the USB
 drivers, I've already done that.  And I've tried adb kill-server.
 And I've restarted the phone and computer many times.  And yes, USB
 debugging is ticked in the settings of my new phone.  And, like I
 said, it is detecting my old broken phone ok.

 Any ideas?  Please help!
 Kevin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---