[android-developers] Re: finishing subactivity after some perticular time

2009-05-28 Thread Ask

Hi Macro,

   You are right and I know this  but this can be applicable only when
you are invoking sub activity that u had created so that u can write
ur logic in that. And My problem is, I am invoking the activity for
the phone dialer application using startActivity so I dont have
control on the code of the phone Dialer application (sub Activity). I
want to dial a number using intent and also want to cut the call
automatically after 15 seconds.

   I hope , u got my problem.

Thanks,

Asif

On May 27, 7:45 pm, Marco Nelissen marc...@android.com wrote:
 Why don't you just have your subactivity post a delayed message to itself
 and have it call finish() when it gets it?



 On Tue, May 26, 2009 at 11:49 PM, Ask asifk1...@gmail.com wrote:

  Is it possible to call finish() for subactivity from the parent
  activity?? I want to show subactivity for only some perticular time
  and after that I want it to be automatically finished..

  Thanks,
  Asif

  On May 26, 7:26 pm, Asif k asifk1...@gmail.com wrote:
   Hi all,

      I had opened an image file store in the sdcard using startActivity
   (intent) API.

     By doing this, image has opened and will remain open til manually
   coming back to parent activity by pressing back button. but I want it
   to be opened only for some perticular time after that it should exit
   and came back to parent acity. So how to set timer for subactivity??

   Please help.

   Thanks,

   Asif- 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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ActivityGroup + embedded Activity search window

2009-05-28 Thread Android Users
You have to be careful with the context in which you are using an activity
group. I encountered this problem when i was trying to show a dialog in an
activity but with different context.
So if you are using any context as parameter, just verify it.

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



[android-developers] Help with google uploader application

2009-05-28 Thread Sujay Krishna Suresh
Hi everyone,
   i'm trying to build an application that captures an image 
shares it...
 'm calling the inbuilt camera application with the following code
code
  Intent i = new Intent(android.media.action.IMAGE_CAPTURE);
  startActivityForResult(i, 0);
 /code
N my on activity result is
code
 @Override
 protected void onActivityResult(int requestCode, int resultCode, Intent
data) {
  super.onActivityResult(requestCode, resultCode, data);
  if (requestCode == 0  resultCode == Activity.RESULT_OK) {

  Intent i = new Intent(Intent.ACTION_SEND);
  i.setType(image/jpeg);
  i.putExtras(data);
  startActivity(i);
  }
  finish();
}
/code
whenever i select the upload button i get a toast sayin
 couldn't send photo data not available...
anyone can temme wats goin wrong??
i'm using SDK 1.0 r2
-- 
Regards,
Sujay
http://www.brainyquote.com/quotes/authors/b/bette_davis.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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: HorizontalScrollView reference text

2009-05-28 Thread AusR

Filed: #2781

On May 27, 3:16 pm, Romain Guy romain...@google.com wrote:
 Oops, it's a copy/paste. My bad :)

 Do you mind filing a bug at b.android.com?



 On Wed, May 27, 2009 at 7:08 AM, AusR austinjr...@gmail.com wrote:

  From the page:
 http://developer.android.com/reference/android/widget/HorizontalScrol...

  You should never use a HorizontalScrollView with a ListView, since
  ListView takes care of its own scrolling. Most importantly, doing this
  defeats all of the important optimizations in ListView for dealing
  with large lists, since it effectively forces the ListView to display
  its entire list of items to fill up the infinite container supplied by
  HorizontalScrollView.

  Does this mean that ListView CAN scroll horizontally? Or is this just
  a copy/edit from the ScrollView object?

 --
 Romain Guy
 Android framework engineer
 romain...@android.com

 Note: please don't send private questions to me, as I don't have time
 to provide private support.  All such questions should be posted on
 public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: SDK 1.5, Unable to load XML wizard

2009-05-28 Thread chen hence
i got the problem too.
but i fixed by use the icon which can hlep  you to  create the Android XML
file,which is is just left of the debug icion.

2009/5/27 Raphael r...@android.com


 On Mon, May 25, 2009 at 5:10 PM, androg roger.weinhei...@gmail.com
 wrote:
 
  I get this error with all three launch options, right-click folder in
  Package Explorer, toolbar button, and File-New-Android XML File.
  Nothing works for me. I am running Eclipse 3.4.2 and ADT 0.9.1 on
  Debian (Lenny). What is the version number of the final release?

 The current version is still 0.9.1. We have not yet released another
 official version with these fixes.

 R/

 


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



[android-developers] Re: getLastKnownLocation() always returns null. What am I doing wrong?

2009-05-28 Thread chen hence
can you send me your full codes?
im on a project on gps.
Thanks for your help.
Hence Chen

2009/5/22 pawpaw17 georgefraz...@yahoo.com


 I'm having no luck getting getLastKnownLocation to
 return a non-null value in the Android emulator running
 in Eclipse. The following call always returns null:

locationManager.getLastKnownLocation(bestProvider);

 (bestprovider is gps)

 In the intent's onCreate method I spawn a thread that calls
 requestFirstUpdate().
 The onLocationChanged method fires so I presume the location was
 updated (I use the
 location section of the DDMS to push out a location first).

 private void requestFirstUpdate(){

 LocationListener myLocationListener = new LocationListener(){
public void onLocationChanged(Location location){
locationManager.removeUpdates(this);
}

public void onProviderDisabled(String provider){
locationManager.removeUpdates(this);
provisionProvider();
}

public void onStatusChanged(String provider, int status, Bundle
 extras)
{
locationManager.removeUpdates(this);
provisionProvider();
}
public void onProviderEnabled(String arg0) {
locationManager.removeUpdates(this);
}
   };
   locationManager.requestLocationUpdates(bestProvider, 0, 0,
 myLocationListener);

}

 In my manifest I have these lines:

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

 Any ideas? Am I using the emulator incorrectly?

 Thanks!
 


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



[android-developers] Re: Problem with MapActivity on the 1.5 release

2009-05-28 Thread sagar.indianic

write
uses-library android:name=com.google.android.maps /
as a child of appliaction tag in anroidmenifest.xml file.
also write

uses-permission android:name=android.permission.INTERNET/
uses-permission
uses-permission
android:name=android.permission.ACCESS_FINE_LOCATION/uses-
permission
in menifest file , as a child of menifest tag.

On May 27, 3:57 pm, mobilekid mobilek...@googlemail.com wrote:
 Yes, I did. Still getting the same error:

 05-27 10:55:21.282: ERROR/AndroidRuntime(743): Uncaught handler:
 thread main exiting due to uncaught exception
 05-27 10:55:21.342: ERROR/AndroidRuntime(743):
 java.lang.NoClassDefFoundError: main.ViewContactActivity

 05-27 10:55:21.342: ERROR/AndroidRuntime(743): Caused by:
 java.lang.IllegalAccessError: cross-loader access from pre-verified
 class
 05-27 10:55:21.342: ERROR/AndroidRuntime(743):     at
 dalvik.system.DexFile.defineClass(Native Method)
 05-27 10:55:21.342: ERROR/AndroidRuntime(743):     at
 dalvik.system.DexFile.loadClass(DexFile.java:193)
 05-27 10:55:21.342: ERROR/AndroidRuntime(743):     at
 dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203)
 05-27 10:55:21.342: ERROR/AndroidRuntime(743):     at
 java.lang.ClassLoader.loadClass(ClassLoader.java:573)
 05-27 10:55:21.342: ERROR/AndroidRuntime(743):     at
 java.lang.ClassLoader.loadClass(ClassLoader.java:532)

 Any ideas? Thanks.

 On May 22, 6:57 pm, arnouf arnaud.far...@gmail.com wrote:

  hi,

  Did you generate your emulator image with AVD and using target 3?
  This type of emulator contains maps.jar in native and all is ok.

  Regards

  On May 22, 4:17 pm, mobilek...@googlemail.com

  mobilek...@googlemail.com wrote:
   Hi,

   I have a problem with firing an activity that extends MapActivity.
   When it gets called, it throws a  java.lang.NoClassDefFoundError...
   not sure what this is supposed to mean. I think something goes wrong
   with the external implementation of the maps API (maps.jar). Has
   anyone come across that problem? Here's the srack trace:

   05-22 15:13:36.723: ERROR/AndroidRuntime(445):
   java.lang.NoClassDefFoundError: main.ViewContactActivity
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   main.ContactsActivity.onOptionsItemSelected(ContactsActivity.java:311)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   android.app.Activity.onMenuItemSelected(Activity.java:2085)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected
   (PhoneWindow.java:820)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:
   139)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   com.android.internal.view.menu.MenuBuilder.performItemAction
   (MenuBuilder.java:813)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   com.android.internal.view.menu.IconMenuView.invokeItem
   (IconMenuView.java:519)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   com.android.internal.view.menu.IconMenuItemView.performClick
   (IconMenuItemView.java:122)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   android.view.View.onTouchEvent(View.java:3828)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   android.widget.TextView.onTouchEvent(TextView.java:6291)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   android.view.View.dispatchTouchEvent(View.java:3368)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   com.android.internal.policy.impl.PhoneWindow
   $DecorView.dispatchTouchEvent(PhoneWindow.java:1691)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   android.view.ViewRoot.handleMessage(ViewRoot.java:1525)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   android.os.Handler.dispatchMessage(Handler.java:99)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   android.os.Looper.loop(Looper.java:123)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   android.app.ActivityThread.main(ActivityThread.java:3948)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   java.lang.reflect.Method.invokeNative(Native Method)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   java.lang.reflect.Method.invoke(Method.java:521)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
   (ZygoteInit.java:782)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
   dalvik.system.NativeStart.main(Native Method)
   05-22 15:13:36.723: ERROR/AndroidRuntime(445): Caused by:
   

[android-developers] Re: getLastKnownLocation() always returns null. What am I doing wrong?

2009-05-28 Thread Saurav Mukherjee
as  far as i know u cannot connect to gps usin the emulator...

On Thu, May 28, 2009 at 12:39 PM, chen hence hencechen...@gmail.com wrote:

 can you send me your full codes?
 im on a project on gps.
 Thanks for your help.
 Hence Chen

 2009/5/22 pawpaw17 georgefraz...@yahoo.com


 I'm having no luck getting getLastKnownLocation to
 return a non-null value in the Android emulator running
 in Eclipse. The following call always returns null:

locationManager.getLastKnownLocation(bestProvider);

 (bestprovider is gps)

 In the intent's onCreate method I spawn a thread that calls
 requestFirstUpdate().
 The onLocationChanged method fires so I presume the location was
 updated (I use the
 location section of the DDMS to push out a location first).

 private void requestFirstUpdate(){

 LocationListener myLocationListener = new LocationListener(){
public void onLocationChanged(Location location){
locationManager.removeUpdates(this);
}

public void onProviderDisabled(String provider){
locationManager.removeUpdates(this);
provisionProvider();
}

public void onStatusChanged(String provider, int status, Bundle
 extras)
{
locationManager.removeUpdates(this);
provisionProvider();
}
public void onProviderEnabled(String arg0) {
locationManager.removeUpdates(this);
}
   };
   locationManager.requestLocationUpdates(bestProvider, 0, 0,
 myLocationListener);

}

 In my manifest I have these lines:

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

 Any ideas? Am I using the emulator incorrectly?

 Thanks! 


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



[android-developers] How to achieve android project's Internationalization

2009-05-28 Thread stonestrange

hi,guys.
I want to make my android project Internationalization,but i don't
know how to achieve it.
I have searched on the internet,and just know i have to make values-xx
file in \res.I want to know what should i do about the code.
thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Canvas.drawPoint() is faster than Bitmap.setPixel()?

2009-05-28 Thread Keith Wiley

I am a little surprised that when drawing many individual pixels to a
canvas, I get much faster performance from Canvas.drawPoint with a
Paint object than I get with Bitmap.setPixel with a direct color.
First, I would expect the Paint object to be more complicated than a
numerical color.  Second, doesn't drawing to the canvas require
translating the command to the underlying Bitmap anyway.  Thus
shouldn't it be faster to get a ref to the Canvas's Bitmap and draw to
it directly?

Any thoughts on this?  Does anyone understand why this is the case?

Furthermore, are these the fastest methods for setting individual
pixels or is there another method?  I tried Canvas.drawLine and stuff,
but naturally, drawPoint() was faster.  No surprise there.

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



[android-developers] Application.onPause()? Is there a hook like this?

2009-05-28 Thread Matthias

Hi,

I want to unregister my location listeners whenever the app is hidden
by another application. I cannot use the onPause() hook in my main
activity, because that hook will also be called when an activity of my
app is hidden by another activity of my own app (in which case I do
not want to disable location listeners -- going through a disable/
enable cycle for two location listeners is pretty expensive).

In other words, is there a thing like App.onPause(), which gets
triggered when the whole app is paused (i.e., no activities of the
same app are visible anymore), e.g. when bringing up the home
application or when a call comes in?

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



[android-developers] Re: Problem with Internet connection through emulator

2009-05-28 Thread Chronos

Thanks for the reply - if anyone has a simple setup for the local
proxy, plz post it, since I am not likely to investigate this problem
any further.

On 25 Mai, 12:16, David Turner di...@android.com wrote:
 It's a known bug in the 1.5 emulator. It only happens under specific network
 conditions that are hard to replicate
 but should be fixed in a later release (you can try to rebuild the emulator
 from the open-source depot if you want the fix).

 One potential way to fix this is to run an intermediate proxy on your
 localhost interface, and direct the emulator to use it, as in:

 emulator   local proxy  real proxy

 There are many free programs that do that very well. Hope this helps.

 On Mon, May 18, 2009 at 12:42 PM, Chronos g358279012044...@gmail.comwrote:





  Unfortunately, this problem isn't solved :( In addition to the steps
  Gerald has taken already, we also:

   - provided the -http-proxy option at emulator start; still no success
  neither for the browser application, nor for our own application
  (which works perfectly without proxy)
   - tried IP addresses instead of domain names in order to circumvent
  possible DNS problems = still no success
   - tried -debug-proxy with the following unsuccessful output:

  #emulator -avd standard_1_5 -http-proxy browser:3128 -debug-proxy
  proxy_http_setup: creating http proxy service connecting to browser:
  3128
  server name 'browser' resolved to 192.168.1.122:3128
  proxy_http_setup: creating HTTP Proxy Service Footer is (len=2):
  '
  '
  http_service_connect: trying to connect to 209.85.135.99:8028
  http_service_connect: using HTTP rewriter
  tcp:209.85.135.99:8028(1576): cannot connect to proxy: unknown error
  http_service_connect: trying to connect to w.x.y.z:808028
  http_service_connect: using HTTP rewriter
  tcp:w.x.y.z:808028(1576): cannot connect to proxy: unknown error
  http_service_free

  I have obfuscated the second IP - but I strongly wonder about those
  obviously wrong port numbers... I hope this is just a string formating
  bug. Anyway we're stuck here... Can't anybody help ?

  On May 9, 9:16 am, sujoydas1...@gmail.com sujoydas1...@gmail.com
  wrote:
   Worked for me. Go to Tools directory and type

   emulator-http-proxyproxy-address:proxy-port

   On May 8, 2:50 am, Gerald Logor gerald.lo...@gmail.com wrote:

 Well if that's the case, if the -http-proxyproxy command-line option
  is
not supplied, thenemulatorshould by default looks up the
http_proxyenvironment variable (which I did set it using sqlite3 in
the settingsdb
file) and automatically uses any value matching the proxy format.
  However,
it still cannot go online.
Thanks for the reference to the releasenotes though.

Gerald Logor

On Fri, May 8, 2009 at 11:22 AM, Android Users 
  androidmai...@gmail.comwrote:

 SDK 1.5 release notes mention this,
 In some cases, you may encounter problems when using the browser on
  an
emulatorstarted with the command-line option -http-proxy.
 Ref :http://developer.android.com/sdk/RELEASENOTES.html

 On Fri, May 8, 2009 at 8:50 AM, Gerald Logor gerald.lo...@gmail.com
  wrote:

 After spending hours of research and different ways to connect
  myemulator
 to the internet (i.e just accessing any ordinary webpages), I'm
  still
 hitting a brick wall.

 My current internet setting is that I'm behind a corporate internet
 connection thus connecting via a proxy (154.23.x.yy:80zz)

 Ways I tried:

 1. Connect to theemulatorusing the adb shell command (From tools
 folder of SDK)
 *adb shell*
 enter this..
 *# sqlite3
 /data/data/com.android.providers.settings/databases/settings.db
 sqlite INSERT INTO system
 VALUES(99,'http_proxy','PROXY_IP:PROXY_Port');*
 Restarting theemulator, it's still showing WebPage unavailable

 2. Using Eclipse as my IDE, I Go to Run - Run Configurations
  -Target in
 eclipse and enter
 *-http-proxyPROXY_IP:PROXY_Port * in Additionalemulatorcommand
 line options.
 Still, no happiness.

 3. I also tried (in Eclipse), Windows-Preferences-Android-Default
Emulatoroption, and insertinghttp-proxy*PROXY_IP:PROXY_Port

 *4. I'm not creating any of my own view or activity, thus did not
  need to
 setup INTERNET permissions in my manifest file.

 Any helps would be appreciated. Thanks.- Zitierten Text ausblenden -

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



[android-developers] Re: Application.onPause()? Is there a hook like this?

2009-05-28 Thread matthias

Hm, so I just peeked at the source code of the Google Maps app on
Android, because they seem to get it right: if you have GPS enabled,
then it will stay on if the main Maps activity is hidden by another
activity of the same app, e.g. the Maps history screen, but it will
turn off when pausing the app via the Home button.

NMapActivity.onPause() looks like this:

protected void onPause()
{
super.onPause();
if(sActivityReference.get() == this)
{
   ... // stop location services
} else
{
android.util.Log.d(MapActivity, (new StringBuilder
()).append(onPause leaving the lights on for ).append
(sActivityReference.get()).toString());
}
}

but what is sActivityReference? I suppose it's some static field with
package level visibility, but it's not declared in that activity...
seems to be some Android internal magic, so I cannot use it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] configChanges and onConfigurationChanged()

2009-05-28 Thread Chronos

Hello there ;)

I am still confused about configuration changes. I considered this a
bug in earlier API versions and didn't care much about it. But since
this behaviour is still the same in the 1.5 SDK, I wonder if I do not
misunderstand something completely... :/

If I want to handle a change of orientation on a device, I should be
setting android:configChanges=orientation in the manifest and
implement the onConfigChanged() method of the corresponding activity.
We have already read several times that we also have to listen for
keyboardHidden changes on the G1. BUT I FAIL TO UNDERSTAND WHY ! And
it seems, there are others who don't understand this...

If my application does not care whether a keyboard is exposed or not -
why should I be listening for it at all ? I can assume two cases in
which this is going to cause serious trouble:

 - If more than orientation|keyboardHidden changes at once,
onConfigurationChanged() won't be called. Assume, a user crosses
country borders (MCC change) in exact the same moment, he changes
orientation... onConfigurationChanged() won't be called - the
application is broken :(.
 - Let's assume an upcoming device has some other configuration
property linked to orientation (which programmers don't know in
advance) - perhaps orientation and touchscreen, because a device has
some weird and limited type of touchscreen - onConfigurationChanged()
wouldn't be called either; the application would be broken and must be
adapted to that device. This rudely offends the resource abstraction
paradigma of the android platform.

In conclusion, to overcome this design bug (as I see it now), I
would have to listen for ALL configuration changes since I don't know
which devices (especially device configurations) will be used in the
future. This makes the configChanged property useless. But
unfortunately there is no all constant available for
android:configChanges and I am not able to enter numeric constants (a
bitmask); if in a later version of the android API another
configuration value is to be introduced, my workaround doesn't work
and my application is broken again D:.

Please prove me wrong or help me clarify this, before there are LOTS
of different devices out there... Thanks in advance ;)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: implementation of onDestroy for a service containing a worker or backround thread

2009-05-28 Thread Gautam

I need to make sure, that onDestroy returns only after proper clean up
by the background thread.
Else (according to my understanding) OS may kill the process hosting
the service before proper cleanup.


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



[android-developers] Re: Problem with MapActivity on the 1.5 release

2009-05-28 Thread mobilekid

Thanks, but It's not that, I have all three declarations in my
manifest.

On May 28, 8:10 am, sagar.indianic sagar.india...@gmail.com wrote:
 write
         uses-library android:name=com.google.android.maps /
 as a child of appliaction tag in anroidmenifest.xml file.
 also write

         uses-permission android:name=android.permission.INTERNET/
 uses-permission
         uses-permission
 android:name=android.permission.ACCESS_FINE_LOCATION/uses-
 permission
 in menifest file , as a child of menifest tag.

 On May 27, 3:57 pm, mobilekid mobilek...@googlemail.com wrote:

  Yes, I did. Still getting the same error:

  05-27 10:55:21.282: ERROR/AndroidRuntime(743): Uncaught handler:
  thread main exiting due to uncaught exception
  05-27 10:55:21.342: ERROR/AndroidRuntime(743):
  java.lang.NoClassDefFoundError: main.ViewContactActivity

  05-27 10:55:21.342: ERROR/AndroidRuntime(743): Caused by:
  java.lang.IllegalAccessError: cross-loader access from pre-verified
  class
  05-27 10:55:21.342: ERROR/AndroidRuntime(743):     at
  dalvik.system.DexFile.defineClass(Native Method)
  05-27 10:55:21.342: ERROR/AndroidRuntime(743):     at
  dalvik.system.DexFile.loadClass(DexFile.java:193)
  05-27 10:55:21.342: ERROR/AndroidRuntime(743):     at
  dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203)
  05-27 10:55:21.342: ERROR/AndroidRuntime(743):     at
  java.lang.ClassLoader.loadClass(ClassLoader.java:573)
  05-27 10:55:21.342: ERROR/AndroidRuntime(743):     at
  java.lang.ClassLoader.loadClass(ClassLoader.java:532)

  Any ideas? Thanks.

  On May 22, 6:57 pm, arnouf arnaud.far...@gmail.com wrote:

   hi,

   Did you generate your emulator image with AVD and using target 3?
   This type of emulator contains maps.jar in native and all is ok.

   Regards

   On May 22, 4:17 pm, mobilek...@googlemail.com

   mobilek...@googlemail.com wrote:
Hi,

I have a problem with firing an activity that extends MapActivity.
When it gets called, it throws a  java.lang.NoClassDefFoundError...
not sure what this is supposed to mean. I think something goes wrong
with the external implementation of the maps API (maps.jar). Has
anyone come across that problem? Here's the srack trace:

05-22 15:13:36.723: ERROR/AndroidRuntime(445):
java.lang.NoClassDefFoundError: main.ViewContactActivity
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
main.ContactsActivity.onOptionsItemSelected(ContactsActivity.java:311)
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
android.app.Activity.onMenuItemSelected(Activity.java:2085)
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected
(PhoneWindow.java:820)
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:
139)
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
com.android.internal.view.menu.MenuBuilder.performItemAction
(MenuBuilder.java:813)
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
com.android.internal.view.menu.IconMenuView.invokeItem
(IconMenuView.java:519)
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
com.android.internal.view.menu.IconMenuItemView.performClick
(IconMenuItemView.java:122)
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
android.view.View.onTouchEvent(View.java:3828)
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
android.widget.TextView.onTouchEvent(TextView.java:6291)
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
android.view.View.dispatchTouchEvent(View.java:3368)
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
com.android.internal.policy.impl.PhoneWindow
$DecorView.dispatchTouchEvent(PhoneWindow.java:1691)
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
android.view.ViewRoot.handleMessage(ViewRoot.java:1525)
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
android.os.Handler.dispatchMessage(Handler.java:99)
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
android.os.Looper.loop(Looper.java:123)
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
android.app.ActivityThread.main(ActivityThread.java:3948)
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
java.lang.reflect.Method.invokeNative(Native Method)
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
java.lang.reflect.Method.invoke(Method.java:521)
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
05-22 15:13:36.723: ERROR/AndroidRuntime(445):     at

[android-developers] Re: Application.onPause()? Is there a hook like this?

2009-05-28 Thread matthias

okay, so sActivityReference is a java.lang.ref.WeakReference, so
apparently this is related to something else (memory management stuff
I guess?).

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



[android-developers] Re: Extremely frustrating = TextView in ScrollView - Scroll to bottom?

2009-05-28 Thread skink



On 28 Maj, 01:28, Peter Carpenter
peter.carpen...@skytechnologies.com wrote:
 Hi guys,


 It appears that plenty of people have asked about this in newsgroups,
 but no solution offered.

 textView.setText(s);


try:
tv.setText(s);
sv.post(new Runnable() {
void run() {
sv.scrollTo(0, yPosition);
}
});










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



[android-developers] view Log on device

2009-05-28 Thread Sam

hi,
  I want to view the Log on device i.e the System.out.println(); I
am able to view on DDMS but how to view on device screeen while
running an apk file

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



[android-developers] Re: Problem with Internet connection through emulator

2009-05-28 Thread David Turner
If you're on Windows, I used to use FreeProxy succesfully a few years ago to
deal with an anal-retentive corporate proxy.
It has a rather nice GUI to setup everything.

http://www.handcraftedsoftware.org/index.php?page=5


On Thu, May 28, 2009 at 9:44 AM, Chronos g358279012044...@gmail.com wrote:


 Thanks for the reply - if anyone has a simple setup for the local
 proxy, plz post it, since I am not likely to investigate this problem
 any further.

 On 25 Mai, 12:16, David Turner di...@android.com wrote:
  It's a known bug in the 1.5 emulator. It only happens under specific
 network
  conditions that are hard to replicate
  but should be fixed in a later release (you can try to rebuild the
 emulator
  from the open-source depot if you want the fix).
 
  One potential way to fix this is to run an intermediate proxy on your
  localhost interface, and direct the emulator to use it, as in:
 
  emulator   local proxy  real proxy
 
  There are many free programs that do that very well. Hope this helps.
 
  On Mon, May 18, 2009 at 12:42 PM, Chronos g358279012044...@gmail.com
 wrote:
 
 
 
 
 
   Unfortunately, this problem isn't solved :( In addition to the steps
   Gerald has taken already, we also:
 
- provided the -http-proxy option at emulator start; still no success
   neither for the browser application, nor for our own application
   (which works perfectly without proxy)
- tried IP addresses instead of domain names in order to circumvent
   possible DNS problems = still no success
- tried -debug-proxy with the following unsuccessful output:
 
   #emulator -avd standard_1_5 -http-proxy browser:3128 -debug-proxy
   proxy_http_setup: creating http proxy service connecting to browser:
   3128
   server name 'browser' resolved to 192.168.1.122:3128
   proxy_http_setup: creating HTTP Proxy Service Footer is (len=2):
   '
   '
   http_service_connect: trying to connect to 209.85.135.99:8028
   http_service_connect: using HTTP rewriter
   tcp:209.85.135.99:8028(1576): cannot connect to proxy: unknown error
   http_service_connect: trying to connect to w.x.y.z:808028
   http_service_connect: using HTTP rewriter
   tcp:w.x.y.z:808028(1576): cannot connect to proxy: unknown error
   http_service_free
 
   I have obfuscated the second IP - but I strongly wonder about those
   obviously wrong port numbers... I hope this is just a string formating
   bug. Anyway we're stuck here... Can't anybody help ?
 
   On May 9, 9:16 am, sujoydas1...@gmail.com sujoydas1...@gmail.com
   wrote:
Worked for me. Go to Tools directory and type
 
emulator-http-proxyproxy-address:proxy-port
 
On May 8, 2:50 am, Gerald Logor gerald.lo...@gmail.com wrote:
 
  Well if that's the case, if the -http-proxyproxy command-line
 option
   is
 not supplied, thenemulatorshould by default looks up the
 http_proxyenvironment variable (which I did set it using sqlite3 in
 the settingsdb
 file) and automatically uses any value matching the proxy format.
   However,
 it still cannot go online.
 Thanks for the reference to the releasenotes though.
 
 Gerald Logor
 
 On Fri, May 8, 2009 at 11:22 AM, Android Users 
   androidmai...@gmail.comwrote:
 
  SDK 1.5 release notes mention this,
  In some cases, you may encounter problems when using the browser
 on
   an
 emulatorstarted with the command-line option -http-proxy.
  Ref :http://developer.android.com/sdk/RELEASENOTES.html
 
  On Fri, May 8, 2009 at 8:50 AM, Gerald Logor 
 gerald.lo...@gmail.com
   wrote:
 
  After spending hours of research and different ways to connect
   myemulator
  to the internet (i.e just accessing any ordinary webpages), I'm
   still
  hitting a brick wall.
 
  My current internet setting is that I'm behind a corporate
 internet
  connection thus connecting via a proxy (154.23.x.yy:80zz)
 
  Ways I tried:
 
  1. Connect to theemulatorusing the adb shell command (From
 tools
  folder of SDK)
  *adb shell*
  enter this..
  *# sqlite3
  /data/data/com.android.providers.settings/databases/settings.db
  sqlite INSERT INTO system
  VALUES(99,'http_proxy','PROXY_IP:PROXY_Port');*
  Restarting theemulator, it's still showing WebPage unavailable
 
  2. Using Eclipse as my IDE, I Go to Run - Run Configurations
   -Target in
  eclipse and enter
  *-http-proxyPROXY_IP:PROXY_Port * in
 Additionalemulatorcommand
  line options.
  Still, no happiness.
 
  3. I also tried (in Eclipse),
 Windows-Preferences-Android-Default
 Emulatoroption, and insertinghttp-proxy*PROXY_IP:PROXY_Port
 
  *4. I'm not creating any of my own view or activity, thus did
 not
   need to
  setup INTERNET permissions in my manifest file.
 
  Any helps would be appreciated. Thanks.- Zitierten Text
 ausblenden -
 
  - Zitierten Text anzeigen -
 


--~--~-~--~~~---~--~~
You received this message because you 

[android-developers] installing android os

2009-05-28 Thread Saurav Mukherjee
has any1 tried inostallin the android on a pda?
is it always from the source code, or is there any other way???

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



[android-developers] Re: The app got crashed on SDK 1.5 which is working fine on SDK 1.0

2009-05-28 Thread Guillaume Perrot

I have the same problem with tabactivity but it's quite random and
rare.
I'll try to simplify the layout...

On 11 mai, 18:51, hina naz hinana...@gmail.com wrote:
 *How to earn money please visit my site *

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



[android-developers] Re: Application.onPause()? Is there a hook like this?

2009-05-28 Thread matthias

I found a workaround, but it's a hack, so I'm still open for better
ideas. I found this to do exactly what I need:

in the main activity of my app:

@Override
protected void onPause() {
super.onPause();

ActivityManager am = (ActivityManager) getSystemService
(ACTIVITY_SERVICE);
ListRunningTaskInfo taskInfo = am.getRunningTasks(1);
if (!taskInfo.isEmpty()) {
ComponentName topActivity = taskInfo.get(0).topActivity;
if (!topActivity.getPackageName().equals(getPackageName
())) {
// disable listeners ...
}
}
}

what this does is find out what the most recently triggered activity
is when the current activity is paused (i.e., it yields the name of
the activity that caused the pause, e.g. the home app), and checks
whether it's an activity of the same package or not (in the latter
case, I unregister the listeners to save battery life).

An app.onPause() hook or a simple isApplicationVisible() would be a
lot nicer of course...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] TextView Highlight/Select Issue

2009-05-28 Thread mscwd01

Hey,

I have a ListView where each row is a layout inflated from an xml
file. Within each layout I have a TextView which is defined by the
following:
TextView  style=@style/MenuItem android:paddingLeft=10sp
android:textColor=@drawable/menu_item /

The style attribute sets the font size and style, the textColor
attribute is a selector drawable which changes the TextView font
colour depending on whether it is currently selected or not. This is
defined by the following:
selector xmlns:android=http://schemas.android.com/apk/res/android;
item android:state_selected=true android:color=#FF /
item android:state_pressed=true android:color=#FF /
item android:color=#00 /
/selector

However, when I use this selector drawable to set the font colour it
results in a weird issue where the TextView gets highlighted when the
row is tapped, or tapped and dragged. See this screenshot for a better
idea:

http://i39.tinypic.com/v4q90n.jpg

Is there anyway I can disable the TextView so it cannot be
highlighted when tapped?

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



[android-developers] android test

2009-05-28 Thread danielececil...@gmail.com

Hi,

I am writting unit tests on my Android project.
I would like to test whether a specific dialog window appears when i
click on a button.
For example, I have :
--Begin Code
-

public class MyDialog extends Dialog
   {
   
   }



public class MyActivity extends Activity
   {



myButton.setOnClickListener( new OnClickListener()
  {
 @Override
 public void onClick(View v)
{
   MyDialog window = new MyDialog(...);
   window.show();
}
  }

.
   }
-End
Code---



It works fine, but how to test it?

I start my test method, but i don't know how to finish it :




Begin Code

@MediumTest
  public void testMyButtonAction()
   {
startActivity(intent,null, null);
Activity currentActivity = getActivity();
myButton = (Button) currentActivity.findViewById(R.id.mybutton);
myButton.performClick();
assertNotNull()   // what is the method to get Dialog
   }
--- End Code



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



[android-developers] Re: WebView.addJavascriptInterface problems

2009-05-28 Thread blindfold

I can use the addJavascriptInterface() mechanism to pass strings and
ints (as function return values) from Android to Javascript, but is it
also possible to pass on an entire array (of ints) in one go, to next
iterate over its elements in Javascript? So far that does not seem to
work for me, while documentation appears limited.

Thanks

On May 7, 7:36 pm, Mark Murphy mmur...@commonsware.com wrote:
 Change your API. Either move your Coordinates data members (double) into
 the Position object, or put methods on the Position object to access the
 Coordinates data members. Or, create a native user interface (instead of
 WebView) and use whatever internal API you want.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Custom dialog background

2009-05-28 Thread illyge

Hello! I want to create custom dialog. I want to use my png drawable
as background for it. I would like the background to be expandable
vertically and it would be good if it was of constant width. Another
requirement is that the top part of the drawable must be background
for the title and also mustn't expand (be of constant height).
So I create style like this:

style name=myDialogStyle parent=android:Theme.Dialog
item name=android:windowBackground@drawable/dialog_bg/item
/style

And in my activity:

setTheme(R.style.myDialogStyle);

In this case, if I use simple png, it expands with it's top part, so
that the last requirement is unsatisfied. It's reasonable to use 9-
patch in this case. But when I convert my drawable into 9-patch one, I
have to put dots not only for vertical expanding, but for the
horizontal one too. So I put a dot for vertical expanding below the
top part of picture and a dot for horizontal expanding at a random
place.
And now a strange problem occurs. The horizontally expandable (marked
by my dot) area gets expanded a bit and the content of my dialog
activity gets placed right in the horizontally expandable area, so
that this content becomes of a very small width. Furhtermore, the
title is shown below the place it is shown at in normal case and does
not match with the top part of drawable. All this looks quite awful.
I've found a way to return a normal width to content. I fill all the
upper line with dots in 9-patch for this. But this way seems ugly to
me and still it doesn't solve the problem with showing title lower
than it should be.

 Does anybody know how to solve these problems? Maybe any other ways
to set dialog background?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Help with google uploader application

2009-05-28 Thread Sujay Krishna

i found my mistake
i forgot to add the EXTRA_STREAM in the extras...
now its workin fine...
if anyone is need of such an app jus send me a request...

On May 28, 11:35 am, Sujay Krishna Suresh sujay.coold...@gmail.com
wrote:
 Hi everyone,
                i'm trying to build an application that captures an image 
 shares it...
  'm calling the inbuilt camera application with the following code
 code
   Intent i = new Intent(android.media.action.IMAGE_CAPTURE);
   startActivityForResult(i, 0);
  /code
 N my on activity result is
 code
 �...@override
  protected void onActivityResult(int requestCode, int resultCode, Intent
 data) {
   super.onActivityResult(requestCode, resultCode, data);
   if (requestCode == 0  resultCode == Activity.RESULT_OK) {

   Intent i = new Intent(Intent.ACTION_SEND);
   i.setType(image/jpeg);
   i.putExtras(data);
   startActivity(i);
   }
   finish();}

 /code
 whenever i select the upload button i get a toast sayin
  couldn't send photo data not available...
 anyone can temme wats goin wrong??
 i'm using SDK 1.0 r2
 --
 Regards,
 Sujay
 http://www.brainyquote.com/quotes/authors/b/bette_davis.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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to share non-sqlite( shared Preference) data over Content Provider.

2009-05-28 Thread sukumar bhashyam
hi,
I looked into some examples of sharing data to other apps using content
Provider. All these examples talks about sharing sqlite dbs. I need to share
data under shared Preferences of my app to other apps using content
Provider.

Can I use content Provider to do that ?. Please let me know some pointers or
sample code to share data other than sqlite db using content provider.


Thanks,
Sukumar.

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



[android-developers] Is there any chance that there will be ADP2?

2009-05-28 Thread szeldon

Hi,

I've read:
http://groups.google.com/group/android-developers/browse_thread/thread/ba29f880345c03aa
http://www.google.com/support/forum/p/Android%20Market/thread?tid=55c6a8a72f53961fhl=en
but both discussions seem a little outdated. At Google IO there were
free HTC Magic phones (unlocked as ADP1?). So, basing on all this, I
wonder if there's something official about ADP2.

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



[android-developers] Re: Is there any chance that there will be ADP2?

2009-05-28 Thread mscwd01

http://code.google.com/android/adc/

On May 28, 12:47 pm, szeldon szeldon@gmail.com wrote:
 Hi,

 I've 
 read:http://groups.google.com/group/android-developers/browse_thread/threa...http://www.google.com/support/forum/p/Android%20Market/thread?tid=55c...
 but both discussions seem a little outdated. At Google IO there were
 free HTC Magic phones (unlocked as ADP1?). So, basing on all this, I
 wonder if there's something official about ADP2.

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



[android-developers] Re: Is there any chance that there will be ADP2?

2009-05-28 Thread mscwd01

^ In that link it mentions phones were given out to aid people for ADC
2 so I guess these would be configured as such. I guess it wont be
long before they're updated.

On May 28, 1:08 pm, mscwd01 mscw...@gmail.com wrote:
 http://code.google.com/android/adc/

 On May 28, 12:47 pm, szeldon szeldon@gmail.com wrote:

  Hi,

  I've 
  read:http://groups.google.com/group/android-developers/browse_thread/threa..
  but both discussions seem a little outdated. At Google IO there were
  free HTC Magic phones (unlocked as ADP1?). So, basing on all this, I
  wonder if there's something official about ADP2.

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



[android-developers] Re: How to achieve android project's Internationalization

2009-05-28 Thread Mark Murphy

 I want to make my android project Internationalization,but i don't
 know how to achieve it.
 I have searched on the internet,and just know i have to make values-xx
 file in \res.I want to know what should i do about the code.

Close.

You do not create values-xx files, you create values-xx directories:

res/values-es
res/values-fr
res/values-de
res/values (default, perhaps English)

Your code, in theory, does not need to change at all -- Android will
choose the right strings out of the strings.xml files in those
directories.

You *might* have to change your UI layouts somewhat if the translated
strings are significantly longer than the space you had set aside.
TextView's android:marquee attribute can help with this, by animating a
selected TextView to show a longer string in its entirety in a smaller
space.

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



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



[android-developers] how to have icons in buttons?

2009-05-28 Thread Saurav Mukherjee
can anyone tell me how to have buttons in a button?

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



[android-developers] Re: how to have icons in buttons?

2009-05-28 Thread Mark Murphy

 can anyone tell me how to have buttons in a button?

Option #1: Use ImageButton

Option #2: Use Button and android:drawableTop (or related properties) to
put an image above the normal text caption

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



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



[android-developers] Find whether trackball events ended or not

2009-05-28 Thread iDeveloper
Hi

I want to move an image around the screen according to the trackball  
movement. I am able to capture the movements using the  
onTrackballEvent method. But this is being called for very small float  
values (I believe for each rotation?) of the trackball.

Now as X and Y positions of views should be integers when specifying  
with LayoutParams, it makes no sense to move the view with every  
rotation. Instead I want to move the view only after the user stops  
rotating the trackball.

Is there any method by which we can get whether the user stopped using  
the trackball or not?

Thanks.




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



[android-developers] 1.5: Phone no longer stays awake when Stay Awake is enabled under Development settings

2009-05-28 Thread Rob Franz

Has anyone else noticed this?  It's slightly annoying.  I downloaded
my version of 1.5 from

https://android.clients.google.com/updates/partner/signed-kila-ota-148830.de6a94ca.zip

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



[android-developers] How to share non-sqlite( shared Preference) data over Content Provider.

2009-05-28 Thread sukumar

hi,

I looked into some examples of sharing data to other apps using
content Provider. All these examples talks about sharing sqlite dbs. I
need to share data under shared Preferences of my app to other apps
using content Provider.

Can I use content Provider to do that ?. Was there any other way to do
it?. Please let me know some pointers or sample code to share data
other than sqlite db using content provider.


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



[android-developers] Re: How to share non-sqlite( shared Preference) data over Content Provider.

2009-05-28 Thread Mark Murphy

 I looked into some examples of sharing data to other apps using
 content Provider. All these examples talks about sharing sqlite dbs. I
 need to share data under shared Preferences of my app to other apps
 using content Provider.

Why? Other than the UI framework, shared preferences are significantly
worse than a database -- for example, they are just stored in an XML file
and so are not transactional. In fact, I'd love to spend some time someday
creating a database-backed SharedPreferences and figuring out how to get
the preference UI to work with one of those.

 Can I use content Provider to do that ?.

Sure -- just implement the required ContentProvider methods (e.g.,
query()). I don't recommend it, and the resulting provider will probably
be limited (e.g., no support for WHERE clauses, unless you're rolling your
own SQL interpreter), but you can do it.

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



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



[android-developers] Re: ActivityGroup + embedded Activity search window

2009-05-28 Thread Taísa Cristina
When I need to show dialog windows I use my parent context. That was the
only way I could show them with no BadTokenException.

But when showing a search window I don't use any context as parameter.

It seems that my embedded activity does not have the window token, but its
parent. However a TabActivity is an ActivityGroup and we can show dialog
windows without problems.

Does anybody know how the TabActivity gives the token to the embedded
activity (if it's really what happens)?
I could just see a focus request, what I also do in my implementation.

On Thu, May 28, 2009 at 3:25 AM, Android Users androidmai...@gmail.comwrote:

 You have to be careful with the context in which you are using an activity
 group. I encountered this problem when i was trying to show a dialog in an
 activity but with different context.
 So if you are using any context as parameter, just verify it.

 



-- 
Taísa Cristina Costa dos Santos
Computer Engineer
Brazil, SP

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



[android-developers] Re: Instrumentation for Dialog's and alike

2009-05-28 Thread danielececil...@gmail.com

Hi,

Do you solve your problem with the dialog window?
I try to verify Dialog component too. But I do not find any help.

Cecilia

On Apr 30, 9:36 pm, Rick richardgc...@gmail.com wrote:
 I've seen a few posts with no answer. Consider this scenario:

 I use Android's InstrumentationTestCase to run functional testing
 through a complex application with many activities and services
 running.

 Most of it works well, but if I invoke a menu item through the
 instrumentation that creates a dialog - the only way I can access that
 dialog is using the handset/emulator sendKey events.

 It would be great to grab that dialog and confirm it or verify the
 text and options.

 I've looked through many places but seems no one has an answer for
 this.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ActivityGroup + embedded Activity search window

2009-05-28 Thread Taísa Cristina
I tried using setDescendantFocusability(FOCUS_AFTER_DESCENDANTS) on my
ActivityGroup layout, and then I got a different error message:

ERROR/AndroidRuntime(871): android.view.WindowManager$BadTokenException:
Unable to add window -- token
android.app.localactivitymanager$localactivityrec...@4376ad40 is not valid;
is your activity running?

Any ideas?


On Thu, May 28, 2009 at 10:07 AM, Taísa Cristina taisa.san...@gmail.comwrote:

 When I need to show dialog windows I use my parent context. That was the
 only way I could show them with no BadTokenException.

 But when showing a search window I don't use any context as parameter.

 It seems that my embedded activity does not have the window token, but
 its parent. However a TabActivity is an ActivityGroup and we can show dialog
 windows without problems.

 Does anybody know how the TabActivity gives the token to the embedded
 activity (if it's really what happens)?
 I could just see a focus request, what I also do in my implementation.


 On Thu, May 28, 2009 at 3:25 AM, Android Users androidmai...@gmail.comwrote:

 You have to be careful with the context in which you are using an activity
 group. I encountered this problem when i was trying to show a dialog in an
 activity but with different context.
 So if you are using any context as parameter, just verify it.

 



 --
 Taísa Cristina Costa dos Santos
 Computer Engineer
 Brazil, SP




-- 
Taísa Cristina Costa dos Santos
Computer Engineer
Brazil, SP

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



[android-developers] Re: how to have icons in buttons?

2009-05-28 Thread Saurav Mukherjee
thanks dude...
i used the 2nd option n it worked wonderfully...

On Thu, May 28, 2009 at 5:50 PM, Mark Murphy mmur...@commonsware.comwrote:


  can anyone tell me how to have buttons in a button?

 Option #1: Use ImageButton

 Option #2: Use Button and android:drawableTop (or related properties) to
 put an image above the normal text caption

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



 


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



[android-developers] Webview: CSS Gradients vs Background Images

2009-05-28 Thread Evan Ruff

Hey guys,

I've got a general performance question. In my Webview app, I'm trying
to display a div (statically-sized) that is 100px x 200px. The div has
a linear gradient that goes the whole 200px. From a performance
standpoint, do you believe that it would be fastest to use an
optimized 1px image and tile the background, or to use the -webkit-
gradient function?

I'm really only asking because the webkit-gradient implementation
looks a little crappy to me. The gradient isn't smooth like it is in
Chrome,/Safari; it's extremely striated, like you'd get with a poorly
optimized .GIF, circa 1998. Would a tiled image degrade performance?

I like the idea of the CSS as I can change the size of the elements
easily for future phones, but I'm not sure if the visual hit is worth
it.

Thanks for any help!

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



[android-developers] Control which items to redraw? (notifyDataSetChanged with a range)

2009-05-28 Thread twan

Goodmorning,

A call to notifyDataSetChanged() on a ArrayAdapter causes all items in
a listview to redraw. This is quite ineffecient.

At swing you can control which items (or which range of items) redraw.
Is this also possible with android?

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



[android-developers] Re: implementation of onDestroy for a service containing a worker or backround thread

2009-05-28 Thread Streets Of Boston

Then you should call join() in onDestroy after calling
myBackgroundThread.stopThread() causing onDestroy to wait until your
background thread to end.

Make sure that your background thread never blocks or takes too long
to shut-down. If onDestroy is waiting too long, your user's ain't
gonna be happy :-)

On May 28, 4:28 am, Gautam gautam_raychaudh...@hotmail.com wrote:
 I need to make sure, that onDestroy returns only after proper clean up
 by the background thread.
 Else (according to my understanding) OS may kill the process hosting
 the service before proper cleanup.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Android default color madness, primary_text_light is color black?

2009-05-28 Thread twan

Good morning,

I got a little textview defined in layout xml:
===
TextView android:id=@+id/tvCategory
android:layout_width=wrap_content
android:background=@android:color/background_light
android:layout_height=wrap_content
android:padding=2dp android:layout_weight=1.0
android:gravity=left android:textColor=@android:color/
primary_text_light /
===

As you can see the background color is background_light (this
results in white color) and the text color is
primary_text_light (this results in black color).

I would have thought that primary_text_light would result in a light
color like white, not black ;-)

When i change primary_text_light into primary_text_dark the text
color becomes color white.

Is this a bug in the naming of the default colors?

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



[android-developers] Re: Application.onPause()? Is there a hook like this?

2009-05-28 Thread Mike Hearn

There is an Application.onCreate() and an Application.onDestroy() you
can use. These are not guaranteed to be called when your app isn't
visible, in fact destroy isn't guaranteed to be called at all, but
that's OK for your use case.

Apparently, the way Maps is doing it is they set a weak ref in onCreate
() then check it in onPause/onDestroy. The idea, I suppose, is that
the activity transition goes:

startActivity
onCreate of new activity
onPause of existing activity
onResume of new activity

So if onCreate sets a static ref to itself, then onPause can check if
it points at this to know if the next activity is another instance
of the same thing. You could do the same trick with something stashed
in your application object. It has to be a WeakRef because otherwise
this will leak the foreground activity (a weak ref is just like a
pointer, but it doesn't stop the target being garbage collected. so it
can spontaneously become null).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android default color madness, primary_text_light is color black?

2009-05-28 Thread Mike Hearn

Confusing but probably deliberate, the most important color when
thinking about text is of course the background color it will be
displayed on top of 

On May 28, 4:04 pm, twan twa...@gmail.com wrote:
 Good morning,

 I got a little textview defined in layout xml:
 ===
 TextView android:id=@+id/tvCategory
 android:layout_width=wrap_content
                 android:background=@android:color/background_light
 android:layout_height=wrap_content
                 android:padding=2dp android:layout_weight=1.0
 android:gravity=left android:textColor=@android:color/
 primary_text_light /
 ===

 As you can see the background color is background_light (this
 results in white color) and the text color is
 primary_text_light (this results in black color).

 I would have thought that primary_text_light would result in a light
 color like white, not black ;-)

 When i change primary_text_light into primary_text_dark the text
 color becomes color white.

 Is this a bug in the naming of the default colors?

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



[android-developers] Re: Android default color madness, primary_text_light is color black?

2009-05-28 Thread Marco Nelissen
I think 'light' refers to a theme in this case, and if you're using the
light theme, you get a light background with dark text on it.


On Thu, May 28, 2009 at 7:04 AM, twan twa...@gmail.com wrote:


 Good morning,

 I got a little textview defined in layout xml:
 ===
 TextView android:id=@+id/tvCategory
 android:layout_width=wrap_content
android:background=@android:color/background_light
 android:layout_height=wrap_content
android:padding=2dp android:layout_weight=1.0
 android:gravity=left android:textColor=@android:color/
 primary_text_light /
 ===

 As you can see the background color is background_light (this
 results in white color) and the text color is
 primary_text_light (this results in black color).

 I would have thought that primary_text_light would result in a light
 color like white, not black ;-)

 When i change primary_text_light into primary_text_dark the text
 color becomes color white.

 Is this a bug in the naming of the default colors?

 Kind regards,
 Twan
 


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



[android-developers] Re: implementation of onDestroy for a service containing a worker or backround thread

2009-05-28 Thread Mike Hearn

Your understanding is wrong - your service can be killed at any time
without onDestroy being run. I'm not actually sure why onDestroy even
exists in this case, I found it was much more common for the kernel to
OOM kill my process than it was for the AM to nicely request my
service to quit. Don't save state in onDestroy, if you need to,
checkpoint state in the service. It'll just be tears in the long run
if you don'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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem with MapActivity on the 1.5 release

2009-05-28 Thread Mike Hearn

I doubt it'll help, but you probably should not put your application
into a single package called main. The point of Java packages is to
avoid conflicts when code is loaded together.

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



[android-developers] Android Icon Templates Pack doesn't download fully

2009-05-28 Thread Chander Pechetty

Has anyone download the template pack zip file from
http://android-developers.blogspot.com/2009/05/android-icon-guidelines.html

I get the following error as the download never goes through---

 signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In
the
  latter case the central directory and zipfile comment will be found
on
  the last disk(s) of this archive.

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



[android-developers] Re: Android Camera Garbage Collection.

2009-05-28 Thread Mike Hearn

If you want to distribute the app to existing Android phone owners,
you're out of luck. You'll have to file a bug.

How does the Camera app itself handle this situation?

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



[android-developers] Re: What's the best way to handle an task w/progress dialog on orientation change?

2009-05-28 Thread Mike Hearn

You don't need a Service, that's way too complicated for what you
need. Especially if you use the RPC stuff (optional but the docs don't
tell you that!)

If you create the progress dialog using the onCreateDialog() method
then it'll be automatically reconstructed after an orientation
change.

To receive callbacks as to progress, you can just send to a static
Handler. Create the Handler in your onCreate if it's not already
created, so it's shared between all instances of your activity. Your
thread can then post updates to it.

When your activity is stopped or paused, you can interrupt() that
thread to tell it to shut down.


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



[android-developers] Re: Android Icon Templates Pack doesn't download fully

2009-05-28 Thread Chander Pechetty

never mind. finally got it on the 5 attempt ...

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



[android-developers] Re: Control which items to redraw? (notifyDataSetChanged with a range)

2009-05-28 Thread Streets Of Boston

If it is just a refresh and not an entirely new list or additions/
removals of elements, use notifyDataSetInvalidated() instead. I think
it's a bit more efficient.

But, as far as i know, you can't specifiy a range of elements. But you
can optimize it yourself.
I do this at times using the list-item view's getTag() and setTag()
methods. If the getTag() returns an object that is different than you
would expect (with respect to the list-item's position), refresh the
view's contents. Otherwise, leave it alone.

On May 28, 9:51 am, twan twa...@gmail.com wrote:
 Goodmorning,

 A call to notifyDataSetChanged() on a ArrayAdapter causes all items in
 a listview to redraw. This is quite ineffecient.

 At swing you can control which items (or which range of items) redraw.
 Is this also possible with android?

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



[android-developers] Simple Canvas Question

2009-05-28 Thread Gavin Aiken
Hi All,

I want to fill a bitmap with a colour. I have the a,r,g  b values. The
techinique I'm using is;

public Bitmap evaluate(Bitmap input) {
Canvas c = new Canvas(input);
c.drawARGB(a, r, g, b);
return input;
}

But my changes are not apparent in the returned bitmap.

The nature of the application is such that I need to return a bitmap but I'd
rather not have to setPixel for every x  y.

I'm hoping that this is obvious but I couldn't work out why this wasn't
working for the documentation or sample code.

Kind regards,

Gav

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



[android-developers] Re: What's the best way to handle an task w/progress dialog on orientation change?

2009-05-28 Thread Streets Of Boston

Hi Mike,

Is it safe to cache a Handler (in a static variable)? Some objects,
such as Activities or Drawables, are not safe to cache statically and
share amongst multiple activity-instances due to possible memory leaks
(memory referencing to destroyed activities that doesn't get cleaned
up in a timely manner).


On May 28, 10:32 am, Mike Hearn mh.in.engl...@gmail.com wrote:
 You don't need a Service, that's way too complicated for what you
 need. Especially if you use the RPC stuff (optional but the docs don't
 tell you that!)

 If you create the progress dialog using the onCreateDialog() method
 then it'll be automatically reconstructed after an orientation
 change.

 To receive callbacks as to progress, you can just send to a static
 Handler. Create the Handler in your onCreate if it's not already
 created, so it's shared between all instances of your activity. Your
 thread can then post updates to it.

 When your activity is stopped or paused, you can interrupt() that
 thread to tell it to shut down.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Google Android Maps API

2009-05-28 Thread Lex

Finally! I must not have seen the woods for the trees. I guess I got
pretty confused about to what extent the Maps are a part of Android. I
assume we should treat it as an external add-on despite the fact it's
from the same company.

Thanks a lot, Mark!

On May 26, 1:54 am, Mark Murphy mmur...@commonsware.com wrote:
 Lex wrote:
  I am working on a map navigation application in 1.5. Due to it's
  recent release most tutorials I was using as a reference are out-of-
  date and cannot be run without refactoring.

 Really?

  The link for Google
  Android Maps API

 http://developer.android.com/reference/com/google/android/maps/packag...

  has been broken for a while now (and it's the first hit!). When can we
  expect the link to work?

 Never, most likely.

  Where else can we find the required API?

 The following link for Locations and Maps is in the sidebar of the Dev
 Guide

 http://developer.android.com/guide/topics/location/index.html#maps

 That will lead you to:

 http://code.google.com/android/add-ons/google-apis

 Which will eventually get you to the Google APIs Add-On API reference:

 http://code.google.com/android/add-ons/google-apis/reference/index.html

  It's
  really inconvient when I want to look up something while developing...

 You will need to get used to it. There may be many more commercial
 add-ons for Android in the coming years, and they may all be
 independently documented like this one is. The main API reference is
 probably being dedicated simply to the open source components.

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

 Android Development Wiki:http://wiki.andmob.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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Movie.decodeStream(is) is returning NULL after updating to 1.5 SDK

2009-05-28 Thread Katsiaryna

I have the same problem as you: after upgrading to 1.5 I can't create
movie from the resources neither using Movie.decodeStream nor
Resources.openMovie. Both functions return null.

On May 27, 5:52 am, Freshman csato...@gmail.com wrote:
 com'on guys,

 Has anyone faced this issue with Android 1.5 ?
 OR
 Is there anyone whose Movie.decodeStream(inputstream) is working fine
 with Android 1.5 ?

 On May 22, 3:52 pm, Freshman csato...@gmail.com wrote:

  I've updated to 1.5 SDK, together with the ADT.
  I followed all the instruction properly.
  Rest of the Projects are working fine.
  but in my current application Movie.decodeStream(inputstream) is
  returning null.
  It was working fine with Android 1.1 version.

  Has anyone faced this issue when using 1.5 version ?
  Any info/help on this would be appreciated.

  My code is as below.

  ---My Code:--
  InputStream is = context.getResources().openRawResource
  (R.drawable.gif_animation);
  Movie movie = Movie.decodeStream(is);

  Thanks in advance,
  freshman


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



[android-developers] Re: Why the Android docs are inconsistent?

2009-05-28 Thread Hamy

Agreed. Please file doc bugs for the benefit of is all.

Hamy

On May 27, 11:12 pm, Raphael r...@android.com wrote:
 Please file doc bugs athttp://b.android.com-- the API probably
 evolved before 1.0 without the javadoc being updated.

 R/

 On Wed, May 27, 2009 at 6:51 PM, havexz bali.param...@gmail.com wrote:

  I have looking for something and found these inconsistencies in the
  online documentation

  This is a snippet from FAQ section
 http://developer.android.com/guide/appendix/faq/commontasks.html#broa...
         NotificationManager nm = (NotificationManager)
         context.getSystemService(Context.NOTIFICATION_SERVICE);
         nm.notifyWithText(R.id.alarm,
                           Alarm!!!,
                           NotificationManager.LENGTH_SHORT,
                           null);

  Now when I try to find the 'notifyWithText' api, I could not find it.

  Another example is IntentReciever. I just want to know is this class
  exists? As I found code in this forum itself using IntentReciever, but
  I cant find this class in the doc.

  And why standard intents like action
  android:name=android.provider.Telephony.SMS_RECEIVED are not
  documented?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Google Android Maps API

2009-05-28 Thread Mark Murphy

 I guess I got
 pretty confused about to what extent the Maps are a part of Android.

I think, internally, they had considered it a separate component from the
outset. However, because it was bundled with the SDK so tightly, it was
easy for us to think that it was going to be universally available.

This whole add-on system seems designed to handle these sorts of things
that might only be available on certain devices. Some might come from
Google, but others might come from device manufacturers.

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



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



[android-developers] Re: Movie.decodeStream(is) is returning NULL after updating to 1.5 SDK

2009-05-28 Thread Streets Of Boston

Judging from your resource name (gif_animation), it looks like you try
to open an image (gif image) as a movie... If it's not a movie/video,
i'm not entirely surprised that opening it as a movie fails.

(an animated gif is not a movie)

On May 22, 2:52 am, Freshman csato...@gmail.com wrote:
 I've updated to 1.5 SDK, together with the ADT.
 I followed all the instruction properly.
 Rest of the Projects are working fine.
 but in my current application Movie.decodeStream(inputstream) is
 returning null.
 It was working fine with Android 1.1 version.

 Has anyone faced this issue when using 1.5 version ?
 Any info/help on this would be appreciated.

 My code is as below.

 ---My Code:--
 InputStream is = context.getResources().openRawResource
 (R.drawable.gif_animation);
 Movie movie = Movie.decodeStream(is);

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



[android-developers] Re: Different UI behavoir between Activity and InputMethodService (test code and video provided)

2009-05-28 Thread www.rzr.online.fr

hi,

If it matters I reported it to :

http://code.google.com/p/android/issues/detail?id=2788

See you there

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



[android-developers] Re: Different UI behavoir between Activity and InputMethodService (test code and video provided)

2009-05-28 Thread Marco Nelissen
I suspect this is not a bug. Your button is probably not highlighting
because it's not focused, because the text view that you're typing in to
retains focus.



On Thu, May 28, 2009 at 8:18 AM, www.rzr.online.fr www.rzr.online.fr@
gmail.com wrote:


 hi,

 If it matters I reported it to :

 http://code.google.com/p/android/issues/detail?id=2788

 See you there

 


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



[android-developers] Re: styled text on button?

2009-05-28 Thread Edward Falk

IIRC, Button is a subclass of TextView, so whatever works with
TextView should work with button.  If you define the button text with
resources, then the usual font, br /, and other tags should work
just fine.  Haven't tried it myself, though.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android Camera Garbage Collection.

2009-05-28 Thread Robert Green

Have you guys tested it previewing to a surfaceview instead?  I'm
wondering if it doesn't behave differently there.

On May 28, 12:25 am, karan parikh karan.n...@gmail.com wrote:
 Hey All,
       @Robert: Yes. I am talking about the same function call. If you read
 the documentation for that, It says that a new copy is assigned everytime.
 You could also verify it with the allocation tracker. It is assigning that
 memory multiple times.
       @Tom: Yes a new object reference is supplied each time.
 My suggestions:
 1. We could implement a different jar file so that the frame gets
 overwritten everytime. But then I believe this would remove the portability
 from the application.
 2. We can change the garbage collector or play around with the memory
 allocation for that very thread. I believe each thread has a generational
 gc. We could further look into that. We could overwrite the memory for that
 particular allocation each time, rather than freeing it and reallocating the
 same.
 3. We can ask some one from google to look into it directly and create an
 issue, which I will be doing by tonight.
 Please let me know your suggestions to remove this bottleneck.
 Thanks for commenting.
 Regards,
 Karan.



 On Tue, May 26, 2009 at 1:17 PM, Tom Gibara m...@tomgibara.com wrote:
  I'm pretty sure I have looked into this in the past and found that a
  different object reference is supplied on each call.
  Tom.

  2009/5/26 Robert Green rbgrn@gmail.com

  Are you talking about the method Camera.PreviewCallback.onPreviewFrame
  (byte[] arg0, anrdoid.hardware.Camera arg1) ?

  Is it allocating a new byte[] for every call?

  I would think it would keep its same byte[] and reuse it for each
  call.

  Posting more code may help.  Thanks

  On May 25, 9:30 pm, Karan Parikh karan.n...@gmail.com wrote:
   Hey All,
         I am developing a camera application , where the frame rate is
   important. However, camera uses a preview callback function which
   allocates a byte[] array of 230400 bytes, which makes it necessary for
   the garbage collection to step in. Can someone suggest me a way to
   avoid garbage collection stepping in ?
   Thanks in advance.
   Regards,
   Karan.

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



[android-developers] Re: Movie.decodeStream(is) is returning NULL after updating to 1.5 SDK

2009-05-28 Thread Marco Nelissen
On Thu, May 28, 2009 at 8:17 AM, Streets Of Boston
flyingdutc...@gmail.comwrote:


 Judging from your resource name (gif_animation), it looks like you try
 to open an image (gif image) as a movie... If it's not a movie/video,
 i'm not entirely surprised that opening it as a movie fails.

 (an animated gif is not a movie)


It is as far as android.graphics.Movie is concerned. Or at least it used to
be. Not sure why it's not working anymore.

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



[android-developers] Re: Android Camera Garbage Collection.

2009-05-28 Thread Robert Green

Karan,

Option 1 is no good - only stubs are in Android.jar for things like
that.  Most of that code is native.  You'd need a custom build of
Android.  If it was just an issue of java, you could write your own
code but since it's native, you're right, portability is the problem.

Option 2 is no good - You can't really change the GC and you can't
really control memory allocation for the thread.  The fact of the
matter is that 284k is being allocated for every frame in native code,
and no amount of messing with stuff is going to change that.

Option 3 works.

Option 4 could be trying alternative ways of getting that data more
efficiently.  I was thinking that running it through a surfaceview and
manipulating its bitmap might work.  It's certainly a hack but it's
worth a shot.

On May 28, 12:25 am, karan parikh karan.n...@gmail.com wrote:
 Hey All,
       @Robert: Yes. I am talking about the same function call. If you read
 the documentation for that, It says that a new copy is assigned everytime.
 You could also verify it with the allocation tracker. It is assigning that
 memory multiple times.
       @Tom: Yes a new object reference is supplied each time.
 My suggestions:
 1. We could implement a different jar file so that the frame gets
 overwritten everytime. But then I believe this would remove the portability
 from the application.
 2. We can change the garbage collector or play around with the memory
 allocation for that very thread. I believe each thread has a generational
 gc. We could further look into that. We could overwrite the memory for that
 particular allocation each time, rather than freeing it and reallocating the
 same.
 3. We can ask some one from google to look into it directly and create an
 issue, which I will be doing by tonight.
 Please let me know your suggestions to remove this bottleneck.
 Thanks for commenting.
 Regards,
 Karan.



 On Tue, May 26, 2009 at 1:17 PM, Tom Gibara m...@tomgibara.com wrote:
  I'm pretty sure I have looked into this in the past and found that a
  different object reference is supplied on each call.
  Tom.

  2009/5/26 Robert Green rbgrn@gmail.com

  Are you talking about the method Camera.PreviewCallback.onPreviewFrame
  (byte[] arg0, anrdoid.hardware.Camera arg1) ?

  Is it allocating a new byte[] for every call?

  I would think it would keep its same byte[] and reuse it for each
  call.

  Posting more code may help.  Thanks

  On May 25, 9:30 pm, Karan Parikh karan.n...@gmail.com wrote:
   Hey All,
         I am developing a camera application , where the frame rate is
   important. However, camera uses a preview callback function which
   allocates a byte[] array of 230400 bytes, which makes it necessary for
   the garbage collection to step in. Can someone suggest me a way to
   avoid garbage collection stepping in ?
   Thanks in advance.
   Regards,
   Karan.

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



[android-developers] Re: implementation of onDestroy for a service containing a worker or backround thread

2009-05-28 Thread Marco Nelissen
On Thu, May 28, 2009 at 7:12 AM, Mike Hearn mh.in.engl...@gmail.com wrote:


 Your understanding is wrong - your service can be killed at any time
 without onDestroy being run. I'm not actually sure why onDestroy even
 exists in this case, I found it was much more common for the kernel to
 OOM kill my process than it was for the AM to nicely request my
 service to quit. Don't save state in onDestroy, if you need to,
 checkpoint state in the service. It'll just be tears in the long run
 if you don't.


It depends on how you use your service. If you call startService() and then
never stop the service again, then yes, eventually that process will
probably just be killed.
If you do stop the service when it is no longer needed, then onDestroy()
will be called shortly thereafter.

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



[android-developers] Re: Grayscaling

2009-05-28 Thread Gavin Aiken
Hi Marco,

Would you mind giving a brief code snippet of how this might work? I've been
trying to get a similar function to run faster but when I use the bitmap the
values I thought were written by the canvas aren't there.

Kind regards,

Gav

On Tue, Apr 21, 2009 at 12:21 AM, Marco Nelissen marc...@android.comwrote:

 You can do this more efficiently by using a Paint and a ColorFilter.



 On Mon, Apr 20, 2009 at 3:59 PM, sm12 mata...@gmail.com wrote:


 Solved. The problem was in the parameters of Color.rgb.




 


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



[android-developers] Re: 1.5: Phone no longer stays awake when Stay Awake is enabled under Development settings

2009-05-28 Thread Keith Wiley

Yep.  I have the same problem.  I haven't officially reported it
because I did a manual install from (presumably) the same file you are
using instead of waiting for the official OTA.  However, it seems
highly unlikely that this problem will be fixed in the next week or
so, so I'm sure all developers will be suffering with this until a fix
is pushed out.

Behavior is: screen dims quickly followed by phone going to sleep
after the set time period (1 minute) against my wishes.  When it is
awakened, I must reenter my pattern code to regain access EVERY TIME
(extremely tedious).  In addition, for obvious OS-related reasons, the
activity is reinitialized each time this occurs, which breaks a
debugging session, forcing me to restart the session.

I haven't installed SDK 1.5 r_2 yet (I'm still on r_1), but I don't
see how it could possibly impact on this.  Can anyone verify this
problem with SDK 1.5 r_2?

I assume most other developers are also having this problem.  Can
anyone else verify?

Cheers!

On May 28, 5:42 am, Rob  Franz rob.fr...@gmail.com wrote:
 Has anyone else noticed this?  It's slightly annoying.  I downloaded
 my version of 1.5 from

 https://android.clients.google.com/updates/partner/signed-kila-ota-14...

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



[android-developers] how to have onItemClickListener for setListAdapter(new EfficientAdapter(this));?

2009-05-28 Thread zeeshan

Hi,

i need image and text on list view and i am using list 14 example in
API demo.
i can have image and text in listview but wondering how to implement
onItemClickListener for each position


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



[android-developers] Re: Control which items to redraw? (notifyDataSetChanged with a range)

2009-05-28 Thread Romain Guy

No, notifyDataSetInvalidated() causes the entire content of ListView
to disappear. It's even more inefficient than notifyDataSetChanged().

If you want to refresh the content of a specific item, call
invalidate() on its View. If you changed the content of the Adapter
though, call notifyDataSetChanged().


-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

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



[android-developers] Re: Grayscaling

2009-05-28 Thread Streets Of Boston

- Create a mutable bitmap from immutable. But instead of a copy, just
create an empty one with the same width and height as the original
one.
- Create a canvas from this mutable bitmap (new Canvas(mutable));
- Create a ColorFilter object. Set its saturation to 0 (this is one
way of doing this).
  (ColorMatrixColorFilter with a ColorMatrix whose saturation is set
to 0).
- Create a new Paint object and set its color-filter to the
ColorMatrixColorFilter (bwPaint).
- Draw the original bitmap onto the new canvas:
  mutableCanvas.drawBitmap(immutable, 0, 0, bwPaint);
- After this drawBitmap call, the mutable bitmap contains a bw
version of your original mutable bitmap.

On May 28, 12:00 pm, Gavin Aiken gavin.ai...@imperial.ac.uk wrote:
 Hi Marco,

 Would you mind giving a brief code snippet of how this might work? I've been
 trying to get a similar function to run faster but when I use the bitmap the
 values I thought were written by the canvas aren't there.

 Kind regards,

 Gav

 On Tue, Apr 21, 2009 at 12:21 AM, Marco Nelissen marc...@android.comwrote:



  You can do this more efficiently by using a Paint and a ColorFilter.

  On Mon, Apr 20, 2009 at 3:59 PM, sm12 mata...@gmail.com wrote:

  Solved. The problem was in the parameters of Color.rgb.- 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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: implementation of onDestroy for a service containing a worker or backround thread

2009-05-28 Thread Gautam

Thanks...
The plan is to start the service once (startService()) and never call
stopService. I want my service to be running always (will set
service.forground() = true).
When any activity wants to use the service it would get the service
via bind and invoke methods on the service.

Also, by looking at the documentation, it seems that the platforfm
does not provide power down broadcast intents.

So, onDestroy() on the service would never be called or used.
Is it a right assumption?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: few querieson OpenGL-ES on Android...

2009-05-28 Thread Nightwolf

I gues GLSurfaceView uses OpenGL ES and regular views don't.
The first stop is API Demos from SDK. There are few examples under
Graphics-OpenGLES.
It's hard to tell for sure for the other, but you may want to check
following games:

3D Cube Race Demo
http://www.cyrket.com/package/com.escmobile.cube_race_demo

Carrom3D Demo
http://www.cyrket.com/package/com.kb.Carrom3D

On May 27, 8:30 pm, Shrinivas sinu.go...@gmail.com wrote:
 Hi All,

 I have few queries:

 - Can anybody let me know is 2D  3D graphics in Android are using
 OpenGL-ES? I have have read only 3D graphics is using OpenGL-ES.

 - what are all the application in android which are using OpenGL-ES.
 please give the list of applications.

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



[android-developers] video capture doesn't seem to work in 1.5

2009-05-28 Thread zeeshan

Hi dear,

i am trying to capture video since a week but still no luck.
can anybody help me to figure out what i am missing in the code below:

final MediaRecorder recorder = new MediaRecorder();
ContentValues values = new 
ContentValues(3);

values.put(MediaStore.MediaColumns.TITLE,
Recorded video);
values.put
(MediaStore.MediaColumns.DATE_ADDED, System.currentTimeMillis());
   // values.put
(MediaStore.MediaColumns.MIME_TYPE, recorder.getMimeContentType());

Uri newUri = getContentResolver().insert
(Media.EXTERNAL_CONTENT_URI, values);
//String path = getContentResolver()
getDataFilePath(newUri);
//final String filePath=newUri.toString
();


final String 
filePath=/sdcard/lion-seul.3gp;
recorder.setAudioSource
(MediaRecorder.AudioSource.MIC);
recorder.setVideoSource
(MediaRecorder.VideoSource.CAMERA);
recorder.setOutputFormat
(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder
(MediaRecorder.AudioEncoder.AMR_NB);

//recorder.setVideoSize(176, 144); // 
QCIF

//recorder.setOutputFormat
(MediaRecorder.OutputFormat.MPEG_4);
recorder.setVideoEncoder
(MediaRecorder.VideoEncoder.MPEG_4_SP);
recorder.setOutputFile(filePath);
//
CameraView.thisCameraView.setRequestedOrientation

//(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
SurfaceHolder holder;

videosurface.setVisibility(View.VISIBLE);
holder = videosurface.getHolder();


recorder.setPreviewDisplay(holder.getSurface
());

try {

recorder.prepare();
} catch 
(IllegalStateException e) {
// TODO 
Auto-generated catch block

e.printStackTrace();
} catch 
(IOException e) {
// TODO 
Auto-generated catch block

e.printStackTrace();
}
catch 
(Exception e) {
// TODO 
Auto-generated catch block

e.printStackTrace();
}
recorder.start();

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



[android-developers] Re: Control which items to redraw? (notifyDataSetChanged with a range)

2009-05-28 Thread Streets Of Boston

Aha! I stand corrected.
That is not what i understood from the API documentation...

Romain,
could you describe the exact differences (and usage example) of the
two?

Thanks!

About calling 'invalidate()':
Does calling invalidate() on a list-item's View cause the 'getView()'
method of an Adpater to be called?
If i'm not mistaken, getView() does not get called on 'invalidate()'.
But i could be wrong. TWan may need the adapter's getView() to be
called for specific items to properly update the items' views.

On May 28, 12:17 pm, Romain Guy romain...@google.com wrote:
 No, notifyDataSetInvalidated() causes the entire content of ListView
 to disappear. It's even more inefficient than notifyDataSetChanged().

 If you want to refresh the content of a specific item, call
 invalidate() on its View. If you changed the content of the Adapter
 though, call notifyDataSetChanged().

 --
 Romain Guy
 Android framework engineer
 romain...@android.com

 Note: please don't send private questions to me, as I don't have time
 to provide private support.  All such questions should be posted on
 public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: video capture doesn't seem to work in 1.5

2009-05-28 Thread Marco Nelissen
What do you mean by no luck? Does something crash? Do you get an
exception? Does it create the recording file? Is there any data in it?


On Thu, May 28, 2009 at 9:25 AM, zeeshan genx...@gmail.com wrote:


 Hi dear,

 i am trying to capture video since a week but still no luck.
 can anybody help me to figure out what i am missing in the code below:

 final MediaRecorder recorder = new MediaRecorder();
ContentValues values = new
 ContentValues(3);


  values.put(MediaStore.MediaColumns.TITLE,
 Recorded video);
values.put
 (MediaStore.MediaColumns.DATE_ADDED, System.currentTimeMillis());
   // values.put
 (MediaStore.MediaColumns.MIME_TYPE, recorder.getMimeContentType());

Uri newUri = getContentResolver().insert
 (Media.EXTERNAL_CONTENT_URI, values);
//String path = getContentResolver()
 getDataFilePath(newUri);
//final String filePath=newUri.toString
 ();


final String
 filePath=/sdcard/lion-seul.3gp;
recorder.setAudioSource
 (MediaRecorder.AudioSource.MIC);
recorder.setVideoSource
 (MediaRecorder.VideoSource.CAMERA);
recorder.setOutputFormat
 (MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder
 (MediaRecorder.AudioEncoder.AMR_NB);

//recorder.setVideoSize(176, 144);
 // QCIF

//recorder.setOutputFormat
 (MediaRecorder.OutputFormat.MPEG_4);
recorder.setVideoEncoder
 (MediaRecorder.VideoEncoder.MPEG_4_SP);
recorder.setOutputFile(filePath);
//
 CameraView.thisCameraView.setRequestedOrientation

  //(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
SurfaceHolder holder;

  videosurface.setVisibility(View.VISIBLE);
holder = videosurface.getHolder();


  recorder.setPreviewDisplay(holder.getSurface
 ());

try {

  recorder.prepare();
} catch
 (IllegalStateException e) {
//
 TODO Auto-generated catch block

  e.printStackTrace();
} catch
 (IOException e) {
//
 TODO Auto-generated catch block

  e.printStackTrace();
}
catch
 (Exception e) {
//
 TODO Auto-generated catch block

  e.printStackTrace();
}
recorder.start();

 


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



[android-developers] Re: Control which items to redraw? (notifyDataSetChanged with a range)

2009-05-28 Thread Romain Guy

notifyDataSetInvalidated() is used when the adapter loses all of its
content. It's there to tell ListView to stop using the adapter
basically. This is usually invoked when you have a Cursor and you call
close() on the Cursor.

On Thu, May 28, 2009 at 9:27 AM, Streets Of Boston
flyingdutc...@gmail.com wrote:

 Aha! I stand corrected.
 That is not what i understood from the API documentation...

 Romain,
 could you describe the exact differences (and usage example) of the
 two?

 Thanks!

 About calling 'invalidate()':
 Does calling invalidate() on a list-item's View cause the 'getView()'
 method of an Adpater to be called?
 If i'm not mistaken, getView() does not get called on 'invalidate()'.
 But i could be wrong. TWan may need the adapter's getView() to be
 called for specific items to properly update the items' views.

 On May 28, 12:17 pm, Romain Guy romain...@google.com wrote:
 No, notifyDataSetInvalidated() causes the entire content of ListView
 to disappear. It's even more inefficient than notifyDataSetChanged().

 If you want to refresh the content of a specific item, call
 invalidate() on its View. If you changed the content of the Adapter
 though, call notifyDataSetChanged().

 --
 Romain Guy
 Android framework engineer
 romain...@android.com

 Note: please don't send private questions to me, as I don't have time
 to provide private support.  All such questions should be posted on
 public forums, where I and others can see and answer them
 




-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

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



[android-developers] Re: how to have onItemClickListener for setListAdapter(new EfficientAdapter(this));?

2009-05-28 Thread Marco Nelissen
You don't set a separate OnItemClickListener for each position, you set one
for the entire list, and in your click listener you will be told which
position was selected.


On Thu, May 28, 2009 at 9:05 AM, zeeshan genx...@gmail.com wrote:


 Hi,

 i need image and text on list view and i am using list 14 example in
 API demo.
 i can have image and text in listview but wondering how to implement
 onItemClickListener for each position


 anybody help plz
 


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



[android-developers] Re: Control which items to redraw? (notifyDataSetChanged with a range)

2009-05-28 Thread Streets Of Boston

Thanks!
The fact that it's used to 'tell the list view to stop using the
adapter' might actually explain an issue i have with a list of images
i show in my own app. :)

On May 28, 12:31 pm, Romain Guy romain...@google.com wrote:
 notifyDataSetInvalidated() is used when the adapter loses all of its
 content. It's there to tell ListView to stop using the adapter
 basically. This is usually invoked when you have a Cursor and you call
 close() on the Cursor.

 On Thu, May 28, 2009 at 9:27 AM, Streets Of Boston





 flyingdutc...@gmail.com wrote:

  Aha! I stand corrected.
  That is not what i understood from the API documentation...

  Romain,
  could you describe the exact differences (and usage example) of the
  two?

  Thanks!

  About calling 'invalidate()':
  Does calling invalidate() on a list-item's View cause the 'getView()'
  method of an Adpater to be called?
  If i'm not mistaken, getView() does not get called on 'invalidate()'.
  But i could be wrong. TWan may need the adapter's getView() to be
  called for specific items to properly update the items' views.

  On May 28, 12:17 pm, Romain Guy romain...@google.com wrote:
  No, notifyDataSetInvalidated() causes the entire content of ListView
  to disappear. It's even more inefficient than notifyDataSetChanged().

  If you want to refresh the content of a specific item, call
  invalidate() on its View. If you changed the content of the Adapter
  though, call notifyDataSetChanged().

  --
  Romain Guy
  Android framework engineer
  romain...@android.com

  Note: please don't send private questions to me, as I don't have time
  to provide private support.  All such questions should be posted on
  public forums, where I and others can see and answer them

 --
 Romain Guy
 Android framework engineer
 romain...@android.com

 Note: please don't send private questions to me, as I don't have time
 to provide private support.  All such questions should be posted on
 public forums, where I and others can see and answer them- 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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] remove button backgroundresource!?

2009-05-28 Thread guruk

Hi,
i have a quit strange problem,

I have a textview in the top and fill some buttons later with:
mbs[i].setBackgroundColor(daybgcolor);

all fine,

but when I also add

mbs[i].setBackgroundResource(R.drawable.chart);

it kills the text in my textview?!? also when i even dont know what my
textview
should have to do with that button action.

Ok, anyhow after duddling around i guess the problem is somehow in the
backgroundresource, because when i later like to fill it with
setbackgroundcolor
the text in the textview dissapear.

Is there a Way to CLEAN, or reset the SetBackgroundResource i did
before,
so the button is clean without any chances I did later on?

Thanks
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: UnknownHostException on 1.5 emulator

2009-05-28 Thread Peter Jeffe

OK, got it to reproduce when running with the -tcpdump flag.  I've
attached the resulting pcap file to the bug report (actually just the
DNS records since the entire 15MB compressed file wouldn't upload).
Here's an excerpt of the DNS traffic from where it turned bad
(starting at 79853):

  76915 20:59:10.741125 10.0.2.15 10.0.2.3
DNS  Standard query A ec2-174-129-233-190.compute-1.amazonaws.com
  76916 20:59:10.850500 10.0.2.3  10.0.2.15
DNS  Standard query response A 174.129.233.190
  77045 20:59:20.475500 10.0.2.15 10.0.2.3
DNS  Standard query A data.flurry.com
  77046 20:59:20.725500 10.0.2.3  10.0.2.15
DNS  Standard query response A 63.150.3.198
  77469 21:01:39.225500 10.0.2.15 10.0.2.3
DNS  Standard query A imap.gmail.com
  77470 21:01:39.272375 10.0.2.3  10.0.2.15
DNS  Standard query response CNAME gmail-imap.l.google.com A
72.14.247.111 A 72.14.247.109
  79853 21:02:44.334875 10.0.2.15 10.0.2.3
DNS  Standard query A ec2-174-129-233-190.compute-1.amazonaws.com
  79937 21:02:49.366125 10.0.2.15 10.0.2.4
DNS  Standard query A ec2-174-129-233-190.compute-1.amazonaws.com
  79942 21:02:54.350500 10.0.2.15 10.0.2.3
DNS  Standard query A ec2-174-129-233-190.compute-1.amazonaws.com
  79947 21:02:59.350500 10.0.2.15 10.0.2.4
DNS  Standard query A ec2-174-129-233-190.compute-1.amazonaws.com
  79948 21:03:04.350500 10.0.2.15 10.0.2.3
DNS  Standard query A ec2-174-129-233-190.compute-1.amazonaws.com
  79949 21:03:09.350500 10.0.2.15 10.0.2.4
DNS  Standard query A ec2-174-129-233-190.compute-1.amazonaws.com
  79950 21:03:14.350500 10.0.2.15 10.0.2.3
DNS  Standard query A ec2-174-129-233-190.compute-1.amazonaws.com
  79953 21:03:19.350500 10.0.2.15 10.0.2.4
DNS  Standard query A ec2-174-129-233-190.compute-1.amazonaws.com
  79960 21:03:24.772375 10.0.2.15 10.0.2.3
DNS  Standard query A data.flurry.com
  79977 21:03:29.772375 10.0.2.15 10.0.2.4
DNS  Standard query A data.flurry.com
  79978 21:03:34.772375 10.0.2.15 10.0.2.3
DNS  Standard query A data.flurry.com
  79979 21:03:39.772375 10.0.2.15 10.0.2.4
DNS  Standard query A data.flurry.com
  79980 21:03:44.772375 10.0.2.15 10.0.2.3
DNS  Standard query A data.flurry.com.\033
  79983 21:03:49.772375 10.0.2.15 10.0.2.4
DNS  Standard query A data.flurry.com.\033
  79986 21:03:54.772375 10.0.2.15 10.0.2.3
DNS  Standard query A data.flurry.com.\033
  79987 21:03:59.772375 10.0.2.15 10.0.2.4
DNS  Standard query A data.flurry.com.\033

Hope this helps!

An unrelated concern: it seems like it's querying the server every
time an application tries to resolve an address--doesn't the resolver
cache at all?  I'm looking at records that have 2-hour TTLs but it's
querying them every few minutes.  Seems to me this wastes battery and
bandwidth and greatly increases application-level latency.

-- 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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Application.onPause()? Is there a hook like this?

2009-05-28 Thread matthias

Well, I need to disable the listeners when the app goes into the
background, not only when it terminates.

I also tested this use of WeakReference, simply to see how it behaves,
and it didn't work for me at all. Regardless of whether the app was
paused to display another application or to display another activity
of the same app, the identity test for 'this' always succeeded.

Frankly, I do not understand how this would work at all. In onCreate
(), the reference is set to 'this' (the current activity), otherwise
it is set to null. So the test for 'this' in onPause is only true, if
onPause() is called on the same activity instance that created the
weak reference in onCreate. But how could those ever be two distinct
objects? Is it possible that resuming an activity will not resurrect
the old one, but create a new activity object? But wouldn't that be
the same as simply doing an onCreate? I'm confused.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ScrolllBar style

2009-05-28 Thread karthikr


Hi Guys,

Can someone please help me with this regard?

I need this functionality in my app..

Even setting the scroll bar image to a particular color on scrolling
and changing it while idle will do..

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



[android-developers] Re: How to open wbxml stream ?

2009-05-28 Thread kaoul

up

On 24 mai, 22:19, kaoul kaoul@gmail.com wrote:
 Hello,

 I would like to read and writewbxml.

 I found org.xmlpull.v1.XmlSerializer but it seems to help just for
 writing.

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



[android-developers] Re: Netbook with Android

2009-05-28 Thread cookdav

Bump!

[What's up with this? Base question got posted back in April, and
there's still no answer?]

So, is there some BETTER forum for Android questions than this 'Google
Group'?

I have the same exact question: I read in all the press that Android
is considered
a 'mobile OS' that netbooks are perfect candidates for, but no one has
any info?
I'm dumb-founded.


On Apr 23, 8:16 am, info+farm bilgiciftl...@gmail.com wrote:
 Hello all,

 I am an Android developer and I am going to buy a newnetbookfor
 seamless portability.

 Once I read it is possible to install Android on netbooks as an OS, my
 eyes started to shine. Therefore, I would like to be able to test my
 or third party applications on thisnetbookin the future.

 Whichnetbookbrand/model will be the best suited(no driver headaches-
 sdcard, camera...) for upcoming Android OS for netbooks? I am reading
 a lot of rumors on the net, but I cannot find a baseline.

 Any idea will be appreciated...

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



[android-developers] Re: Netbook with Android

2009-05-28 Thread Al Sutton

It's more a case of there is no good answer yet.

Plans for Android on netbooks haven't been formally announced so if you really 
want one now you should look around for a group or groups who are porting it to 
netbooks to ask them, or you'll have to sit and wait until something is 
announced.

Al.

---

* Written an Android App? - List it at http://andappstore.com/ *

==
Funky Android Limited is registered in England  Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries. 


-Original Message-
From: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] On Behalf Of cookdav
Sent: 28 May 2009 18:37
To: Android Developers
Subject: [android-developers] Re: Netbook with Android


Bump!

[What's up with this? Base question got posted back in April, and
there's still no answer?]

So, is there some BETTER forum for Android questions than this 'Google
Group'?

I have the same exact question: I read in all the press that Android
is considered
a 'mobile OS' that netbooks are perfect candidates for, but no one has
any info?
I'm dumb-founded.


On Apr 23, 8:16 am, info+farm bilgiciftl...@gmail.com wrote:
 Hello all,

 I am an Android developer and I am going to buy a newnetbookfor
 seamless portability.

 Once I read it is possible to install Android on netbooks as an OS, my
 eyes started to shine. Therefore, I would like to be able to test my
 or third party applications on thisnetbookin the future.

 Whichnetbookbrand/model will be the best suited(no driver headaches-
 sdcard, camera...) for upcoming Android OS for netbooks? I am reading
 a lot of rumors on the net, but I cannot find a baseline.

 Any idea will be appreciated...

 Regards,
 info+farm


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



[android-developers] screenBrightness of 0.0 == ???

2009-05-28 Thread Brad Fullmer

In my app I want to completely dim the screen for a period of time and
later restore the brightness.  Dimming works fine:

 WindowManager.LayoutParams lp = getWindow().getAttributes();
 lp.screenBrightness = 0.0f;
 getWindow().setAttributes(lp);

But this seem to put the phone into an odd state whereby touch events
are no longer received and when I later try to restore the screen
brightness, either by setting it to 1.0 or -1.0 - nothing happens!
The only way I can get the screen back is to hit the end button and
menu out of the screen lock.

Is this the correct behavior?  Is there any way to work around it and
A) receive touch events while the screen is dimmed and B)
programatically restore the brightness?

NOTE: things work as expected with non zero brighness values such as
0.1


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



[android-developers] Drawing Masked Bitmaps

2009-05-28 Thread Salentinux

Hi all,

I want make a Mask effect with 2 bitmaps. The first has to be masked
by the second. What is the best way? I need it to redraw portions of
the screen the are involved in animations. I have an object(bitmap)
that moves on the screen and i need to redraw with a mask its last
position with the background bitmap.

Thank you in advance

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



[android-developers] Re: Netbook with Android

2009-05-28 Thread Marco Nelissen
On Thu, May 28, 2009 at 10:37 AM, cookdav david.hubert.c...@gmail.comwrote:


 Bump!

 [What's up with this? Base question got posted back in April, and
 there's still no answer?]


This group is for asking question about development using the Android SDK.
Asking which netbooks might run Android is completely unrelated to the SDK,
so it's not surprising nobody here has an answer.

So, is there some BETTER forum for Android questions than this 'Google
 Group'?


You could try android-discuss or android-porting.

I have the same exact question: I read in all the press that Android
 is considered
 a 'mobile OS' that netbooks are perfect candidates for, but no one has
 any info?
 I'm dumb-founded.


Just because someone said that Android is a perfect candidate for netbooks
doesn't mean that anyone can tell you which netbooks, if any, Android has
been or will be ported to. Perhaps you could ask the writers of all those
articles you read which particular netbooks they think will be capable of
running Android.

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



[android-developers] Problem while streaming amr file

2009-05-28 Thread Zhubham

Hi,

I am trying to stream a hinted AMR narrowband file through darwin
streaming server.

(i) This is not getting streamed at all. RTSP Describe is followed
by Teardown. I use the api demo apk and c that it is failing @ prepare
(). I am able to stream this file through QuickTime Pro.

(ii) However, If i stream an MPEG-4 + AMR narrowband file there is no
problem at all.

can anyone suggest something on this.

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



[android-developers] Re: word wrap on button

2009-05-28 Thread Keith Wiley

I agree that this was frustrating in the past, but since installing
1.5 I see buttons wrapping text automatically now.  I didn't even
ask.  :-)

On May 27, 3:04 pm, jonathan topcod...@gmail.com wrote:
 the possible button width are fill_parent or wrap_content, is there a
 way to make it wrap words?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] can not find a file in dynamically loaded jar

2009-05-28 Thread sherry

I'm trying to dynamically load a jar file, then load the classes
inside the jar. The code is simple but I keep getting ClassNotFind
exception. The class is in the jar. How can I figure out what is
wrong?

import java.net.URL;
import java.io.IOException;
import java.net.URLClassLoader;
import java.net.MalformedURLException;

import android.util.Log;

public class JarFileLoader extends URLClassLoader {

public JarFileLoader(URL[] urls) {
super(urls);
}

protected void addFile (String path) throws MalformedURLException
{
String urlPath = jar:file:// + path;// + !/;
addURL (new URL (urlPath));
}

public static void loadjar()
   {
 URL[] urls = {};
// load sprint jar
JarFileLoader cl = new JarFileLoader (urls);
try {
cl.addFile(C:/working/Adroid/workspace/my.jar);

cl.loadClass(com.mycompany.internal.Manager); // ! ClassNotFind
exception here !
 } catch (Exception e) {
// TODO Auto-generated catch block
Log.i(JarFileLoader, e.getMessage());
e.printStackTrace();
}
Log.i(jarloader, Success!);
   }

}

Anyone has done dynamic jar and class loading please help.

Thanks,

Sherry

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



[android-developers] loading external data on local file in WebView

2009-05-28 Thread pius.lee

when I load external web page, image or javascript file from local
webpage.
I can't see external image and can't load javascript or webpage.
but I can only see local image.
why I can't load external javascript, webpage or image?

here is the HTML source.
(of course, I filled right [daum open API key])

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
html
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8
titleDaum 지도 API/title
script type=text/javascript src=http://apis.daum.net/maps/maps.js?
apikey=[daum open API key] charset=utf-8/script
/head
body
div id=map style=width:600px;height:400px; style=border:1px
solid #000/div
img src=http://4.bp.blogspot.com/_2-7AdSkZA7I/RlCnDhD3ZfI/
E9U/LEHMtyVLdY8/s400/CutyTale10.jpg
img src=file:///android_asset/coffeebean.jpg
script type=text/javascript
var map = new DMap(map, {point:new DLatLng(37.48879895934866,
127.03130020103005), level:2} );
/script
iframe src=http://www.daum.com; width=300 height=150/iframe
/body
/html

and I use this Activity source

package bo.my.android.test;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;

public class OpenAPITest extends Activity {

WebView webView;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

webView = (WebView) findViewById(R.id.webView1);
webView.setWebViewClient(new DaumMapClient());
webView.getSettings().setJavaScriptEnabled(true);

webView.loadUrl(file:///android_asset/daummap.html);
//webView.loadUrl(http://www.daum.net;);
}
}

I check permission like this manifest

?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=bo.my.android.test
  android:versionCode=1
  android:versionName=1.0
application android:icon=@drawable/icon android:label=@string/
app_name
activity android:name=.OpenAPITest
  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
uses-permission android:name=android.permission.INTERNET/uses-
permission
uses-sdk android:minSdkVersion=2 /

/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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] can't loading external webpage or image, javascript in WebView

2009-05-28 Thread pius.lee

when I load external web page, image or javascript file from local
webpage.
I can't see external image and can't load javascript or webpage.
but I can only see local image.
why I can't load external javascript, webpage or image?

here is the HTML source.
(of course, I filled right [daum open API key])

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
html
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8
titleDaum 지도 API/title
script type=text/javascript src=http://apis.daum.net/maps/maps.js?
apikey=[daum open API key] charset=utf-8/script
/head
body
   div id=map style=width:600px;height:400px; style=border:
1px
solid #000/div
   img src=http://4.bp.blogspot.com/_2-7AdSkZA7I/RlCnDhD3ZfI/
E9U/LEHMtyVLdY8/s400/CutyTale10.jpg
   img src=file:///android_asset/coffeebean.jpg
   script type=text/javascript
   var map = new DMap(map, {point:new DLatLng
(37.48879895934866,
127.03130020103005), level:2} );
   /script
   iframe src=http://www.daum.com; width=300 height=150/
iframe
/body
/html

and I use this Activity source

package bo.my.android.test;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;

public class OpenAPITest extends Activity {

   WebView webView;
   /** Called when the activity is first created. */
   @Override
   public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.main);

   webView = (WebView) findViewById(R.id.webView1);
   webView.setWebViewClient(new DaumMapClient());
   webView.getSettings().setJavaScriptEnabled(true);

   webView.loadUrl(file:///android_asset/daummap.html);
   //webView.loadUrl(http://www.daum.net;);
   }
}

I check permission like this manifest

?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
 package=bo.my.android.test
 android:versionCode=1
 android:versionName=1.0
   application android:icon=@drawable/icon android:label=@string/
app_name
   activity android:name=.OpenAPITest
 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
   uses-permission android:name=android.permission.INTERNET/uses-
permission
   uses-sdk android:minSdkVersion=2 /

/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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] loading external data on local file in WebView

2009-05-28 Thread pius.lee

when I load external web page, image or javascript file from local
webpage.
I can't see external image and can't load javascript or webpage.
but I can only see local image.
why I can't load external javascript, webpage or image?

here is the HTML source.
(of course, I filled right [daum open API key])

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
html
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8
titleDaum 지도 API/title
script type=text/javascript src=http://apis.daum.net/maps/maps.js?
apikey=[daum open API key] charset=utf-8/script
/head
body
   div id=map style=width:600px;height:400px; style=border:
1px
solid #000/div
   img src=http://developer.android.com/assets/images/home/sdk-
large.png
   img src=file:///android_asset/coffeebean.jpg
   script type=text/javascript
   var map = new DMap(map, {point:new DLatLng
(37.48879895934866,
127.03130020103005), level:2} );
   /script
   iframe src=http://www.daum.net; width=300 height=150/
iframe
/body
/html

and I use this Activity source

package bo.my.android.test;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;

public class OpenAPITest extends Activity {

   WebView webView;
   /** Called when the activity is first created. */
   @Override
   public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.main);

   webView = (WebView) findViewById(R.id.webView1);
   webView.setWebViewClient(new DaumMapClient());
   webView.getSettings().setJavaScriptEnabled(true);

   webView.loadUrl(file:///android_asset/daummap.html);
   //webView.loadUrl(http://www.daum.net;);
   }
}

I check permission like this manifest

?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
 package=bo.my.android.test
 android:versionCode=1
 android:versionName=1.0
   application android:icon=@drawable/icon android:label=@string/
app_name
   activity android:name=.OpenAPITest
 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
   uses-permission android:name=android.permission.INTERNET/uses-
permission
   uses-sdk android:minSdkVersion=2 /

/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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



  1   2   3   >