[android-developers] Re: MapView and Zoom Control in 0.9 SDK

2008-08-27 Thread Amos

I think you're right. It's probably a better idea to add the mapview
to the relativelayout. The layout is not necessary.

On Aug 27, 3:29 am, jokochi [EMAIL PROTECTED] wrote:
 That's a neat solution. It works! Thank you, Amos.
 I really know how to use RelativeLayout.

 It's just a small question comes to me, why mapview was stacked on
 layer layout?
 I think mapview is able to be on top layer like as before.

 On 8月26日, 午後9:38, Amos [EMAIL PROTECTED] wrote:

  Hi All,

  There's no need to manually handle touch events for displaying the
  zoom controls. The following works for me:

  My layout xml file is...

  ?xml version=1.0 encoding=utf-8?
  RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
  android
  android:layout_width=fill_parent
  android:layout_height=fill_parent

 LinearLayout android:id=@+id/layout
  android:layout_width=fill_parent
  android:layout_height=fill_parent
  /

 LinearLayout android:id=@+id/layout_zoom
  android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:layout_alignParentBottom=true
  android:layout_centerHorizontal=true /

  /RelativeLayout

  ... And in my onCreate I do:

  //...
  LinearLayout lay=(LinearLayout)findViewById(R.id.layout);
  LinearLayout 
  zoom=(LinearLayout)findViewById(R.id.layout_zoom);
  _map= new MapView(this, MyConstants.GOOGLE_MAPS_API_KEY);
  _map.setClickable(true);
  _map.setEnabled(true);

  _map.displayZoomControls(true);

  lay.addView(_map, new LinearLayout.LayoutParams(
  LayoutParams.FILL_PARENT,
  LayoutParams.WRAP_CONTENT));

  View zoomView = _map.getZoomControls();
  zoom.addView(zoomView, new LinearLayout.LayoutParams(
  LayoutParams.WRAP_CONTENT,
  LayoutParams.WRAP_CONTENT));
  //...

  Hope this helps.

  Amos


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Could not fine HelloAndroid.apk when lauching the HelloAndroid example

2008-08-27 Thread Vittee

I have the same problem with the same SDK/Plugin
http://groups.google.com/group/android-beginners/browse_thread/thread/bbc019fb99932a6f

Sometimes I see the error message in Eclipse's Problem  panel
showing
Debug Certificate expired on 

so I removed file debug.keystore in C:\Documents and Settings
\Administrator\Local Settings\Application Data\Android
as described in http://code.google.com/android/intro/develop-and-debug.html
but I have no luck :(

There's still no .apk file generated anywhere on my machine.

please help, and thanks in advance.


On Aug 26, 2:21 pm, yukinoba [EMAIL PROTECTED] wrote:
 Hi, I'm a totally newbie to the Android SDK.
 I have been installed Eclipse 3.4 (Ganymede), ADT 0.7.1 and Android
 0.9 SDK with JRE 6 updated 7.
 It seems weird when I follow the Hello, Android! guideline on Google
 site.

 First I encountered the problem of Android libray.
 It seems eclipse won't include the .jar library file under the Android
 directory automatically after create the HelloAndroid project, and I
 have fixed this one.

 However, after the ealier problem, when I try to run the example, the
 eclipse told me Could not find HelloAndroid.apk!, and stops.

 Here is the message:
 [2008-08-27 10:01:43 - HelloAndroid] --
 [2008-08-27 10:01:43 - HelloAndroid] Android Launch!
 [2008-08-27 10:01:43 - HelloAndroid] adb is running normally.
 [2008-08-27 10:01:43 - HelloAndroid] Could not find HelloAndroid.apk!

 I have checked the posts on the forum, and try the possible
 solutions : check Installed JREs in Window--Preferences--Java, and
 the AndroidManifest.xml. But still can not fix it.

 Does anyone met the same situation before? Pls help and Thx.

 The following is the AndroidManifest.xml from HelloAndroid :
 ?xml version=1.0 encoding=utf-8?
 manifest xmlns:android=http://schemas.android.com/apk/res/android;
     package=com.android.hello
     application android:icon=@drawable/icon android:label=@string/
 app_name
         activity android:name=.HelloAndroid android:label=@string/
 app_name
             intent-filter
                 action android:name=android.intent.action.MAIN /
                 category
 android:name=android.intent.category.LAUNCHER /
             /intent-filter
         /activity
     /application
 /manifest

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Simulator is slow to start up

2008-08-27 Thread kevinr

Hello all,

I setup the Android SDK along with the Eclipse development plug-in.  I
found that the time from clicking the run button in Eclipse to the
time I was able to interact with the Android simulator was excessively
long.  It seems to be related to the boot time for the Android
simulator.  Is there something I'm missing in order to make the
develop-test-develop cycle shorter?  Is there a way to make the boot
time shorter through settings on my machine, etc.?

Thanks,

Kevin

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Simulator is slow to start up

2008-08-27 Thread Romain Guy

Hi,

The startup time highly depends on your host machine. Please note that
you need to start the emulator only once. Once the emulator is
started, simply click the Run button again to redeploy/relaunch your
application, without closing the emulator.

On Tue, Aug 26, 2008 at 9:19 PM, kevinr [EMAIL PROTECTED] wrote:

 Hello all,

 I setup the Android SDK along with the Eclipse development plug-in.  I
 found that the time from clicking the run button in Eclipse to the
 time I was able to interact with the Android simulator was excessively
 long.  It seems to be related to the boot time for the Android
 simulator.  Is there something I'm missing in order to make the
 develop-test-develop cycle shorter?  Is there a way to make the boot
 time shorter through settings on my machine, etc.?

 Thanks,

 Kevin

 




-- 
Romain Guy
www.curious-creature.org

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Overlay never displayed in MapView

2008-08-27 Thread Guillaume Perrot

Do you use ItemizedOverlay or directly Overlay ?
I found that no one on the mailing list made ItemizedOverlay work,
included me.
I'll try to draw items myself like in the M5.

On 25 août, 09:05, 6real [EMAIL PROTECTED] wrote:
 Hum hum. A am ashamed to say that I found the reason why :

 actually the draw() signature has changed and I still have my old draw
 method (I removed the assertion @Override the first time I migrate my
 code ... ).

 On Aug 23, 3:15 pm, 6real [EMAIL PROTECTED] wrote:

  Dear all,

  I am facing an issue with anoverlaydisplay (again while migrating to
  0.9).

  I add an verlay this way

  Log.d(MAP, addoverlay);
  myMapOverlay = new MyStationsOverlay(this, nearestFullStations);
  mapViewFromXML.getOverlays().add(myMapOverlay);
  mapViewFromXML.postInvalidate();

  But the draw (I have specific process during the draw)  method inside
  myOverlayis never called ! SO theoverlaynever displays what I
  expect.

  Thanks for your help.

  PS : the running code on the previous SDK was like :

  Log.d(MAP, add
  OverlayController myOC = mapViewFromXML.createOverlayController();
  myMapOverlay = new MyMapOverlay (this, nearestFullStations);
  myOC.add(veloidMapOverlay, true);
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] abortBroadcast

2008-08-27 Thread Swanz

Hi.

I'm trying to use the abortBroadcast() method of the BroadcastReceiver
class, but it seems not to work.

Here's the situation:

a background service send an intent with action=X; a
BroadcastReceiver registered in the manifest catch this intent.
When the Activity Y is in foreground it registers another BCreceiver
that responds at the same intent X.

Now, when the last receiver catch the intent i use abortBroadcast() to
prevent the first to do the same, but it doesnt work. In the activity
the abort flag is TRUE, but if i read it in the first receiver is
always FALSE.

Can anybody tell me where i do wrong?

Thanks (and sorry for my bad bad english).


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: maps behind proxy 0.9 beta

2008-08-27 Thread shan

Im getting this :

PHP Parse error:  syntax error, unexpected T_LOGICAL_OR in C:\Program
Files\PHP\
AndroidMapProxy.php on line 169

Please assist

On Aug 26, 2:20 pm, jokochi [EMAIL PROTECTED] wrote:
 Hi Shan,

 I did open two windows with cmd.exe.
 And run php script in a window,
 c:\ php AndroidMapProxy.phphttp://my.proxy.com:8001  - please
 fix them.

 Then run emulator in another window,
 c:\emulator -http-proxyhttp://127.0.0.1:8001- this must be the
 same port number that specified script's parameter.

 No firewall setting is required.

 I saw the maps using original map application.

 On 8月26日, 午後2:35, shan [EMAIL PROTECTED] wrote:



  Also, did you see the maps via the maps application or on the browser?

  On Aug 22, 7:06 pm, jokochi [EMAIL PROTECTED] wrote:

   Yes, I am able to see the map.
   After that I checked the script working on Windows.
   Have you install PHP5 and run it on command prompt(cmd.exe) ?

   Windows PHP can be found 
   here.http://www.php.net/get/php-5.2.6-win32-installer.msi/from/a/mirror

   I installed it with default setting.
   Please do not forget to turn off the firewall.

   On 8月22日, 午後6:43, shan [EMAIL PROTECTED] wrote:

Thanks Jokochi, still can't get it same problems. Please update if you
could.
Were you able to display the maps?

On Aug 22, 1:10 pm, jokochi [EMAIL PROTECTED] wrote:

 Hi Shan,

 I am sorry I did not test with windows so I can not answer you so far.
 But at least your PC has to be installed PHP5.

 Regarding port no, only if your site proxy is the same PC which runs
 emurator, you have to change the port no.
 In my example mentioned before,  it is running the PHP script and
 emulator on local pc (xxx.yyy.com).
 The connection is like this
  emulator (xxx.yyy.com:???) - php script (xxx.yyy.com:8080) - proxy
 (aaa.bbb.com:8000) - (Google?)
 Of course you can change the local port and run script on the
 different PC.

 Ahh, I found a bug in my code.
 Please fix this line;
 wrong:
 if (isset($argv[2])  (preg_match(^\d+$, $argv[2])))
 correct:
 if (isset($argv[2])  (preg_match(/^\d+$/, $argv[2])))

 Thank you.

 On 8月22日, 午後3:58, shan [EMAIL PROTECTED] wrote:

  Hi Jokochi

  I am using a Windows machine, do i need to setup something to 
  execute
  the script?
  Also my proxy port no is 8080, i could make out that you were 
  routing
  to 8080 but mine already runs on the same.
  I tried to execute it on IE7 but it returned an open-save dialog 
  which
  keeps looping.
  I got the browser up but the maps won't respond.
  Thanks for the script.

  Any solutions.

  On Aug 22, 11:04 am, shan [EMAIL PROTECTED] wrote:

   Hi Justin

   Now the browser works in the emulator but not the maps.
   Any suggestions to get the maps going.

   On Aug 21, 1:34 am, Justin (Google Employee) [EMAIL PROTECTED]
   wrote:

Does the browser work in the emulator for you? The emulator 
doesn't
deal well with being behind a proxy and my guess would be that 
you
aren't able to use any data at all.

Cheers,
Justin
Android Team @ Google

On Aug 20, 5:40 am, shan [EMAIL PROTECTED] wrote:

 Can the maps API  work behind proxy in the 0.9 beta?- Hide 
 quoted text -

- Show quoted text -- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: abortBroadcast

2008-08-27 Thread Swanz

Ok, i found the error.
i was using sendBroadcast() instead of sendOrderedBroadcast().

Sorry!

On Aug 27, 11:20 am, Swanz [EMAIL PROTECTED] wrote:
 Hi.

 I'm trying to use the abortBroadcast() method of the BroadcastReceiver
 class, but it seems not to work.

 Here's the situation:

 a background service send an intent with action=X; a
 BroadcastReceiver registered in the manifest catch this intent.
 When the Activity Y is in foreground it registers another BCreceiver
 that responds at the same intent X.

 Now, when the last receiver catch the intent i use abortBroadcast() to
 prevent the first to do the same, but it doesnt work. In the activity
 the abort flag is TRUE, but if i read it in the first receiver is
 always FALSE.

 Can anybody tell me where i do wrong?

 Thanks (and sorry for my bad bad english).
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Overlay

2008-08-27 Thread Peter Stevenson

Guillaume Perrot wrote:
 Hi,
 We're several developers on the mailing list having problems with
 ItemizedOverlay in v0.9: items are not drawn.
 Do you use ItemizedOverlay or Overlay ?

 On 23 août, 02:29, Peter Stevenson [EMAIL PROTECTED] wrote:
   
 hi

 I trying to work out howOverlayworks,
 any help would be greatly appreciated

 Peter
 
 

   


  I have tried both overlay and ItemizedOverlay with out every


  luck


  I think ItemizedOverlay is the way to go


  still working on it


  any help would be greatly appreciated


Peter





--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: problem Porting to 0.9 sdk, anyone please guide me... thanks...

2008-08-27 Thread munzelmann



 Problem 2
 -
 I wanna to download image using HTTPConnection it say
 java.net.SocketException: unknown error means???



Try to add
uses-permission xmlns:android=http://schemas.android.com/apk/res/
android android:name=android.permission.INTERNET/uses-permission
to your AndroidManifest.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Overlay

2008-08-27 Thread Reto

I've been able to use the standard technique (extending Overlay and
overriding the onDraw handler) in 0.9, ItemizedOverlay doesn't seem to
be happening at the moment.

What problem are you having using Overlay?

Cheers
Reto

On 27 Aug, 11:56, Peter Stevenson [EMAIL PROTECTED] wrote:
 Guillaume Perrot wrote:
  Hi,
  We're several developers on the mailing list having problems with
  ItemizedOverlay in v0.9: items are not drawn.
  Do you use ItemizedOverlay or Overlay ?

  On 23 août, 02:29, Peter Stevenson [EMAIL PROTECTED] wrote:

  hi

  I trying to work out howOverlayworks,
  any help would be greatly appreciated

  Peter

       I have tried both overlay and ItemizedOverlay with out every

       luck

       I think ItemizedOverlay is the way to go

       still working on it

       any help would be greatly appreciated

 Peter- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Custom Content Provider and Multiple Tables

2008-08-27 Thread Mark Murphy

Lonzo1968 wrote:
 I got you book from commonsware.com. I like what you have done so far,
 especially the detail on the layouts.

Thanks!

 What is the best architecture for this ContentProvider situation?
 Should I have a Provider for each table or muliple tables in a single
 provider. Maybe I'm missing something here, since I'm used to very
 different database layers (like the DAO pattern for example).

Well, hackbod responded on this question, and she's *WAY* more 
authoritative than I am on Android. I'd follow her recommendations.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.1 Published!

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: question about service and thread

2008-08-27 Thread Mark Murphy

april wrote:
 I am doing a game, which needs to update server player's status. In my
 code , I first put those information into database. Then I used a
 service to read the information from DB and send to server.
 
 Following are the document for sevice:
 Note that services, like other application objects, run in the main
 thread of their hosting process. This means that, if your service is
 going to do any CPU intensive (such as MP3 playback) or blocking (such
 as networking) operations, it should spawn its own thread in which to
 do that work. More information on this can be found in the Threading
 section of the Application Model overview.
 
 Should I using thread in the service to send data to server?

Any true background operations need to be off the main thread, 
particularly any that might take a while (e.g., slow Internet connection 
to the server). That could be:

-- A secondary thread in a service
-- A secondary thread in an activity
-- Having the service be in a whole 'nuther process

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.1 Published!

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: problem Porting to 0.9 sdk, anyone please guide me... thanks...

2008-08-27 Thread Mark Murphy

Wesley Sagittarius wrote:

 Problem 1
 
 those class already remove??? which class I can use on this case???
 android.view.ViewInflate;

This is now LayoutInflater, as documented here:

http://code.google.com/android/migrating/m5-0.9/changes-overview.html

 android.view.Menu.Item;

This is now the MenuItem interface. I think the implementation is 
Menu.MenuItem, but you should only need to reference the interface.

 I wanna to download image using HTTPConnection it say
 java.net.SocketException: unknown error means???

As the other responder noted, try adding the INTERNET permission

uses-permission android:name=android.permission.INTERNET /

I would have added the first two items above to the M5-0.9 FAQ:

http://groups.google.com/group/android-developers/web/m5-to-0-9-porting-and-migration-tips

except that I can't seem to edit that page anymore... :-(

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.1 Published!

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Overlay

2008-08-27 Thread Guillaume Perrot

I'm still using ItemizedOverlay to benefit some mechanisms over
Overlay but I overrode the draw function, all work well now but I
manually draw...
onTap(int index) is actually called with the correct parameter even if
the overlay is not automatically drawn by the ItemizedOverlay.

On 27 août, 13:43, Reto [EMAIL PROTECTED] wrote:
 I've been able to use the standard technique (extending Overlay and
 overriding the onDraw handler) in 0.9, ItemizedOverlay doesn't seem to
 be happening at the moment.

 What problem are you having using Overlay?

 Cheers
 Reto

 On 27 Aug, 11:56, Peter Stevenson [EMAIL PROTECTED] wrote:

  Guillaume Perrot wrote:
   Hi,
   We're several developers on the mailing list having problems with
   ItemizedOverlay in v0.9: items are not drawn.
   Do you use ItemizedOverlay or Overlay ?

   On 23 août, 02:29, Peter Stevenson [EMAIL PROTECTED] wrote:

   hi

   I trying to work out howOverlayworks,
   any help would be greatly appreciated

   Peter

        I have tried both overlay and ItemizedOverlay with out every

        luck

        I think ItemizedOverlay is the way to go

        still working on it

        any help would be greatly appreciated

  Peter- Hide quoted text -

  - Show quoted text -
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: maps behind proxy 0.9 beta

2008-08-27 Thread jokochi

T_LOGICAL_OR means or operator in PHP, but there is no or operator
in the script.
Maybe you got a capture with needless line break in the script.

Please fix to be one line.
// add a protocol and a host address to be a full URI in a POST and/or
GET request.

I don't think other lines will cause side effect.

On 8月27日, 午後6:52, shan [EMAIL PROTECTED] wrote:
 Im getting this :

 PHP Parse error:  syntax error, unexpected T_LOGICAL_OR in C:\Program
 Files\PHP\
 AndroidMapProxy.php on line 169

 Please assist

 On Aug 26, 2:20 pm, jokochi [EMAIL PROTECTED] wrote:

  Hi Shan,

  I did open two windows with cmd.exe.
  And run php script in a window,
  c:\ php AndroidMapProxy.phphttp://my.proxy.com:8001 - please
  fix them.

  Then run emulator in another window,
  c:\emulator -http-proxyhttp://127.0.0.1:8001- this must be the
  same port number that specified script's parameter.

  No firewall setting is required.

  I saw the maps using original map application.

  On 8月26日, 午後2:35, shan [EMAIL PROTECTED] wrote:

   Also, did you see the maps via the maps application or on the browser?

   On Aug 22, 7:06 pm, jokochi [EMAIL PROTECTED] wrote:

Yes, I am able to see the map.
After that I checked the script working on Windows.
Have you install PHP5 and run it on command prompt(cmd.exe) ?

Windows PHP can be found 
here.http://www.php.net/get/php-5.2.6-win32-installer.msi/from/a/mirror

I installed it with default setting.
Please do not forget to turn off the firewall.

On 8月22日, 午後6:43, shan [EMAIL PROTECTED] wrote:

 Thanks Jokochi, still can't get it same problems. Please update if you
 could.
 Were you able to display the maps?

 On Aug 22, 1:10 pm, jokochi [EMAIL PROTECTED] wrote:

  Hi Shan,

  I am sorry I did not test with windows so I can not answer you so 
  far.
  But at least your PC has to be installed PHP5.

  Regarding port no, only if your site proxy is the same PC which runs
  emurator, you have to change the port no.
  In my example mentioned before,  it is running the PHP script and
  emulator on local pc (xxx.yyy.com).
  The connection is like this
   emulator (xxx.yyy.com:???) - php script (xxx.yyy.com:8080) - 
  proxy
  (aaa.bbb.com:8000) - (Google?)
  Of course you can change the local port and run script on the
  different PC.

  Ahh, I found a bug in my code.
  Please fix this line;
  wrong:
  if (isset($argv[2])  (preg_match(^\d+$, $argv[2])))
  correct:
  if (isset($argv[2])  (preg_match(/^\d+$/, $argv[2])))

  Thank you.

  On 8月22日, 午後3:58, shan [EMAIL PROTECTED] wrote:

   Hi Jokochi

   I am using a Windows machine, do i need to setup something to 
   execute
   the script?
   Also my proxy port no is 8080, i could make out that you were 
   routing
   to 8080 but mine already runs on the same.
   I tried to execute it on IE7 but it returned an open-save dialog 
   which
   keeps looping.
   I got the browser up but the maps won't respond.
   Thanks for the script.

   Any solutions.

   On Aug 22, 11:04 am, shan [EMAIL PROTECTED] wrote:

Hi Justin

Now the browser works in the emulator but not the maps.
Any suggestions to get the maps going.

On Aug 21, 1:34 am, Justin (Google Employee) [EMAIL 
PROTECTED]
wrote:

 Does the browser work in the emulator for you? The emulator 
 doesn't
 deal well with being behind a proxy and my guess would be 
 that you
 aren't able to use any data at all.

 Cheers,
 Justin
 Android Team @ Google

 On Aug 20, 5:40 am, shan [EMAIL PROTECTED] wrote:

  Can the maps API  work behind proxy in the 0.9 beta?- Hide 
  quoted text -

 - Show quoted text -- Hide quoted text -

- Show quoted text -- Hide quoted text -

  - Show quoted text -- Hide quoted text -

- Show quoted text -- Hide quoted text -

  - Show quoted text -
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: location is always latitude 0 longitude 0 altitude 10 in v0.9

2008-08-27 Thread [EMAIL PROTECTED]

I've seen the same effect, but using a test provider does not help
either: I've registered a LocationListener and it gets called only
once, even if i change the position every x seconds. But registering a
listener seems to be the way to detect location changes
asynchronously.

Using the geo command on the emulator via telnet seems to break
things, too - using it takes me to the northern atlantic, no matter
what i set the coordinates to. So i guess GPS support in the emulator
is seriously broken... any ideas how to test a GPS-dependent App that
needs location change updates?

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Simulator is slow to start up

2008-08-27 Thread kevinr

Thanks Romain, that made things much faster.



On Aug 27, 3:12 am, Romain Guy [EMAIL PROTECTED] wrote:
 Hi,

 The startup time highly depends on your host machine. Please note that
 you need to start the emulator only once. Once the emulator is
 started, simply click the Run button again to redeploy/relaunch your
 application, without closing the emulator.

 Romain Guywww.curious-creature.org

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Logging

2008-08-27 Thread rajesh

Hi,

I used java.util.logging for creating file Logging.
The code works perfectly fine,

As I did not find any word about this procedure of doing the logging,
just wanted to make sure, if this is the correct way of writing file
loggers.

package org.hsc.learning.helloAndroid;

import java.io.IOException;
import java.util.logging.FileHandler;
import java.util.logging.Formatter;
import java.util.logging.Handler;
import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.logging.Logger;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

public class HelloAndroid extends Activity {



/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 TextView tv = new TextView(this);
 Logger logger = Logger.getLogger(Test);
 Handler handler = null;
 try {
 handler = new FileHandler(/data/data/org.hsc.learning.main/
files/droid.log);
 handler.setFormatter(new Formatter() {
  public String format(LogRecord record) {
return record.getMessage()+ \n;
  }
});
 logger.addHandler(handler);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
LogRecord record = new LogRecord(Level.INFO, Terms=Yes);
logger.log(record);
 Handler[] handlers = Logger.getLogger(Test).getHandlers();
 for (int i = 0; i  handlers.length; i++) {
 System.out.println(handlers[i].getLevel().getName());
 }
 Log.i(HelloAndroid, 123456789);
 tv.setText(Hello, Android);
 setContentView(tv);
}
}

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Logging to File

2008-08-27 Thread rajesh

I am trying to log data to my file.

try {
 handler = new FileHandler(droid.log, 1000, 2);
 logger.addHandler(handler);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
LogRecord record = new LogRecord(Level.INFO, Logged in a file..
22.);
logger.log(record);

I used the above code,
but I always get fileNotFound exception on android.

How do I log to a file (trying out rolling file appender)

One way to log to a file is write to file, which I am able to do it.
But I want to use logger api to do the same.

Please help

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Simple Mock Location Provider

2008-08-27 Thread [EMAIL PROTECTED]

Here is what i have done:

private void setTestLocation(double lat, double lng) {
Location location = new Location(gps);
location.setLatitude(lat);
location.setLongitude(lng);
locationManager.setTestProviderLocation(gps, location);
}

Using LocationManager.GPS_PROVIDER is better style, i guess, but
calling this with:

setTestLocation(40.738412973944534,-73.98468017578125);

takes your emulator straight to Manhattan. :-)

The tools that come with 0.9 beta seem to be broken, so using KML/GPX
replay via eclipse does not work (at least for me and some other
people).




On 25 Aug., 21:23, CG [EMAIL PROTECTED] wrote:
 Hi,

 I'd just like to create to get alocation(not tracking, just get the
 last postion fixed), but for my mocklocationprovider, I'd like this
 fix change time to time.

 I tried the old method by creating a new directory under thelocation
 directory but it seems it does not work anymore (as documented by the
 way :-) ).

 I also add the test providers with the method :
 public static void addMyMockLocationProvider(LocationManager locmgr) {

 String mocLocationProvider = LocationManager.GPS_PROVIDER;

 if (locmgr.getProvider(mocLocationProvider) == null || !
 locmgr.isProviderEnabled(mocLocationProvider)) {
                         locmgr.addTestProvider(mocLocationProvider, false, 
 false, false,
 false, false, false, false, 0, 5);
                         locmgr.setTestProviderEnabled(mocLocationProvider, 
 true);
    }

 }

 But I still don't have the position given in KML file I send thanks to
 DDMS  (or even GPX files) (I import files and then push on the PLAY
 button when clickable).

 I have the folowing error in the logcat:
 08-25 19:11:30.926: ERROR/LocationManagerService(52):
 isProviderEnabled got exception:
 08-25 19:11:30.926: ERROR/LocationManagerService(52):
 java.lang.IllegalArgumentException: provider=network
 08-25 19:11:30.926: ERROR/LocationManagerService(52):     at
 com.android.server.LocationManagerService._isProviderEnabled(LocationManagerService.java:
 1145)
 08-25 19:11:30.926: ERROR/LocationManagerService(52):     at
 com.android.server.LocationManagerService.isProviderEnabled(LocationManagerService.java:
 1131)
 08-25 19:11:30.926: ERROR/LocationManagerService(52):     at
 android.location.ILocationManager
 $Stub.onTransact(ILocationManager.java:211)

 I can't also succeed in having my currentlocationin the standard
 maps application. The system still returns 0, 0 !

 Does anyone here can provide a quick step by step solution to have a
 mocklocationprovider working ?

 Thx !

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Extracting Cookies from Http Responses etc.

2008-08-27 Thread Graeme

Hi

I'm trying to write a HttpClient 4.x application in which

a) I extract Cookies from a HTTP Response (following an initial HTPP
POST),
b) put the Cookie in the next outgoing request (another HTTP POST
method),
c) get the Cookie(s) from the resulting Response,
d) put the Cookie(s) in the next outgoing Request,
 etc. until end of my HTTP sequence.

How do I do this in Android's version of HttpClient 4.x ? I think I
need to use Request Interceptors and Response Interceptors. Does
anyone have experience with this ?
I am currently trying

DefaultHttpClient dhc = new DefaultHttpClient() ;

// Response Interceptor to extract Cookies from Responsies and add to
CookieStore
dhc.addResponseInterceptor( new ResponseProcessCookies() );

// Request Interceptor to add  Cookies from CookieStore to outgoing
Requests
dhc.addRequestInterceptor( new RequestAddCookies() );

// Create a HttpPost
HttpPost post1= new HttpPost(some-url-or-other);

// Send first request  get response
HttpResponse rsp1 = dhc.execute( post1 );

//Create second HttpPost
HttpPost post2 = new HttpPost(some-url-or-other);

//Send the seconfd POST and get a response
HttpResponse rsp2 = dhc.execute( post2 );

etc.

BTW Am I able to examine the contensts of the CookieStore ? (If so,
how ?)

Thanks for any pointers
Graeme



--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: MapView and Zoom Control in 0.9 SDK

2008-08-27 Thread Guillaume Perrot

How to control zoom steps:
In my application when I zoom in and out, I can't control how much
this will zoom but in the standard map application zooms less at
each step than in my application. I tried setZoomSpeed on ZoomControls
but it deals with the animation speed, not the zoom step.

On 27 août, 08:00, Amos [EMAIL PROTECTED] wrote:
 I think you're right. It's probably a better idea to add the mapview
 to the relativelayout. The layout is not necessary.

 On Aug 27, 3:29 am, jokochi [EMAIL PROTECTED] wrote:

  That's a neat solution. It works! Thank you, Amos.
  I really know how to use RelativeLayout.

  It's just a small question comes to me, why mapview was stacked on
  layer layout?
  I think mapview is able to be on top layer like as before.

  On 8月26日, 午後9:38, Amos [EMAIL PROTECTED] wrote:

   Hi All,

   There's no need to manually handle touch events for displaying the
  zoomcontrols. The following works for me:

   My layout xml file is...

   ?xml version=1.0 encoding=utf-8?
   RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
   android
           android:layout_width=fill_parent
           android:layout_height=fill_parent

      LinearLayout android:id=@+id/layout
           android:layout_width=fill_parent
           android:layout_height=fill_parent
           /

      LinearLayout android:id=@+id/layout_zoom
           android:layout_width=wrap_content
           android:layout_height=wrap_content
           android:layout_alignParentBottom=true
           android:layout_centerHorizontal=true /

   /RelativeLayout

   ... And in my onCreate I do:

                   //...
                   LinearLayout lay=(LinearLayout)findViewById(R.id.layout);
                   
   LinearLayoutzoom=(LinearLayout)findViewById(R.id.layout_zoom);
                   _map= new MapView(this, MyConstants.GOOGLE_MAPS_API_KEY);
                   _map.setClickable(true);
                   _map.setEnabled(true);

                   _map.displayZoomControls(true);

                   lay.addView(_map, new LinearLayout.LayoutParams(
                                   LayoutParams.FILL_PARENT,
                                   LayoutParams.WRAP_CONTENT));

                   View zoomView = _map.getZoomControls();
                  zoom.addView(zoomView, new LinearLayout.LayoutParams(
                                   LayoutParams.WRAP_CONTENT,
                                   LayoutParams.WRAP_CONTENT));
                   //...

   Hope this helps.

   Amos
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] ListView - If you have a item that can focus you can select the Item

2008-08-27 Thread marielisacr

Hi, I am working in an application that have several ListView.

Here is the thing, I have a ListView and every row have a button and
some text. I need that both events, push the button and select one
row, can be handler. I mean if I press the button make some things and
if I select one row make another things.

The problem is that I can't move through the ListView with the touch
and keyboards  capabilities. The item can't be selected in touch mode,
I mean, I can't select the row, if I click the row item and it does
nothing. If I click the button and it responds fine. And I have no way
to press the button by keyboard. In my ListView I also have a
footerView.

If I use setItemsCanFocus(true) there is no way to press the Item, no
through keyboard, no through touch, just the button.

I am using SDK 0.9.

I have a short example that shows what is happen. If you need it let
me know and I will post it.

I hope someone can hel 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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to call MAP application to pick a location ?

2008-08-27 Thread Magellan

Hi,

I'm trying to call Map Application trought an Intent, to pick a point
on the map, and return it to my own application.
The needs are :

- setting the current location of the map (to center it on, on Map
application startup)
- the user will pick a new location on the map
- the Map application could exit and return the point.

Is there any way to do this with a simple Intent ? I saw an Intent
ACTION_VIEW with an uri like geo:x,y that can only show a map...
With ACTION_PICK, my application crashes.

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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem 2nd launch of my application

2008-08-27 Thread bleucalme

First, thank you for those quick replies.

You're right, my application is still running after I taught it was
closed. For people having similar problems, in Eclipse, we can see
active process under DDMS-- emulator.

I'll work on my bug and keep you informed.

Thanks.


On Aug 26, 3:48 pm, StevePotell [EMAIL PROTECTED] wrote:
 bleucalme,

 Kind of looks like your app is still running, make sure you call
 finish() when closing the app.  Also close and free any system
 resources you may be using (like media player, etc) prior to calling
 finish().

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Is android:choiceMode implemented?

2008-08-27 Thread Guillaume Perrot

I tested ApiDemos - 11. Multiple Choice Lists but clicking on an
item or pressing enter (or dpad_center) on an item does nothing

On Aug 26, 8:24 pm, Romain Guy [EMAIL PROTECTED] wrote:
 Please refer to the ApiDemos, you will need to use a layout file for
 your list items that supports the checked state. The easiest thing to
 do is use the CheckedTextView for instance.



 On Tue, Aug 26, 2008 at 11:21 AM, Megha Joshi [EMAIL PROTECTED] wrote:
  You should use ListView.setItemChecked(pos,true) to check the last
  clicked/touched item. ChoiceMode = multiple allows you to call
  setItemChecked() for multiple list items...and choicemode = single...allows
  you to do so for one item only.

  2008/8/26 Mark Hansen [EMAIL PROTECTED]

  I have a ListView and I'm trying to show the last selected item
  clicked/touched or navigated too, from what I can gather setting the
  choiceMode to singleChoice shoudl achieve this, but it doesn't
  appear to be doing anything...

         ListView
                 android:id=@android:id/list
                 android:layout_width=fill_parent
                 android:layout_height=229px
                 android:background=#00
                 android:layout_x=0px
                 android:layout_y=203px
                 android:choiceMode=singleChoice
         /ListView

  RE:http://code.google.com/android/reference/android/widget/ListView.html
  (XML attributes section)

  Is this not implemented or am I making a mistake in how to achieve
  this?

 --
 Romain Guywww.curious-creature.org
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to call MAP application to pick a location ?

2008-08-27 Thread Guillaume Perrot

A standard intent to pick a location is probably not available in this
SDK but you still can easily implement it:
- Extend MapActivity and edit the manifest file to include an intent
filter with ACTION_PICK and the geo pattern.
- Use a custom Overlay which overrides onTap (GeoPoint,MapView): when
you click somewhere on the map this method will be called with the
coordinates you clicked. Call setResult with theses coordinates then
finish() and that should do the trick.


On 27 août, 17:02, Magellan [EMAIL PROTECTED] wrote:
 Hi,

 I'm trying to call Map Application trought an Intent, to pick a point
 on the map, and return it to my own application.
 The needs are :

 - setting the current location of the map (to center it on, on Map
 application startup)
 - the user will pick a new location on the map
 - the Map application could exit and return the point.

 Is there any way to do this with a simple Intent ? I saw an Intent
 ACTION_VIEW with an uri like geo:x,y that can only show a map...
 With ACTION_PICK, my application crashes.

 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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Simulator is slow to start up

2008-08-27 Thread Romain Guy

Unfortunately the Android SDK contains an emulator, not a simulator.
That means the software emulates every CPU instruction and all the
hardware you would find in a phone. This requires a lot of host CPU
and RAM to work properly. This is not fast but this is as close as it
gets from real phones.

On Wed, Aug 27, 2008 at 2:48 AM, Nanard [EMAIL PROTECTED] wrote:

 Still slow start-up on my PC (1.2Ghs, 1.2Go RAM).  The 1st version was
 a lot better.

 I suppose now, if you don't have a at least 2 core at 2Ghz, you can't
 work !

 




-- 
Romain Guy
www.curious-creature.org

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Crash reading by 16384 of file

2008-08-27 Thread Jon Webb

BTW, I tracked the fault down to a bug in the Android SDK. It is that
InputStreamReader.read(char[], int, int) doesn't always work across
buffer boundaries. Sometimes a NUL (0) gets inserted in the char[]
array. I changed my code so that it uses InputStreamReader.read()
repeatedly when I have to read more than one character at a time and
it works. This is in the 0.9 SDK.
-- Jon

On Aug 22, 4:17 pm, Jon Webb [EMAIL PROTECTED] wrote:
 I keep getting a crash (reading NUL which is not in the file) when I
 try to read a file into my app. The crash occurs at byte 16384 of the
 file. I assume this is some sort of buffering error because the buffer
 size is 8192. I posted an app on the issue list (http://
 code.google.com/p/android/issues/detail?id=811) but no replay so far.
 People seem to be getting responses here, so maybe this will work.
 My app works in J2ME and J2SE. It is just on the Android emulator that
 it doesn't. I had the same problem in the February / March SDK, and
 reported the bug then.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] 0.9 SDK Build Error

2008-08-27 Thread Gil

This morning I ran into the following error when I initiated the first
build of the day:

Error generating final archive: Debug Certificate expired on 8/27/08
9:06 AM!

I try restarting Eclipse but that did not help. I'm stuck.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Comunication Server-Phone: SMS directed to an application (0.9 SDK)

2008-08-27 Thread jtaylor

SMS is probably problematic on more than one level.
There are HTTP api's and that's what you want. JAVA has an api and
Apache has one as well.




On Aug 26, 9:35 am, Cristina [EMAIL PROTECTED] wrote:
 Hi!

 We are designing an application for android phones. In our application
 there is a central server, and this server must send some application
 information to the phone.
 So, we thought to use SMS in order to communicate with our application
 in the phone.
 Our application will look for messages with a particular prefix and
 consume it. Other applications (including messagig applications)
 should not get the application SMS messages.

 In order to do that, we have implemeted a Sms BroadcastReceiver, that
 get all SMS messages, but only processed the ones with the application
 prefix. After processing them, we do an abortBroadcast(), in order to
 stop the broadcast of the message to the Messaging application or
 other applications receiving the same intent.

 However, SMS Inbox is receiving the message, and is showing the
 message in the notification application.

 1.  Is there any way for an application to receive the SMS message,
 avoiding the rest of applications to receive it? Is abortBroadcast
 working for SMS broadcast intents? I understand that maybe the
 abortBroadcast is not working for SMS broadcast intents, because of
 security reasons (for example we could abort the broadcast of all SMS
 messages ). Is there another way for an application to to receive SMS
 messages in an exclusive way (the rest of applications do not
 receive it)?

 2. Is there any other way to communicate information from a external
 server to the application in the phone?

 For example, In other projects with other phones we have  used
 transparent wappush to implement that communication..Does android
 support wappush protocol?

 We would not like to implement an always open connection in the phone
 application (where the phone acts like a server), because that implies
 that we must have a list with all the IPs of the phones in order to
 communicate with them..that complicates a lot the  implementation...

 Any other idea?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem 2nd launch of my application

2008-08-27 Thread hackbod

Seeing the process running doesn't mean anything.

Please read: http://code.google.com/android/intro/appmodel.html

On Aug 27, 8:13 am, bleucalme [EMAIL PROTECTED] wrote:
 First, thank you for those quick replies.

 You're right, my application is still running after I taught it was
 closed. For people having similar problems, in Eclipse, we can see
 active process under DDMS-- emulator.

 I'll work on my bug and keep you informed.

 Thanks.

 On Aug 26, 3:48 pm, StevePotell [EMAIL PROTECTED] wrote:

  bleucalme,

  Kind of looks like your app is still running, make sure you call
  finish() when closing the app.  Also close and free any system
  resources you may be using (like media player, etc) prior to calling
  finish().
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ListView - If you have a item that can focus you can select the Item

2008-08-27 Thread marielisacr

Hey Romain thanks for the answer,

So, in conclusion, I can have a focusable item or a focusable child
into the item but not both.

That means, for example, that if I want to have a list of songs, where
if I select one I play it, and each one have a button to add to one
playlist is not possible?

And another quick question, Can I have a SurfaceView able to display
videos and photos?, lets say, for example, that I want to put a
loading image while downloading the video, is that possible? (using
MediaPlayer yo play the video).

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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Developing a 2D game on Android

2008-08-27 Thread hackbod

If you want to do high performance graphics, you probably want to use
OpenGL since that will be hardware accelerated.  You can use OpenGL
for 2d as much as 3d graphics.

Otherwise, the high-level 2d APIs are very extensive; the main API is
android.graphics.Canvas, with a number of secondary classes associated
with it.  Are there some features in particular that you are looking
for?

On Aug 27, 3:34 am, crayon- [EMAIL PROTECTED] wrote:
 Hi folks, just a question about developing a 2D game on Android.

 Namely the difficulty of it, basically I'm hoping to make a type of 2D
 RPG (in the vein of the SNES Final Fantasy games for my final year
 project in college, originally I've been doing this on C++ using SDL,
 but I think it would look far more impressive if done on Android, with
 possible touch screen.

 Just wondering on the difficulty of doing this? I've good Java
 experience through college and I've learned a good bit about 2D
 programming through SDL, but I can't see much documentation on the 2D
 graphics in the Android SDK so I'm wondering would it be worth while
 doing?

 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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] HttpPost - setting parameters but the web page is not receiving them?

2008-08-27 Thread Zack

Thanks for helping.

in m5 :
client = new HttpClient();
pmethod = new PostMethod(posturl);
pmethod.addParameter(PacketNum, mStringPacketNumber);
...other parameters set here...
int statusCode = client.executeMethod( pmethod );



in 0.9:
 HttpClient HClient = new DefaultHttpClient();
 HttpParams HParams = new BasicHttpParams();
 HClient.getConnectionManager();

 HttpPost postRequest = new HttpPost(posturl);
 HParams.setParameter(PacketNum,
mStringPacketNumber);
 ... other parameters set here...
 postRequest.setParams(HParams);
 HClient.execute(postRequest);

The Post request is received by the web server in both cases but in
the 0.9 version none of the parameters are received.  What is the
right way to set the parameters for 0.9 SDK.

Thanks again.


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Multipart Messages - Is there an example how to get them work now. (Uploading to a web API)

2008-08-27 Thread jlapenna

Yeah, you're going to need to add it to your build path. You can do
that by right clicking on your project in the Package Explorer,
selecting Build Path - Configure Build Path, clicking on Libraries
then clicking Add JARs. If nothing is listed you need to add the
libraries to your project, you can do that by creating a new folder in
your project called lib, and copying the .jar files recommended above
in that directory and then right clicking on that folder and clicking
refresh. At that point the libraries should be listed in the Add
JARs dialog.

On Aug 26, 7:49 pm, Zack [EMAIL PROTECTED] wrote:
 Thanks for your many helpful posts!
 I'm sure this one will be helpful to me but what do I need to do to be
 able to
 import org.apache.http.entity.mime.MultipartEntity;?
 I get The import org.apache.http.entity.mime cannot be resolved
 Do I need to configure eclipse and add something to it?

 Thanks again.

 On Aug 19, 4:18 pm, Justin (Google Employee) [EMAIL PROTECTED]
 wrote:

  Just to finish this thread off nicely, here's some code to use
  multipart posts. Again, you need mime4j, httpmime, and Apache Commons
  IO.

  import java.io.ByteArrayInputStream;
  import java.io.InputStream;
  import org.apache.http.client.HttpClient;
  import org.apache.http.client.methods.HttpPost;
  import org.apache.http.entity.mime.MultipartEntity;
  import org.apache.http.entity.mime.content.ContentBody;
  import org.apache.http.entity.mime.content.InputStreamBody;
  import org.apache.http.entity.mime.content.StringBody;
  import org.apache.http.impl.client.DefaultHttpClient;
  ...
  HttpClient httpClient = new DefaultHttpClient();
  HttpPost request = new HttpPost(http://www.example.com;);

  // we assume 'data' is some byte array representing a jpeg
  InputStream ins = new ByteArrayInputStream(data);
  parts[0] = new InputStreamBody(ins, image.jpg);
  parts[1] = new StringBody(some bit of information);
  parts[2] = new StringBody(another bit of information);

  // create the multipart request and add the parts to it
  MultipartEntity requestContent = new MultipartEntity();
  requestContent.addPart(image.jpg, parts[0]);
  requestContent.addPart(data_part1, parts[1]);
  requestContent.addPart(data_part2, parts[2]);

  // execute the request
  request.setEntity(requestContent);
  httpClient.execute(request);

  The HttpClient execute method will give you a handle to the response.
  From that you can do HttpResponse.getEntity().getContent() which will
  give you an InputStream to read the response. Unfortunately the
  InputStream doesn't produce a meaningful response for
  InputStream.available(). This might be because somewhere along the way
  the Content-Length header seems to be getting lost, but I haven't had
  time to look into this further yet.

  Cheers,
  Justin
  Android Team @ Google

  On Aug 18, 11:13 pm, code_android_festival_way

  [EMAIL PROTECTED] wrote:
   Thank you Justin for helping me out. It is working pretty fine
   now. :-)

   Cheers from Germany!

   On 19 Aug., 02:11, Justin (Google Employee) [EMAIL PROTECTED] wrote:

Looks like you also need the Apache Commons IO library which you can
get fromhttp://commons.apache.org/io/.

Cheers,
Justin
Android Team @ Google

On Aug 18, 3:19 pm, code_android_festival_way

[EMAIL PROTECTED] wrote:
 So I'm back with a question. I've imported the libraries mentioned
 above and got the following setup:

http://paste.pocoo.org/show/82631/

 Now I get an error while executing the POST method with the
 HttpClient. Am I doing sth. wrong or what do I have to change to get
 it working. (the paste above is cutted down to the most important
 parts)

 The error message:

 Error in org.apache.commons.io.ouput.ByteArrayOutputStream

 I'm looking forward getting some answers.

 Regards!

 On 18 Aug., 22:35, code_android_festival_way

 [EMAIL PROTECTED] wrote:
  Thank you for your answer Dan.

  I'm looking now how to get the whole thing working. (since I'm not 
  the
  best Java developer :) )

  I will come back with the results later on.

  On 18 Aug., 22:26, Dan Morrill [EMAIL PROTECTED] wrote:

   To shed a bit more light, the reason the multi-part APIs were 
   removed is
   because those APIs will not be final in the upstream Apache 
   HTTPClient in
   time for Android's schedule for a final 1.0 version.  Rather than 
   ship an
   early/incompatible API, we chose to remove it, and rely on other 
   libraries
   as Justin suggested.

   Note that this applies only to the multi-part APIs: the rest of 
   the Apache
   HTTPClient APIs have been frozen, and so they are safe for us 
   to include.
   (Seehttp://www.nabble.com/-VOTE--RESULT--HttpClient-4.0-API-freeze-td1863...
   )

   - Dan

   On Mon, Aug 18, 2008 at 1:10 PM, Justin (Google Employee) [EMAIL 
   PROTECTED]wrote:

Note that 

[android-developers] Re: ListView - If you have a item that can focus you can select the Item

2008-08-27 Thread sacoskun

Hello marielisacr,

That means, for example, that if I want to have a list of songs,
where
if I select one I play it, and each one have a button to add to one
playlist is not possible? 

If I were you, I would go for standard select handler in order to play
the selected song and I would come up with a ContextMenu for user to
pick from add this one to the playlist. May be making the list a
multiple choice list and letting the user to add more than one title
at a time can be a better way.

Regards,

On Aug 27, 7:28 pm, marielisacr [EMAIL PROTECTED] wrote:
 Hey Romain thanks for the answer,

 So, in conclusion, I can have a focusable item or a focusable child
 into the item but not both.

 That means, for example, that if I want to have a list of songs, where
 if I select one I play it, and each one have a button to add to one
 playlist is not possible?

 And another quick question, Can I have a SurfaceView able to display
 videos and photos?, lets say, for example, that I want to put a
 loading image while downloading the video, is that possible? (using
 MediaPlayer yo play the video).

 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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ListView - If you have a item that can focus you can select the Item

2008-08-27 Thread Romain Guy

 So, in conclusion, I can have a focusable item or a focusable child
 into the item but not both.

No, items in a ListView are not focusable by default, they are
selectable. So an item can be focusable (it gets focus or one of its
children gets focus) OR selectable, but not both. You can make the
item and its children focusable if you want. But keyboard focus
navigation might not work properly in that case (overlapping focusable
items are not handled very well for now.)


 That means, for example, that if I want to have a list of songs, where
 if I select one I play it, and each one have a button to add to one
 playlist is not possible?

 And another quick question, Can I have a SurfaceView able to display
 videos and photos?, lets say, for example, that I want to put a
 loading image while downloading the video, is that possible? (using
 MediaPlayer yo play the video).

 Thanks.
 




-- 
Romain Guy
www.curious-creature.org

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Could not fine HelloAndroid.apk when lauching the HelloAndroid example

2008-08-27 Thread Gil

I'm having the same problem today.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] android.view.WindowLeaked when onPause() is called

2008-08-27 Thread snowcrash

hi,

i have an application running a background thread to do xml-parsing
while the ui-thread displays a progressdialog. the activity has a
handler to queue runnables from the other thread, mainly to display
messages. when the xml-thread is finished and the activity is left
using the back button on the emulator, i'm getting the following
error:

android.view.WindowLeaked: Activity Name has leaked window
[EMAIL PROTECTED] that
was originally added here

what am i doing wrong? i also can't find information on
'android.view.WindowLeaked', it seems to be undocumented.

thanks
snowcrash

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Manually restarting an Activity

2008-08-27 Thread Mark Murphy

 Is there a way for an Activity to restart itself, so that you go
 trough a similar cycle that you get when there is a configuration
 change?

U...not sure what you mean by configuration change, but if your
activity calls finish(), it will close up and exit the activity. At least
in M5, it will call all appropriate lifecycle methods on its way out the
door -- I'll be testing that under 0.9 this weekend.

--
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.1 Published!



--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Menu bug?

2008-08-27 Thread Megha Joshi
2008/8/26 android_dev [EMAIL PROTECTED]


 Menu does not show up.

 If the focus is on an EditText field with android:password=true,
 then hitting the Menu key does not show the menu options for that
 screen. If the focus is on some other field, then the menu shows up.

 Bug?


I was not able to reproduce this issue...perhaps there is something else
which is
causing this behavior.  Can your attach your code?



 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Using the ItemizedOverlay and OverlayItem

2008-08-27 Thread Chris Chiappone

Same problem here, i converted code normal overlay code that worked in
order to use the recommended ItemizedOverlay.  Can anyone confirm
that this is a bug or are we just doing something wrong.

Thanks.

On Tue, Aug 26, 2008 at 9:52 AM, Guillaume Perrot
[EMAIL PROTECTED] wrote:

 Hi,
 I have the same problem.
 The draw function is called, I tried to override it, I even added a
 bitmap in the top left corner for test purposes, I see my dummy bitmap
 but no items...

 On 26 août, 07:50, marcel-182 [EMAIL PROTECTED] wrote:
 Hi,

 Same problem here. I added two items and I found out that even the
 draw() method from ItemizedOverlay is called but there is nothing on
 my map view. My code is quite equal to yours.

 On 25 Aug., 18:29, Reto [EMAIL PROTECTED] wrote:

  I've been trying to use the ItemizedOverlay and OverlayItem classes in
  the 0.9 Beta to simulate map markers but have been having some
  problems getting it to display on the map.

  Once I've implemented my own ItemizedOverlay (and overriden
  createItem), creating a new instance of my class seems to work (I can
  extract OverlayItems from it) but adding it to the overlay list for
  one of my maps doesn't seem to do anything.

  I've included the code for adding the ItemizedOverlay to the map, and
  the ItemizedOverlay implementation itself is also included. Have I
  done something wrong or is this functionality not yet available?

  // Add the ItemizedOverlay to the Map
  private void addItemizedOverlay() {
Resources r = getResources();
mapView = (MapView)findViewById(R.id.map_view);
ListOverlay overlays = mapView.getOverlays();

MyItemizedOverlay markers = new
  MyItemizedOverlay(r.getDrawable(R.drawable.icon));
overlays.add(markers);

OverlayItem oi = markers.getItem(0);
markers.setFocus(oi);
mapView.postInvalidate();

  }

  Where MyItemizedOverlay is defined as:

  public class MyItemizedOverlay extends ItemizedOverlayOverlayItem {
public MyItemizedOverlay(Drawable defaultMarker) {
  super(defaultMarker);
  populate();
}

@Override
protected OverlayItem createItem(int index) {
  Double lat = (index+37.422006)*1E6;
  Double lng = -122.084095*1E6;
  GeoPoint point = new GeoPoint(lat.intValue(), lng.intValue());

  OverlayItem oi = new OverlayItem(point, Marker, Marker Text);
  return oi;
}

@Override
public int size() {
  return 5;
}

  }
 




-- 
~chris

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Manually restarting an Activity

2008-08-27 Thread Justin (Google Employee)

You could have Activity A start Activity B and after starting B
calling finish(). Then have B, perhaps as the result of a button
press, start a new instance of A. Of course, finish() won't result in
onSaveInstanceState being called, which I believe is when a
configuration change (because naturally after the screen rotates you
want the user to see the same web page or whatever as they say before
the screen rotation). You can cause the emulator to change orientation
and do the same thing, see the emulator docs for more information on
this.

What are you trying to accomplish though?

Cheers,
Justin
Android Team @ Google

On Aug 27, 11:52 am, webmonkey [EMAIL PROTECTED] wrote:
 A configuration change as described in:

 http://code.google.com/android/reference/android/app/Activity.html#Co...

 Unless you specify otherwise, a configuration change (such as a
 change in screen orientation, language, input devices, etc) will cause
 your current activity to be destroyed, going through the normal
 activity lifecycle process of onPause(), onStop(), and onDestroy() as
 appropriate. If the activity had been in the foreground or visible to
 the user, once onDestroy() is called in that instance then a new
 instance of the activity will be created, with whatever
 savedInstanceState the previous instance had generated from
 onSaveInstanceState(Bundle).

 I actually don't care about configuration changes but I would like to
 be able to restart my activity from the activity itself and that it
 will go through the same lifecycle as described above.

 On Aug 27, 8:40 pm, Mark Murphy [EMAIL PROTECTED] wrote:

   Is there a way for an Activity to restart itself, so that you go
   trough a similar cycle that you get when there is a configuration
   change?

  U...not sure what you mean by configuration change, but if your
  activity calls finish(), it will close up and exit the activity. At least
  in M5, it will call all appropriate lifecycle methods on its way out the
  door -- I'll be testing that under 0.9 this weekend.

  --
  Mark Murphy (a Commons Guy)http://commonsware.com
  _The Busy Coder's Guide to Android Development_ Version 1.1 Published!
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Could not fine HelloAndroid.apk when lauching the HelloAndroid example

2008-08-27 Thread Ralf

Please file a bug in the tracker. Also please specify which original
timezone, locale and your operating system in the bug report so that
we can try to reproduce it.

R/

On Wed, Aug 27, 2008 at 8:58 AM, Vittee [EMAIL PROTECTED] wrote:

 Problem solved! Thanks :)

 I tried your solution and I work!
 I also noticed that I need to re-create/import project from source
 once agina in order to solve the problem.

 bottom line...
 when creating a project in Eclipse the Windows system locale and
 location must be English, United States.

 should we treat this problem as a bug and submit to the issue tracker?

 On Aug 27, 9:32 pm, NuuNeoI [EMAIL PROTECTED] wrote:
 I found the solution already.

 First please delete file C:\Documents and Settings\user\Local
 Settings\Application Data\Android\debug.keystore

 Next, change your location and date time settings to United Stated.

 Rebuild project once again.

 If everything goes fine, you can change date time back to your locale.

 That's all. Hope this help.

 Best Regards,
 Sittiphol Phanvilaihttp://www.neuvex.com

 On Aug 27, 9:21 am, yukinoba [EMAIL PROTECTED] wrote:

  Hi, I'm a totally newbie to the Android SDK.
  I have been installed Eclipse 3.4 (Ganymede), ADT 0.7.1 and Android
  0.9 SDK with JRE 6 updated 7.
  It seems weird when I follow the Hello, Android! guideline on Google
  site.

  First I encountered the problem of Android libray.
  It seems eclipse won't include the .jar library file under the Android
  directory automatically after create the HelloAndroid project, and I
  have fixed this one.

  However, after the ealier problem, when I try to run the example, the
  eclipse told me Could not find HelloAndroid.apk!, and stops.

  Here is the message:
  [2008-08-27 10:01:43 - HelloAndroid] --
  [2008-08-27 10:01:43 - HelloAndroid] Android Launch!
  [2008-08-27 10:01:43 - HelloAndroid] adb is running normally.
  [2008-08-27 10:01:43 - HelloAndroid] Could not find HelloAndroid.apk!

  I have checked the posts on the forum, and try the possible
  solutions : check Installed JREs in Window--Preferences--Java, and
  the AndroidManifest.xml. But still can not fix it.

  Does anyone met the same situation before? Pls help and Thx.

  The following is the AndroidManifest.xml from HelloAndroid :
  ?xml version=1.0 encoding=utf-8?
  manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=com.android.hello
  application android:icon=@drawable/icon android:label=@string/
  app_name
  activity android:name=.HelloAndroid android:label=@string/
  app_name
  intent-filter
  action android:name=android.intent.action.MAIN /
  category
  android:name=android.intent.category.LAUNCHER /
  /intent-filter
  /activity
  /application
  /manifest

 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] issues with setPhotoData() and loadContactPhoto()

2008-08-27 Thread kingkung

I'm having trouble getting the new contact photo methods for 0.9 beta
to work correctly.

This is what I do currently:

private static boolean storePhoto(Context context, AndroidContact
ac,Uri personUri)
{
byte[] bytes = 
ExternalServices.retrieveBytesFromURL(ac.photoUrl);
People.setPhotoData(context.getContentResolver(), personUri, 
bytes);
return true;
}

where the path of the personUri is something like /people/57

To retrieve, I use the same personUri, and do:

  public void loadPhoto(Uri personUri) throws Exception
  {
Bitmap b = null;
b=People.loadContactPhoto(f_context, personUri,
R.drawable.no_photo_found,null);
if (b!=null)
photoView.setImageBitmap(b);
else
photoView.setImageResource(R.drawable.no_photo_found);
 }

Store seems to work correctly as far as I can tell, but retrieve
throws a NullPointerException on the line

b=People.loadContactPhoto(f_context, personUri,
R.drawable.no_photo_found,null);

which is amazing, because none of the parameters (outside of the last
one) are null.

What is going on?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: 0.9 SDK Build Error

2008-08-27 Thread Ralf

Simply remove the debug.keystore in ~/.android and it will be
re-created with an updated expiration date.

R/

On Wed, Aug 27, 2008 at 9:21 AM, Gil [EMAIL PROTECTED] wrote:

 This morning I ran into the following error when I initiated the first
 build of the day:

 Error generating final archive: Debug Certificate expired on 8/27/08
 9:06 AM!

 I try restarting Eclipse but that did not help. I'm stuck.
 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Tool to generate callback listeners from AIDL

2008-08-27 Thread Josh Guilfoyle

I wrote a tool to generate extended RemoteCallbackList classes from an
AIDL interface for use in services that implement listeners.

The tool can be found here:
http://android-random.googlecode.com/svn/trunk/aidl-cblistsub/aidl-cbliststub.pl

With my full post here:
http://devtcg.blogspot.com/2008/08/generate-callback-listener-helpers-from.html
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem 2nd launch of my application

2008-08-27 Thread bleucalme

I fixed my problem. I had a thread that was still running when I
taught my application was closed. Closing this thread in OnDestroy()
workded (like LunarView example).

Thanks everybody

On Aug 27, 12:26 pm, hackbod [EMAIL PROTECTED] wrote:
 Seeing the process running doesn't mean anything.

 Please read:http://code.google.com/android/intro/appmodel.html

 On Aug 27, 8:13 am,bleucalme[EMAIL PROTECTED] wrote:

  First, thank you for those quick replies.

  You're right, my application is still running after I taught it was
  closed. For people having similar problems, in Eclipse, we can see
  active process under DDMS-- emulator.

  I'll work on my bug and keep you informed.

  Thanks.

  On Aug 26, 3:48 pm, StevePotell [EMAIL PROTECTED] wrote:

  bleucalme,

   Kind of looks like your app is still running, make sure you call
   finish() when closing the app.  Also close and free any system
   resources you may be using (like media player, etc) prior to calling
   finish().
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Crash reading by 16384 of file

2008-08-27 Thread Ralf

Please file a bug in the tracker with a little snippet of code to reproduce it.

R/

On Wed, Aug 27, 2008 at 9:06 AM, Jon Webb [EMAIL PROTECTED] wrote:

 BTW, I tracked the fault down to a bug in the Android SDK. It is that
 InputStreamReader.read(char[], int, int) doesn't always work across
 buffer boundaries. Sometimes a NUL (0) gets inserted in the char[]
 array. I changed my code so that it uses InputStreamReader.read()
 repeatedly when I have to read more than one character at a time and
 it works. This is in the 0.9 SDK.
 -- Jon

 On Aug 22, 4:17 pm, Jon Webb [EMAIL PROTECTED] wrote:
 I keep getting a crash (reading NUL which is not in the file) when I
 try to read a file into my app. The crash occurs at byte 16384 of the
 file. I assume this is some sort of buffering error because the buffer
 size is 8192. I posted an app on the issue list (http://
 code.google.com/p/android/issues/detail?id=811) but no replay so far.
 People seem to be getting responses here, so maybe this will work.
 My app works in J2ME and J2SE. It is just on the Android emulator that
 it doesn't. I had the same problem in the February / March SDK, and
 reported the bug then.
 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Manually restarting an Activity

2008-08-27 Thread webmonkey

I want to switch OpenGL on and off in my activity, because there are
moments that would really benefit from the acceleration, even if that
means re-starting the activity (my app goes through the cycle pretty
fast). But there are also moments where I can't use OpenGL because it
does not support all the canvas functions. I use:

requestWindowFeature(Window.FEATURE_OPENGL);

But this can only be called in onCreate, so to test it I currently
just flip the screen which restarts the activity.

I can do without, but it would be nice if there was a restart()
function. The functionality is already there with the configuration
change.


On Aug 27, 9:06 pm, Justin (Google Employee) [EMAIL PROTECTED]
wrote:
 You could have Activity A start Activity B and after starting B
 calling finish(). Then have B, perhaps as the result of a button
 press, start a new instance of A. Of course, finish() won't result in
 onSaveInstanceState being called, which I believe is when a
 configuration change (because naturally after the screen rotates you
 want the user to see the same web page or whatever as they say before
 the screen rotation). You can cause the emulator to change orientation
 and do the same thing, see the emulator docs for more information on
 this.

 What are you trying to accomplish though?

 Cheers,
 Justin
 Android Team @ Google

 On Aug 27, 11:52 am, webmonkey [EMAIL PROTECTED] wrote:



  A configuration change as described in:

 http://code.google.com/android/reference/android/app/Activity.html#Co...

  Unless you specify otherwise, a configuration change (such as a
  change in screen orientation, language, input devices, etc) will cause
  your current activity to be destroyed, going through the normal
  activity lifecycle process of onPause(), onStop(), and onDestroy() as
  appropriate. If the activity had been in the foreground or visible to
  the user, once onDestroy() is called in that instance then a new
  instance of the activity will be created, with whatever
  savedInstanceState the previous instance had generated from
  onSaveInstanceState(Bundle).

  I actually don't care about configuration changes but I would like to
  be able to restart my activity from the activity itself and that it
  will go through the same lifecycle as described above.

  On Aug 27, 8:40 pm, Mark Murphy [EMAIL PROTECTED] wrote:

Is there a way for an Activity to restart itself, so that you go
trough a similar cycle that you get when there is a configuration
change?

   U...not sure what you mean by configuration change, but if your
   activity calls finish(), it will close up and exit the activity. At least
   in M5, it will call all appropriate lifecycle methods on its way out the
   door -- I'll be testing that under 0.9 this weekend.

   --
   Mark Murphy (a Commons Guy)http://commonsware.com
   _The Busy Coder's Guide to Android Development_ Version 1.1 Published!- 
   Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: 0.9 SDK Build Error

2008-08-27 Thread Gil

Thanks Ralf! That solved the problem.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Feature Request: Virtual Contacts Content Provider

2008-08-27 Thread jtaylor

The problem with Contacts in mobile devices is that there are two
types of Contacts. One is what I call Personal Contacts (family and
friends) and the other is Virtual Contacts (social app friends/
multiplayer games). The Virtual Contacts don't go in the same place as
Personal Contacts. So where do Virtual Contacts go?

Some apps will have Virtual Contacts in the browser (on the web) and
others within the mobile app on the device. So speaking of those that
are part of a mobile app on the device, where should virtual contacts
go? If you put virtual and personal contacts together, separating
virtual contacts with a column/field value, what happens when an app
simply requests all contacts considering them all personal contacts?
So I don't see how a group field would work.

So I think one has to set up a totally new Content Provider for
Virtual Contacts. Either from scratch for each application or unified
and having that group field so new apps can just use the 'Virtual
Contacts Content Provider'.

So can we have that? A  'Virtual Contacts Content Provider'?


- Juan T.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Manually restarting an Activity

2008-08-27 Thread hackbod

I think you have put the cart a little before the horse here. :)  I
wouldn't count on FEATURE_OPENGL speeding up your app...  certainly,
until you are running on actual hardware with graphics acceleration,
you really can't know how much it will help.  I would really suggest
on doing anything at all with FEATURE_OPENGL until you can run it on
hardware that could take advantage of it.

That said, sorry, there is no way to force a configuration change of
your activity when the configuration doesn't actually change.

On Aug 27, 12:49 pm, webmonkey [EMAIL PROTECTED] wrote:
 I want to switch OpenGL on and off in my activity, because there are
 moments that would really benefit from the acceleration, even if that
 means re-starting the activity (my app goes through the cycle pretty
 fast). But there are also moments where I can't use OpenGL because it
 does not support all the canvas functions. I use:

 requestWindowFeature(Window.FEATURE_OPENGL);

 But this can only be called in onCreate, so to test it I currently
 just flip the screen which restarts the activity.

 I can do without, but it would be nice if there was a restart()
 function. The functionality is already there with the configuration
 change.

 On Aug 27, 9:06 pm, Justin (Google Employee) [EMAIL PROTECTED]
 wrote:

  You could have Activity A start Activity B and after starting B
  calling finish(). Then have B, perhaps as the result of a button
  press, start a new instance of A. Of course, finish() won't result in
  onSaveInstanceState being called, which I believe is when a
  configuration change (because naturally after the screen rotates you
  want the user to see the same web page or whatever as they say before
  the screen rotation). You can cause the emulator to change orientation
  and do the same thing, see the emulator docs for more information on
  this.

  What are you trying to accomplish though?

  Cheers,
  Justin
  Android Team @ Google

  On Aug 27, 11:52 am, webmonkey [EMAIL PROTECTED] wrote:

   A configuration change as described in:

  http://code.google.com/android/reference/android/app/Activity.html#Co...

   Unless you specify otherwise, a configuration change (such as a
   change in screen orientation, language, input devices, etc) will cause
   your current activity to be destroyed, going through the normal
   activity lifecycle process of onPause(), onStop(), and onDestroy() as
   appropriate. If the activity had been in the foreground or visible to
   the user, once onDestroy() is called in that instance then a new
   instance of the activity will be created, with whatever
   savedInstanceState the previous instance had generated from
   onSaveInstanceState(Bundle).

   I actually don't care about configuration changes but I would like to
   be able to restart my activity from the activity itself and that it
   will go through the same lifecycle as described above.

   On Aug 27, 8:40 pm, Mark Murphy [EMAIL PROTECTED] wrote:

 Is there a way for an Activity to restart itself, so that you go
 trough a similar cycle that you get when there is a configuration
 change?

U...not sure what you mean by configuration change, but if your
activity calls finish(), it will close up and exit the activity. At 
least
in M5, it will call all appropriate lifecycle methods on its way out the
door -- I'll be testing that under 0.9 this weekend.

--
Mark Murphy (a Commons Guy)http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.1 Published!- 
Hide quoted text -

  - Show quoted text -
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Feature Request: Virtual Contacts Content Provider

2008-08-27 Thread jtaylor

Also to mention that there should be big differences. Such as that
Virtual Contacts don't have a phone number. You may press a button to
put a virtual contact in your Personal Contacts though. Anyway, I
think this is very important. This was an issue with the GTalkService
problem I believe. But hopefully this will be in 1.0 because so many
apps will use Virtual Contacts and not just Personal Contacts.

Or am I missing anything?


- Juan T.

On Aug 27, 4:17 pm, jtaylor [EMAIL PROTECTED] wrote:
 The problem with Contacts in mobile devices is that there are two
 types of Contacts. One is what I call Personal Contacts (family and
 friends) and the other is Virtual Contacts (social app friends/
 multiplayer games). The Virtual Contacts don't go in the same place as
 Personal Contacts. So where do Virtual Contacts go?

 Some apps will have Virtual Contacts in the browser (on the web) and
 others within the mobile app on the device. So speaking of those that
 are part of a mobile app on the device, where should virtual contacts
 go? If you put virtual and personal contacts together, separating
 virtual contacts with a column/field value, what happens when an app
 simply requests all contacts considering them all personal contacts?
 So I don't see how a group field would work.

 So I think one has to set up a totally new Content Provider for
 Virtual Contacts. Either from scratch for each application or unified
 and having that group field so new apps can just use the 'Virtual
 Contacts Content Provider'.

 So can we have that? A  'Virtual Contacts Content Provider'?

 - Juan T.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Activity Question

2008-08-27 Thread Gil

webmonkey: I confirm the behavior you are describing. If the
application is started from Eclipse it behaves the way I described
above. Once I start it from the Home screen the problem goes away.

Justin: Given what webmonkey stated I removed all the launch flags
from all the activities in the manifest file. The behavior seems
correct now if I start the app from the Home screen but not if I
launch the app from Eclipse. I added the intent-filter you recommended
but that did not help the situation so for now I took it back out.
Also, I was not trying to optimize anything when I was experimenting
with the launch flags, I was just trying to obtain the correct
behavior; now I know that the launch flags do not help in this case.

Thanks to both of 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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Errors with android httpclient (Thread forbids HTTP requests)

2008-08-27 Thread webmonkey

If you run the call in a separate thread it will work.

On Aug 27, 9:51 pm, androidETuser [EMAIL PROTECTED] wrote:
 I am trying to make HTTP requests thru android APis. But I am getting
 some error.

 Did any one saw this error before? Can someone help me out here?

 Here is the code I am running. This code executed when the sub
 activitilty is completed and the callback is called.

     protected void onActivityResult(int requestCode, int resultCode,
 Intent intent) {
         super.onActivityResult(requestCode, resultCode, intent);

         Bundle extras = intent.getExtras();

                String symbol = extras.getString(Symbol);

               String lastPrc = getLastPrice(symbol);
     }

     private String getLastPrice (final String symbol) {
         String  response = new String();
         String errMsg = new String();
         errMsg = test;

         try {

                 AndroidHttpClient httpClient =
 AndroidHttpClient.newInstance(Etrade);

                 HttpGet authGet = new HttpGet( 
 https://us.etrade.com/e/t/invest/
 flash?type=EQsym= + symbol);
                 HttpResponse resp = httpClient.execute(authGet);
                  response = resp.toString();
             System.out.println(actual response is  + response);
         } catch(Exception e) {
                 errMsg = e.getMessage();

                 System.out.println(actual error msg is  + errMsg);
                 e.printStackTrace();
         }
         return response;
     }

 This line is thrwoing errors.
         httpClient.execute(authGet);

 And the error message is This thread forbids HTTP requests.

 Thanks,
 Navin
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Feature Request: Virtual Contacts Content Provider

2008-08-27 Thread hackbod

On Aug 27, 1:26 pm, jtaylor [EMAIL PROTECTED] wrote:
 Also to mention that there should be big differences. Such as that
 Virtual Contacts don't have a phone number.

It sounds to me like you are talking about a different kind of content
provider, not the normal contacts provider.

 You may press a button to
 put a virtual contact in your Personal Contacts though. Anyway, I
 think this is very important. This was an issue with the GTalkService
 problem I believe. But hopefully this will be in 1.0 because so many
 apps will use Virtual Contacts and not just Personal Contacts.

No, there will be nothing like this in 1.0.  As you've see, one of the
reasons why the GTalk data API was removed was because of the concern
of mixing these two kinds of people.

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: active note application

2008-08-27 Thread Megha Joshi
You can use the addSubMenu() method of Menu class, alternately you can
define submenus in XML.
http://code.google.com/android/reference/android/view/Menu.html

Also, see how its done in ApiDemosappMenu sample code.

2008/8/26 jalandar [EMAIL PROTECTED]


 Hi
 I am junior andriod developer.
 In my application of active note .I want to create sub menu list of
 main menu
 e.g.
 Options--1.New note--1.send ,2.delete,3.exit
  2.help
  3.exit

 when i click on Options there should be pop -up list of sub menus (new
 note,help,exit) and new note again having pop-up menus
 (send ,delete,exit)
 plz provide  me suggetions. how to create this application.




 thank u

 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Manually restarting an Activity

2008-08-27 Thread webmonkey

I know it is all software based in the emulator but to my surprise I
saw an small increase in speed when using Canvas.drawBitmapMesh with
FEATURE_OPENGL.

But as I mentioned, I can do without so it is not a big problem.

Thanks

On Aug 27, 10:21 pm, hackbod [EMAIL PROTECTED] wrote:
 I think you have put the cart a little before the horse here. :)  I
 wouldn't count on FEATURE_OPENGL speeding up your app...  certainly,
 until you are running on actual hardware with graphics acceleration,
 you really can't know how much it will help.  I would really suggest
 on doing anything at all with FEATURE_OPENGL until you can run it on
 hardware that could take advantage of it.

 That said, sorry, there is no way to force a configuration change of
 your activity when the configuration doesn't actually change.

 On Aug 27, 12:49 pm, webmonkey [EMAIL PROTECTED] wrote:

  I want to switch OpenGL on and off in my activity, because there are
  moments that would really benefit from the acceleration, even if that
  means re-starting the activity (my app goes through the cycle pretty
  fast). But there are also moments where I can't use OpenGL because it
  does not support all the canvas functions. I use:

  requestWindowFeature(Window.FEATURE_OPENGL);

  But this can only be called in onCreate, so to test it I currently
  just flip the screen which restarts the activity.

  I can do without, but it would be nice if there was a restart()
  function. The functionality is already there with the configuration
  change.

  On Aug 27, 9:06 pm, Justin (Google Employee) [EMAIL PROTECTED]
  wrote:

   You could have Activity A start Activity B and after starting B
   calling finish(). Then have B, perhaps as the result of a button
   press, start a new instance of A. Of course, finish() won't result in
   onSaveInstanceState being called, which I believe is when a
   configuration change (because naturally after the screen rotates you
   want the user to see the same web page or whatever as they say before
   the screen rotation). You can cause the emulator to change orientation
   and do the same thing, see the emulator docs for more information on
   this.

   What are you trying to accomplish though?

   Cheers,
   Justin
   Android Team @ Google

   On Aug 27, 11:52 am, webmonkey [EMAIL PROTECTED] wrote:

A configuration change as described in:

   http://code.google.com/android/reference/android/app/Activity.html#Co...

Unless you specify otherwise, a configuration change (such as a
change in screen orientation, language, input devices, etc) will cause
your current activity to be destroyed, going through the normal
activity lifecycle process of onPause(), onStop(), and onDestroy() as
appropriate. If the activity had been in the foreground or visible to
the user, once onDestroy() is called in that instance then a new
instance of the activity will be created, with whatever
savedInstanceState the previous instance had generated from
onSaveInstanceState(Bundle).

I actually don't care about configuration changes but I would like to
be able to restart my activity from the activity itself and that it
will go through the same lifecycle as described above.

On Aug 27, 8:40 pm, Mark Murphy [EMAIL PROTECTED] wrote:

  Is there a way for an Activity to restart itself, so that you go
  trough a similar cycle that you get when there is a configuration
  change?

 U...not sure what you mean by configuration change, but if your
 activity calls finish(), it will close up and exit the activity. At 
 least
 in M5, it will call all appropriate lifecycle methods on its way out 
 the
 door -- I'll be testing that under 0.9 this weekend.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.1 
 Published!- Hide quoted text -

   - Show quoted text -
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Activity Question

2008-08-27 Thread hackbod

On Aug 27, 1:37 pm, Gil [EMAIL PROTECTED] wrote:
 Justin: Given what webmonkey stated I removed all the launch flags
 from all the activities in the manifest file. The behavior seems
 correct now if I start the app from the Home screen but not if I
 launch the app from Eclipse.

The behavior in Eclipse is correct.  Each time you run from Eclipse,
you are uninstalling and reinstalling the app, so it will be started
completely fresh.

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Activity Question

2008-08-27 Thread webmonkey

 The behavior in Eclipse is correct.  Each time you run from Eclipse,
 you are uninstalling and reinstalling the app, so it will be started
 completely fresh.

True, and I wouldn't expect Eclipse to go back to where you left. But
the fact still is that in this freshly started app the problem above
arises unless you use the steps described above.

On Aug 27, 11:00 pm, hackbod [EMAIL PROTECTED] wrote:
 On Aug 27, 1:37 pm, Gil [EMAIL PROTECTED] wrote:

  Justin: Given what webmonkey stated I removed all the launch flags
  from all the activities in the manifest file. The behavior seems
  correct now if I start the app from the Home screen but not if I
  launch the app from Eclipse.


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Activity Question

2008-08-27 Thread Gil

Thanks hackbod, I understand that the app is uninstalled and then
reinstalled when started from Eclipse. I guess what I did not
understand is that when you launch the app from Eclipse the behavior
is different (as outlined in the sequence of steps to reproduce the
problem I posted earlier) than when you start the app from the Home
screen. Now I know.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Feature Request: Virtual Contacts Content Provider

2008-08-27 Thread jtaylor

Yes, that's the point, not to mix them. So two different contact
providers separates the two different types of contacts.

If the other type of contact provider (not for personal contacts)
called the Virtual Contacts Content Provider isn't provided, then
developers have to make their own content provider for the users
virtual (social space contacts, etc.) contacts that are part of their
app. So it's either each app builds their own virtual contacts
Content Provider -or- there is a standard Content Provider for these
virtual contacts. So that's what I'm saying.



On Aug 27, 4:43 pm, hackbod [EMAIL PROTECTED] wrote:
 On Aug 27, 1:26 pm, jtaylor [EMAIL PROTECTED] wrote:

  Also to mention that there should be big differences. Such as that
  Virtual Contacts don't have a phone number.

 It sounds to me like you are talking about a different kind of content
 provider, not the normal contacts provider.

  You may press a button to
  put a virtual contact in your Personal Contacts though. Anyway, I
  think this is very important. This was an issue with the GTalkService
  problem I believe. But hopefully this will be in 1.0 because so many
  apps will use Virtual Contacts and not just Personal Contacts.

 No, there will be nothing like this in 1.0.  As you've see, one of the
 reasons why the GTalk data API was removed was because of the concern
 of mixing these two kinds of people.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] anyone has problem with verifyError?

2008-08-27 Thread chouman82

Anyone has problem using third party JAR file? I can't use external
JAR, running into VerifyError.

08-27 00:08:20.312: WARN/dalvikvm(444): VFY: unable to find class
referenced in signature (Lorg/jivesoftware/smack/Roster;)
08-27 00:08:20.312: WARN/dalvikvm(444): VFY: unable to resolve virtual
method 976: Lorg/jivesoftware/smack/packet/Presence;.setMode (Lorg/
jivesoftware/smack/packet/Presence$Mode;)V
08-27 00:08:20.312: WARN/dalvikvm(444): VFY:  rejecting opcode 0x6e at
0x0002
08-27 00:08:20.312: WARN/dalvikvm(444): VFY:  rejected Lcom/asurion/
android/instantmessaging/AndroidChat;.changePresence (Lorg/
jivesoftware/smack/packet/Presence$Mode;)V
08-27 00:08:20.312: WARN/dalvikvm(444): Verifier rejected class Lcom/
asurion/android/instantmessaging/AndroidChat;
08-27 00:08:20.312: DEBUG/AndroidRuntime(444): Shutting down VM
08-27 00:08:20.312: WARN/dalvikvm(444): threadid=3: thread exiting
with uncaught exception (group=0x40010e28)
08-27 00:08:20.333: ERROR/AndroidRuntime(444): Uncaught handler:
thread main exiting due to uncaught exception
08-27 00:08:20.353: ERROR/AndroidRuntime(444): java.lang.VerifyError:
com.asurion.android.instantmessaging.AndroidChat
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
com.asurion.android.activity.AddressBook.initChat(AddressBook.java:
374)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
com.asurion.android.activity.AddressBook.onCreate(AddressBook.java:
165)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1121)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2094)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2147)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1572)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
android.os.Handler.dispatchMessage(Handler.java:88)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
android.os.Looper.loop(Looper.java:123)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
android.app.ActivityThread.main(ActivityThread.java:3708)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
java.lang.reflect.Method.invokeNative(Native Method)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
java.lang.reflect.Method.invoke(Method.java:492)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:734)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:492)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
dalvik.system.NativeStart.main(Native Method)


anyone has a clue?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Attempt to include a core VM class in something other than a core library

2008-08-27 Thread Oscar Castaneda
Hi,

I'm building a reduced set of Tuscany modules to get a sample Tuscany
application running on Android. However, building results in the error shown
below. How can I pass the --core-library option to the compiler and would
this be a solution? The problem is arising when processing class files from
stax-api-1.0-2.jar. Any ideas or thoughts on how to finish the build
successfully would be greatly appreciated.

[2008-08-27 23:23:55 - calculator-android]
trouble processing javax/xml/namespace/QName$1.class:
[2008-08-27 23:23:55 - calculator-android]
Attempt to include a core VM class in something other than a core library.
It is likely that you have attempted to include the core library from a
desktop
virtual machine into an application, which will most assuredly not work. If
you really intend to build a core library -- which is only appropriate as
part of creating a full virtual machine binary, as opposed to compiling an
application -- then use the --core-library option to suppress this error
message. If you go ahead and use --core-library but are in fact building
an application, then please be aware that your build will still fail at some
point; you will simply be denied the pleasure of reading this helpful error
message.
[2008-08-27 23:23:55 - calculator-android] 1 error; aborting
[2008-08-27 23:23:55 - calculator-android] Conversion to Dalvik format
failed with error 1

-- 
best,
-oscar

Oscar Castañeda

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Browser crash

2008-08-27 Thread qvark

The browser crash when opening www.sourceforge.net. Below is de logcat
output. Should I create a new issue in the tracker?

08-27 21:45:03.205: INFO/ActivityManager(51): Starting activity:
Intent { action=android.intent.action.VIEW
categories={android.intent.category.BROWSABLE} data=http://
sourceforge.net/ comp={com.android.browser/
com.android.browser.BrowserActivity} }
08-27 21:45:03.227: DEBUG/WebCore(1288): *-* Start browser instrument
08-27 21:45:05.375: DEBUG/browser(1288): updating cursor
08-27 21:45:08.397: WARN/javascriptcore(1288): * JavaScript used
1204 ms
08-27 21:45:08.565: DEBUG/dalvikvm(1288): GC freed 4023 objects /
464328 bytes in 102ms
08-27 21:45:08.646: WARN/webkit(1288): res nativeFinished used 2015 ms
08-27 21:45:11.425: WARN/javascriptcore(1288): * JavaScript used
2271 ms
08-27 21:45:11.485: WARN/webkit(1288): res nativeFinished used 2730 ms
08-27 21:45:17.656: DEBUG/dalvikvm(1288): GC freed 3798 objects /
480280 bytes in 117ms
08-27 21:45:23.395: WARN/javascriptcore(1288): * JavaScript used
3295 ms
08-27 21:45:23.407: WARN/webkit(1288): res nativeFinished used 4538 ms
08-27 21:45:25.785: INFO/DEBUG(21): *** *** *** *** *** *** *** ***
*** *** *** *** *** *** *** ***
08-27 21:45:25.795: INFO/DEBUG(21): Build fingerprint: 'generic/
generic/generic/:1.0/0.9_r1/98467:sdk/test-keys'
08-27 21:45:25.795: INFO/DEBUG(21): pid: 1288, tid: 1297  
com.android.browser 
08-27 21:45:25.805: INFO/DEBUG(21): signal 11 (SIGSEGV), fault addr
4539f000
08-27 21:45:25.823: INFO/DEBUG(21):  r0 0068225c  r1 005e7b80  r2
44b9e7ec  r3 
08-27 21:45:25.825: INFO/DEBUG(21):  r4 0068225c  r5 00682248  r6
0001  r7 005e7b80
08-27 21:45:25.825: INFO/DEBUG(21):  r8 44b9eda0  r9 4103cf34  10
4103cf20  fp 0001
08-27 21:45:25.825: INFO/DEBUG(21):  ip   sp 44b9e7b0  lr
aa120d37  pc 4539f000  cpsr 0010
08-27 21:45:25.916: INFO/DEBUG(21):  #00  pc 4539f000
08-27 21:45:25.925: INFO/DEBUG(21):  #01  pc aa120d34  /system/
lib/libwebcore.so
08-27 21:45:25.945: INFO/DEBUG(21):  #02  pc aa120d9a  /system/
lib/libwebcore.so
08-27 21:45:25.955: INFO/DEBUG(21):  #03  pc aa0ac014  /system/
lib/libwebcore.so
08-27 21:45:25.977: INFO/DEBUG(21):  #04  pc aa0ac06c  /system/
lib/libwebcore.so
08-27 21:45:25.995: INFO/DEBUG(21):  #05  pc aa0ac26a  /system/
lib/libwebcore.so
08-27 21:45:26.016: INFO/DEBUG(21):  #06  pc aa0ae048  /system/
lib/libwebcore.so
08-27 21:45:26.027: INFO/DEBUG(21):  #07  pc aa1c461e  /system/
lib/libwebcore.so
08-27 21:45:26.045: INFO/DEBUG(21):  #08  pc aa20490a  /system/
lib/libwebcore.so
08-27 21:45:26.057: INFO/DEBUG(21):  #09  pc aa2243ae  /system/
lib/libwebcore.so
08-27 21:45:26.080: INFO/DEBUG(21):  #10  pc aa215840  /system/
lib/libwebcore.so
08-27 21:45:26.086: INFO/DEBUG(21):  #11  pc aa210d0c  /system/
lib/libwebcore.so
08-27 21:45:26.086: INFO/DEBUG(21):  #12  pc aa20f76a  /system/
lib/libwebcore.so
08-27 21:45:26.096: INFO/DEBUG(21):  #13  pc aa210cba  /system/
lib/libwebcore.so
08-27 21:45:26.115: INFO/DEBUG(21):  #14  pc aa21dda8  /system/
lib/libwebcore.so
08-27 21:45:26.125: INFO/DEBUG(21):  #15  pc aa204d7c  /system/
lib/libwebcore.so
08-27 21:45:26.135: INFO/DEBUG(21):  #16  pc aa2243ae  /system/
lib/libwebcore.so
08-27 21:45:26.165: INFO/DEBUG(21):  #17  pc aa215f64  /system/
lib/libwebcore.so
08-27 21:45:26.189: INFO/DEBUG(21):  #18  pc aa210d0c  /system/
lib/libwebcore.so
08-27 21:45:26.195: INFO/DEBUG(21):  #19  pc aa21dda8  /system/
lib/libwebcore.so
08-27 21:45:26.206: INFO/DEBUG(21):  #20  pc aa204d7c  /system/
lib/libwebcore.so
08-27 21:45:26.226: INFO/DEBUG(21):  #21  pc aa2243ae  /system/
lib/libwebcore.so
08-27 21:45:26.235: INFO/DEBUG(21):  #22  pc aa0246f8  /system/
lib/libwebcore.so
08-27 21:45:26.246: INFO/DEBUG(21):  #23  pc aa05d19c  /system/
lib/libwebcore.so
08-27 21:45:26.263: INFO/DEBUG(21):  #24  pc aa069f78  /system/
lib/libwebcore.so
08-27 21:45:26.267: INFO/DEBUG(21):  #25  pc aa063882  /system/
lib/libwebcore.so
08-27 21:45:26.267: INFO/DEBUG(21):  #26  pc aa0e00d2  /system/
lib/libwebcore.so
08-27 21:45:26.267: INFO/DEBUG(21):  #27  pc aa0e7acc  /system/
lib/libwebcore.so
08-27 21:45:26.301: INFO/DEBUG(21):  #28  pc aa0e7baa  /system/
lib/libwebcore.so
08-27 21:45:26.305: INFO/DEBUG(21):  #29  pc aa0dc68c  /system/
lib/libwebcore.so
08-27 21:45:26.305: INFO/DEBUG(21):  #30  pc aa0f6d10  /system/
lib/libwebcore.so
08-27 21:45:26.317: INFO/DEBUG(21):  #31  pc aa0eef3e  /system/
lib/libwebcore.so
08-27 21:45:26.340: INFO/DEBUG(21):  #32  pc aa0edde8  /system/
lib/libwebcore.so
08-27 21:45:26.345: INFO/DEBUG(21):  #33  pc aa1243c0  /system/
lib/libwebcore.so
08-27 21:45:26.345: INFO/DEBUG(21):  #34  pc ad00da74  /system/
lib/libdvm.so
08-27 21:45:26.345: 

[android-developers] Re: Shared library/separate module not found

2008-08-27 Thread Justin (Google Employee)

Its undocumented and I guess its actually in an internal package in
android.jar. Either is an indication of an API that shouldn't be used.

Cheers,
Justin
Android Team @ Google

On Aug 26, 12:13 am, deviand [EMAIL PROTECTED] wrote:
 Hi Justin!

 I can't find android.awt anywhere (documentation or android.jar).
 It seems it has been removed and I also found it between the removed
 packages 
 here:http://code.google.com/android/migrating/m5-0.9/changes/changes-summa

 I believe there is no awt left in Android SDK. Am I right?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Feature Request: Virtual Contacts Content Provider

2008-08-27 Thread jtaylor

p.s. I guess if there's time at this late date.
If not, then maybe the next version of Android since it's such a big
thing.

- Juan T.



On Aug 27, 5:20 pm, jtaylor [EMAIL PROTECTED] wrote:
 Yes, that's the point, not to mix them. So two different contact
 providers separates the two different types of contacts.

 If the other type of contact provider (not for personal contacts)
 called the Virtual Contacts Content Provider isn't provided, then
 developers have to make their own content provider for the users
 virtual (social space contacts, etc.) contacts that are part of their
 app. So it's either each app builds their own virtual contacts
 Content Provider -or- there is a standard Content Provider for these
 virtual contacts. So that's what I'm saying.

 On Aug 27, 4:43 pm, hackbod [EMAIL PROTECTED] wrote:

  On Aug 27, 1:26 pm, jtaylor [EMAIL PROTECTED] wrote:

   Also to mention that there should be big differences. Such as that
   Virtual Contacts don't have a phone number.

  It sounds to me like you are talking about a different kind of content
  provider, not the normal contacts provider.

   You may press a button to
   put a virtual contact in your Personal Contacts though. Anyway, I
   think this is very important. This was an issue with the GTalkService
   problem I believe. But hopefully this will be in 1.0 because so many
   apps will use Virtual Contacts and not just Personal Contacts.

  No, there will be nothing like this in 1.0.  As you've see, one of the
  reasons why the GTalk data API was removed was because of the concern
  of mixing these two kinds of people.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Browser crash

2008-08-27 Thread Justin (Google Employee)

Please also use attach the output of 'adb bugreport' to the bug.

Cheers,
Justin
Android Team @ Google

On Aug 27, 3:08 pm, Megha Joshi [EMAIL PROTECTED] wrote:
 Yes, I was able to reproduce this issue... please log it in the issue
 tracker...

 2008/8/27 qvark [EMAIL PROTECTED]



  The browser crash when openingwww.sourceforge.net. Below is de logcat
  output. Should I create a new issue in the tracker?

  08-27 21:45:03.205: INFO/ActivityManager(51): Starting activity:
  Intent { action=android.intent.action.VIEW
  categories={android.intent.category.BROWSABLE} data=http://
  sourceforge.net/ comp={com.android.browser/
  com.android.browser.BrowserActivity} }
  08-27 21:45:03.227: DEBUG/WebCore(1288): *-* Start browser instrument
  08-27 21:45:05.375: DEBUG/browser(1288): updating cursor
  08-27 21:45:08.397: WARN/javascriptcore(1288): * JavaScript used
  1204 ms
  08-27 21:45:08.565: DEBUG/dalvikvm(1288): GC freed 4023 objects /
  464328 bytes in 102ms
  08-27 21:45:08.646: WARN/webkit(1288): res nativeFinished used 2015 ms
  08-27 21:45:11.425: WARN/javascriptcore(1288): * JavaScript used
  2271 ms
  08-27 21:45:11.485: WARN/webkit(1288): res nativeFinished used 2730 ms
  08-27 21:45:17.656: DEBUG/dalvikvm(1288): GC freed 3798 objects /
  480280 bytes in 117ms
  08-27 21:45:23.395: WARN/javascriptcore(1288): * JavaScript used
  3295 ms
  08-27 21:45:23.407: WARN/webkit(1288): res nativeFinished used 4538 ms
  08-27 21:45:25.785: INFO/DEBUG(21): *** *** *** *** *** *** *** ***
  *** *** *** *** *** *** *** ***
  08-27 21:45:25.795: INFO/DEBUG(21): Build fingerprint: 'generic/
  generic/generic/:1.0/0.9_r1/98467:sdk/test-keys'
  08-27 21:45:25.795: INFO/DEBUG(21): pid: 1288, tid: 1297  
  com.android.browser 
  08-27 21:45:25.805: INFO/DEBUG(21): signal 11 (SIGSEGV), fault addr
  4539f000
  08-27 21:45:25.823: INFO/DEBUG(21):  r0 0068225c  r1 005e7b80  r2
  44b9e7ec  r3 
  08-27 21:45:25.825: INFO/DEBUG(21):  r4 0068225c  r5 00682248  r6
  0001  r7 005e7b80
  08-27 21:45:25.825: INFO/DEBUG(21):  r8 44b9eda0  r9 4103cf34  10
  4103cf20  fp 0001
  08-27 21:45:25.825: INFO/DEBUG(21):  ip   sp 44b9e7b0  lr
  aa120d37  pc 4539f000  cpsr 0010
  08-27 21:45:25.916: INFO/DEBUG(21):  #00  pc 4539f000
  08-27 21:45:25.925: INFO/DEBUG(21):  #01  pc aa120d34  /system/
  lib/libwebcore.so
  08-27 21:45:25.945: INFO/DEBUG(21):  #02  pc aa120d9a  /system/
  lib/libwebcore.so
  08-27 21:45:25.955: INFO/DEBUG(21):  #03  pc aa0ac014  /system/
  lib/libwebcore.so
  08-27 21:45:25.977: INFO/DEBUG(21):  #04  pc aa0ac06c  /system/
  lib/libwebcore.so
  08-27 21:45:25.995: INFO/DEBUG(21):  #05  pc aa0ac26a  /system/
  lib/libwebcore.so
  08-27 21:45:26.016: INFO/DEBUG(21):  #06  pc aa0ae048  /system/
  lib/libwebcore.so
  08-27 21:45:26.027: INFO/DEBUG(21):  #07  pc aa1c461e  /system/
  lib/libwebcore.so
  08-27 21:45:26.045: INFO/DEBUG(21):  #08  pc aa20490a  /system/
  lib/libwebcore.so
  08-27 21:45:26.057: INFO/DEBUG(21):  #09  pc aa2243ae  /system/
  lib/libwebcore.so
  08-27 21:45:26.080: INFO/DEBUG(21):  #10  pc aa215840  /system/
  lib/libwebcore.so
  08-27 21:45:26.086: INFO/DEBUG(21):  #11  pc aa210d0c  /system/
  lib/libwebcore.so
  08-27 21:45:26.086: INFO/DEBUG(21):  #12  pc aa20f76a  /system/
  lib/libwebcore.so
  08-27 21:45:26.096: INFO/DEBUG(21):  #13  pc aa210cba  /system/
  lib/libwebcore.so
  08-27 21:45:26.115: INFO/DEBUG(21):  #14  pc aa21dda8  /system/
  lib/libwebcore.so
  08-27 21:45:26.125: INFO/DEBUG(21):  #15  pc aa204d7c  /system/
  lib/libwebcore.so
  08-27 21:45:26.135: INFO/DEBUG(21):  #16  pc aa2243ae  /system/
  lib/libwebcore.so
  08-27 21:45:26.165: INFO/DEBUG(21):  #17  pc aa215f64  /system/
  lib/libwebcore.so
  08-27 21:45:26.189: INFO/DEBUG(21):  #18  pc aa210d0c  /system/
  lib/libwebcore.so
  08-27 21:45:26.195: INFO/DEBUG(21):  #19  pc aa21dda8  /system/
  lib/libwebcore.so
  08-27 21:45:26.206: INFO/DEBUG(21):  #20  pc aa204d7c  /system/
  lib/libwebcore.so
  08-27 21:45:26.226: INFO/DEBUG(21):  #21  pc aa2243ae  /system/
  lib/libwebcore.so
  08-27 21:45:26.235: INFO/DEBUG(21):  #22  pc aa0246f8  /system/
  lib/libwebcore.so
  08-27 21:45:26.246: INFO/DEBUG(21):  #23  pc aa05d19c  /system/
  lib/libwebcore.so
  08-27 21:45:26.263: INFO/DEBUG(21):  #24  pc aa069f78  /system/
  lib/libwebcore.so
  08-27 21:45:26.267: INFO/DEBUG(21):  #25  pc aa063882  /system/
  lib/libwebcore.so
  08-27 21:45:26.267: INFO/DEBUG(21):  #26  pc aa0e00d2  /system/
  lib/libwebcore.so
  08-27 21:45:26.267: INFO/DEBUG(21):  #27  pc aa0e7acc  /system/
  lib/libwebcore.so
  08-27 21:45:26.301: INFO/DEBUG(21):  #28  pc aa0e7baa  /system/
  lib/libwebcore.so
  08-27 21:45:26.305: INFO/DEBUG(21):  #29  pc aa0dc68c  /system/
  

[android-developers] Re: issues with setPhotoData() and loadContactPhoto()

2008-08-27 Thread kingkung

I added one simple line to the demo and it crashed with a null pointer
exception.  Apparently I can't recreate a second Uri from an original
Uri.

  private void readContact(Uri uri) {
ImageView i = (ImageView) findViewById(R.id.image);
Uri uri2 = Uri.parse(uri.getEncodedPath());
Bitmap b = People.loadContactPhoto(this, uri2, 0, null);
i.setImageBitmap(b);
  }

This is a terrible scenario, because people don't necessarily store
and retrieve within the same operations, and I have no idea how to
store a Uri except storing its path as a String.

How do I get around this??

On Aug 27, 3:04 pm, Megha Joshi [EMAIL PROTECTED] wrote:
 Please refer to the attached sample code for setting a contact's image and
 loading it..
 I didn't get null pointer exception so perhaps there is something else going
 on with your code...

 2008/8/27 kingkung [EMAIL PROTECTED]



  I'm having trouble getting the new contact photo methods for 0.9 beta
  to work correctly.

  This is what I do currently:

         private static boolean storePhoto(Context context, AndroidContact
  ac,Uri personUri)
         {
                 byte[] bytes =
  ExternalServices.retrieveBytesFromURL(ac.photoUrl);
                 People.setPhotoData(context.getContentResolver(), personUri,
  bytes);
                 return true;
         }

  where the path of the personUri is something like /people/57

  To retrieve, I use the same personUri, and do:

       public void loadPhoto(Uri personUri) throws Exception
       {
                 Bitmap b = null;
                 b=People.loadContactPhoto(f_context, personUri,
  R.drawable.no_photo_found,null);
                 if (b!=null)
                         photoView.setImageBitmap(b);
                 else

   photoView.setImageResource(R.drawable.no_photo_found);
      }

  Store seems to work correctly as far as I can tell, but retrieve
  throws a NullPointerException on the line

  b=People.loadContactPhoto(f_context, personUri,
  R.drawable.no_photo_found,null);

  which is amazing, because none of the parameters (outside of the last
  one) are null.

  What is going on?



  ContactsDemo.zip
 51KViewDownload
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: HttpPost - setting parameters but the web page is not receiving them?

2008-08-27 Thread Justin (Google Employee)

params aren't what you think they are, take a look at
http://code.google.com/android/reference/org/apache/http/params/HttpParams.html
.

You're looking for 
http://code.google.com/android/reference/org/apache/http/HttpEntity.html
.

Cheers,
Justin
Android Team @ Google

On Aug 27, 10:03 am, Zack [EMAIL PROTECTED] wrote:
 Thanks for helping.

 in m5 :
 client = new HttpClient();
 pmethod = new PostMethod(posturl);
 pmethod.addParameter(PacketNum, mStringPacketNumber);
 ...other parameters set here...
 int statusCode = client.executeMethod( pmethod );

 in 0.9:
  HttpClient HClient = new DefaultHttpClient();
  HttpParams HParams = new BasicHttpParams();
  HClient.getConnectionManager();

  HttpPost postRequest = new HttpPost(posturl);
  HParams.setParameter(PacketNum,
 mStringPacketNumber);
  ... other parameters set here...
  postRequest.setParams(HParams);
  HClient.execute(postRequest);

 The Post request is received by the web server in both cases but in
 the 0.9 version none of the parameters are received.  What is the
 right way to set the parameters for 0.9 SDK.

 Thanks again.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: issues with setPhotoData() and loadContactPhoto()

2008-08-27 Thread Megha Joshi
You definitely don't need to store the URI, what are the first and second
URI values that you get?

2008/8/27 kingkung [EMAIL PROTECTED]


 I added one simple line to the demo and it crashed with a null pointer
 exception.  Apparently I can't recreate a second Uri from an original
 Uri.

  private void readContact(Uri uri) {
ImageView i = (ImageView) findViewById(R.id.image);
Uri uri2 = Uri.parse(uri.getEncodedPath());
Bitmap b = People.loadContactPhoto(this, uri2, 0, null);
i.setImageBitmap(b);
  }

 This is a terrible scenario, because people don't necessarily store
 and retrieve within the same operations, and I have no idea how to
 store a Uri except storing its path as a String.

 How do I get around this??

 On Aug 27, 3:04 pm, Megha Joshi [EMAIL PROTECTED] wrote:
  Please refer to the attached sample code for setting a contact's image
 and
  loading it..
  I didn't get null pointer exception so perhaps there is something else
 going
  on with your code...
 
  2008/8/27 kingkung [EMAIL PROTECTED]
 
 
 
   I'm having trouble getting the new contact photo methods for 0.9 beta
   to work correctly.
 
   This is what I do currently:
 
  private static boolean storePhoto(Context context,
 AndroidContact
   ac,Uri personUri)
  {
  byte[] bytes =
   ExternalServices.retrieveBytesFromURL(ac.photoUrl);
  People.setPhotoData(context.getContentResolver(),
 personUri,
   bytes);
  return true;
  }
 
   where the path of the personUri is something like /people/57
 
   To retrieve, I use the same personUri, and do:
 
public void loadPhoto(Uri personUri) throws Exception
{
  Bitmap b = null;
  b=People.loadContactPhoto(f_context, personUri,
   R.drawable.no_photo_found,null);
  if (b!=null)
  photoView.setImageBitmap(b);
  else
 
photoView.setImageResource(R.drawable.no_photo_found);
   }
 
   Store seems to work correctly as far as I can tell, but retrieve
   throws a NullPointerException on the line
 
   b=People.loadContactPhoto(f_context, personUri,
   R.drawable.no_photo_found,null);
 
   which is amazing, because none of the parameters (outside of the last
   one) are null.
 
   What is going on?
 
 
 
   ContactsDemo.zip
  51KViewDownload
 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: issues with setPhotoData() and loadContactPhoto()

2008-08-27 Thread kingkung

If you try that code in your demo (and print out the Uri for
debugging), it will crash with a null pointer exception.

I also tried using Uri.Builder to rebuild the contact Uri, and that
didn't work either.

On Aug 27, 4:31 pm, kingkung [EMAIL PROTECTED] wrote:
 /people/189 is the uri i get.

 On Aug 27, 4:24 pm, Megha Joshi [EMAIL PROTECTED] wrote:

  You definitely don't need to store the URI, what are the first and second
  URI values that you get?

  2008/8/27 kingkung [EMAIL PROTECTED]

   I added one simple line to the demo and it crashed with a null pointer
   exception.  Apparently I can't recreate a second Uri from an original
   Uri.

    private void readContact(Uri uri) {
      ImageView i = (ImageView) findViewById(R.id.image);
      Uri uri2 = Uri.parse(uri.getEncodedPath());
      Bitmap b = People.loadContactPhoto(this, uri2, 0, null);
      i.setImageBitmap(b);
    }

   This is a terrible scenario, because people don't necessarily store
   and retrieve within the same operations, and I have no idea how to
   store a Uri except storing its path as a String.

   How do I get around this??

   On Aug 27, 3:04 pm, Megha Joshi [EMAIL PROTECTED] wrote:
Please refer to the attached sample code for setting a contact's image
   and
loading it..
I didn't get null pointer exception so perhaps there is something else
   going
on with your code...

2008/8/27 kingkung [EMAIL PROTECTED]

 I'm having trouble getting the new contact photo methods for 0.9 beta
 to work correctly.

 This is what I do currently:

        private static boolean storePhoto(Context context,
   AndroidContact
 ac,Uri personUri)
        {
                byte[] bytes =
 ExternalServices.retrieveBytesFromURL(ac.photoUrl);
                People.setPhotoData(context.getContentResolver(),
   personUri,
 bytes);
                return true;
        }

 where the path of the personUri is something like /people/57

 To retrieve, I use the same personUri, and do:

      public void loadPhoto(Uri personUri) throws Exception
      {
                Bitmap b = null;
                b=People.loadContactPhoto(f_context, personUri,
 R.drawable.no_photo_found,null);
                if (b!=null)
                        photoView.setImageBitmap(b);
                else

  photoView.setImageResource(R.drawable.no_photo_found);
     }

 Store seems to work correctly as far as I can tell, but retrieve
 throws a NullPointerException on the line

 b=People.loadContactPhoto(f_context, personUri,
 R.drawable.no_photo_found,null);

 which is amazing, because none of the parameters (outside of the last
 one) are null.

 What is going on?

 ContactsDemo.zip
51KViewDownload


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: issues with setPhotoData() and loadContactPhoto()

2008-08-27 Thread Megha Joshi
Yes it would crash, because then the Uri value you get does not include the
base contacts uri...which is content://contacts.

The uri value should be something like:
content://contacts/people/person_id
As long as the Uri value is in this format and the person_id is present in
the content provider it should work...
You can use ContentUris.withAppendedId(People.CONTENT_URI, person_id) to
generate the correct Uri ..


2008/8/27 kingkung [EMAIL PROTECTED]


 If you try that code in your demo (and print out the Uri for
 debugging), it will crash with a null pointer exception.

 I also tried using Uri.Builder to rebuild the contact Uri, and that
 didn't work either.

 On Aug 27, 4:31 pm, kingkung [EMAIL PROTECTED] wrote:
  /people/189 is the uri i get.
 
  On Aug 27, 4:24 pm, Megha Joshi [EMAIL PROTECTED] wrote:
 
   You definitely don't need to store the URI, what are the first and
 second
   URI values that you get?
 
   2008/8/27 kingkung [EMAIL PROTECTED]
 
I added one simple line to the demo and it crashed with a null
 pointer
exception.  Apparently I can't recreate a second Uri from an original
Uri.
 
 private void readContact(Uri uri) {
   ImageView i = (ImageView) findViewById(R.id.image);
   Uri uri2 = Uri.parse(uri.getEncodedPath());
   Bitmap b = People.loadContactPhoto(this, uri2, 0, null);
   i.setImageBitmap(b);
 }
 
This is a terrible scenario, because people don't necessarily store
and retrieve within the same operations, and I have no idea how to
store a Uri except storing its path as a String.
 
How do I get around this??
 
On Aug 27, 3:04 pm, Megha Joshi [EMAIL PROTECTED] wrote:
 Please refer to the attached sample code for setting a contact's
 image
and
 loading it..
 I didn't get null pointer exception so perhaps there is something
 else
going
 on with your code...
 
 2008/8/27 kingkung [EMAIL PROTECTED]
 
  I'm having trouble getting the new contact photo methods for 0.9
 beta
  to work correctly.
 
  This is what I do currently:
 
 private static boolean storePhoto(Context context,
AndroidContact
  ac,Uri personUri)
 {
 byte[] bytes =
  ExternalServices.retrieveBytesFromURL(ac.photoUrl);
 People.setPhotoData(context.getContentResolver(),
personUri,
  bytes);
 return true;
 }
 
  where the path of the personUri is something like /people/57
 
  To retrieve, I use the same personUri, and do:
 
   public void loadPhoto(Uri personUri) throws Exception
   {
 Bitmap b = null;
 b=People.loadContactPhoto(f_context, personUri,
  R.drawable.no_photo_found,null);
 if (b!=null)
 photoView.setImageBitmap(b);
 else
 
   photoView.setImageResource(R.drawable.no_photo_found);
  }
 
  Store seems to work correctly as far as I can tell, but retrieve
  throws a NullPointerException on the line
 
  b=People.loadContactPhoto(f_context, personUri,
  R.drawable.no_photo_found,null);
 
  which is amazing, because none of the parameters (outside of the
 last
  one) are null.
 
  What is going on?
 
  ContactsDemo.zip
 51KViewDownload
 
 
 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Could not fine HelloAndroid.apk when lauching the HelloAndroid example

2008-08-27 Thread Gil

Xavier,

I'm using the English version of Windows XP (I never switched to any
another locale) and I'm in the Pacific timezone and yet I had this
problem this morning.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: issues with setPhotoData() and loadContactPhoto()

2008-08-27 Thread kingkung

Got it, thanks.  I just did Uri.parse() on that a string containing
content://

It would certainly be nice if we didn't have to manually type that
entire URI address in... some way we could access the ENTIRE Uri for
People, Phones, etc.  Even referencing People.CONTENT_URI.getPath()
fails to show the content://contacts portion of the Uri.

On Aug 27, 4:42 pm, Megha Joshi [EMAIL PROTECTED] wrote:
 Yes it would crash, because then the Uri value you get does not include the
 base contacts uri...which is content://contacts.

 The uri value should be something like:
 content://contacts/people/person_id
 As long as the Uri value is in this format and the person_id is present in
 the content provider it should work...
 You can use ContentUris.withAppendedId(People.CONTENT_URI, person_id) to
 generate the correct Uri ..

 2008/8/27 kingkung [EMAIL PROTECTED]



  If you try that code in your demo (and print out the Uri for
  debugging), it will crash with a null pointer exception.

  I also tried using Uri.Builder to rebuild the contact Uri, and that
  didn't work either.

  On Aug 27, 4:31 pm, kingkung [EMAIL PROTECTED] wrote:
   /people/189 is the uri i get.

   On Aug 27, 4:24 pm, Megha Joshi [EMAIL PROTECTED] wrote:

You definitely don't need to store the URI, what are the first and
  second
URI values that you get?

2008/8/27 kingkung [EMAIL PROTECTED]

 I added one simple line to the demo and it crashed with a null
  pointer
 exception.  Apparently I can't recreate a second Uri from an original
 Uri.

  private void readContact(Uri uri) {
    ImageView i = (ImageView) findViewById(R.id.image);
    Uri uri2 = Uri.parse(uri.getEncodedPath());
    Bitmap b = People.loadContactPhoto(this, uri2, 0, null);
    i.setImageBitmap(b);
  }

 This is a terrible scenario, because people don't necessarily store
 and retrieve within the same operations, and I have no idea how to
 store a Uri except storing its path as a String.

 How do I get around this??

 On Aug 27, 3:04 pm, Megha Joshi [EMAIL PROTECTED] wrote:
  Please refer to the attached sample code for setting a contact's
  image
 and
  loading it..
  I didn't get null pointer exception so perhaps there is something
  else
 going
  on with your code...

  2008/8/27 kingkung [EMAIL PROTECTED]

   I'm having trouble getting the new contact photo methods for 0.9
  beta
   to work correctly.

   This is what I do currently:

          private static boolean storePhoto(Context context,
 AndroidContact
   ac,Uri personUri)
          {
                  byte[] bytes =
   ExternalServices.retrieveBytesFromURL(ac.photoUrl);
                  People.setPhotoData(context.getContentResolver(),
 personUri,
   bytes);
                  return true;
          }

   where the path of the personUri is something like /people/57

   To retrieve, I use the same personUri, and do:

        public void loadPhoto(Uri personUri) throws Exception
        {
                  Bitmap b = null;
                  b=People.loadContactPhoto(f_context, personUri,
   R.drawable.no_photo_found,null);
                  if (b!=null)
                          photoView.setImageBitmap(b);
                  else

    photoView.setImageResource(R.drawable.no_photo_found);
       }

   Store seems to work correctly as far as I can tell, but retrieve
   throws a NullPointerException on the line

   b=People.loadContactPhoto(f_context, personUri,
   R.drawable.no_photo_found,null);

   which is amazing, because none of the parameters (outside of the
  last
   one) are null.

   What is going on?

   ContactsDemo.zip
  51KViewDownload


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: issues with setPhotoData() and loadContactPhoto()

2008-08-27 Thread Megha Joshi
You don't need to manually type the uris.. as I said before you can use
ContentUris.withAppendedId(People.CONTENT_URI, person_id)

More in the docs/examples here:
http://code.google.com/android/devel/data/contentproviders.html

Most of the times you could get the base URIs and use withApendedPath() or
withAppenededID()...to generate the full Uri..

2008/8/27 kingkung [EMAIL PROTECTED]


 Got it, thanks.  I just did Uri.parse() on that a string containing
 content://

 It would certainly be nice if we didn't have to manually type that
 entire URI address in... some way we could access the ENTIRE Uri for
 People, Phones, etc.  Even referencing People.CONTENT_URI.getPath()
 fails to show the content://contacts portion of the Uri.

 On Aug 27, 4:42 pm, Megha Joshi [EMAIL PROTECTED] wrote:
  Yes it would crash, because then the Uri value you get does not include
 the
  base contacts uri...which is content://contacts.
 
  The uri value should be something like:
  content://contacts/people/person_id
  As long as the Uri value is in this format and the person_id is present
 in
  the content provider it should work...
  You can use ContentUris.withAppendedId(People.CONTENT_URI, person_id)
 to
  generate the correct Uri ..
 
  2008/8/27 kingkung [EMAIL PROTECTED]
 
 
 
   If you try that code in your demo (and print out the Uri for
   debugging), it will crash with a null pointer exception.
 
   I also tried using Uri.Builder to rebuild the contact Uri, and that
   didn't work either.
 
   On Aug 27, 4:31 pm, kingkung [EMAIL PROTECTED] wrote:
/people/189 is the uri i get.
 
On Aug 27, 4:24 pm, Megha Joshi [EMAIL PROTECTED] wrote:
 
 You definitely don't need to store the URI, what are the first and
   second
 URI values that you get?
 
 2008/8/27 kingkung [EMAIL PROTECTED]
 
  I added one simple line to the demo and it crashed with a null
   pointer
  exception.  Apparently I can't recreate a second Uri from an
 original
  Uri.
 
   private void readContact(Uri uri) {
 ImageView i = (ImageView) findViewById(R.id.image);
 Uri uri2 = Uri.parse(uri.getEncodedPath());
 Bitmap b = People.loadContactPhoto(this, uri2, 0, null);
 i.setImageBitmap(b);
   }
 
  This is a terrible scenario, because people don't necessarily
 store
  and retrieve within the same operations, and I have no idea how
 to
  store a Uri except storing its path as a String.
 
  How do I get around this??
 
  On Aug 27, 3:04 pm, Megha Joshi [EMAIL PROTECTED] wrote:
   Please refer to the attached sample code for setting a
 contact's
   image
  and
   loading it..
   I didn't get null pointer exception so perhaps there is
 something
   else
  going
   on with your code...
 
   2008/8/27 kingkung [EMAIL PROTECTED]
 
I'm having trouble getting the new contact photo methods for
 0.9
   beta
to work correctly.
 
This is what I do currently:
 
   private static boolean storePhoto(Context context,
  AndroidContact
ac,Uri personUri)
   {
   byte[] bytes =
ExternalServices.retrieveBytesFromURL(ac.photoUrl);
   
  People.setPhotoData(context.getContentResolver(),
  personUri,
bytes);
   return true;
   }
 
where the path of the personUri is something like
 /people/57
 
To retrieve, I use the same personUri, and do:
 
 public void loadPhoto(Uri personUri) throws Exception
 {
   Bitmap b = null;
   b=People.loadContactPhoto(f_context,
 personUri,
R.drawable.no_photo_found,null);
   if (b!=null)
   photoView.setImageBitmap(b);
   else
 
 photoView.setImageResource(R.drawable.no_photo_found);
}
 
Store seems to work correctly as far as I can tell, but
 retrieve
throws a NullPointerException on the line
 
b=People.loadContactPhoto(f_context, personUri,
R.drawable.no_photo_found,null);
 
which is amazing, because none of the parameters (outside of
 the
   last
one) are null.
 
What is going on?
 
ContactsDemo.zip
   51KViewDownload
 
 
 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: issues with setPhotoData() and loadContactPhoto()

2008-08-27 Thread kingkung

Cool, gotcha, thanks.

On Aug 27, 5:12 pm, Megha Joshi [EMAIL PROTECTED] wrote:
 You don't need to manually type the uris.. as I said before you can use
 ContentUris.withAppendedId(People.CONTENT_URI, person_id)

 More in the docs/examples 
 here:http://code.google.com/android/devel/data/contentproviders.html

 Most of the times you could get the base URIs and use withApendedPath() or
 withAppenededID()...to generate the full Uri..

 2008/8/27 kingkung [EMAIL PROTECTED]



  Got it, thanks.  I just did Uri.parse() on that a string containing
  content://

  It would certainly be nice if we didn't have to manually type that
  entire URI address in... some way we could access the ENTIRE Uri for
  People, Phones, etc.  Even referencing People.CONTENT_URI.getPath()
  fails to show the content://contacts portion of the Uri.

  On Aug 27, 4:42 pm, Megha Joshi [EMAIL PROTECTED] wrote:
   Yes it would crash, because then the Uri value you get does not include
  the
   base contacts uri...which is content://contacts.

   The uri value should be something like:
   content://contacts/people/person_id
   As long as the Uri value is in this format and the person_id is present
  in
   the content provider it should work...
   You can use ContentUris.withAppendedId(People.CONTENT_URI, person_id)
  to
   generate the correct Uri ..

   2008/8/27 kingkung [EMAIL PROTECTED]

If you try that code in your demo (and print out the Uri for
debugging), it will crash with a null pointer exception.

I also tried using Uri.Builder to rebuild the contact Uri, and that
didn't work either.

On Aug 27, 4:31 pm, kingkung [EMAIL PROTECTED] wrote:
 /people/189 is the uri i get.

 On Aug 27, 4:24 pm, Megha Joshi [EMAIL PROTECTED] wrote:

  You definitely don't need to store the URI, what are the first and
second
  URI values that you get?

  2008/8/27 kingkung [EMAIL PROTECTED]

   I added one simple line to the demo and it crashed with a null
pointer
   exception.  Apparently I can't recreate a second Uri from an
  original
   Uri.

    private void readContact(Uri uri) {
      ImageView i = (ImageView) findViewById(R.id.image);
      Uri uri2 = Uri.parse(uri.getEncodedPath());
      Bitmap b = People.loadContactPhoto(this, uri2, 0, null);
      i.setImageBitmap(b);
    }

   This is a terrible scenario, because people don't necessarily
  store
   and retrieve within the same operations, and I have no idea how
  to
   store a Uri except storing its path as a String.

   How do I get around this??

   On Aug 27, 3:04 pm, Megha Joshi [EMAIL PROTECTED] wrote:
Please refer to the attached sample code for setting a
  contact's
image
   and
loading it..
I didn't get null pointer exception so perhaps there is
  something
else
   going
on with your code...

2008/8/27 kingkung [EMAIL PROTECTED]

 I'm having trouble getting the new contact photo methods for
  0.9
beta
 to work correctly.

 This is what I do currently:

        private static boolean storePhoto(Context context,
   AndroidContact
 ac,Uri personUri)
        {
                byte[] bytes =
 ExternalServices.retrieveBytesFromURL(ac.photoUrl);

   People.setPhotoData(context.getContentResolver(),
   personUri,
 bytes);
                return true;
        }

 where the path of the personUri is something like
  /people/57

 To retrieve, I use the same personUri, and do:

      public void loadPhoto(Uri personUri) throws Exception
      {
                Bitmap b = null;
                b=People.loadContactPhoto(f_context,
  personUri,
 R.drawable.no_photo_found,null);
                if (b!=null)
                        photoView.setImageBitmap(b);
                else

  photoView.setImageResource(R.drawable.no_photo_found);
     }

 Store seems to work correctly as far as I can tell, but
  retrieve
 throws a NullPointerException on the line

 b=People.loadContactPhoto(f_context, personUri,
 R.drawable.no_photo_found,null);

 which is amazing, because none of the parameters (outside of
  the
last
 one) are null.

 What is going on?

 ContactsDemo.zip
51KViewDownload


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at

[android-developers] problem with verifier

2008-08-27 Thread chouman82

Anyone know the bases on what the verifier allows and now?  I am
having problem with verifyError on certain classes.  Anyone else have
faced this issue?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: HttpPost - setting parameters but the web page is not receiving them?

2008-08-27 Thread Zack

Thanks Justin,

so is it correct that I need to set the HttpPost entity?

HttpPost postRequest = new HttpPost(posturl);
InputStream postEntityInStream;
HttpEntity postEntity = postRequest.getEntity();
postEntityInStream = postEntity.getContent();
postEntityInStream.what goes here;---do I put my data here? if
so how?
postEntity.setContent(postEntityInStream);
postRequest.setEntity(postEntity);

I'm definitely missing  something here.  Seems like a catch 22 to me.
Can't setEntity w/o setContent w/o magically putting my data in the
InputStream which comes from the postEntity which comes from the
postRequest... I can't see how to put my sting variables in anywhere.

Thanks again.

On Aug 27, 4:15 pm, Justin (Google Employee) [EMAIL PROTECTED]
wrote:
 params aren't what you think they are, take a look 
 athttp://code.google.com/android/reference/org/apache/http/params/HttpP...
 .

 You're looking 
 forhttp://code.google.com/android/reference/org/apache/http/HttpEntity.html
 .

 Cheers,
 Justin
 Android Team @ Google

 On Aug 27, 10:03 am, Zack [EMAIL PROTECTED] wrote:

  Thanks for helping.

  in m5 :
  client = new HttpClient();
  pmethod = new PostMethod(posturl);
  pmethod.addParameter(PacketNum, mStringPacketNumber);
  ...other parameters set here...
  int statusCode = client.executeMethod( pmethod );

  in 0.9:
   HttpClient HClient = new DefaultHttpClient();
   HttpParams HParams = new BasicHttpParams();
   HClient.getConnectionManager();

   HttpPost postRequest = new HttpPost(posturl);
   HParams.setParameter(PacketNum,
  mStringPacketNumber);
   ... other parameters set here...
   postRequest.setParams(HParams);
   HClient.execute(postRequest);

  The Post request is received by the web server in both cases but in
  the 0.9 version none of the parameters are received.  What is the
  right way to set the parameters for 0.9 SDK.

  Thanks again.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: HttpPost - setting parameters but the web page is not receiving them?

2008-08-27 Thread Mark Murphy

Zack wrote:
 I'm definitely missing  something here.  Seems like a catch 22 to me.
 Can't setEntity w/o setContent w/o magically putting my data in the
 InputStream which comes from the postEntity which comes from the
 postRequest... I can't see how to put my sting variables in anywhere.

Forgive me, I'm tuning in a little late to this thread...

Have you tried the official docs over at http://hc.apache.org ?

There's a series of examples at:

http://hc.apache.org/httpcomponents-client/examples.html

In particular, this example:

http://tinyurl.com/2d23et

shows:

List NameValuePair nvps = new ArrayList NameValuePair();

nvps.add(new BasicNameValuePair(IDToken1, username));
nvps.add(new BasicNameValuePair(IDToken2, password));

httpost.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));

(where httpost is an HttpPost object)

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Warescription: All titles, revisions,  ebook formats, just $35/year

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: pop up menu

2008-08-27 Thread Andrew

Thanks for your help.

I tried according to your comments. Yes the context menu is what I
want. But there is another question. I can't get the item selected
event using the overrided function onContextItemSelected(MenuItem
item). This function will never be called.

On Aug 26, 8:11 pm, Mark Murphy [EMAIL PROTECTED] wrote:
 Andrew wrote:
  How to implement a pop up menu? Example for pressing and holding the
  listview.

 You are looking for context menus. To implement context menus in the 0.9
 SDK, you need to:

 1. Call Activity#registerForContextMenu(View) somewhere (e.g., in
 onCreate()) to indicate which widget(s) get a context menu

 2. Implement onCreateContextMenu() in your activity to supply the menu
 when the user long-taps on your widget

 The following tutorials ship with the SDK (in samples/) that demonstrate
 this:

 ./ApiDemos/src/com/android/samples/view/Gallery1.java
 ./ApiDemos/src/com/android/samples/view/ExpandableList1.java

 If that didn't help, write back with more details!

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.1 Published!
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Resetting Preferences?

2008-08-27 Thread Mark Hansen

Can someone give me some direction on how to restore the emulators
preferences back to default?  I'm afraid to just start deleting files
at random :)
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: onContextItemSelected does not work

2008-08-27 Thread Andrew

public void onCreateContextMenu(ContextMenu menu, View view,
ContextMenuInfo menuInfo)
{
Log.d(, create pop up menu);

Above log can be printed. And below log can not.
-

public boolean onContextItemSelected(MenuItem item)
{
Log.d(, select the pop up menu);




On Aug 28, 11:28 am, Andrew [EMAIL PROTECTED] wrote:
 My program has a contextmenu. It can pop up when I press and hold the
 list view.

 But below function can't be called when I select one menu item.

 public boolean onContextItemSelected(MenuItem item)

 Please give some 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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: pop up menu

2008-08-27 Thread Andrew

public void onCreateContextMenu(ContextMenu menu, View view,
ContextMenuInfo menuInfo)
{
Log.d(, create pop up menu);

Above log can be printed. And below log can not.
-

public boolean onContextItemSelected(MenuItem item)
{
Log.d(, select the pop up menu);





On Aug 28, 11:44 am, Andrew [EMAIL PROTECTED] wrote:
 Thanks for your help.

 I tried according to your comments. Yes the context menu is what I
 want. But there is another question. I can't get the item selected
 event using the overrided function onContextItemSelected(MenuItem
 item). This function will never be called.

 On Aug 26, 8:11 pm, Mark Murphy [EMAIL PROTECTED] wrote:

  Andrew wrote:
   How to implement a pop up menu? Example for pressing and holding the
   listview.

  You are looking for context menus. To implement context menus in the 0.9
  SDK, you need to:

  1. Call Activity#registerForContextMenu(View) somewhere (e.g., in
  onCreate()) to indicate which widget(s) get a context menu

  2. Implement onCreateContextMenu() in your activity to supply the menu
  when the user long-taps on your widget

  The following tutorials ship with the SDK (in samples/) that demonstrate
  this:

  ./ApiDemos/src/com/android/samples/view/Gallery1.java
  ./ApiDemos/src/com/android/samples/view/ExpandableList1.java

  If that didn't help, write back with more details!

  --
  Mark Murphy (a Commons Guy)http://commonsware.com
  _The Busy Coder's Guide to Android Development_ Version 1.1 Published!
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: MediaRecord Audio - working example? / raw data stream onPictureTaken()? / Bug in Pictures application?

2008-08-27 Thread Reto Meier

Hi Justin,
  I've tried explicitly including the display name (and artist and
album) into the new ContentValue but still end up with exactly the
same error on the ContentResolver.insert call.

On Aug 27, 10:56 pm, Justin (Google Employee) [EMAIL PROTECTED]
wrote:
  Error:

  08-24 19:27:18.675: ERROR/Database(178): Error inserting title=Content
  Creation No.5 date_added=1219598838 _display_name= album_id=2
  title_key=  -  E  C  O  1  C  O     -
  K  1  )  O  9  E  C     C  E  „   artist_id=3 using INSERT INTO
  audio_meta(title, date_added, _display_name, album_id, title_key,
  artist_id) VALUES(?, ?, ?, ?, ?, ?);

 From the error it jumps out at me that you're not setting
 MediaStore.Audio.Media.DISPLAY_NAME, which seems like its required.
 Also, are you setting the ALBUM_ID and ARTIST_ID somehow or are they
 encoded in the URI you're using?

 Cheers,
 Justin
 Android Team @ Google

 On Aug 24, 3:20 pm, code_android_festival_way

 [EMAIL PROTECTED] wrote:
  I've got two questions.

  1)
  Is there a working example for recording audio with the MediaRecorder?
  At the moment I'm using the following setup but it doesnt work:

 http://paste.pocoo.org/show/83242/

  Error:

  08-24 19:27:18.675: ERROR/Database(178): Error inserting title=Content
  Creation No.5 date_added=1219598838 _display_name= album_id=2
  title_key=  -  E  C  O  1  C  O     -
  K  1  )  O  9  E  C     C  E  „   artist_id=3 using INSERT INTO
  audio_meta(title, date_added, _display_name, album_id, title_key,
  artist_id) VALUES(?, ?, ?, ?, ?, ?);

  I've tried the example provided in the docs (Media API) but that
  doesn't work at all. It would be nice if someone could provide a
  working example.

  2)
  Is it normal that the raw data stream returned by onPictureTaken(...)
  is null?

  3)

  I'm taking pictures as above mentioned. After that I'm saving the
  available jpeg stream into the image ContentProvider which works fine.
  Now I'm leaving my app and try to start the Pictures application
  from the home screen. And now I get the following error message:

 http://img.skitch.com/20080824-mrbc7yuhfh7an5ynndj9hm6twp.jpg

  Here is the error from the logs:

  08-25 00:15:34.007: ERROR/AndroidRuntime(220):
  java.lang.RuntimeException: Unable to resume activity
  {com.android.camera/com.android.camera.GalleryPicker}:
  java.lang.NullPointerException

  I can savely say that I'm calling camera.stopPreview() and
  camera.release() so there shouldn't be a problem with the camera. What
  else could be wrong?

  Here is the part where I'm saving my jpeg byte[] into the
  ContentProvider:

 http://paste.pocoo.org/show/83246/

  Regards!


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] run time exceptional error

2008-08-27 Thread patelpower

Hello Everyone,

  i am new to android and i am trying to extract the metadata of the
mp3 file i have writtten piece of the code as per the follows but its
giving the tuntime error in the setDataSource so can anyone let me
know what could be the problem.


the code is follow:

nMetaDataDetails = new MediaMetadataRetriever();

path = D:\\Songs\\a13033b03.mp3;

nMetaDataDetails.setMode(MODE_GET_METADATA_ONLY);

nMetaDataDetails.setDataSource(D:\\Songs\\nagada.mp3);

nMetaDataDetails.extractMetadata(MODE_GET_METADATA_ONLY);

please let me know..
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: pop up menu

2008-08-27 Thread Andrew

Yes, I got the reason that I override below function.

onMenuItemSelected(int featureId, MenuItem item)
Default implementation of onMenuItemSelected(int, MenuItem) for
activities.



On Aug 28, 12:56 pm, Andrew [EMAIL PROTECTED] wrote:
     public void onCreateContextMenu(ContextMenu menu, View view,
             ContextMenuInfo menuInfo)
     {
         Log.d(, create pop up menu);

 Above log can be printed. And below log can not.
 -

     public boolean onContextItemSelected(MenuItem item)
     {
         Log.d(, select the pop up menu);

 On Aug 28, 11:44 am, Andrew [EMAIL PROTECTED] wrote:

  Thanks for your help.

  I tried according to your comments. Yes the context menu is what I
  want. But there is another question. I can't get the item selected
  event using the overrided function onContextItemSelected(MenuItem
  item). This function will never be called.

  On Aug 26, 8:11 pm, Mark Murphy [EMAIL PROTECTED] wrote:

   Andrew wrote:
How to implement a pop up menu? Example for pressing and holding the
listview.

   You are looking for context menus. To implement context menus in the 0.9
   SDK, you need to:

   1. Call Activity#registerForContextMenu(View) somewhere (e.g., in
   onCreate()) to indicate which widget(s) get a context menu

   2. Implement onCreateContextMenu() in your activity to supply the menu
   when the user long-taps on your widget

   The following tutorials ship with the SDK (in samples/) that demonstrate
   this:

   ./ApiDemos/src/com/android/samples/view/Gallery1.java
   ./ApiDemos/src/com/android/samples/view/ExpandableList1.java

   If that didn't help, write back with more details!

   --
   Mark Murphy (a Commons Guy)http://commonsware.com
   _The Busy Coder's Guide to Android Development_ Version 1.1 Published!
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: problem Porting to 0.9 sdk, anyone please guide me... thanks...

2008-08-27 Thread Wesley
hi all,

any idea what class has been replace by this class??

 android.app.ActivityPendingResult;


Wesley.

On Thu, Aug 28, 2008 at 9:50 AM, Wesley [EMAIL PROTECTED] wrote:

 hi all,

 Thanks for the reply...

 I will try it out... Hopefully, I don't have to go for the worst worst
 case(I mean re-do all the thing)...
 pray for wesley... man... :P...


 Thanks to all... I will buzz up again if I have problem...

 Thanks for your times...

 have a nice day...



 Wesley.




 On Wed, Aug 27, 2008 at 8:18 PM, Mark Murphy [EMAIL PROTECTED]wrote:


 Wesley Sagittarius wrote:

  Problem 1
  
  those class already remove??? which class I can use on this case???
  android.view.ViewInflate;

 This is now LayoutInflater, as documented here:

 http://code.google.com/android/migrating/m5-0.9/changes-overview.html

  android.view.Menu.Item;

 This is now the MenuItem interface. I think the implementation is
 Menu.MenuItem, but you should only need to reference the interface.

  I wanna to download image using HTTPConnection it say
  java.net.SocketException: unknown error means???

 As the other responder noted, try adding the INTERNET permission

 uses-permission android:name=android.permission.INTERNET /

 I would have added the first two items above to the M5-0.9 FAQ:


 http://groups.google.com/group/android-developers/web/m5-to-0-9-porting-and-migration-tips

 except that I can't seem to edit that page anymore... :-(

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.1 Published!

 



--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: problem Porting to 0.9 sdk, anyone please guide me... thanks...

2008-08-27 Thread Ralf

android.app.PendingIntent maybe?

R/

On Wed, Aug 27, 2008 at 10:39 PM, Wesley [EMAIL PROTECTED] wrote:
 hi all,

 any idea what class has been replace by this class??

 android.app.ActivityPendingResult;


 Wesley.

 On Thu, Aug 28, 2008 at 9:50 AM, Wesley [EMAIL PROTECTED] wrote:

 hi all,

 Thanks for the reply...

 I will try it out... Hopefully, I don't have to go for the worst worst
 case(I mean re-do all the thing)...
 pray for wesley... man... :P...


 Thanks to all... I will buzz up again if I have problem...

 Thanks for your times...

 have a nice day...



 Wesley.



 On Wed, Aug 27, 2008 at 8:18 PM, Mark Murphy [EMAIL PROTECTED]
 wrote:

 Wesley Sagittarius wrote:

  Problem 1
  
  those class already remove??? which class I can use on this case???
  android.view.ViewInflate;

 This is now LayoutInflater, as documented here:

 http://code.google.com/android/migrating/m5-0.9/changes-overview.html

  android.view.Menu.Item;

 This is now the MenuItem interface. I think the implementation is
 Menu.MenuItem, but you should only need to reference the interface.

  I wanna to download image using HTTPConnection it say
  java.net.SocketException: unknown error means???

 As the other responder noted, try adding the INTERNET permission

 uses-permission android:name=android.permission.INTERNET /

 I would have added the first two items above to the M5-0.9 FAQ:


 http://groups.google.com/group/android-developers/web/m5-to-0-9-porting-and-migration-tips

 except that I can't seem to edit that page anymore... :-(

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.1 Published!





 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---