[android-developers] problem with KeyEvent.KEYCODE_PLUS in SDK 1.5pre

2009-04-26 Thread André Charles Legendre

When I Override onKeyDown in a MapActivity I have a problem with
KeyEvent.KEYCODE_PLUS.
When running my app + just don't work.

The same code works for any key but KeyEvent.KEYCODE_PLUS.
In log I get
W/KeyCharacterMap(  725): No keyboard fo id 0
W/KeyCharacterMap(  725): Using default keymap:
/system/usr/keychars/qwerty.kcm.bin

I am working with a Hp Laptop with US qwerty keyboard and Kubuntu 8.04.

Any idea ?

Andre

--~--~-~--~~~---~--~~
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: URGENT!!!!! Can't update apps in android market!!!

2009-04-26 Thread aleung

Perhaps it's because of this line:
uses-library android:name=com.google.android.maps /

The Android blog said that Google Maps API is a plugin in the 1.5 SDK.
I'm now downloading the 1.5 SDK early look to have a try.

On Apr 26, 12:05 pm, jsdf jasons...@gmail.com wrote:
 Even with 1 this does not work. I still get The server could not
 process your apk. Try again.
 I've pasted the relevant AndroidManifest.xml code below.  Is there
 anything else that is wrong?  Perhaps use of the custom Application
 (vs. the default Application) is throwing the XML parser for a loop?
 (I hope not; I've been using this structure for AndroidManifest for
 over a month now!)

 ?xml version=1.0 encoding=utf-8?
 manifest xmlns:android=http://schemas.android.com/apk/res/android;
         package=com.my.package android:versionName=1.071
         android:versionCode=20
         uses-sdk android:minSdkVersion=1 /
         application android:icon=@drawable/icon android:label=@string/
 app_name
                 android:name=com.my.package.MyApplication
                 activity android:name=.MyAppActivity 
 android:label=@string/
 app_name
                         intent-filter
                                 action 
 android:name=android.intent.action.MAIN /
                                 category 
 android:name=android.intent.category.LAUNCHER /
                         /intent-filter
                 /activity
                 activity android:name=RouteChooser/activity
                 activity android:name=DirChooser/activity
                 activity android:name=StopChooser/activity
                 activity android:name=UserRouteNameActivity/activity
                 activity android:name=PreferencesActivity/activity
                 activity android:name=com.my.package.map.MapViewActivity/
 activity
                 uses-library android:name=com.google.android.maps /
         /application
         uses-permission android:name=android.permission.VIBRATE/uses-
 permission
         uses-permission android:name=android.permission.INTERNET/uses-
 permission
 /manifest

 Thanks for the help!
 Jason

 On Apr 25, 5:14 pm, Randy McEoin rmce...@gmail.com wrote:

  The market doesn't seem to accept minSdkVersion=2.   You must use
  1.

  On Apr 25, 10:42 am, aleung leoli...@gmail.com wrote:

   When I didn't add the minSdkVersion, I got the error message:
   Market requires theminSdkVersionto be set in AndroidManifest.xml.

   But even after I added it, there was still error:
   The server could not process your apk. Try again.

   I have added the uses-sdk as the first child of manifest:

   manifest xmlns:android=http://schemas.android.com/apk/res/android;
         package=leoliang.bettermylocation android:versionCode=9
   android:versionName=1.4.1
           uses-sdk android:minSdkVersion=2 /


--~--~-~--~~~---~--~~
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 KeyEvent.KEYCODE_PLUS in SDK 1.5pre

2009-04-26 Thread Dianne Hackborn
There isn't a dedicated '+' key on the G1 keyboard (nor likely on most phone
keyboards), so it would be reasonable for it to not be generated by the
emulator.

On Sun, Apr 26, 2009 at 12:04 AM, André Charles Legendre 
andre.legen...@gmail.com wrote:


 When I Override onKeyDown in a MapActivity I have a problem with
 KeyEvent.KEYCODE_PLUS.
 When running my app + just don't work.

 The same code works for any key but KeyEvent.KEYCODE_PLUS.
 In log I get
 W/KeyCharacterMap(  725): No keyboard fo id 0
 W/KeyCharacterMap(  725): Using default keymap:
 /system/usr/keychars/qwerty.kcm.bin

 I am working with a Hp Laptop with US qwerty keyboard and Kubuntu 8.04.

 Any idea ?

 Andre

 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  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] [note pad]How to implemet some actions in the note pad such as page down...

2009-04-26 Thread Morris

Hi All:

Now I want to port android on netbook. I already finish it. But the
keys of keyboard on android are not enough for netbook. For example,
it lacks page down, page up, and so on. Thus I want to implement these
key actions when we use note pad application.
But I have no idea how and where to start? Could somebody tell or give
a direction to me?
Thanks a lot.

Morris
--~--~-~--~~~---~--~~
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 KeyEvent.KEYCODE_PLUS in SDK 1.5pre

2009-04-26 Thread André Charles Legendre

Hi Diane


Tank's for the answer.

What keys are usually mapped for zoomIn and zoomOut in Android devices ?

And what physical key is associated to the logical KEYCODE_PLUS ?

Regards

Andre

--~--~-~--~~~---~--~~
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 demo multiple alarms

2009-04-26 Thread guruk

Hi, i like to create multiple alarms, but i does not work. how to set
and how to request in my receiver what alarm intent came activated

in my alarm.java i call this function like: setalarm(5); setalarm(10)
(it works but only remember the last)


 public void setalarm(int delay)
{
 Intent intent = new Intent(alarm.this, alarmreceiver.class);
 PendingIntent sender = PendingIntent.getBroadcast(alarm.this,
0, intent, 0);
 intent.setData((Uri.parse(custom://+delay)));   i heared
about this would make individual alarms.. but does not work

 Calendar calendar = Calendar.getInstance();
 calendar.setTimeInMillis(System.currentTimeMillis());
 calendar.add(Calendar.SECOND, delay);

 intent.putExtra(avr, +delay);   //i tried to set my data
here to read later, but also does not work


 AlarmManager am = (AlarmManager)getSystemService
(ALARM_SERVICE);
 am.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),
sender);

 //Toast.makeText(this, Alarm set, Toast.LENGTH_LONG).show
();

}

 my alarmreceiver.java

public class alarmreceiver extends BroadcastReceiver
{
NotificationManager mNM;
@Override
 public void onReceive(Context context, Intent intent)
 {
Uri ursistr = intent.getData();
String intentstr = intent.getStringExtra(avr);  //does not 
get the
saved intentextra?!

Toast.makeText(context, GOT IT :+intentstr+ +ursistr,
Toast.LENGTH_SHORT).show();

 }

greets
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: Difficulty Resuming SurfaceView

2009-04-26 Thread Jason Van Anden
This looks like it does what I have been trying to do ... except that I have
no way of knowing if it will resolve the problem that occurs when I call the
listview until I tinker with it.  I have things running well enough except
for this problem (thus I am inclined to continue with what I have and wait
to use 1.5 until it is ready for release).  The mis-registration of the
buffers is super weird ... esp since it only occurs when started from the
activity with the surfaceview.

Thank you,
Jason

On Apr 25, 2009 3:28 PM, Mike Hearn mh.in.engl...@gmail.com wrote:


Does GLSurfaceView do what you want? See the latest blog post.


--~--~-~--~~~---~--~~
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: Transparency on Views behaving differently in 1.5

2009-04-26 Thread cnordvik

Does this change happen with the current binary of your app, or after you
recompile it against 1.5?

This happens only when I recompile it against 1.5 and run it in the
emulator. Haven't tested the 1.1 binaries in the 1.5 emulator. If I
switch target to 1.1 and run it on my phone then it works great.

I noticed that it is related to setting transparency with 00  or
FF color. If I use another color like (01) then it works
as expected.

I can change all my colors, but this seems like a bug to me?


LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:orientation=horizontal android:id=@+id/root
android:layout_width=fill_parent
android:layout_height=fill_parent
android:background=@drawable/field

!-- This doesn't work in 1.5. In 1.1 this would produce a black
layout with transparency.  --
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:orientation=vertical android:id=@+id/root2
android:layout_width=fill_parent
android:layout_height=fill_parent
android:background=#cc00

!-- This one works...
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:orientation=vertical android:id=@+id/root2
android:layout_width=fill_parent
android:layout_height=fill_parent
android:background=#cc01 --

-Christer
--~--~-~--~~~---~--~~
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: Difficulty Resuming SurfaceView

2009-04-26 Thread Jason Van Anden

Not to beat a dead horse ... but other suggestions regarding how to
deal with the mis-registered list view issue would be super
appreciated.  My app is a data visualization app like Google Maps and
I was using the SurfaceView mainly in order to better control the draw
loop (like what is described in the blog entry).

Thanks,
Jason Van Anden
http://www.smileproject.com




On Sun, Apr 26, 2009 at 6:49 AM, Jason Van Anden
jason.van.an...@gmail.com wrote:
 This looks like it does what I have been trying to do ... except that I have
 no way of knowing if it will resolve the problem that occurs when I call the
 listview until I tinker with it.  I have things running well enough except
 for this problem (thus I am inclined to continue with what I have and wait
 to use 1.5 until it is ready for release).  The mis-registration of the
 buffers is super weird ... esp since it only occurs when started from the
 activity with the surfaceview.

 Thank you,
 Jason

 On Apr 25, 2009 3:28 PM, Mike Hearn mh.in.engl...@gmail.com wrote:


 Does GLSurfaceView do what you want? See the latest blog post.

 


--~--~-~--~~~---~--~~
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 UI Elements in AppWidget?

2009-04-26 Thread nEx.Software

Is it safe to assume that classes derived of those allowed are not
usable?
So, if I created a custom button or something that extends one of
those available classes, it wouldn't be available to RemoteViews?

On Apr 25, 6:56 pm, nEx.Software justin.shapc...@gmail.com wrote:
 Awesome. Thanks. Not sure why it didn't come up in my search?
 Oh well, I appreciate the quick response... It helps a lot.

 On Apr 25, 6:32 pm, Jeff Sharkey jshar...@android.com wrote:

  Here ya 
  go:http://groups.google.com/group/android-developers/msg/a5247467151f5e3a

  j

  On Sat, Apr 25, 2009 at 6:24 PM, nEx.Software justin.shapc...@gmail.com 
  wrote:
   Just wonder what limitations there are for UI elements in AppWidgets?
   I tried a ListView and was met with an error... I saw the other post
   that EditText isn't available.  Just wondering if there was a full
   list somewhere?

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



[android-developers] Re: What UI Elements in AppWidget?

2009-04-26 Thread Jean-Baptiste Queru

Correct, you can only use the exact classes that are marked as available.

JBQ

On Sun, Apr 26, 2009 at 6:09 AM, nEx.Software justin.shapc...@gmail.com wrote:

 Is it safe to assume that classes derived of those allowed are not
 usable?
 So, if I created a custom button or something that extends one of
 those available classes, it wouldn't be available to RemoteViews?

 On Apr 25, 6:56 pm, nEx.Software justin.shapc...@gmail.com wrote:
 Awesome. Thanks. Not sure why it didn't come up in my search?
 Oh well, I appreciate the quick response... It helps a lot.

 On Apr 25, 6:32 pm, Jeff Sharkey jshar...@android.com wrote:

  Here ya 
  go:http://groups.google.com/group/android-developers/msg/a5247467151f5e3a

  j

  On Sat, Apr 25, 2009 at 6:24 PM, nEx.Software justin.shapc...@gmail.com 
  wrote:
   Just wonder what limitations there are for UI elements in AppWidgets?
   I tried a ListView and was met with an error... I saw the other post
   that EditText isn't available.  Just wondering if there was a full
   list somewhere?

  --
  Jeff Sharkey
  jshar...@google.com
 




-- 
Jean-Baptiste M. JBQ Queru
Android Engineer, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

--~--~-~--~~~---~--~~
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 UI Elements in AppWidget?

2009-04-26 Thread nEx.Software

Thanks for the info. Again, I appreciate the quick response... That is
very refreshing to see.

On Apr 26, 6:31 am, Jean-Baptiste Queru j...@android.com wrote:
 Correct, you can only use the exact classes that are marked as available.

 JBQ



 On Sun, Apr 26, 2009 at 6:09 AM, nEx.Software justin.shapc...@gmail.com 
 wrote:

  Is it safe to assume that classes derived of those allowed are not
  usable?
  So, if I created a custom button or something that extends one of
  those available classes, it wouldn't be available to RemoteViews?

  On Apr 25, 6:56 pm, nEx.Software justin.shapc...@gmail.com wrote:
  Awesome. Thanks. Not sure why it didn't come up in my search?
  Oh well, I appreciate the quick response... It helps a lot.

  On Apr 25, 6:32 pm, Jeff Sharkey jshar...@android.com wrote:

   Here ya 
   go:http://groups.google.com/group/android-developers/msg/a5247467151f5e3a

   j

   On Sat, Apr 25, 2009 at 6:24 PM, nEx.Software 
   justin.shapc...@gmail.com wrote:
Just wonder what limitations there are for UI elements in AppWidgets?
I tried a ListView and was met with an error... I saw the other post
that EditText isn't available.  Just wondering if there was a full
list somewhere?

   --
   Jeff Sharkey
   jshar...@google.com

 --
 Jean-Baptiste M. JBQ Queru
 Android Engineer, Google.

 Questions sent directly to me that have no reason for being private
 will likely get ignored or forwarded to a public forum with no further
 warning.
--~--~-~--~~~---~--~~
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: URGENT!!!!! Can't update apps in android market!!!

2009-04-26 Thread jsdf

However, I am building with the 1.1 ADT and 1.1 target.
Can anyone else who have a maps application verify that this line is
still acceptable for their Manifest file in the market?
Jason

On Apr 26, 2:16 am, aleung leoli...@gmail.com wrote:
 Perhaps it's because of this line:
 uses-library android:name=com.google.android.maps /

 The Android blog said that Google Maps API is a plugin in the 1.5 SDK.
 I'm now downloading the 1.5 SDK early look to have a try.

 On Apr 26, 12:05 pm, jsdf jasons...@gmail.com wrote:

  Even with 1 this does not work. I still get The server could not
  process your apk. Try again.
  I've pasted the relevant AndroidManifest.xml code below.  Is there
  anything else that is wrong?  Perhaps use of the custom Application
  (vs. the default Application) is throwing the XML parser for a loop?
  (I hope not; I've been using this structure for AndroidManifest for
  over a month now!)

  ?xml version=1.0 encoding=utf-8?
  manifest xmlns:android=http://schemas.android.com/apk/res/android;
          package=com.my.package android:versionName=1.071
          android:versionCode=20
          uses-sdk android:minSdkVersion=1 /
          application android:icon=@drawable/icon android:label=@string/
  app_name
                  android:name=com.my.package.MyApplication
                  activity android:name=.MyAppActivity 
  android:label=@string/
  app_name
                          intent-filter
                                  action 
  android:name=android.intent.action.MAIN /
                                  category 
  android:name=android.intent.category.LAUNCHER /
                          /intent-filter
                  /activity
                  activity android:name=RouteChooser/activity
                  activity android:name=DirChooser/activity
                  activity android:name=StopChooser/activity
                  activity android:name=UserRouteNameActivity/activity
                  activity android:name=PreferencesActivity/activity
                  activity 
  android:name=com.my.package.map.MapViewActivity/
  activity
                  uses-library android:name=com.google.android.maps /
          /application
          uses-permission android:name=android.permission.VIBRATE/uses-
  permission
          uses-permission android:name=android.permission.INTERNET/uses-
  permission
  /manifest

  Thanks for the help!
  Jason

  On Apr 25, 5:14 pm, Randy McEoin rmce...@gmail.com wrote:

   The market doesn't seem to accept minSdkVersion=2.   You must use
   1.

   On Apr 25, 10:42 am, aleung leoli...@gmail.com wrote:

When I didn't add the minSdkVersion, I got the error message:
Market requires theminSdkVersionto be set in AndroidManifest.xml.

But even after I added it, there was still error:
The server could not process your apk. Try again.

I have added the uses-sdk as the first child of manifest:

manifest xmlns:android=http://schemas.android.com/apk/res/android;
      package=leoliang.bettermylocation android:versionCode=9
android:versionName=1.4.1
        uses-sdk android:minSdkVersion=2 /
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Using Widget.TextView.ListSeparator

2009-04-26 Thread Michael Elsdörfer

I need to separate to content areas in my application, and I thought I
would use the OS built-in style for better integration, style-wise.
The separator used by the ListView seemed to fit.

So I had a custom style resource like this, inheriting from
Widget.TextView.ListSeparator:

style name=Header parent=@android:style/
Widget.TextView.ListSeparator.../style

And then using the resource with a view like so:

TextView style=@style/Header

Compiled a against 1.0, this worked just fine on my 1.0 device, and
also with the unofficial holiday 1.1 ADP image.

Now, using the 1.5 SDK, it still works as expected on a 1.5 AVD, but
when running the app on a 1.1 AVD or my 1.1 holiday device, the
parent style doesn't seem to be taken into account. Neither the
android:background specified by Widget.TextView.ListSeparator nor the
android:textColor value is used.

On the other hand, when targeting 1.1 in Eclipse, it*does* work in 1.1
again, but the same issue now occurs while running on 1.5.

When trying to use TextView style=@android:style/
Widget.TextView.ListSeparator directly, Eclipse says Resource is
not public , both when targeting 1.1 or 1.5.

Is there any obvious explanation for this? What would be the correct
way to reference the Widget.TextView.ListSeparator style?

Why can't I use the style directly, but are allowed to inherit from
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] Copy protection License key management

2009-04-26 Thread Jay-andro

1. When the copy protection checkbox was first introduced on Android
Market, I heard about a lot of issues with people not being able to
download etc. Have those issues been resolved now? If I turn on copy-
protection on an app with over 10K active users, do I risk a major
rebellion?

2. I'd like to sell my app on other stores like slideme, andappstore
and handango. Since some of these just redirect the user to your own
site to download the app, there needs to be a license key that
authenticates the user and unlocks his app. I saw that andappstore has
a framework for that (not sure if that will only work with them or is
a generic solution). I'm looking for a free, generic licensing
solution. Is there one that you know of or use?  My concern is to not
throw in a wrench in the process of user download and use of the app,
where I start getting a ton of emails from people whose keys arent
working or asking for new keys etc, where license support turns into a
full-time activity.

Any thoughts, experience or pointers on this, specific to Android
apps, would be appreciated.

Thanks
Jay
--~--~-~--~~~---~--~~
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 retrieve invalid region during View.onDraw()?

2009-04-26 Thread Keith Wiley

Subject pretty much says it all.  I can't find a getInvalidRegion() or
getInvalidRect() function, or anything of similar intention.  How do I
trim my drawing work during onDraw() to only the invalid region so I
don't bother drawing parts of the view that don't need to be updated?

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: Copy protection License key management

2009-04-26 Thread Jean-Baptiste Queru

The issue (1) with turning copy protection on (or off) was in Android
1.0/1.1, and there's been no fix for it made on top of those versions.
I believe that it is fixed in 1.5, which means that you might be OK if
you deliver a copy-protected version with minSdkVersion=3 - I'm not
sure, though.

JBQ

On Sun, Apr 26, 2009 at 7:59 AM, Jay-andro jayan...@gmail.com wrote:

 1. When the copy protection checkbox was first introduced on Android
 Market, I heard about a lot of issues with people not being able to
 download etc. Have those issues been resolved now? If I turn on copy-
 protection on an app with over 10K active users, do I risk a major
 rebellion?

 2. I'd like to sell my app on other stores like slideme, andappstore
 and handango. Since some of these just redirect the user to your own
 site to download the app, there needs to be a license key that
 authenticates the user and unlocks his app. I saw that andappstore has
 a framework for that (not sure if that will only work with them or is
 a generic solution). I'm looking for a free, generic licensing
 solution. Is there one that you know of or use?  My concern is to not
 throw in a wrench in the process of user download and use of the app,
 where I start getting a ton of emails from people whose keys arent
 working or asking for new keys etc, where license support turns into a
 full-time activity.

 Any thoughts, experience or pointers on this, specific to Android
 apps, would be appreciated.

 Thanks
 Jay
 




-- 
Jean-Baptiste M. JBQ Queru
Android Engineer, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

--~--~-~--~~~---~--~~
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 1.5: How do we use the AudioTrack class?

2009-04-26 Thread Moto

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



[android-developers] Re: MediaPlayer sound problem

2009-04-26 Thread BlackLight

I have other problem now. Lets say I have 10 buttons (0-9), when user
press button program should play short (0.3-0.5 secs) sound. I added
them as wav resources. Now I see that each MediaPlayer creates its own
thread and takes resources. I'm not sure that this is good idea to
make 10 players. But if I create player when user presses button it
works fine only if user presses no more than 1 button in 2 secs. If
user presses button each second or even several buttons a second, some
sounds are silent. What's best solution for this problem on android?
On Pocket PC we can play wav files fast - we create thread, that uses
WaveIO and we have no silent sounds. How can we make sounds ready to
play fast?

On Apr 23, 7:18 pm, Marco Nelissen marc...@android.com wrote:
 Does it work with longer sounds?
 Have you tried using MediaPlayer.setLooping(true) instead of restarting it
 yourself from the OnCompletionListener callback?

 On Thu, Apr 23, 2009 at 12:00 AM, BlackLight blacklight1...@gmail.comwrote:



  Hello.

  I have this task:
  Need to play short (0.3-0.4 sec) sounds all the time. When sound is
  played, it should start again, etc. User can press button to reset
  sound - it should stop and lunch.

  I did many tests. I tried to create 1 MediaPlayer, then do this:
         MediaPlayer.OnCompletionListener complListener = new
  MediaPlayer.OnCompletionListener()
         {
                 public void onCompletion(MediaPlayer mp) {
                         lunchSound(); // rewind
                 }
         };

         private boolean lunchSound()
         {
                 try
                 {
                         mplayer.seekTo(0); // move to start
                         mplayer.start();
                         return true;
                 }catch(Exception e){}
                 return false;
         }
  When user press button, I call lunchSound();

  It works great on emulator and on device if I have eclipse+debugger
  on.
  When I disconnect debugger, I have very strange errors - sound can
  stop at all (till program restart), sound can start repeating (play
  0.1-0.2 sec, then restart). Can someone please provide me some info
  about problem?
  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: Copy protection License key management

2009-04-26 Thread Mike Hearn

What is your goal here? The copy protection mechanism in Android isn't
strong, so if it's to try and mitigate piracy I'd not bother. It won't
work and will inconvenience your users.

In case you think I'm some kind of anti-DRM activist, I'm not. If
somebody produced a secure and convenient way to distribute Android
apps I'd be a happy guy. For now, your best bet is to produce
something yourself, and rely on the relative obscurity of Dalvik
bytecode to ward off crackers.

Longer term, this is something Android ISVs will have to research
carefully. Android is actually the most crack friendly OS I've seen,
as it quite heavily restricts what apps can do but users [who root
their phone] have complete freedom, so it's even worse than on Windows
where apps and users do at least fight on a level playing field (not
that it helps much).

--~--~-~--~~~---~--~~
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 1.5: How do we use the AudioTrack class?

2009-04-26 Thread MrSnowflake

You can play from a stream if you capture the stream in your program
and stream the audio to the mediaplayer. There is no direct support of
audio streams, execpt directly from server.
This sollution is somewhere in the docs...

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



[android-developers] Re: Copy protection License key management

2009-04-26 Thread Jason Van Anden
Is the copy protection in 1.5 any more robust in 1.5?

On Apr 26, 2009 11:38 AM, Jean-Baptiste Queru j...@android.com wrote:


The issue (1) with turning copy protection on (or off) was in Android
1.0/1.1, and there's been no fix for it made on top of those versions.
I believe that it is fixed in 1.5, which means that you might be OK if
you deliver a copy-protected version with minSdkVersion=3 - I'm not
sure, though.

JBQ

On Sun, Apr 26, 2009 at 7:59 AM, Jay-andro jayan...@gmail.com wrote:  
1. When the copy protec...
Jean-Baptiste M. JBQ Queru
Android Engineer, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

--~--~-~--~~~---~--~~ You received this
message because you are sub...

--~--~-~--~~~---~--~~
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: Copy protection License key management

2009-04-26 Thread Al Sutton

The AndAppStore licensing system isn't tied to AndAppStore, you can create a
license for a user using HTTP GET or POST via any website/store.

Full details about it are at
http://andappstore.com/AndroidPhoneApplications/licensing.jsp


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 Jay-andro
Sent: 26 April 2009 15:59
To: Android Developers
Subject: [android-developers] Copy protection  License key management


1. When the copy protection checkbox was first introduced on Android
Market, I heard about a lot of issues with people not being able to download
etc. Have those issues been resolved now? If I turn on copy- protection on
an app with over 10K active users, do I risk a major rebellion?

2. I'd like to sell my app on other stores like slideme, andappstore and
handango. Since some of these just redirect the user to your own site to
download the app, there needs to be a license key that authenticates the
user and unlocks his app. I saw that andappstore has a framework for that
(not sure if that will only work with them or is a generic solution). I'm
looking for a free, generic licensing solution. Is there one that you know
of or use?  My concern is to not throw in a wrench in the process of user
download and use of the app, where I start getting a ton of emails from
people whose keys arent working or asking for new keys etc, where license
support turns into a full-time activity.

Any thoughts, experience or pointers on this, specific to Android apps,
would be appreciated.

Thanks
Jay



--~--~-~--~~~---~--~~
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] Crash on mediaPlayer.prepare();

2009-04-26 Thread Fábio Fabris

Hello fellow developers!

I'm having quite a hard time using the android.media.MediaPlayer
class.
I would like to implement a very simple proof of concept Activity that
just launches a mp4 video.
I've successfully achieved this by using a callback like this:

See ACTIVITY 1.

It successfully plays the video.

After that I tried the Callback-free version:

See ACTIVITY 2.

The result is sound coming out just fine and a black square instead of
a video.

Does anyone knows what is going on here?
In using:
android-sdk-linux_x86-1.1_r1
java-sun6-sdk
Ubuntu 9.04 32bits

Thank you!

##BEGIN ACTIVITY 1###
package test.test;

import java.io.IOException;

import android.app.Activity;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

class MyCallback implements SurfaceHolder.Callback,
MediaPlayer.OnPreparedListener{

private String path;
private MediaPlayer mMediaPlayer;

public MyCallback(String string) {
path=string;
}

public void surfaceChanged(SurfaceHolder holder, int format, int
width,int height) {}

public void surfaceCreated(SurfaceHolder holder) {
mMediaPlayer = new MediaPlayer();
try {
mMediaPlayer.setDataSource(path);
mMediaPlayer.setDisplay(holder);
mMediaPlayer.prepare();
} catch (IOException e) {
e.printStackTrace();
}
mMediaPlayer.setOnPreparedListener(this);
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
}

public void surfaceDestroyed(SurfaceHolder holder) {
}

public void onPrepared(MediaPlayer mp) {
mp.start();
}

}

public class test extends Activity {

private SurfaceView mPreview;
private SurfaceHolder holder;

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mPreview = (SurfaceView) findViewById(R.id.SurfaceView01);
holder = mPreview.getHolder();
holder.addCallback(new MyCallback(/sdcard/yu2.mp4));
holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
}
}

##END OF ACTIVITY 1###

##BEGIN ACTIVITY 2###
package test.test;

import android.app.Activity;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class test extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button but = (Button) findViewById(R.id.Button01);
but.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
show();
}
});
}

private void show() {
SurfaceView sv = (SurfaceView) findViewById(R.id.SurfaceView01);
SurfaceHolder holder = sv.getHolder();
holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
MediaPlayer mp = new MediaPlayer();

try {
mp.setDataSource(/sdcard/yu2.mp4);
mp.setDisplay(holder);
mp.setAudioStreamType(AudioManager.STREAM_MUSIC);
mp.prepare();
} catch (Exception e) {
e.printStackTrace();
}
mp.start();
}
}
##END OF ACTIVITY 2###

##LAYOUT###
?xml version=1.0 encoding=utf-8?

AbsoluteLayout android:id=@+id/AbsoluteLayout01
xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_height=fill_parent
android:layout_width=fill_parentSurfaceView android:id=@+id/
SurfaceView01 android:layout_height=100px
android:layout_width=100px/SurfaceView
Button android:id=@+id/Button01 android:layout_width=wrap_content
android:layout_height=wrap_content android:layout_y=200px/
Button
/AbsoluteLayout

##END OF LAYOUT###
--~--~-~--~~~---~--~~
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

[android-developers] Re: Crash on mediaPlayer.prepare();

2009-04-26 Thread Fábio Fabris

Sorry about the subject. It is wrong.
It should be:
Black Screen on mediaPlayer.start();
My bad
--~--~-~--~~~---~--~~
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 retrieve invalid region during View.onDraw()?

2009-04-26 Thread Dianne Hackborn
Use the rectangle given to onDraw().

On Sun, Apr 26, 2009 at 8:27 AM, Keith Wiley kbwi...@gmail.com wrote:


 Subject pretty much says it all.  I can't find a getInvalidRegion() or
 getInvalidRect() function, or anything of similar intention.  How do I
 trim my drawing work during onDraw() to only the invalid region so I
 don't bother drawing parts of the view that don't need to be updated?

 Thanks.

 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  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 retrieve invalid region during View.onDraw()?

2009-04-26 Thread Keith Wiley

Thanks, although to clarify this discussion for anyone else who finds
reads this, View.onDraw() doesn't directly take a Rect parameter.  It
takes a Canvas...which turns out to have a clip rect inside it which
is easily retrieved.

Cheers!

On Apr 26, 11:02 am, Dianne Hackborn hack...@android.com wrote:
 Use the rectangle given to onDraw().

 On Sun, Apr 26, 2009 at 8:27 AM, Keith Wiley kbwi...@gmail.com wrote:

  Subject pretty much says it all.  I can't find a getInvalidRegion() or
  getInvalidRect() function, or anything of similar intention.  How do I
  trim my drawing work during onDraw() to only the invalid region so I
  don't bother drawing parts of the view that don't need to be updated?

  Thanks.

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  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: Server/Client in different machines

2009-04-26 Thread Rande Arievilo Moreira

Hi Ask,

I'm developing the same application with Lillian. After debugging a
little bit, I found out that we're receiving the following exception:

java.net.ConnectException: 192.168.0.173/192.168.0.173:7000 -
Connection refused

192.168.0.173 is the IP of my machine (the server) in the Local
Network.
Any suggestion?

Thanks.


On Apr 7, 9:21 am, Ask asifk1...@gmail.com wrote:
 Can you send the exception you are getting or some code snippets,

 it can be some io exception...

 On Apr 7, 4:58 pm,LillianBrandão lbrolive...@gmail.com wrote:

  I've already done at the server machines:
  redir add tcp:7000:7000.

  --
 LillianBrandão

  On Tue, Apr 7, 2009 at 8:47 AM, Ask asifk1...@gmail.com wrote:

   Have you done port forwarding at server machine??

   Any message which is coming to the server should be redirected towards
   the emulator port : 7000

   On Apr 7, 4:35 pm,LillianBrandão lbrolive...@gmail.com wrote:
Hi all,

I have an application client/server and I want to install this
   application
in differente machines. The server is located in IP_SERVER, listening
   port
7000.
I want to start a cliente in another machine with IP_Y and connect to 
the
server on the different machine.

I've started the server and I've created the socket like this:
... new ServerSocket(7000);

I've started the client and I've created the socket like this:
...new Socket(SERVER_IP, 7000)

But the client did not connect to the server. I've already set the
INTERNET_PERMISSION.
Any suggestions how to do it?
Anybody else have already done a client/server application that
   communicate
between differente machines?

Thanks in advance,
   LillianBrandão.- 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: Difficulty Resuming SurfaceView

2009-04-26 Thread Jason Van Anden

Solved ... the culprit was trying to run without the window background
via : 
http://android-developers.blogspot.com/2009/03/window-backgrounds-ui-speed.html

It seems that this theme speed may speed up my surfaceView but screws
up my lists.

This cost me a lot of frustration to sort out.  I hope this helps someone else!

Jason Van Anden
http://www.smileproject.com

On Sun, Apr 26, 2009 at 7:30 AM, Jason Van Anden
jason.van.an...@gmail.com wrote:
 Not to beat a dead horse ... but other suggestions regarding how to
 deal with the mis-registered list view issue would be super
 appreciated.  My app is a data visualization app like Google Maps and
 I was using the SurfaceView mainly in order to better control the draw
 loop (like what is described in the blog entry).

 Thanks,
 Jason Van Anden
 http://www.smileproject.com




 On Sun, Apr 26, 2009 at 6:49 AM, Jason Van Anden
 jason.van.an...@gmail.com wrote:
 This looks like it does what I have been trying to do ... except that I have
 no way of knowing if it will resolve the problem that occurs when I call the
 listview until I tinker with it.  I have things running well enough except
 for this problem (thus I am inclined to continue with what I have and wait
 to use 1.5 until it is ready for release).  The mis-registration of the
 buffers is super weird ... esp since it only occurs when started from the
 activity with the surfaceview.

 Thank you,
 Jason

 On Apr 25, 2009 3:28 PM, Mike Hearn mh.in.engl...@gmail.com wrote:


 Does GLSurfaceView do what you want? See the latest blog post.

 



--~--~-~--~~~---~--~~
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: Copy protection License key management

2009-04-26 Thread Brian Conrad

One thing I've learned over the years of selling products on the net is 
to do unlockable demos.   The unlockable ones were quickly hacked and 
wound up as warez.  The ones where I provided a crippled demo and the 
real version was only available for purchase did not wind up as warez.  
Pirates won't purchase the program to hack it or create key generators.

Jay-andro wrote:
 1. When the copy protection checkbox was first introduced on Android
 Market, I heard about a lot of issues with people not being able to
 download etc. Have those issues been resolved now? If I turn on copy-
 protection on an app with over 10K active users, do I risk a major
 rebellion?

 2. I'd like to sell my app on other stores like slideme, andappstore
 and handango. Since some of these just redirect the user to your own
 site to download the app, there needs to be a license key that
 authenticates the user and unlocks his app. I saw that andappstore has
 a framework for that (not sure if that will only work with them or is
 a generic solution). I'm looking for a free, generic licensing
 solution. Is there one that you know of or use?  My concern is to not
 throw in a wrench in the process of user download and use of the app,
 where I start getting a ton of emails from people whose keys arent
 working or asking for new keys etc, where license support turns into a
 full-time activity.

 Any thoughts, experience or pointers on this, specific to Android
 apps, would be appreciated.

 Thanks
 Jay
 

   


--~--~-~--~~~---~--~~
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: apk-builder sdk 1.5

2009-04-26 Thread Xavier Ducrohet

Are you talking about the command line tool used in Ant?

If so, this one didn't change IIRC. The Ant script now uses a custom
tasks that directly use apkbuilder.jar instead of the command line
version, but that's it.

Xav

On Sat, Apr 25, 2009 at 8:38 AM, Fred Grott(shareme)
fred.gr...@gmail.com wrote:

 I know that some new commands may have been added to apk-builder but
 are the command line ones we used before still valid?

 For example, can I still denote the junit path usign the same command
 line sequence?

 Thanks
 




-- 
Xavier Ducrohet
Android Developer Tools Engineer
Google Inc.

--~--~-~--~~~---~--~~
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 Delete SMS from inbox programmatically OR discard it before received in inbox

2009-04-26 Thread Adam K

Scroll down a bit on the page I sent for an example of how to retrieve
a message from the system content provider:
http://code.google.com/p/android-smspopup/source/browse/tags/SMSPopup%20v0.9.93/src/net/everythingandroid/smspopup/SMSPopupUtils.java#553

Cheers,

Adam K
www.everythingandroid.net

On Apr 21, 4:16 am, Gulfam gulfa...@gmail.com wrote:
 Hi all,

 Thanks for response. How i can get thread_id or message id ?

 Regards,
 Gulfam

 On Apr 21, 9:14 am, Adam K a...@everythingandroid.net wrote:



  You candeleteby message id, see 
  here:http://code.google.com/p/android-smspopup/source/browse/tags/SMSPopup...

  Cheers,

  Adam Kwww.everythingandroid.net

  On Mon, Apr 20, 2009 at 11:38 AM, avrono avr...@mail.com wrote:

   Gulfram,

   As far as I can see you can onlydeleteandsmsby thread_id using the
   content content://sms/conversations/

   Regards
   Avron

   On Feb 20, 9:45 am, Gulfam Hassan gulfa...@gmail.com wrote:
Hi,

I want toDeleteSMShow i candeleteit programmatically?
I am receivingsmsin my application in this format string. 12345
username password
**
i have post this thread on so many groups and forums but i dont receive
   any
reply from last one week.
its very urgent for our product. so i am sending this mail  to all of
   you.
***
public void onReceive(Context context, Intent intent) {

               if(!intent.getAction().equals
(android.provider.Telephony.SMS_RECEIVED))
                       {
                               return;
                       }
                       SmsMessage smsMsg[] =
getMessagesFromIntent(intent);// here gettingsmssuccessfully

                       for(int i=0; i  smsMsg.length; i++)
                       {
                               receivedSMS =
smsMsg[i].getDisplayMessageBody();
                               if(receivedSMS.startsWith(12345))
                                 {
                                         String[] dataArray =
MyUtility.breakIntoLines(receivedSMS, '
');
                                         String userName = dataArray[1];
                                         String userPassword =
   dataArray[2];

 this.updateUsernamePassword(context, userName, userPassword );//here
   saving
data successfully
                                         
Toast.makeText(context,Settings
saved, Toast.LENGTH_LONG).show
();

                                     try{

    ***here
i want todeletethat perticullarsms***
                                                 Uri uriSms =
Uri.parse(content://sms/inbox);
                                                  Cursor c =
context.getContentResolver().query(uriSms, null,null,null,null);
                                                int thread_id
   =c.getCount();
//get the thread_id

   context.getContentResolver().delete(Uri.parse(content://sms/conversations/
­+thread_id
),null,null);

                      }catch(Exception e)
                        {
                            Log.i(exception ,e.getMessage());
                        }

                                           }
                                 }

                   }

          }

after getting my required
data i want todeletethis currently receivedsmsprogrammatically.
data is very confidential in thissmsand i want todeleteit here
after getting data and also clear it from notification bar.or i want to
discard it because i dont want to show it in inbox
any one can help me regarding this.can any one give me code snippet
which was working perfectly for deletingsmsor discarding it.

Thanks  Regards,
Gulfam
--~--~-~--~~~---~--~~
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 draw a rectangle on screen using layout.xml file

2009-04-26 Thread MrSnowflake

Color isn't a class, so, ofcourse, you can't instantiate it from xml.

The way I see this happening would be Implementing your own View:
RectangleView. Have it extend View and have it draw a rectangle, using
the settings from the xml.
Or you could extend a ViewGroup and implement your own, so other View
will become part of this ViewGroup. This might be more resource
friendly.

On 26 apr, 06:09, Lucius Fox lucius.fo...@gmail.com wrote:
 Hi,

 I am trying to draw a rectangle using layout.xml file without java
 code.  So this is what I tried:

 LinearLayout
 color
                 android:layout_width=wrap_content
                 android:layout_height=10dp
                 android:color=#00ff00
                 /

         /LinearLayout
 But I get these error when i run it in emulator:

 E/AndroidRuntime(  760): Caused by: java.lang.ClassNotFoundException:
 android.view.color in loader dalvik.system.pathclassloa...@435c9be8
 E/AndroidRuntime(  760):        at
 dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
 E/AndroidRuntime(  760):        at
 java.lang.ClassLoader.loadClass(ClassLoader.java:573)
 E/AndroidRuntime(  760):        at
 java.lang.ClassLoader.loadClass(ClassLoader.java:532)
 E/AndroidRuntime(  760):        at
 android.view.LayoutInflater.createView(LayoutInflater.java:465)
 E/AndroidRuntime(  760):        at
 android.view.LayoutInflater.onCreateView(LayoutInflater.java:543)
 E/AndroidRuntime(  760):        at 
 com.android.internal.policy.impl.PhoneLayoutInfl

 Can you please tell me how can I do 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] Re: What UI Elements in AppWidget?

2009-04-26 Thread Jeff Sharkey

Many of these core controls still allow customization.  For example,
you can have custom button styles by setting the android:background to
a stateful drawable that has various button states.

The same goes for AnalogClock, which has attributes to swap out the
clock face and hand drawables.  (Just swap them out and the control
will automatically show the correct time for you.)

Same with ProgressBar too, using android:progressDrawable.  :)

j

On Sun, Apr 26, 2009 at 6:36 AM, nEx.Software justin.shapc...@gmail.com wrote:

 Thanks for the info. Again, I appreciate the quick response... That is
 very refreshing to see.

 On Apr 26, 6:31 am, Jean-Baptiste Queru j...@android.com wrote:
 Correct, you can only use the exact classes that are marked as available.

 JBQ



 On Sun, Apr 26, 2009 at 6:09 AM, nEx.Software justin.shapc...@gmail.com 
 wrote:

  Is it safe to assume that classes derived of those allowed are not
  usable?
  So, if I created a custom button or something that extends one of
  those available classes, it wouldn't be available to RemoteViews?

  On Apr 25, 6:56 pm, nEx.Software justin.shapc...@gmail.com wrote:
  Awesome. Thanks. Not sure why it didn't come up in my search?
  Oh well, I appreciate the quick response... It helps a lot.

  On Apr 25, 6:32 pm, Jeff Sharkey jshar...@android.com wrote:

   Here ya 
   go:http://groups.google.com/group/android-developers/msg/a5247467151f5e3a

   j

   On Sat, Apr 25, 2009 at 6:24 PM, nEx.Software 
   justin.shapc...@gmail.com wrote:
Just wonder what limitations there are for UI elements in AppWidgets?
I tried a ListView and was met with an error... I saw the other post
that EditText isn't available.  Just wondering if there was a full
list somewhere?

   --
   Jeff Sharkey
   jshar...@google.com

 --
 Jean-Baptiste M. JBQ Queru
 Android Engineer, Google.

 Questions sent directly to me that have no reason for being private
 will likely get ignored or forwarded to a public forum with no further
 warning.
 




-- 
Jeff Sharkey
jshar...@google.com

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



[android-developers] Re: What UI Elements in AppWidget?

2009-04-26 Thread nEx.Software

Yeah, I know. I just prefer doing my own drawing. I guess it's not
common to do all that much in a Widget. Getting some ideas on how to
do things from the Music application and also your Weather Widget.
Great way to learn. :)

On Apr 26, 2:14 pm, Jeff Sharkey jshar...@android.com wrote:
 Many of these core controls still allow customization.  For example,
 you can have custom button styles by setting the android:background to
 a stateful drawable that has various button states.

 The same goes for AnalogClock, which has attributes to swap out the
 clock face and hand drawables.  (Just swap them out and the control
 will automatically show the correct time for you.)

 Same with ProgressBar too, using android:progressDrawable.  :)

 j



 On Sun, Apr 26, 2009 at 6:36 AM, nEx.Software justin.shapc...@gmail.com 
 wrote:

  Thanks for the info. Again, I appreciate the quick response... That is
  very refreshing to see.

  On Apr 26, 6:31 am, Jean-Baptiste Queru j...@android.com wrote:
  Correct, you can only use the exact classes that are marked as available.

  JBQ

  On Sun, Apr 26, 2009 at 6:09 AM, nEx.Software justin.shapc...@gmail.com 
  wrote:

   Is it safe to assume that classes derived of those allowed are not
   usable?
   So, if I created a custom button or something that extends one of
   those available classes, it wouldn't be available to RemoteViews?

   On Apr 25, 6:56 pm, nEx.Software justin.shapc...@gmail.com wrote:
   Awesome. Thanks. Not sure why it didn't come up in my search?
   Oh well, I appreciate the quick response... It helps a lot.

   On Apr 25, 6:32 pm, Jeff Sharkey jshar...@android.com wrote:

Here ya 
go:http://groups.google.com/group/android-developers/msg/a5247467151f5e3a

j

On Sat, Apr 25, 2009 at 6:24 PM, nEx.Software 
justin.shapc...@gmail.com wrote:
 Just wonder what limitations there are for UI elements in 
 AppWidgets?
 I tried a ListView and was met with an error... I saw the other post
 that EditText isn't available.  Just wondering if there was a full
 list somewhere?

--
Jeff Sharkey
jshar...@google.com

  --
  Jean-Baptiste M. JBQ Queru
  Android Engineer, Google.

  Questions sent directly to me that have no reason for being private
  will likely get ignored or forwarded to a public forum with no further
  warning.

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



[android-developers] Re: How to draw a piece of Bitmap

2009-04-26 Thread Ikon

Nick, Did you figure this one out? I want to do the same.

On Mar 9, 12:50 pm, Nick nkulik...@gmail.com wrote:
 Hello!
 I'm creating a simple game for Android and faced with a problem: Idea
 is to have a huge map image file and re-drawonly small part of it
 (320*480) depending on user actions.

 I didn't find a better solution than using public staticBitmap
 createBitmap (Bitmapsource, int x, int y, int width, int height)
 method and decided to try it (expected huge performance degradation),
 but actually it's appeared that this method changes sourcebitmapand
 when i call it second time source size is significantly reduced. For
 instance this code:

 int bitHeight = mBackgroundImage.getHeight();
 int bitWidth = mBackgroundImage.getWidth();BitmapcurMap 
 =Bitmap.createBitmap(mBackgroundImage,
                 0, mY, 320, 480);
 canvas.drawBitmap(curMap, 0, 0, null);

 gives 320*960 (initial source image size) size for the first time and
 320*455 for the second call

 I hope this is not a best solution and look forward to hearing a new
 direction or at least clarification on createBitmap method.

 p.s i'm not a native english speaker and i apologise for possible
 mistakes.
--~--~-~--~~~---~--~~
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 1.5: How do we use the AudioTrack class?

2009-04-26 Thread Moto

Yeah,
currently that's my method... o well I thought something like the
AudioTrack would be nice... were you can select the type of audio to
decode not just PCM :(
--~--~-~--~~~---~--~~
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] MP3 download problem

2009-04-26 Thread ivan

I'm trying to download files such as:

http://www.freesound.org/download/23246/23246_acclivity_GullsByTheSea.mp3

to the SDCARD of my t-mobile G1.

I can only download about 2^16 ~ (16384 bytes) before my input stream
read returns -1.

This wouldn't be a problem if the connection object could retrieve the
content's length, so that I would keep trying the read when the total
bytes have not yet been downloaded ... but the connection object
always returns -1 for the content length.

Any thoughts or tips...

My code is below:

private synchronized void download()
{
HttpURLConnection conn = null;
InputStream inStream = null;
FileOutputStream outStream = null;

try
{
//Where the file comes from
URL sourceURL = new URL(m_url);

conn = (HttpURLConnection) sourceURL.openConnection();
conn.connect();

inStream = conn.getInputStream();

Log.d(TAG, content length =  + conn.getContentLength()); // 
alwasy
returns -1

// Where the file is going to go
outStream = new FileOutputStream(/sdcard/Music/ + 
m_newFilename);

//a read buffer
byte[] bytes = new byte[1024];

//read the first chunk
int readBytes = 0;
int total = 0;

readBytes = inStream.read(bytes, 0, 1024);

Log.d(TAG, readBytes =  + readBytes);

while (readBytes  0)
{
total += readBytes;

//Write the buffered chunk to the file
outStream.write(bytes, 0, readBytes);

Log.d(TAG, total =  + total);

try
{
wait(100);
}
catch(InterruptedException ie){}

readBytes = inStream.read(bytes, 0, 1024);
}
}
catch(Exception e)
{
Log.d(TAG, Run exception:  + e.toString());
}
finally
{
Log.d(TAG, Finally);
try
{
inStream.close();
outStream.close();
}
catch (IOException e){}
}
}
--~--~-~--~~~---~--~~
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 set the width and height of an ImageView programmically?

2009-04-26 Thread Lucius Fox

Hi,

Can you please tell me how can i set the width and height of an
ImageView programmically in java code (not layout xml file)?
I tried setMinimumWidth/setMinimumHeight, but that does not work. I
have looked at the view in HierarchyView, it still said the width to
be 80 and height to be 100. And that is not the value I set.

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] Android 1.5 Documentation

2009-04-26 Thread Mark Fayngersh
I see the GLSurfaceView is not in the reference docs. Is there any
official/un-official documentation for 1.5 sdk?
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] App Engine/Google login integration

2009-04-26 Thread SR

Hi,

I was wondering if there are plans (or currently available ways) of
integrating Google login from the phone with App Engine sites.

It would be desirable for the phone to submit GMail login credentials
to App Engine sites without the user having to re-enter his/her name
and password.

Any thoughts on how to do 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: problems with bitmaps

2009-04-26 Thread Win Myo Htet
I also get the OOME ( 6291456-byte) with bitmap file of 350KB (if it is
35KB, it is fine) when I do the rotation on the third time. I use
Bitmap.createScaledBitmap so that the pic fit into the screen and I also try
do myPic.recycle() in onSaveInstanceState to release the memory but it is
not helping. I wonder if I need to do myPic.compress instead of
Bitmap.createScaledBitmap and if I am not doing the proper myPic.recycle().

On Thu, Apr 9, 2009 at 4:53 PM, Mark Murphy mmur...@commonsware.com wrote:


 mark.ka...@gmail.com wrote:
There's been a number of threads on this issue, the BitmapFactory
  tends to throw this out of memory errors when it really shouldn't,
  looks like a bug or memory leak. I'm not sure if it's cataloged as an
  official bug though.

 If you have a reproducible test case, head over to http://b.android.com
 and make it official.

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

 _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] Android 1.5 - Does MediaPlayer support HTTP 1.1 Transfer-Encoding = chunked?

2009-04-26 Thread Moto

The tittle asks the question... :)

Thanks!
Moto!

--~--~-~--~~~---~--~~
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] partially updated frames problem

2009-04-26 Thread Nasam

BitmapDecode.java is an example to show animated GIF where all frames
are fully updates. But if frames are partially updated(next frame is
only the difference of prevoius frame) then this eaxmple shows only
the first frame.


How can i resolve this?
thanks
nasam


--~--~-~--~~~---~--~~
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 is the correct way to refresh UI when I use android:configChanges=keyboardHidden|orientation

2009-04-26 Thread Wang He

Is here anybody knows the right way?
Still waiting ...

BRs
He

On Apr 24, 4:53 pm, Wang He iptvph...@gmail.com wrote:
 Hi all

 when I use android:configChanges=keyboardHidden|orientation in my
 code, the activity will not destroy and recreate when I change from
 portrait to landscape, only onConfigurationChanged(newConfig) will be
 called by framework.

 The issue is:
 My UI cannot refresh by default, what is the correct way in
 onConfigurationChanged() to refresh my UI?

 BTW, my UI is write with mylayout.xml and added to my Widget by addView
 (inflator(mylayout.xml),null).

 Thanks in advance!!
 BRs
 Wang He
--~--~-~--~~~---~--~~
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] Activity finish() question ??

2009-04-26 Thread Neo

hi guys

I have a question about finish activity

When start the activity i will set the activity object to the
Application, and i will registry it in the Appication
app = MyApplication.getApplication(this);

1. Start Activity A  store A id 0x12345678
2. Activity A - Activity B
3. Store B id 0x87654321
4. Finish B activity
5. but the Activity B object not null in the Application

i don't not why this problem???

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



[android-developers] Re: Activity finish() question ??

2009-04-26 Thread Dianne Hackborn
If you are explicitly setting it, you will need to explicitly clear it at
some point, possibly in onDestroy().

Note that you need to be very careful when doing this kind of thing.
Generally the most safe global to store like this is the currently resumed
activity, set in onResume() and cleared in onPause().

On Sun, Apr 26, 2009 at 7:59 PM, Neo mobi.liub...@gmail.com wrote:


 hi guys

I have a question about finish activity

When start the activity i will set the activity object to the
 Application, and i will registry it in the Appication
app = MyApplication.getApplication(this);

1. Start Activity A  store A id 0x12345678
2. Activity A - Activity B
3. Store B id 0x87654321
4. Finish B activity
5. but the Activity B object not null in the Application

i don't not why this problem???

 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  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: What is the correct way to refresh UI when I use android:configChanges=keyboardHidden|orientation

2009-04-26 Thread Dianne Hackborn
If you actually have resources that change due to these states, you really
should consider letting the normal destroy/recreate behavior execute.
Otherwise, you will just need to poke through your UI, reloading and
resetting resources that may have changed.  There is no simple answer that
can be given about what to do, because it depends entirely on what you need
to have change (and you haven't said anything here about what you actually
need to change).

On Sun, Apr 26, 2009 at 7:56 PM, Wang He iptvph...@gmail.com wrote:


 Is here anybody knows the right way?
 Still waiting ...

 BRs
 He

 On Apr 24, 4:53 pm, Wang He iptvph...@gmail.com wrote:
  Hi all
 
  when I use android:configChanges=keyboardHidden|orientation in my
  code, the activity will not destroy and recreate when I change from
  portrait to landscape, only onConfigurationChanged(newConfig) will be
  called by framework.
 
  The issue is:
  My UI cannot refresh by default, what is the correct way in
  onConfigurationChanged() to refresh my UI?
 
  BTW, my UI is write with mylayout.xml and added to my Widget by addView
  (inflator(mylayout.xml),null).
 
  Thanks in advance!!
  BRs
  Wang He
 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  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 set the width and height of an ImageView programmically?

2009-04-26 Thread Dianne Hackborn
The standard way you force the size of a view is with
android:layout_width=999dp and android:layout_height=999dp.

On Sun, Apr 26, 2009 at 4:24 PM, Lucius Fox lucius.fo...@gmail.com wrote:


 Hi,

 Can you please tell me how can i set the width and height of an
 ImageView programmically in java code (not layout xml file)?
 I tried setMinimumWidth/setMinimumHeight, but that does not work. I
 have looked at the view in HierarchyView, it still said the width to
 be 80 and height to be 100. And that is not the value I set.

 Thank you.

 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  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: Difficulty Resuming SurfaceView

2009-04-26 Thread Dianne Hackborn
This will have no impact on SurfaceView, since by design it gives you a
dedicated surface that you control all of the pixels for and so the window
background will never be drawn in it.  (That said, it does have an impact on
drawing in the main window, if you have places that aren't filled by the
surface view...  but if you have such places, and they aren't completely
opaque, then they need something to draw on top of, so you need the
background, so it is not a waste.)

On Sun, Apr 26, 2009 at 11:54 AM, Jason Van Anden jason.van.an...@gmail.com
 wrote:


 Solved ... the culprit was trying to run without the window background
 via :
 http://android-developers.blogspot.com/2009/03/window-backgrounds-ui-speed.html

 It seems that this theme speed may speed up my surfaceView but screws
 up my lists.

 This cost me a lot of frustration to sort out.  I hope this helps someone
 else!

 Jason Van Anden
 http://www.smileproject.com

 On Sun, Apr 26, 2009 at 7:30 AM, Jason Van Anden
 jason.van.an...@gmail.com wrote:
  Not to beat a dead horse ... but other suggestions regarding how to
  deal with the mis-registered list view issue would be super
  appreciated.  My app is a data visualization app like Google Maps and
  I was using the SurfaceView mainly in order to better control the draw
  loop (like what is described in the blog entry).
 
  Thanks,
  Jason Van Anden
  http://www.smileproject.com
 
 
 
 
  On Sun, Apr 26, 2009 at 6:49 AM, Jason Van Anden
  jason.van.an...@gmail.com wrote:
  This looks like it does what I have been trying to do ... except that I
 have
  no way of knowing if it will resolve the problem that occurs when I call
 the
  listview until I tinker with it.  I have things running well enough
 except
  for this problem (thus I am inclined to continue with what I have and
 wait
  to use 1.5 until it is ready for release).  The mis-registration of the
  buffers is super weird ... esp since it only occurs when started from
 the
  activity with the surfaceview.
 
  Thank you,
  Jason
 
  On Apr 25, 2009 3:28 PM, Mike Hearn mh.in.engl...@gmail.com wrote:
 
 
  Does GLSurfaceView do what you want? See the latest blog post.
 
  
 
 

 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  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: distributing an app packaged with just emulator

2009-04-26 Thread Raphael

You don't really need to send them adb.
What you need to do is:
- create an AVD, run the emulator with it
- install your app on this emulator image
- send your friends the emulator binary, the AVD itself and the
corresponding system images.

The AVD contains the userimage which has your app installed for the
emulated device, which means you can setup the emulated device exactly
as you want your friend to see it.

An AVD is composed of a config file located in
~/.android/avds/name.ini and a directory located at
~/.android/avds/name.avd. You will need to edit the config.ini file in
the avd directory to indicate the system images location (it's
normally found in SDK/platform/android-1.5/images/).

I suggest you read the extensive emulator help (see emulator -help).
It describes the mechanism used to locate images.

So it might sound a bit complicated at first but it should be doable
once you understand the various moving parts.
Good luck!

R/

On Wed, Apr 22, 2009 at 12:54 PM, tansaku tans...@gmail.com wrote:

 Hi All,

 I was wondering if anyone has ever been able to distribute their app
 in a bundle with an emulator?

 The reason I want to do this is that I have some friends who don't
 have android phones, but I'd like them to be able to play with my app
 so that they can give me feedback.  I've previously sent them screen
 casts, but I'd really like them to be able to get interactive with the
 app.

 Now I could ask them to get all installed with the whole android
 framework, eclipse etc,. but some of them are not so technical.
 Ideally what I'd like to be able to do is create a package that is the
 android emulator with my app and perhaps 1 or 2 other related apps pre-
 installed, so that they can download it, open it and run it
 interactively on their computers?

 Has anyone ever tried this?

 So far I found that I can run the emulator standalone, and I assume I
 could probably send them just that and it would run.  However the adb
 tool is needed to install apps.  I could send them that too, and ask
 the to run an 'adb install myapp.apk' from the command line, but at
 the moment I can't even seem to do that myself.

 Running the emulator standalone, the adb tool can't seem to see it:

 samuel-josephs-computer-2:tools samueljoseph$ sudo ./adb devices
 List of devices attached

 I just get no list of devices ...

 I have previously used the adb tool to install apk files, but that is
 after I had started the emulator from eclipse - of course even then I
 always have to restart eclipse and the emulator two or three times
 before I can get the connection (I am on OSX 10.5.6., eclipse
 3.4.1) ...

 Any suggestions greatly appreciated.

 CHEERS SAM

 


--~--~-~--~~~---~--~~
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 KeyEvent.KEYCODE_PLUS in SDK 1.5pre

2009-04-26 Thread Dianne Hackborn
No current phones have zoom in or zoom out keys.  If one does, we would
prefer to define a new key code for such a key rather than overloading it
with plus.

I'm not sure about your second question -- there is no physical key for
KEYCODE_PLUS.  KEYCODE_PLUS (nor any of the other key codes) is not a
logical key, it is the code or a physical key.

The KeyCharacterMap class is responsible for mapping from physical key
events to Unicode characters.  Note that you can't make any assumptions
about what this mapping my be -- you can pretty much assume that there will
be a wide variety of keyboard layouts in Android devices (not to mention the
new soft keyboard mechanism, which allows the user to generate text without
any physical keys at all).

On Sun, Apr 26, 2009 at 2:57 AM, André Charles Legendre 
andre.legen...@gmail.com wrote:


 Hi Diane


 Tank's for the answer.

 What keys are usually mapped for zoomIn and zoomOut in Android devices ?

 And what physical key is associated to the logical KEYCODE_PLUS ?

 Regards

 Andre

 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  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: Why the service is always to restart even if force to kill it?

2009-04-26 Thread Eckel



I just want to find a way to clean the user-defined service. Now it's
ok,Thanks' your answer.

On Apr 24, 4:16 pm, Dianne Hackborn hack...@android.com wrote:
 Yes, if you force stop the input method, it is restarted, because it is
 actually being used and needed by the system to let the user perform input!
 It makes no sense to try stop it from running.

 Seriously, what are you trying to accomplish?



 On Fri, Apr 24, 2009 at 12:42 AM, Eckel zhangjin...@gmail.com wrote:

  No I do not write a apk and write the code on framework notification
  view.

  I just have a try the force stop functionality and it's a new
  interface for activitymanger.restartPacakge, right?   If I try to
  force stop a background service like inputmethod, acitivtymanger will
  also restart the crash service and related process :(    It's by
  design?  So I still not force to remove a service.

  On Apr 24, 12:46 am, Dianne Hackborn hack...@android.com wrote:
   On Wed, Apr 22, 2009 at 10:51 PM, Eckel zhangjin...@gmail.com wrote:
You can get the running prcess info with process id from
activitymanager, then kill it by Process.KillProcess(mPid).

   So wait...  you are saying you just wrote a regular application in an
  .apk,
   and you can do this?  You really shouldn't be able to do this.  I am
  almost
   positive you can't.  So I really want to confirm what you are actually
   doing.

Could you have a simple introduction for how to use Force Stop?

   Er...  press the button?

As Mike and you said, android will automatically manager the activity
and service lifecyle and don't need task management by users. I often
meet a case,  playback a music on background service and view a a lot
picture on foreground,  which maybe will cause low memory, then
android will kill the background music. You will not hear the music
again, but if you check the music process, you will find the music
service restart and service is still alive and still occupy system
resource. So for this case, I think service should not be restart.
What's your opinion?

   It's basically working as intended.  If you really care about this, in
   cupcake you can go in to manage applications, see the list of
  applications
   with running processes, and force stop that one.

   --
   Dianne Hackborn
   Android framework engineer
   hack...@android.com

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

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  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: Why the service is always to restart even if force to kill it?

2009-04-26 Thread Eckel



I just want to find a way to clean the user-defined service. Now it's
ok,Thanks' your answer.

On Apr 24, 4:16 pm, Dianne Hackborn hack...@android.com wrote:
 Yes, if you force stop the input method, it is restarted, because it is
 actually being used and needed by the system to let the user perform input!
 It makes no sense to try stop it from running.

 Seriously, what are you trying to accomplish?



 On Fri, Apr 24, 2009 at 12:42 AM, Eckel zhangjin...@gmail.com wrote:

  No I do not write a apk and write the code on framework notification
  view.

  I just have a try the force stop functionality and it's a new
  interface for activitymanger.restartPacakge, right?   If I try to
  force stop a background service like inputmethod, acitivtymanger will
  also restart the crash service and related process :(    It's by
  design?  So I still not force to remove a service.

  On Apr 24, 12:46 am, Dianne Hackborn hack...@android.com wrote:
   On Wed, Apr 22, 2009 at 10:51 PM, Eckel zhangjin...@gmail.com wrote:
You can get the running prcess info with process id from
activitymanager, then kill it by Process.KillProcess(mPid).

   So wait...  you are saying you just wrote a regular application in an
  .apk,
   and you can do this?  You really shouldn't be able to do this.  I am
  almost
   positive you can't.  So I really want to confirm what you are actually
   doing.

Could you have a simple introduction for how to use Force Stop?

   Er...  press the button?

As Mike and you said, android will automatically manager the activity
and service lifecyle and don't need task management by users. I often
meet a case,  playback a music on background service and view a a lot
picture on foreground,  which maybe will cause low memory, then
android will kill the background music. You will not hear the music
again, but if you check the music process, you will find the music
service restart and service is still alive and still occupy system
resource. So for this case, I think service should not be restart.
What's your opinion?

   It's basically working as intended.  If you really care about this, in
   cupcake you can go in to manage applications, see the list of
  applications
   with running processes, and force stop that one.

   --
   Dianne Hackborn
   Android framework engineer
   hack...@android.com

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

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  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: ANT Build files sdk 1.5 and beyond

2009-04-26 Thread Raphael

I'm not sure I understand your question. I'll try something and then
let me know if I got it right.

The Eclipse ADT plugin does not use the ant build.xml files -- it has
its own build logic and just uses the .classpath and .project files
needed by Eclipse.

For Ant, you don't need to write the build.xml file yourself -- in
fact you should not. Instead you should use android create project
to create new Android projects.

You can use both Ant and Eclipse to work on the same project.

If you create your project using the Eclipse Android New Project
Wizard, you can run android update project to create the build.xml
based on the AndroidManifes.xml.

if you create your project using android create project, you get you
ant build.xml. You then just need to use the Eclipse Android New
Project Wizard in existing source mode to create an Eclipse project
for it.

Hope this helps
R/

On Fri, Apr 24, 2009 at 5:39 AM, Fred Grott(shareme)
fred.gr...@gmail.com wrote:

 Good morning,

 I am in the process of writing some new build files for Android Sdk
 1.5 and beyond.

 My question is every tool-IDE plugin the same in that they do not
 contribute the ANT task libs to the IDE ant editor and thus have to
 manually set the paths in each IDE?

 At them moment i know ADT 0.90 pre is but I am assuming that will
 change as we approach the ADT 0.90 final release.

 Just trying to write the buid file so that I idiot proof some  issues.

 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] HTC Magic, is PhoneNumberUtils.PAUSE different?

2009-04-26 Thread Alejandro

I am getting reports that the in the HTC Magic the character that
represents the pause in a dial string is different than in the Google
build of cupcake. In the SDK 1.5 pre-release, the pause is given by a
','. Apparently, in the HTC magic, the pause is given by a 'p'.
Unfortunately, I don't currently have the means to test this. Does
anyone know if the PhoneNumberUtils.PAUSE member in the HTC magic
build reflects this change? Have any other functions in
PhoneNumberUtils changed in order to support this?

Thank you,
Alejandro

--~--~-~--~~~---~--~~
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: Resetting checkboxes in a dialog with .setMultiChoiceItems()

2009-04-26 Thread npak...@gmail.com

Hi DavidG,

Now, I meet the same problem as you.
Did you solve it? If yes, please share your way with me.

Thanks,
NPAK


On Apr 9, 9:16 pm, DavidG dgu...@gmail.com wrote:
 I'd like to have a dialog box which prompts the user to select from
 various checkboxes, then confirm Ok or Cancel. I have this
 working, but my only issue is the dialog always retains the previous
 checkbox selection state from the last time the dialog was shown. I'd
 like to always force the checkboxes to be unchecked (false) every
 time. Is there a way to accomplish this?

 protected Dialog onCreateDialog(int id) {
         switch (id)         {
         case DIALOG_OPTION:
             return newAlertDialog.Builder(MyApp.this)
             .setTitle(R.string.select_option_title)
             .setMultiChoiceItems(R.array.select_option,
                     null,
                     new DialogInterface.OnMultiChoiceClickListener() {
                         public void onClick(DialogInterface dialog,
 int whichButton, boolean isChecked) {
                             /* Do whatever with checked buttons */
                         }
                     })
             .setPositiveButton(OK, new
 DialogInterface.OnClickListener() {
                 public void onClick(DialogInterface dialog, int
 whichButton) {
                         /* User clicked Yes so do some stuff */
                         /* Is there a way to reset the checked buttons state
 to false from here? */
                 }
             })
             .setNegativeButton(Cancel, new
 DialogInterface.OnClickListener() {
                 public void onClick(DialogInterface dialog, int
 whichButton) {
                     /* User clicked No so do some stuff */
                     /* Is there a way to reset the checked buttons
 state to false from here? */
                 }
             })
            .create();
      }
      return 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: orientation change runtime option?

2009-04-26 Thread andrew

Great, thanks!

On Apr 26, 12:33 am, Dianne Hackborn hack...@android.com wrote:
 You can certainly have a user preference that lets them select between
 sensor, nosensor, portrait, landscape, and set that in the activity when it
 starts with the API on Activity.



 On Sat, Apr 25, 2009 at 11:15 AM, andrew andrewsach...@gmail.com wrote:

  Thanks for your quick response.  My app is kind of specialized and I
  think users might want it to respond differently to orientation
  changes than the default (I get a lot of requests for that, hence the
  android:screenOrientation=sensor ).  Is there any other approach I
  can take that would essentially change the value of the
  screenOrientation at runtime?  I think I have seen apps where the user
  selects how to respond to orientation changes.

  On Apr 25, 12:30 pm, Dianne Hackborn hack...@android.com wrote:
   I would suggest not doing anything special and letting users select what
   they want in the global pref that is in 1.5.

   On Fri, Apr 24, 2009 at 7:21 PM, andrew andrewsach...@gmail.com wrote:

Hi,
Is it possible to have a user choose how an app should respond to
orientation changes?  I have it set to
android:screenOrientation=sensor in the manifest but I would like
users to be able to turn this on and off or set landscape or portrait
orientation permanently.

Thanks,
Andrew

   --
   Dianne Hackborn
   Android framework engineer
   hack...@android.com

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

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  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: EditText Tabhost problem

2009-04-26 Thread SR

Confirmed as a problem in 1.5pre, in my own code on the emulator.

Non-toplevel TabHost (meaning:  embedded in another layout)
will steal the focus from an EditText elsewhere in the layout.  Upon a
keypress, but before the
letter for the depressed key shows up in the EditText -- the focus
jumps back to the first tab.

SR

On Apr 17, 5:36 pm, cvance383 cvance...@yahoo.com wrote:
 The problem I am having is I have a framelayout with a tabhost (
 widget  tabcontent) then I have another layout over top of the tabs
 that looks like a form. It has two editTexts but when I type in the
 them, the tabs stealfocusand put what i typed in the edittext i have
 within the tabcontent. If I remove the tabs from my xml and app, the
 top level edittext works fine. Anyone know why the tabs stealfocus
 when I type in the form in the foreground. Any solutions? I appreciate
 any help.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: HTC Magic, is PhoneNumberUtils.PAUSE different?

2009-04-26 Thread Dianne Hackborn
At this point there is no HTC Magic.  I would assume that these people are
using one of the leaked builds of 1.5, which is from some random pre-final
build of 1.5 with some random set of changes HTC as done on it.  I would not
spend my time trying to support it at this point, as it is not a real
product.

On Sun, Apr 26, 2009 at 9:37 PM, Alejandro atroc...@gmail.com wrote:


 I am getting reports that the in the HTC Magic the character that
 represents the pause in a dial string is different than in the Google
 build of cupcake. In the SDK 1.5 pre-release, the pause is given by a
 ','. Apparently, in the HTC magic, the pause is given by a 'p'.
 Unfortunately, I don't currently have the means to test this. Does
 anyone know if the PhoneNumberUtils.PAUSE member in the HTC magic
 build reflects this change? Have any other functions in
 PhoneNumberUtils changed in order to support this?

 Thank you,
 Alejandro

 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  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: Android v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-26 Thread Raphael

On Fri, Apr 24, 2009 at 10:37 AM, chrispix chris...@gmail.com wrote:

 Dianne, thank you for the response.
  The issue is, that if an application uses GPS and it is NOT turned
 off, it can drain the battery quite quickly if the app continues to
 ping the location. Which is why you disabled this. By saying the user
 can just leave the GPS on, and it won't get powered up until data is
 requested is still fine. But does not solve the underlying issue of
 applications still draining the battery from being poorly written,

So why not focus all this ranting on having the said developers fix
their poorly written apps and make sure that comment be properly
propagated in market?

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: Launch android emulator on mingw/msys, but failed

2009-04-26 Thread Raphael

What does it say if you run it with emulator -verbose or -debug init?
R/

On Thu, Apr 23, 2009 at 9:17 PM, Edward xia...@gmail.com wrote:

 Hi,
 I built the android emulator source on mingw/msys, then run ./
 emulator in msys console as below, but failed.

 $ ./emulator

 This application has requested the Runtime to terminate it in an
 unusual way.
 Please contact the application's support team for more information.
 .

 Is anyone who can help me?


 Edward
 


--~--~-~--~~~---~--~~
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 v. 1.5 = FAIL #2: Directly Manipulating Settings

2009-04-26 Thread Al Sutton

Show me a way of forcing a developer of an app to fix poorly written code
that doesn't stop the app running and I'll show you a management technique
that will earn you hundreds of thousands of dollars in book sales..

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 Raphael
Sent: 27 April 2009 06:05
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Android v. 1.5 = FAIL #2: Directly
Manipulating Settings


On Fri, Apr 24, 2009 at 10:37 AM, chrispix chris...@gmail.com wrote:

 Dianne, thank you for the response.
  The issue is, that if an application uses GPS and it is NOT turned 
 off, it can drain the battery quite quickly if the app continues to 
 ping the location. Which is why you disabled this. By saying the user 
 can just leave the GPS on, and it won't get powered up until data is 
 requested is still fine. But does not solve the underlying issue of 
 applications still draining the battery from being poorly written,

So why not focus all this ranting on having the said developers fix their
poorly written apps and make sure that comment be properly propagated in
market?

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: A simple question regarding inter-process communication.

2009-04-26 Thread M.Manjunatha

Hi All,

I have a same kind of problem..

I have an activity in the another process, Say it is running as a back
ground.

I want to tell that activity to start something.. how do i do that??

Regards,
Manjunatha

On Mar 23, 4:13 am, me tun a...@tpg.com.au wrote:
 Yeah, I got my example above to work across processes with intents.  I
 actually managed to send the soft keyboard character sequence and
 cursor position to another text edit view via a bundle in
 intent.PutExtra()...  So basically, I can type in one application and
 have it appear in another one which I needed to do for something I'm
 working on.  Thanks for all your help.

 On Mar 21, 5:11 am, David Turner di...@android.com wrote:



  On Fri, Mar 20, 2009 at 10:46 AM, Kenny yxw...@gmail.com wrote:

   I wonder if intents are sent across Linux processes too. Very anxious
   to know the answer.

  Of course, they are transparently send across processes when necessary, or
  sent locally if the receiver is in the same process.
  This magic is the exact purpose of the Android Binder.

   Kenny

   On Mar 19, 1:05 pm, me tun a...@tpg.com.au wrote:
Thanks Dianne, a colleague was telling me basically this too.  Does it
matter that the activities are running on different processes?

On Mar 19, 3:50 pm, Dianne Hackborn hack...@android.com wrote:

 If you are communicating between activities, you wouldn't use
   interfaces at
 all -- all of the communication with be by sending Intents between 
 them
   in
 various ways, and you can use Intent.putExtra() to put strings and
   other
 data in them.

 If you are communicating via a Service, you can use Messenger as the
 interface returned by onBind(), and you can stuff fairly arbitrary 
 data
   in
 the Message with message.setData().

 On Wed, Mar 18, 2009 at 9:22 PM, me tun a...@tpg.com.au wrote:

  Just say I have two applications, each with one activity running on
  separate processes and I want to send a simple string between them.
  For the purposes of this example, let us say I have a button that
  sends whatever is typed into an EditText view to the other
   application
  where it is then displayed.

  Do I have to expose a remote interface via a service that co-resides
  between the two applications?

  Or can I do something simpler (is there a way to pass data between
  processes without defining your interface using AIDL)?

  Thanks for clearing this up for me, as I seem to be struggling with
  performing IPC at the moment.  I'm pretty sure I have to use the
  Android IPC path and generate a remote interface using AIDL.  I'm
   just
  not sure about the binding to service part.

  Cheers!

 --
 Dianne Hackborn
 Android framework engineer
 hack...@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
-~--~~~~--~~--~--~---