[android-developers] upgrade

2011-03-26 Thread Hendrik Greving
Is there a function in the API of activity for instance that gets called when 
upgrading an application? 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] car dock mode

2011-03-26 Thread Hendrik Greving
Hi is there a broadcast even when entering/leaving car dock mode? Actually, 
finding these kind of events is a little cumbersome in the otherwise excellent 
documentation... - 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] Amazon appstore

2011-03-23 Thread Hendrik Greving
Do you guys know why you need a tax id in the amazon appstore?

-- 
You received this message because you are subscribed to the Google
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] Total install numbers

2011-03-02 Thread Hendrik Greving
Hi! Why is there a big difference of Total installs from the publishers 
website and the number of people who actually bought my app?

-- 
You received this message because you are subscribed to the Google
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] NullPointer Exception

2011-02-27 Thread Hendrik Greving
Hi I am getting a NullPointerException but no real log where it occurs. How can 
I debug this? It crashes when it returns from onCreate from the first Activity

ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord, Intent) 
line: 2496 
ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord, Intent) 
line: 2512 
ActivityThread.access$2200(ActivityThread, ActivityThread$ActivityRecord, 
Intent) line: 119 
ActivityThread$H.handleMessage(Message) line: 1863 
ActivityThread$H(Handler).dispatchMessage(Message) line: 99 
Looper.loop() line: 123 
ActivityThread.main(String[]) line: 4363 

-- 
You received this message because you are subscribed to the Google
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: NullPointer Exception

2011-02-27 Thread Hendrik Greving
I found it. I learned that with Run-Add Java Exception Breakpoint you can 
actually catch the exception
  - Original Message - 
  From: Hendrik Greving 
  To: Android Developers 
  Sent: Sunday, February 27, 2011 3:03 PM
  Subject: NullPointer Exception


  Hi I am getting a NullPointerException but no real log where it occurs. How 
can I debug this? It crashes when it returns from onCreate from the first 
Activity

  ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord, Intent) 
line: 2496 
  ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord, Intent) 
line: 2512 
  ActivityThread.access$2200(ActivityThread, ActivityThread$ActivityRecord, 
Intent) line: 119 
  ActivityThread$H.handleMessage(Message) line: 1863 
  ActivityThread$H(Handler).dispatchMessage(Message) line: 99 
  Looper.loop() line: 123 
  ActivityThread.main(String[]) line: 4363 

-- 
You received this message because you are subscribed to the Google
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] Publishing / log.d

2011-02-14 Thread Hendrik Greving
Hi question to publishing apps: Do you need to remove all Log.d calls before 
publishing? Since there is no preprocessor with #defines, it seems kind of dumb 
to put if (static_flag) around every Log.d call. 

-- 
You received this message because you are subscribed to the Google
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] adb upload

2011-02-14 Thread Hendrik Greving
After I've signed and exported an .apk, is there a way to upload this 
automatically with Eclipse? This is a basic question, I know. If I press F11 I 
guess it is just recompiling an unsigned package.

-- 
You received this message because you are subscribed to the Google
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: adb upload

2011-02-14 Thread Hendrik Greving
Oh and second question, how do you actually know whether you've compiled in 
debug or release mode in Eclipse? This is actually very basic but somehow not 
very obvious in this tool.
  - Original Message - 
  From: Hendrik Greving 
  To: Android Developers 
  Sent: Monday, February 14, 2011 8:39 PM
  Subject: adb upload


  After I've signed and exported an .apk, is there a way to upload this 
automatically with Eclipse? This is a basic question, I know. If I press F11 I 
guess it is just recompiling an unsigned package.

-- 
You received this message because you are subscribed to the Google
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] sqllite

2011-01-12 Thread Hendrik Greving
I have a database with a primary integer row key and several columns. One of 
the columns is text. Normally I am only fetching for the key, which is easy 
with SQLiteDataBase.query and KEY_ROWID = mynumber in the selection field. 
How can I check whether a row (or more) exist that contain a certain string in 
the text column. I've tried MY_STRING_COLUMN = \my_search_string\ in the 
selection argument, but this doesn't work.

-- 
You received this message because you are subscribed to the Google
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

Re: [android-developers] sqllite

2011-01-12 Thread Hendrik Greving
KEY_STRING is the text column name

When putting in KEY_STRING +  like  + mystring = I am getting a syntax 
exception
KEY_STRING +  like \ + mystring + \ = it seems to incorrectly always 
find something

Actually, I want only exact matches, no substrings anyways
  - Original Message - 
  From: Kostya Vasilyev 
  To: android-developers@googlegroups.com 
  Sent: Wednesday, January 12, 2011 4:51 PM
  Subject: Re: [android-developers] sqllite


  Try using like:

  ... where column like %substring%...


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

  13.01.2011 3:42 пользователь Hendrik Greving fourhend...@gmail.com 
написал:
   I have a database with a primary integer row key and several columns. One 
of the columns is text. Normally I am only fetching for the key, which is 
easy with SQLiteDataBase.query and KEY_ROWID = mynumber in the selection 
field. How can I check whether a row (or more) exist that contain a certain 
string in the text column. I've tried MY_STRING_COLUMN = \my_search_string\ 
in the selection argument, but this doesn't work.
   
   -- 
   You received this message because you are subscribed to the Google
   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


  -- 
  You received this message because you are subscribed to the Google
  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

-- 
You received this message because you are subscribed to the Google
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 name

2011-01-05 Thread Hendrik Greving
I have an app and changed its name everywhere, Manifest etc. The icon names 
etc. are correct now, also the widget name from the widget manager and the name 
which appear when you add to the home screen. BUT, if I go to the application 
manager (Settings - Applications), the old name is still there. How can I get 
rid of 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

Re: [android-developers] App name

2011-01-05 Thread Hendrik Greving
Tried that, I uninstalled  deleted everything before. It must somehow still 
hidden in the sources somewhere.

- Original Message - 
  From: John Lussmyer 
  To: android-developers@googlegroups.com 
  Sent: Wednesday, January 05, 2011 5:41 PM
  Subject: Re: [android-developers] App name


  Uninstall it before re-installing it?


  On Wed, Jan 5, 2011 at 5:05 PM, Hendrik Greving fourhend...@gmail.com wrote:

I have an app and changed its name everywhere, Manifest etc. The icon names 
etc. are correct now, also the widget name from the widget manager and the name 
which appear when you add to the home screen. BUT, if I go to the application 
manager (Settings - Applications), the old name is still there. How can I get 
rid of 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

-- 
You received this message because you are subscribed to the Google
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] Dialog, ListView, ListViewAdapter, form elements

2010-12-28 Thread Hendrik Greving
I have a Dialog, setContentView set to a xml ListView. I then use a ListAdapter 
that returns view form elements, like RadioGroup and a Button. I took the 
ListView to get scrolling if the RadioGroup is big. First, is there a better, 
smarter way to do this? My current problem is, yet it works, the form elements 
like the button is not getting the click when tapping on it. I guess it's 
getting lost in the ListView. Any help is appreciated, thank you. Happy New 
Year.

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

[android-developers] Re: Dialog, ListView, ListViewAdapter, form elements

2010-12-28 Thread Hendrik Greving
Ok I used ScrollView and it works. 
  - Original Message - 
  From: Hendrik Greving 
  To: Android Developers 
  Sent: Tuesday, December 28, 2010 8:05 PM
  Subject: Dialog, ListView, ListViewAdapter, form elements


  I have a Dialog, setContentView set to a xml ListView. I then use a 
ListAdapter that returns view form elements, like RadioGroup and a Button. I 
took the ListView to get scrolling if the RadioGroup is big. First, is there a 
better, smarter way to do this? My current problem is, yet it works, the form 
elements like the button is not getting the click when tapping on it. I guess 
it's getting lost in the ListView. Any help is appreciated, thank you. Happy 
New Year.

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

[android-developers] android ideas

2010-12-27 Thread Hendrik Greving
When setting to auto, either widget or settings, check the current best auto 
settings right away

-- 
You received this message because you are subscribed to the Google
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 ideas

2010-12-27 Thread Hendrik Greving
Err sorry, please disregard this
  - Original Message - 
  From: Hendrik Greving 
  To: Android Developers 
  Sent: Monday, December 27, 2010 10:31 PM
  Subject: android ideas


  When setting to auto, either widget or settings, check the current best auto 
settings right away

-- 
You received this message because you are subscribed to the Google
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: LocationManager.KEY_PROXIMITY_ENTERING

2010-12-24 Thread Hendrik Greving
Still having this problem. Does entering false/true work for anybody? I yes, 
with what radius put in for the proximity alert?
  - Original Message - 
  From: Hendrik Greving 
  To: Android Developers 
  Sent: Thursday, December 23, 2010 10:57 AM
  Subject: LocationManager.KEY_PROXIMITY_ENTERING


  LocationManager.KEY_PROXIMITY_ENTERING is true for the intent of a 
proximityAlert I was adding. No matter where I am going, I never receive 
false. Anybody else seeing 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] LocationManager.KEY_PROXIMITY_ENTERING

2010-12-23 Thread Hendrik Greving
LocationManager.KEY_PROXIMITY_ENTERING is true for the intent of a 
proximityAlert I was adding. No matter where I am going, I never receive 
false. Anybody else seeing 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] display brightness

2010-12-15 Thread Hendrik Greving
Hi. Is there a way to check if hardware support automatic brightness? Can 
setting the system settings to auto throw an exception?

-- 
You received this message because you are subscribed to the Google
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

Re: [android-developers] display brightness

2010-12-15 Thread Hendrik Greving

Ok. I've tried to change the brightness with

   Settings.System.putInt(getContentResolver(),
   SCREEN_BRIGHTNESS_MODE,
   SCREEN_BRIGHTNESS_MODE_MANUAL);

   Settings.System.putInt(getContentResolver(), 
Settings.System.SCREEN_BRIGHTNESS, 10);


and tried some other values. It doesn't have any effect. Am I missing 
something? In API level 7, I can't find 
Settings.System.SCREEN_BRIGHTNESS_MODE so I've defined it myself. Is this a 
problem?


- Original Message - 
From: Mark Murphy mmur...@commonsware.com

To: android-developers@googlegroups.com
Sent: Wednesday, December 15, 2010 4:37 PM
Subject: Re: [android-developers] display brightness


On Wed, Dec 15, 2010 at 7:26 PM, Hendrik Greving fourhend...@gmail.com 
wrote:

Hi. Is there a way to check if hardware support automatic brightness?


android.provider.Settings.System and SCREEN_BRIGHTNESS_MODE will tell
you if automatic brightness is enabled. I am not aware of a way to
determine if the hardware has the option, though.


Can
setting the system settings to auto throw an exception?


I have no idea what this means, sorry.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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 


--
You received this message because you are subscribed to the Google
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


Re: [android-developers] display brightness

2010-12-15 Thread Hendrik Greving
I noticed that when checking with Settings-Display-Brightness, the control 
bar is set to the setting I am writing with my app. But the display doesn't 
reflect the brightness. Is there any update method or a broadcast I have to 
sent before it gets reflected by the hardware?


- Original Message - 
From: Hendrik Greving fourhend...@gmail.com

To: android-developers@googlegroups.com
Sent: Wednesday, December 15, 2010 5:04 PM
Subject: Re: [android-developers] display brightness



Ok. I've tried to change the brightness with

   Settings.System.putInt(getContentResolver(),
   SCREEN_BRIGHTNESS_MODE,
   SCREEN_BRIGHTNESS_MODE_MANUAL);

   Settings.System.putInt(getContentResolver(), 
Settings.System.SCREEN_BRIGHTNESS, 10);


and tried some other values. It doesn't have any effect. Am I missing 
something? In API level 7, I can't find 
Settings.System.SCREEN_BRIGHTNESS_MODE so I've defined it myself. Is this 
a problem?


- Original Message - 
From: Mark Murphy mmur...@commonsware.com

To: android-developers@googlegroups.com
Sent: Wednesday, December 15, 2010 4:37 PM
Subject: Re: [android-developers] display brightness


On Wed, Dec 15, 2010 at 7:26 PM, Hendrik Greving fourhend...@gmail.com 
wrote:

Hi. Is there a way to check if hardware support automatic brightness?


android.provider.Settings.System and SCREEN_BRIGHTNESS_MODE will tell
you if automatic brightness is enabled. I am not aware of a way to
determine if the hardware has the option, though.


Can
setting the system settings to auto throw an exception?


I have no idea what this means, sorry.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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




--
You received this message because you are subscribed to the Google
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


Re: [android-developers] Re: screen brightness change

2010-12-14 Thread Hendrik Greving
I have a widget button that adjusts the brightness and it would be nice if the 
button could adjust its face if the brightness gets changed otherwise. I guess 
this is not possible then.
  - Original Message - 
  From: Dianne Hackborn 
  To: android-developers@googlegroups.com 
  Sent: Tuesday, December 14, 2010 6:46 PM
  Subject: Re: [android-developers] Re: screen brightness change


  On Tue, Dec 14, 2010 at 6:43 PM, fourhend...@gmail.com 
fourhend...@gmail.com wrote:

I am trying to catch the event when the screen brightness changes.



  Yeah, I gathered that.  At a higher level, what are you trying to accomplish 
from the user's perspective?


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

-- 
You received this message because you are subscribed to the Google
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] screen brightness change

2010-12-13 Thread Hendrik Greving
Hi is there some broadcast or listener for screen brightness changes?

-- 
You received this message because you are subscribed to the Google
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] GPS

2010-12-10 Thread Hendrik Greving
I know how to read the GPS status etc. but how do I turn the chip on/off? There 
is nothing in LocationManager/Provider or GpsStatus or Satellite 

-- 
You received this message because you are subscribed to the Google
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

Re: [android-developers] GPS

2010-12-10 Thread Hendrik Greving
Eww. I just read about this. I guess this is a FAQ, but why can the Power 
Control Widget do this?
  - Original Message - 
  From: TreKing 
  To: android-developers@googlegroups.com 
  Sent: Friday, December 10, 2010 4:47 PM
  Subject: Re: [android-developers] GPS


  On Fri, Dec 10, 2010 at 6:47 PM, Hendrik Greving fourhend...@gmail.com 
wrote:

I know how to read the GPS status etc. but how do I turn the chip on/off?

  You can't. You can bring up the settings screen to let the user turn it on or 
off, if they want.

  
-
  TreKing - Chicago transit tracking app for Android-powered devices


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

-- 
You received this message because you are subscribed to the Google
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

Re: [android-developers] Re: GPS

2010-12-10 Thread Hendrik Greving
I've actually just tried that. But even if I put the permission in the 
manifest, it still makes a security exception that this permission was 
missing


- Original Message - 
From: Nathan critter...@crittermap.com

To: Android Developers android-developers@googlegroups.com
Sent: Friday, December 10, 2010 5:34 PM
Subject: [android-developers] Re: GPS


It probably has 'Write System Settings' permission or maybe even
'Write Secure System Settings' permission.

These are probably very scary sounding permissions to ask for, but a
built in widget never had to ask for them.

Nathan

On Dec 10, 4:59 pm, Hendrik Greving fourhend...@gmail.com wrote:
Eww. I just read about this. I guess this is a FAQ, but why can the Power 
Control Widget do this?








- Original Message -
From: TreKing
To: android-developers@googlegroups.com
Sent: Friday, December 10, 2010 4:47 PM
Subject: Re: [android-developers] GPS

On Fri, Dec 10, 2010 at 6:47 PM, Hendrik Greving fourhend...@gmail.com 
wrote:


I know how to read the GPS status etc. but how do I turn the chip on/off?

You can't. You can bring up the settings screen to let the user turn it on 
or off, if they want.


--- 
 --

TreKing - Chicago transit tracking app for Android-powered devices

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


--
You received this message because you are subscribed to the Google
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 


--
You received this message because you are subscribed to the Google
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


Re: [android-developers] Re: GPS

2010-12-10 Thread Hendrik Greving

The power control plus application can do it. So what's the trick?

- Original Message - 
From: Nathan critter...@crittermap.com

To: Android Developers android-developers@googlegroups.com
Sent: Friday, December 10, 2010 5:34 PM
Subject: [android-developers] Re: GPS


It probably has 'Write System Settings' permission or maybe even
'Write Secure System Settings' permission.

These are probably very scary sounding permissions to ask for, but a
built in widget never had to ask for them.

Nathan

On Dec 10, 4:59 pm, Hendrik Greving fourhend...@gmail.com wrote:
Eww. I just read about this. I guess this is a FAQ, but why can the Power 
Control Widget do this?








- Original Message -
From: TreKing
To: android-developers@googlegroups.com
Sent: Friday, December 10, 2010 4:47 PM
Subject: Re: [android-developers] GPS

On Fri, Dec 10, 2010 at 6:47 PM, Hendrik Greving fourhend...@gmail.com 
wrote:


I know how to read the GPS status etc. but how do I turn the chip on/off?

You can't. You can bring up the settings screen to let the user turn it on 
or off, if they want.


--- 
 --

TreKing - Chicago transit tracking app for Android-powered devices

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


--
You received this message because you are subscribed to the Google
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 


--
You received this message because you are subscribed to the Google
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


Re: [android-developers] Re: GPS

2010-12-10 Thread Hendrik Greving
I've triedWRITE_SECURE_SETTINGS. I've found out that only system apps can get 
this permission.Actually I've found out how to toggle GPS etc., but it is an 
expoit which I guess will be fixed with Gingerbread. Unfortunately.

  - Original Message - 
  From: TreKing 
  To: android-developers@googlegroups.com 
  Sent: Friday, December 10, 2010 10:09 PM
  Subject: Re: [android-developers] Re: GPS


  On Fri, Dec 10, 2010 at 7:41 PM, Hendrik Greving fourhend...@gmail.com 
wrote:

I've actually just tried that. But even if I put the permission in the 
manifest, it still makes a security exception that this permission was missing

  What did you try?


  On Fri, Dec 10, 2010 at 11:06 PM, Hendrik Greving fourhend...@gmail.com 
wrote:

The power control plus application can do it. So what's the trick?

  Being built as part of the firmware probably helps.


  
-
  TreKing - Chicago transit tracking app for Android-powered devices


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

-- 
You received this message because you are subscribed to the Google
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] AppWidgetProvider onReceive

2010-12-09 Thread Hendrik Greving
I need to overwrite onReceive to get some own Broadcasts. The original method 
dispatches certain Broadcasts to onUpdate. I'm having a little trouble and like 
to see what the original method dispatches exactly to onUpdate. Does anybody 
know in which package the source file is with onReceive of AppWidgetProvider? 
Or just know what the method does?

-- 
You received this message because you are subscribed to the Google
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: AppWidgetProvider onReceive

2010-12-09 Thread Hendrik Greving
Nevermind. I just call super.onReceive
  - Original Message - 
  From: Hendrik Greving 
  To: Android Developers 
  Sent: Thursday, December 09, 2010 7:58 PM
  Subject: AppWidgetProvider onReceive


  I need to overwrite onReceive to get some own Broadcasts. The original method 
dispatches certain Broadcasts to onUpdate. I'm having a little trouble and like 
to see what the original method dispatches exactly to onUpdate. Does anybody 
know in which package the source file is with onReceive of AppWidgetProvider? 
Or just know what the method does?

-- 
You received this message because you are subscribed to the Google
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

Re: [android-developers] Re: starting local service class not found

2010-12-02 Thread Hendrik Greving

I do. Like this

   service android:name=.MyWidgetProvider$MyService
   /service

- Original Message - 
From: Mark Murphy mmur...@commonsware.com

To: android-developers@googlegroups.com
Sent: Wednesday, December 01, 2010 4:30 PM
Subject: Re: [android-developers] Re: starting local service class not found


On Wed, Dec 1, 2010 at 7:09 PM, Hendrik Greving fourhend...@gmail.com 
wrote:

Still having this problem :/ Anyone?


Perhaps you do not have the service listed in the AndroidManifest.xml file.

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

_Android Programming Tutorials_ Version 3.0.1 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 


--
You received this message because you are subscribed to the Google
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


Re: [android-developers] Re: starting local service class not found

2010-12-02 Thread Hendrik Greving
By the way, I am getting an InstantiationException and shortly before, a 
NewInstance failed: no init(). When I google for it, I find a little bit 
about IntentService constructors and alike, I am not using IntentService 
though, just regular Service.



- Original Message - 
From: Hendrik Greving fourhend...@gmail.com

To: android-developers@googlegroups.com
Sent: Thursday, December 02, 2010 10:18 PM
Subject: Re: [android-developers] Re: starting local service class not found



I do. Like this

   service android:name=.MyWidgetProvider$MyService
   /service

- Original Message - 
From: Mark Murphy mmur...@commonsware.com

To: android-developers@googlegroups.com
Sent: Wednesday, December 01, 2010 4:30 PM
Subject: Re: [android-developers] Re: starting local service class not 
found



On Wed, Dec 1, 2010 at 7:09 PM, Hendrik Greving fourhend...@gmail.com 
wrote:

Still having this problem :/ Anyone?


Perhaps you do not have the service listed in the AndroidManifest.xml 
file.


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

_Android Programming Tutorials_ Version 3.0.1 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 


--
You received this message because you are subscribed to the Google
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: starting local service class not found

2010-12-01 Thread Hendrik Greving
Still having this problem :/ Anyone?
  - Original Message - 
  From: Hendrik Greving 
  To: Android Developers 
  Sent: Tuesday, November 30, 2010 11:13 PM
  Subject: starting local service class not found


  I have
  package com.myapps.myapp;


  public class MyWidgetProvider extends AppWidgetProvider {
  
  [..]

  public MyService extends Service {
  
  [..]

  @Override
  public int onStartCommand(Intent intent, int flags, int startId)  {

  [..]
  
  Intent updateIntent = new Intent(this, 
com.myapps.myapp.MyWidgetProvider.MyService.class);
  PendingIntent pendingIntent = PendingIntent.getService(this, 0, 
updateIntent, PendingIntent.FLAG_CANCEL_CURRENT);

  [..]
  }

  }

  gives unable to start service intent and not found. I guess this is more 
a java than an android question, is it? How do I fix 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] starting local service class not found

2010-11-30 Thread Hendrik Greving
I have
package com.myapps.myapp;


public class MyWidgetProvider extends AppWidgetProvider {

[..]

public MyService extends Service {

[..]

@Override
public int onStartCommand(Intent intent, int flags, int startId)  {

[..]

Intent updateIntent = new Intent(this, 
com.myapps.myapp.MyWidgetProvider.MyService.class);
PendingIntent pendingIntent = PendingIntent.getService(this, 0, 
updateIntent, PendingIntent.FLAG_CANCEL_CURRENT);

[..]
}

}

gives unable to start service intent and not found. I guess this is more a 
java than an android question, is it? How do I fix 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] location updates verizon

2010-11-29 Thread Hendrik Greving
Is it possible to get network_location updates with Verizon phones? I could 
imagine that not, since Verizon is CDMA and there is no timing advance as in 
GSM for instance, so the network might not know the location at all. I am not 
sure though. I notice though that I am not getting anything from 
getLastKnownLocation when asking an ACCURACY_COARSE provider with a Verizon 
phone.

-- 
You received this message because you are subscribed to the Google
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: location updates verizon

2010-11-29 Thread Hendrik Greving
Err. Nevermind. It works now (with Verizon). Thanks
  - Original Message - 
  From: Hendrik Greving 
  To: Android Developers 
  Sent: Monday, November 29, 2010 10:26 PM
  Subject: location updates verizon


  Is it possible to get network_location updates with Verizon phones? I could 
imagine that not, since Verizon is CDMA and there is no timing advance as in 
GSM for instance, so the network might not know the location at all. I am not 
sure though. I notice though that I am not getting anything from 
getLastKnownLocation when asking an ACCURACY_COARSE provider with a Verizon 
phone.

-- 
You received this message because you are subscribed to the Google
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

Re: [android-developers] Re: droid 2 drivers

2010-11-27 Thread Hendrik Greving
Yes I simply didn't see the link, only saw the USB charger drivers. Thanks it 
works now.
  - Original Message - 
  From: Evgeny V 
  To: android-developers@googlegroups.com 
  Sent: Saturday, November 27, 2010 3:12 AM
  Subject: Re: [android-developers] Re: droid 2 drivers


  I have xt701 and  using downloaded drivers from Motorola site: 
Motorola_Mobile_Drivers_4.7.1_MotoConnect_1.1.31.exe
  Works fine for me.


  2010/11/27 Kostya Vasilyev kmans...@gmail.com

Have you looked here:

http://developer.Motorola.com ?

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

27.11.2010 7:33 пользователь Hendrik Greving fourhend...@gmail.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



  -- 
  You received this message because you are subscribed to the Google
  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

-- 
You received this message because you are subscribed to the Google
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

Re: [android-developers] Re: custom view in widget

2010-11-27 Thread Hendrik Greving
This works, thanks. It seems clickable ImageView is the way that works.
  - Original Message - 
  From: Kostya Vasilyev 
  To: android-developers@googlegroups.com 
  Sent: Saturday, November 27, 2010 1:34 AM
  Subject: Re: [android-developers] Re: custom view in widget


  Hendrik,

  What are you actually trying to do? Do you need to replace buttons because 
your widget has several different versions, varying in size and the number of 
buttons?

  If that's the case, consider using separate layouts, one for each widget size 
/ number of buttons. You pretty much need this anyway, since initial widget 
size is specified in widget_info.xml, and there can only be one for each widget 
declared in the manifest.

  Once you have a layout with the right number of buttons, you can change them 
individually with setImageViewResource and setOnClickPendingIntent. This has a 
side benefit, that only resource id and pending intent id are marshalled 
cross-process into the home application.

  Also, I recommend using ImageViews for buttons. They respond to touch events, 
and you can add visual feedback by using a selector type drawable with an 
entry for item android:state_pressed=true.

  Hope this helps.

  -- Kostya


  27.11.2010 2:27, Hendrik Greving пишет: 
That's a good idea, I'll try that. By the way, if I want to replace one of 
the buttons from my widget provider per remoteviews, can I do this (for 
instance with removeAllViews and addView)? I've tried this and the widget than 
fails loading. Or do I need to set up a layout each for all possible 
combinations and then use this with updateAppWidget?
  - Original Message - 
  From: Kostya Vasilyev 
  To: android-developers@googlegroups.com 
  Sent: Friday, November 26, 2010 3:07 PM
  Subject: Re: [android-developers] Re: custom view in widget


  Yes, portrait mode seems to be somewhat different. I don't have a tablet, 
but had to fix this for a Motorola Milestone (when the keyboard is pulled out, 
the home screen rotates).

  I did this by doing three things:

  - having separate layouts for portrait and landscape modes (you can use 
res/layout_port, etc. in a widget);

  - specifying a larger width for the landscape layout (found empirically, 
so that my 2*1, 3*1, and 1*1 widgets line up at the edges when placed one below 
another);

  - using nine-patches for the backgrounds.

  One more trick would be to make use of layout_weight, although I haven't 
needed that.

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

  27.11.2010 1:38 пользователь Hendrik Greving fourhend...@gmail.com 
написал:
   So basically the ideal image size for a standard 1-row widget would be 
320x100 * 1.5? I did both the minimum APIlevel (7) and enabled scaling (true). 
The problem I have is that they don't scale in an (emulated-) tablet. The OS 
seems to scale the width more than the height. I played around with all setting 
I could imagine, scale type, minimum width, height, wrap_content/fill_parent, 
9-patch png's. What would be the standard way to make this work? I saw widget's 
that apparently can do this.
   
   - Original Message - 
   From: Kostya Vasilyev 
   To: android-developers@googlegroups.com 
   Sent: Friday, November 26, 2010 2:08 PM
   Subject: Re: [android-developers] Re: custom view in widget
   
   
   When you read about standard widget sizes, that's in dp units: device 
independent pixels. On a high-res screen, your layouts are scaled by Android to 
a larger pixel size (a factor of 1.5 for hdpi).
   
   As for your issue with scaling - did you add support for scaling in the 
manifest? You can do it by either by setting minSdk to 4 and above, or by 
including a supports-screens element.
   
   --
   Kostya Vasilyev -- http://kmansoft.wordpress.com
   
   27.11.2010 0:45 пользователь Hendrik Greving fourhend...@gmail.com 
написал:
I'm much further now, thanks. I have 5 button in a horizontal linear 
layout. 
Each button is currently 167x280. I read that a one row widget is 
normally 
320x100. However, if I scale each button to 64x100, it looks bad, 
probably 
because I need the density?! On a high density screen like a Nexus 
one,the 
167x280 look perfect. The other problem I have is, that it scales 
badly. I 
would like to at least make it look 'ok' when used on a tablet. 
However, it 
looks like that it scales only the width, and doesn't preserve the 
ratio. 
I've tried a lot with different scale types, I've also tried 9-patch 
png 
images. If I do the latter, the button is scaled wrong in either 
case. Any 
idea? Thanks!!

- Original Message - 
From: Mark Murphy mmur...@commonsware.com
To: android-developers@googlegroups.com
Sent: Saturday, November 20, 2010 4:16 AM

Re: [android-developers] Re: custom view in widget

2010-11-26 Thread Hendrik Greving
I'm much further now, thanks. I have 5 button in a horizontal linear layout. 
Each button is currently 167x280. I read that a one row widget is normally 
320x100. However, if I scale each button to 64x100, it looks bad, probably 
because I need the density?! On a high density screen like a Nexus one,the 
167x280 look perfect. The other problem I have is, that it scales badly. I 
would like to at least make it look 'ok' when used on a tablet. However, it 
looks like that it scales only the width, and doesn't preserve the ratio. 
I've tried a lot with different scale types, I've also tried 9-patch png 
images. If I do the latter, the button is scaled wrong in either case. Any 
idea? Thanks!!


- Original Message - 
From: Mark Murphy mmur...@commonsware.com

To: android-developers@googlegroups.com
Sent: Saturday, November 20, 2010 4:16 AM
Subject: Re: [android-developers] Re: custom view in widget


On Fri, Nov 19, 2010 at 6:19 PM, Hendrik Greving fourhend...@gmail.com 
wrote:

So basically the widget can only use stuff from the OS?


Please read the documentation:

http://developer.android.com/guide/topics/appwidgets/index.html

particularly:

http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout

where it lists the eligible classes for use through a RemoteViews.


Let's say you want
to draw something nice into a widget, I saw several widgets doing that, 
like
HTML content or so, or a picture from your mum (j/k), how would you do 
that?


Since you neglected to point out any examples, and since it is
impossible to tell by looking at a set of pixels whether or not they
came from HTML content or so, it is difficult to answer your
question.

TextView supports SpannedString, such as that returned by
Html.fromHtml(). RemoteViews supports sending a SpannedString to an
app widget. Hence, you can use that subset of HTML supported by
fromHtml() in a TextView hosted by an app widget.

Also, please bear in mind that home screens are not subject to app
widget limitations. So, just because you might see an HTC Sense or
MOTOBLUR home screen doing something fancy does not mean that an app
widget is capable of the same feats of derring-do.

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

_The Busy Coder's Guide to Android Development_ Version 3.2 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 


--
You received this message because you are subscribed to the Google
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


Re: [android-developers] Re: custom view in widget

2010-11-26 Thread Hendrik Greving
So basically the ideal image size for a standard 1-row widget would be 320x100 
* 1.5? I did both the minimum APIlevel (7) and enabled scaling (true). The 
problem I have is that they don't scale in an (emulated-) tablet. The OS seems 
to scale the width more than the height. I played around with all setting I 
could imagine, scale type, minimum width, height, wrap_content/fill_parent, 
9-patch png's. What would be the standard way to make this work? I saw widget's 
that apparently can do this.

- Original Message - 
  From: Kostya Vasilyev 
  To: android-developers@googlegroups.com 
  Sent: Friday, November 26, 2010 2:08 PM
  Subject: Re: [android-developers] Re: custom view in widget


  When you read about standard widget sizes, that's in dp units: device 
independent pixels. On a high-res screen, your layouts are scaled by Android to 
a larger pixel size (a factor of 1.5 for hdpi).

  As for your issue with scaling - did you add support for scaling in the 
manifest? You can do it by either by setting minSdk to 4 and above, or by 
including a supports-screens element.

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

  27.11.2010 0:45 пользователь Hendrik Greving fourhend...@gmail.com 
написал:
   I'm much further now, thanks. I have 5 button in a horizontal linear 
layout. 
   Each button is currently 167x280. I read that a one row widget is normally 
   320x100. However, if I scale each button to 64x100, it looks bad, probably 
   because I need the density?! On a high density screen like a Nexus one,the 
   167x280 look perfect. The other problem I have is, that it scales badly. I 
   would like to at least make it look 'ok' when used on a tablet. However, it 
   looks like that it scales only the width, and doesn't preserve the ratio. 
   I've tried a lot with different scale types, I've also tried 9-patch png 
   images. If I do the latter, the button is scaled wrong in either case. Any 
   idea? Thanks!!
   
   - Original Message - 
   From: Mark Murphy mmur...@commonsware.com
   To: android-developers@googlegroups.com
   Sent: Saturday, November 20, 2010 4:16 AM
   Subject: Re: [android-developers] Re: custom view in widget
   
   
   On Fri, Nov 19, 2010 at 6:19 PM, Hendrik Greving fourhend...@gmail.com 
   wrote:
   So basically the widget can only use stuff from the OS?
  
   Please read the documentation:
  
   http://developer.android.com/guide/topics/appwidgets/index.html
  
   particularly:
  
   
http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout
  
   where it lists the eligible classes for use through a RemoteViews.
  
   Let's say you want
   to draw something nice into a widget, I saw several widgets doing that, 
   like
   HTML content or so, or a picture from your mum (j/k), how would you do 
   that?
  
   Since you neglected to point out any examples, and since it is
   impossible to tell by looking at a set of pixels whether or not they
   came from HTML content or so, it is difficult to answer your
   question.
  
   TextView supports SpannedString, such as that returned by
   Html.fromHtml(). RemoteViews supports sending a SpannedString to an
   app widget. Hence, you can use that subset of HTML supported by
   fromHtml() in a TextView hosted by an app widget.
  
   Also, please bear in mind that home screens are not subject to app
   widget limitations. So, just because you might see an HTC Sense or
   MOTOBLUR home screen doing something fancy does not mean that an app
   widget is capable of the same feats of derring-do.
  
   -- 
   Mark Murphy (a Commons Guy)
   http://commonsware.com | http://github.com/commonsguy
   http://commonsware.com/blog | http://twitter.com/commonsguy
  
   _The Busy Coder's Guide to Android Development_ Version 3.2 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 
   
   -- 
   You received this message because you are subscribed to the Google
   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


  -- 
  You received this message because you are subscribed to the Google
  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

-- 
You received

Re: [android-developers] Re: custom view in widget

2010-11-26 Thread Hendrik Greving
That's a good idea, I'll try that. By the way, if I want to replace one of the 
buttons from my widget provider per remoteviews, can I do this (for instance 
with removeAllViews and addView)? I've tried this and the widget than fails 
loading. Or do I need to set up a layout each for all possible combinations and 
then use this with updateAppWidget?
  - Original Message - 
  From: Kostya Vasilyev 
  To: android-developers@googlegroups.com 
  Sent: Friday, November 26, 2010 3:07 PM
  Subject: Re: [android-developers] Re: custom view in widget


  Yes, portrait mode seems to be somewhat different. I don't have a tablet, but 
had to fix this for a Motorola Milestone (when the keyboard is pulled out, the 
home screen rotates).

  I did this by doing three things:

  - having separate layouts for portrait and landscape modes (you can use 
res/layout_port, etc. in a widget);

  - specifying a larger width for the landscape layout (found empirically, so 
that my 2*1, 3*1, and 1*1 widgets line up at the edges when placed one below 
another);

  - using nine-patches for the backgrounds.

  One more trick would be to make use of layout_weight, although I haven't 
needed that.

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

  27.11.2010 1:38 пользователь Hendrik Greving fourhend...@gmail.com 
написал:
   So basically the ideal image size for a standard 1-row widget would be 
320x100 * 1.5? I did both the minimum APIlevel (7) and enabled scaling (true). 
The problem I have is that they don't scale in an (emulated-) tablet. The OS 
seems to scale the width more than the height. I played around with all setting 
I could imagine, scale type, minimum width, height, wrap_content/fill_parent, 
9-patch png's. What would be the standard way to make this work? I saw widget's 
that apparently can do this.
   
   - Original Message - 
   From: Kostya Vasilyev 
   To: android-developers@googlegroups.com 
   Sent: Friday, November 26, 2010 2:08 PM
   Subject: Re: [android-developers] Re: custom view in widget
   
   
   When you read about standard widget sizes, that's in dp units: device 
independent pixels. On a high-res screen, your layouts are scaled by Android to 
a larger pixel size (a factor of 1.5 for hdpi).
   
   As for your issue with scaling - did you add support for scaling in the 
manifest? You can do it by either by setting minSdk to 4 and above, or by 
including a supports-screens element.
   
   --
   Kostya Vasilyev -- http://kmansoft.wordpress.com
   
   27.11.2010 0:45 пользователь Hendrik Greving fourhend...@gmail.com 
написал:
I'm much further now, thanks. I have 5 button in a horizontal linear 
layout. 
Each button is currently 167x280. I read that a one row widget is 
normally 
320x100. However, if I scale each button to 64x100, it looks bad, 
probably 
because I need the density?! On a high density screen like a Nexus 
one,the 
167x280 look perfect. The other problem I have is, that it scales badly. 
I 
would like to at least make it look 'ok' when used on a tablet. However, 
it 
looks like that it scales only the width, and doesn't preserve the ratio. 
I've tried a lot with different scale types, I've also tried 9-patch png 
images. If I do the latter, the button is scaled wrong in either case. 
Any 
idea? Thanks!!

- Original Message - 
From: Mark Murphy mmur...@commonsware.com
To: android-developers@googlegroups.com
Sent: Saturday, November 20, 2010 4:16 AM
Subject: Re: [android-developers] Re: custom view in widget


On Fri, Nov 19, 2010 at 6:19 PM, Hendrik Greving fourhend...@gmail.com 
wrote:
So basically the widget can only use stuff from the OS?
   
Please read the documentation:
   
http://developer.android.com/guide/topics/appwidgets/index.html
   
particularly:
   

http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout
   
where it lists the eligible classes for use through a RemoteViews.
   
Let's say you want
to draw something nice into a widget, I saw several widgets doing that, 
like
HTML content or so, or a picture from your mum (j/k), how would you do 
that?
   
Since you neglected to point out any examples, and since it is
impossible to tell by looking at a set of pixels whether or not they
came from HTML content or so, it is difficult to answer your
question.
   
TextView supports SpannedString, such as that returned by
Html.fromHtml(). RemoteViews supports sending a SpannedString to an
app widget. Hence, you can use that subset of HTML supported by
fromHtml() in a TextView hosted by an app widget.
   
Also, please bear in mind that home screens are not subject to app
widget limitations. So, just because you might see an HTC Sense or
MOTOBLUR home screen doing something fancy does not mean that an app
widget is capable of the same feats of derring-do

[android-developers] droid 2 drivers

2010-11-26 Thread Hendrik Greving
A Nexus One worked fine and installed the adb drivers right away. It can't find 
the drivers for Droid 2 (Vista 32). Anybody know where to get them from? 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: droid 2 drivers

2010-11-26 Thread Hendrik Greving
By the way I've tried the Motorola link but it doesn't take the drivers 
http://www.motorola.com/consumers/v/index.jsp?vgnextoid=bda09ec8009a0210VgnVCM108806b00aRCRD
  - Original Message - 
  From: Hendrik Greving 
  To: Android Developers 
  Sent: Friday, November 26, 2010 8:21 PM
  Subject: droid 2 drivers


  A Nexus One worked fine and installed the adb drivers right away. It can't 
find the drivers for Droid 2 (Vista 32). Anybody know where to get them from? 
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] widget buttons/images changing the layout

2010-11-20 Thread Hendrik Greving
I can write a widget with a Button or ImageButton and assign a StateDrawable as 
background or sourcein order to make an effect when you click it. Besides that 
I have problems with the side of each button, my main problem is this: how do I 
change the StateDrawable if I want to change the image of the button from the 
AppWidgetProvider but still want to preserve the click effect like a 
StateDrawable. The power control widget in Android does things like that. Help 
would be very appreciated, I've tried so many things already, but nothing works.

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

[android-developers] custom view in widget

2010-11-19 Thread Hendrik Greving
Can I use a custom view like com.examples.me.customview in the xml file of a 
app widget and can then draw in the onDraw of the custom view? Or do I have to 
draw into the drawing cache of an ImageView instead?

-- 
You received this message because you are subscribed to the Google
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

Re: [android-developers] Re: custom view in widget

2010-11-19 Thread Hendrik Greving
So basically the widget can only use stuff from the OS? Let's say you want 
to draw something nice into a widget, I saw several widgets doing that, like 
HTML content or so, or a picture from your mum (j/k), how would you do that?


- Original Message - 
From: Lance Nanek lna...@gmail.com

To: Android Developers android-developers@googlegroups.com
Sent: Friday, November 19, 2010 2:40 PM
Subject: [android-developers] Re: custom view in widget


Custom subclasses are not supported:

http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout
Descendants of these classes are not supported.


It runs in another process. It has no way to load them.

On Nov 19, 3:40 pm, Hendrik Greving fourhend...@gmail.com wrote:
Can I use a custom view like com.examples.me.customview in the xml file of 
a app widget and can then draw in the onDraw of the custom view? Or do I 
have to draw into the drawing cache of an ImageView instead?


--
You received this message because you are subscribed to the Google
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 


--
You received this message because you are subscribed to the Google
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


Re: [android-developers] Re: custom view in widget

2010-11-19 Thread Hendrik Greving

In particular, if you want to change the content on touch/clicks

- Original Message - 
From: Hendrik Greving fourhend...@gmail.com

To: android-developers@googlegroups.com
Sent: Friday, November 19, 2010 3:19 PM
Subject: Re: [android-developers] Re: custom view in widget


So basically the widget can only use stuff from the OS? Let's say you want 
to draw something nice into a widget, I saw several widgets doing that, 
like HTML content or so, or a picture from your mum (j/k), how would you 
do that?


- Original Message - 
From: Lance Nanek lna...@gmail.com

To: Android Developers android-developers@googlegroups.com
Sent: Friday, November 19, 2010 2:40 PM
Subject: [android-developers] Re: custom view in widget


Custom subclasses are not supported:

http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout
Descendants of these classes are not supported.


It runs in another process. It has no way to load them.

On Nov 19, 3:40 pm, Hendrik Greving fourhend...@gmail.com wrote:
Can I use a custom view like com.examples.me.customview in the xml file 
of a app widget and can then draw in the onDraw of the custom view? Or do 
I have to draw into the drawing cache of an ImageView instead?


--
You received this message because you are subscribed to the Google
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 


--
You received this message because you are subscribed to the Google
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: addProximityAlert lifecycle

2010-11-17 Thread Hendrik Greving
Just in case somebody is interested, everything works now. The key is to put 
the time into the faked location.

fakedLocation.setTime(System.currentTimeMillis());
locationManager.setTestProviderLocation(LocManager.MOCK_PROVIDER, 
fakedLocation);

I've also noticed that even though I was able to make a broadcast work with 
addProximityAlert, the intent in onReceive of the intent receiver is not the 
same as the one I created for the PendingIntent created with getBroadcast() 
passed to addProximityAlert. This might be an Android bug. If I do the same 
PendingIntent but use it to start a service with getService(), everything works 
fine.

I have one question left regarding service. If I let my service do 
addProximityAlert, but the service doesn't do anything but waiting for the 
alert. Can I be sure, that under normal circumstances the proximity alert will 
be kicked off, even after several days for instance, as long as I specify the 
expiration time as == -1?

- Original Message - 
  From: Hendrik Greving 
  To: Android Developers 
  Sent: Sunday, November 14, 2010 8:05 PM
  Subject: addProximityAlert  lifecycle


  Hi I understand the documentation about activity and service lifecycle. 
Generally speaking, what's the approach if you want to have an application 
which gets unlimited proximity alerts, basically a service that doesn't die? 
I've tried startService with requestLocationUpdate etc. but after a while the 
service seems to get killed by the OS. That's basically question 1) :-) 

  Now to problem 2) I've tried to do addProximityAlert but it doesn't really 
seem to work. I am basically doing something like

  Intent updateIntent = new Intent(this, LocManIntentReceiver.class);
  updateIntent.addCategory(Intent.CATEGORY_INFO);
  updateIntent.setAction(Intent.ACTION_LOCALE_CHANGED);
  // Put the information into the Intent


  updateIntent.putExtra[..]
  // Create a pending broadcast intent for the proximity alertPendingIntent 
pendingIntent = PendingIntent.getBroadcast(this, -1, updateIntent, 
PendingIntent.FLAG_UPDATE_CURRENT);
  // Add a new proximity alert, update the old one
  locationManager.addProximityAlert((double)latitude/1E6, 
(double)longitude/1E6, (float)1, 100, pendingIntent);

  But if I set a breakpoint or do a Toast.makeText in the onReceive function of 
the BroadcastReceiver, I never get anything.

  Now to problem 3) :-) I've tried to set up a mock location provider by 
starting a Timer which periodically spits out a new location, and I set up a 
LocationListener. The timer does something like this

  LocationManager locationManager = 
(LocationManager)mContext.getSystemService(Context.LOCATION_SERVICE);
  locationManager.setTestProviderLocation(LocManager.MOCK_LOCMAN_PROVIDER, 
fakedLocation);

  I am passing the context in the constructor of the Timer object when 
instantiating it. The location listener in the main activity never received an 
update but the very first one. Any take on that?

  - 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] addProximityAlert lifecycle

2010-11-14 Thread Hendrik Greving
Hi I understand the documentation about activity and service lifecycle. 
Generally speaking, what's the approach if you want to have an application 
which gets unlimited proximity alerts, basically a service that doesn't die? 
I've tried startService with requestLocationUpdate etc. but after a while the 
service seems to get killed by the OS. That's basically question 1) :-) 

Now to problem 2) I've tried to do addProximityAlert but it doesn't really seem 
to work. I am basically doing something like

Intent updateIntent = new Intent(this, LocManIntentReceiver.class);
updateIntent.addCategory(Intent.CATEGORY_INFO);
updateIntent.setAction(Intent.ACTION_LOCALE_CHANGED);
// Put the information into the Intent


updateIntent.putExtra[..]
// Create a pending broadcast intent for the proximity alertPendingIntent 
pendingIntent = PendingIntent.getBroadcast(this, -1, updateIntent, 
PendingIntent.FLAG_UPDATE_CURRENT);
// Add a new proximity alert, update the old one
locationManager.addProximityAlert((double)latitude/1E6, (double)longitude/1E6, 
(float)1, 100, pendingIntent);

But if I set a breakpoint or do a Toast.makeText in the onReceive function of 
the BroadcastReceiver, I never get anything.

Now to problem 3) :-) I've tried to set up a mock location provider by starting 
a Timer which periodically spits out a new location, and I set up a 
LocationListener. The timer does something like this

LocationManager locationManager = 
(LocationManager)mContext.getSystemService(Context.LOCATION_SERVICE);
locationManager.setTestProviderLocation(LocManager.MOCK_LOCMAN_PROVIDER, 
fakedLocation);

I am passing the context in the constructor of the Timer object when 
instantiating it. The location listener in the main activity never received an 
update but the very first one. Any take on that?

- 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] power widget source code and images

2010-11-12 Thread Hendrik Greving
Does anybody know where I can find the power widget source code that comes with 
Android and in particular the images?

-- 
You received this message because you are subscribed to the Google
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

Re: [android-developers] proximity alert

2010-11-10 Thread Hendrik Greving
The documentation says that you can pass PendingIntent.FLAG_UPDATE_CURRENT 
and then any matching pending alert would be updated. It dosn't further 
specify what matching means though. longitude/latitude?


- Original Message - 
From: Mark Murphy mmur...@commonsware.com

To: android-developers@googlegroups.com
Sent: Wednesday, November 10, 2010 4:00 AM
Subject: Re: [android-developers] proximity alert


On Tue, Nov 9, 2010 at 9:51 PM, Hendrik Greving fourhend...@gmail.com 
wrote:

What happens if you add the semantically the same proximity alert without
expiration several times, let's say with an intent to start a service?
Obviously the service will be only started once, but will this compromise
the system?


I would assume startService() will be called several times, meaning
onStartCommand() of the service would be called several times. But
that is just a guess -- I have not played with proximity alerts in ~2
years.

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

_Android Programming Tutorials_ Version 3.0.1 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 


--
You received this message because you are subscribed to the Google
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


Re: [android-developers] standard power widget icons

2010-11-10 Thread Hendrik Greving
I am looking for the buttons or icon images of the power control widget 
(wireless, bluetooth, gps, sync and display brightness). Couldn't find it in 
there. Are they open source and available at source.android.com by any 
chance?


- Original Message - 
From: Mark Murphy mmur...@commonsware.com

To: android-developers@googlegroups.com
Sent: Wednesday, November 10, 2010 4:02 AM
Subject: Re: [android-developers] standard power widget icons



I have no idea what the standard power control widget icons are.
However, all icons that are part of the SDK can be found in:

$ANDROID_HOME/platforms/$SDK/data/res

where $ANDROID_HOME is wherever you unpacked the Android SDK and $SDK
is some platform version (e.g., android-8).

If the icons you seek are not there, then try http://source.android.com.

On Tue, Nov 9, 2010 at 11:23 PM, Hendrik Greving fourhend...@gmail.com 
wrote:
Does anybody know where to get the standard power control widget icons 
from?


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

_Android Programming Tutorials_ Version 3.0.1 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 


--
You received this message because you are subscribed to the Google
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


Re: [android-developers] standard power widget icons

2010-11-10 Thread Hendrik Greving

No. Another take :)? I've checked launcher, too

- Original Message - 
From: Mark Murphy mmur...@commonsware.com

To: android-developers@googlegroups.com
Sent: Wednesday, November 10, 2010 12:27 PM
Subject: Re: [android-developers] standard power widget icons



Maybe in Launcher2.

On Wed, Nov 10, 2010 at 2:51 PM, Hendrik Greving fourhend...@gmail.com 
wrote:

I am looking for the buttons or icon images of the power control widget
(wireless, bluetooth, gps, sync and display brightness). Couldn't find it 
in

there. Are they open source and available at source.android.com by any
chance?

- Original Message - From: Mark Murphy 
mmur...@commonsware.com

To: android-developers@googlegroups.com
Sent: Wednesday, November 10, 2010 4:02 AM
Subject: Re: [android-developers] standard power widget icons



I have no idea what the standard power control widget icons are.
However, all icons that are part of the SDK can be found in:

$ANDROID_HOME/platforms/$SDK/data/res

where $ANDROID_HOME is wherever you unpacked the Android SDK and $SDK
is some platform version (e.g., android-8).

If the icons you seek are not there, then try http://source.android.com.

On Tue, Nov 9, 2010 at 11:23 PM, Hendrik Greving fourhend...@gmail.com
wrote:


Does anybody know where to get the standard power control widget icons
from?


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

_Android Programming Tutorials_ Version 3.0.1 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


--
You received this message because you are subscribed to the Google
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





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

_Android Programming Tutorials_ Version 3.0.1 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 


--
You received this message because you are subscribed to the Google
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


Re: [android-developers] standard power widget icons

2010-11-10 Thread Hendrik Greving
I am talking about the power control widget that comes free with android 
since android 1.6.


- Original Message - 
From: Kostya Vasilyev kmans...@gmail.com

To: android-developers@googlegroups.com
Sent: Wednesday, November 10, 2010 1:03 PM
Subject: Re: [android-developers] standard power widget icons


Hendrik,

Power Control Plus is a commercial project, and I don't see a link to
download their source:

http://www.siriusapplications.com/powercontrolplus/

-- Kostya

10.11.2010 23:27, Mark Murphy пишет:

Maybe in Launcher2.

On Wed, Nov 10, 2010 at 2:51 PM, Hendrik Grevingfourhend...@gmail.com 
wrote:

I am looking for the buttons or icon images of the power control widget
(wireless, bluetooth, gps, sync and display brightness). Couldn't find it 
in

there. Are they open source and available at source.android.com by any
chance?

- Original Message - From: Mark Murphymmur...@commonsware.com
To:android-developers@googlegroups.com
Sent: Wednesday, November 10, 2010 4:02 AM
Subject: Re: [android-developers] standard power widget icons



I have no idea what the standard power control widget icons are.
However, all icons that are part of the SDK can be found in:

$ANDROID_HOME/platforms/$SDK/data/res

where $ANDROID_HOME is wherever you unpacked the Android SDK and $SDK
is some platform version (e.g., android-8).

If the icons you seek are not there, then try http://source.android.com.

On Tue, Nov 9, 2010 at 11:23 PM, Hendrik Grevingfourhend...@gmail.com
wrote:

Does anybody know where to get the standard power control widget icons
from?

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

_Android Programming Tutorials_ Version 3.0.1 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

--
You received this message because you are subscribed to the Google
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







--
Kostya Vasilyev -- WiFi Manager + pretty widget --  
http://kmansoft.wordpress.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 


--
You received this message because you are subscribed to the Google
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] proximity alert

2010-11-09 Thread Hendrik Greving
What happens if you add the semantically the same proximity alert without 
expiration several times, let's say with an intent to start a service? 
Obviously the service will be only started once, but will this compromise the 
system? Is it better or do you need to make sure you'll add the same proximity 
alert only once? Or will the OS filter the alerts?

-- 
You received this message because you are subscribed to the Google
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] standard power widget icons

2010-11-09 Thread Hendrik Greving
Does anybody know where to get the standard power control widget icons from?

-- 
You received this message because you are subscribed to the Google
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

Re: [android-developers] layout inflator

2010-11-08 Thread Hendrik Greving
Ok thanks. And it works now. Apparently it is calling addView from parent 
view, and in case of ListView, this throws an exception.


- Original Message - 
From: Daniel Drozdzewski daniel.drozdzew...@gmail.com

To: android-developers@googlegroups.com
Sent: Monday, November 08, 2010 2:40 AM
Subject: Re: [android-developers] layout inflator


Hendrik,

You should not return null out of getView.
Try finding out more info, how view recycling works in ListViews.

The right answer will depend on many details of your design.

My attempt:

In the default case (in your scenario it is everything else than view
at position 0), simply return convertView, ONLY WHEN each view in your
list is exactly the same and the contenst of all items exactly are the
same OR when you are 100% sure that you are NEVER going to recycle any
views (no view will ever too high or too low to get displayed), which
is VERY hard to be sure of.

If your list is something like:

0: TITLE
1: Item 1
2: Item 2
...

i.e. each list item has a different content, then you have to do a bit
more work in your getView(). You have to populate the view behind each
item with information specific for this view at this particular
position.

Other things to look at:
- if your items are static throughout the life of the application and
there are not too many of them, try using ScrollView.
- have a look at ListView.addHeaderView(View) method to add item(s)
with different view than the most of the items of the ListView.

Daniel





On Sun, Nov 7, 2010 at 9:57 PM, Hendrik Greving fourhend...@gmail.com 
wrote:

I am implementing a ListAdapter and in getView, I am returning

@Override
public View getView(int position, View convertView, ViewGroup parent) {
switch (position) {
case 0:
if (title == null) {
title = View.inflate(mContext, R.layout.main_settings_title,
parent);
}
return title;
}
return null;
}

inflate is throwing a UnsupportedOperationException

The resource is posted below. What am I doing wrong?

?
xml version=1.0 encoding=utf-8?

LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=fill_parent
android:layout_height=fill_parent
TextView android:id=@+id/menutitle
android:layout_width=fill_parent
android:layout_height=wrap_content
android:background=#44
android:gravity=center_horizontal|top
android:text=Settings
android:textColor=#ee
android:textStyle=bold
android:shadowColor=#00
android:shadowRadius=3.
android:shadowDx=3.0
android:shadowDy=3.0
android:textSize=7pt
android:paddingBottom=20dip
android:paddingTop=20dip/
/
LinearLayout

--
You received this message because you are subscribed to the Google
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




--
Daniel Drozdzewski

--
You received this message because you are subscribed to the Google
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

--
You received this message because you are subscribed to the Google
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] Change name space

2010-11-08 Thread Hendrik Greving
Can I change the packet namespace in eclipse in an already existing project? 

-- 
You received this message because you are subscribed to the Google
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] layout inflator

2010-11-07 Thread Hendrik Greving
I am implementing a ListAdapter and in getView, I am returning 

@Override
public View getView(int position, View convertView, ViewGroup parent) {
switch (position) {
case 0:
if (title == null) {
title = View.inflate(mContext, R.layout.main_settings_title, 
parent);
}
return title;
}
return null;
}

inflate is throwing a UnsupportedOperationException

The resource is posted below. What am I doing wrong?

?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=fill_parent
android:layout_height=fill_parent
TextView android:id=@+id/menutitle
android:layout_width=fill_parent
android:layout_height=wrap_content
android:background=#44
android:gravity=center_horizontal|top 
android:text=Settings
android:textColor=#ee
android:textStyle=bold
android:shadowColor=#00
android:shadowRadius=3.
android:shadowDx=3.0
android:shadowDy=3.0
android:textSize=7pt
android:paddingBottom=20dip
android:paddingTop=20dip/
/LinearLayout

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

[android-developers] Drawing circle in MapView

2010-10-29 Thread Hendrik Greving
Trying to draw a circle at a longitude/latitude position. The circle below 
doesn't show up, does anybody know why?

latitude, longitude is known here

ListOverlay mapOverlays = mapView.getOverlays();
ColorDrawable myCircle = new ColorDrawable();
mCirc = new Canvas();
mPaint = new Paint();
mPaint.setStyle(Paint.Style.FILL);
mPaint.setColor(0xee44);

GeoPoint gp = new GeoPoint(latitude, longitude);
MapController mc = mapView.getController();
mc.setZoom(18);
if (mc != null) {
mc.animateTo(gp);
}

// mapView is the current mapView from MapViewActivity
Projection proj = mapView.getProjection(); 
Point mp = proj.toPixels(gp, null);

mCirc.drawCircle(mp.x, mp.y, 50, mPaint);
//myCircle.setBounds(mp.x-100, mp.y-100, mp.x+100, mp.y+100); // do I need 
this???
myCircle.draw(mCirc);

// MyItemizedOverlay is defined in the project
MyItemizedOverlay itemizedoverlay = new MyItemizedOverlay(myCircle);
OverlayItem overlayitem = new OverlayItem(gp, title, );
itemizedoverlay.addOverlay(overlayitem);
mapOverlays.add(itemizedoverlay);

-- 
You received this message because you are subscribed to the Google
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

Re: [android-developers] Drawing circle in MapView

2010-10-29 Thread Hendrik Greving
Shouldn't it work somehow since I create a drawable and pass it to the 
OverlayItem?


latitude, longitude is known here

ListOverlay mapOverlays = mapView.getOverlays();
ColorDrawable myCircle = new ColorDrawable();
mCirc = new Canvas();
mPaint = new Paint();
mPaint.setStyle(Paint.Style.FILL);
mPaint.setColor(0xee44);

GeoPoint gp = new GeoPoint(latitude, longitude);
MapController mc = mapView.getController();
mc.setZoom(18);
if (mc != null) {
mc.animateTo(gp);
}

// mapView is the current mapView from MapViewActivity
Projection proj = mapView.getProjection(); 
Point mp = proj.toPixels(gp, null);

mCirc.drawCircle(mp.x, mp.y, 50, mPaint);
//myCircle.setBounds(mp.x-100, mp.y-100, mp.x+100, mp.y+100); // do I need 
this???
myCircle.draw(mCirc);

// MyItemizedOverlay is defined in the project
MyItemizedOverlay itemizedoverlay = new MyItemizedOverlay(myCircle);
OverlayItem overlayitem = new OverlayItem(gp, title, );
itemizedoverlay.addOverlay(overlayitem);
mapOverlays.add(itemizedoverlay); 

  - Original Message - 
  From: TreKing 
  To: android-developers@googlegroups.com 
  Sent: Friday, October 29, 2010 11:02 AM
  Subject: Re: [android-developers] Drawing circle in MapView


  On Fri, Oct 29, 2010 at 1:56 AM, Hendrik Greving fourhend...@gmail.com 
wrote:

The circle below doesn't show up, does anybody know why?

  Probably because you're creating your own Canvas the system knows nothing 
about.
  If you want to do custom drawing, override the onDraw or draw() methods in 
the Overlay class (I forget which it is).
  That function gets passes the Canvas object the system is drawing to and 
that's where you put your draw call.

  
-
  TreKing - Chicago transit tracking app for Android-powered devices



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

-- 
You received this message because you are subscribed to the Google
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

Re: [android-developers] Re: ListView setOnTouchListener

2010-10-20 Thread Hendrik Greving
Hmm. I tried ListView... 
lv.setOnItemSelectedListener(AdapterView.OnItemSelectedListener() 


It seems the callback isn't even called for my ListView. I've also 
experimented with selection .xml file and setting this as a background for 
a View to bind to the SimpleCursorAdapter. I don't know if this is supposed 
to work either. I thought the first way (setOnItemSelectedListener) is 
supposed to work, actually..



- Original Message - 
From: Kumar Bibek coomar@gmail.com

To: Android Developers android-developers@googlegroups.com
Sent: Tuesday, October 19, 2010 11:16 PM
Subject: [android-developers] Re: ListView setOnTouchListener


You should use the selectors for a list item and whenever you want to
set a selection, call the listview's method for that. Doing it on
touch, has a few bad effects, which are difficult to handle, or
atleast you would need a few lines of code to handle specific
gestures.

On Oct 20, 10:41 am, Hendrik Greving fourhend...@gmail.com wrote:
I have a ListView and a database cursor which I set with setListAdapter. 
The

adapter is a SimpleCursorAdapter which takes a xml description for the
ListView items. How can I set a onTouch handler for every item, in order 
to

highlight when it's being touched?


--
You received this message because you are subscribed to the Google
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 


--
You received this message because you are subscribed to the Google
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


Re: [android-developers] Re: ListView setOnTouchListener

2010-10-20 Thread Hendrik Greving

Ok

   lv.setDrawSelectorOnTop(true);
   lv.setSelector(R.drawable.list_selected);

does draw a drawable, but it wipes out the rest. I would only like to -of 
course - the background of the View which was the list item inthe unselected 
state. How would you do this?


- Original Message - 
From: Hendrik Greving fourhend...@gmail.com

To: android-developers@googlegroups.com
Sent: Tuesday, October 19, 2010 11:21 PM
Subject: Re: [android-developers] Re: ListView setOnTouchListener


Hmm. I tried ListView... 
lv.setOnItemSelectedListener(AdapterView.OnItemSelectedListener() 


It seems the callback isn't even called for my ListView. I've also 
experimented with selection .xml file and setting this as a background 
for a View to bind to the SimpleCursorAdapter. I don't know if this is 
supposed to work either. I thought the first way 
(setOnItemSelectedListener) is supposed to work, actually..



- Original Message - 
From: Kumar Bibek coomar@gmail.com

To: Android Developers android-developers@googlegroups.com
Sent: Tuesday, October 19, 2010 11:16 PM
Subject: [android-developers] Re: ListView setOnTouchListener


You should use the selectors for a list item and whenever you want to
set a selection, call the listview's method for that. Doing it on
touch, has a few bad effects, which are difficult to handle, or
atleast you would need a few lines of code to handle specific
gestures.

On Oct 20, 10:41 am, Hendrik Greving fourhend...@gmail.com wrote:
I have a ListView and a database cursor which I set with setListAdapter. 
The

adapter is a SimpleCursorAdapter which takes a xml description for the
ListView items. How can I set a onTouch handler for every item, in order 
to

highlight when it's being touched?


--
You received this message because you are subscribed to the Google
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 


--
You received this message because you are subscribed to the Google
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


Re: [android-developers] Re: ListView setOnTouchListener

2010-10-20 Thread Hendrik Greving
If I don't set drawSelectorOnTop, it does nothing. I've also tried getting the 
TextView and call tv.bringToFront(); within onItemClick of the 
AdapterView.OnItemClickListener. This doesn't do anything, too. Maybe it's 
called before the selection drawable is drawn :/ What's the standard way to do 
this?
  - Original Message - 
  From: Kumar Bibek 
  To: android-developers@googlegroups.com 
  Sent: Tuesday, October 19, 2010 11:51 PM
  Subject: Re: [android-developers] Re: ListView setOnTouchListener


  drawSelector on top, don't set it and try


  On Wed, Oct 20, 2010 at 12:13 PM, Hendrik Greving fourhend...@gmail.com 
wrote:

Ok

  lv.setDrawSelectorOnTop(true);
  lv.setSelector(R.drawable.list_selected);

does draw a drawable, but it wipes out the rest. I would only like to -of 
course - the background of the View which was the list item inthe unselected 
state. How would you do this?

- Original Message - From: Hendrik Greving fourhend...@gmail.com
To: android-developers@googlegroups.com
Sent: Tuesday, October 19, 2010 11:21 PM
Subject: Re: [android-developers] Re: ListView setOnTouchListener




  Hmm. I tried ListView... 
lv.setOnItemSelectedListener(AdapterView.OnItemSelectedListener() 

  It seems the callback isn't even called for my ListView. I've also 
experimented with selection .xml file and setting this as a background for a 
View to bind to the SimpleCursorAdapter. I don't know if this is supposed to 
work either. I thought the first way (setOnItemSelectedListener) is supposed to 
work, actually..


  - Original Message - From: Kumar Bibek coomar@gmail.com
  To: Android Developers android-developers@googlegroups.com
  Sent: Tuesday, October 19, 2010 11:16 PM
  Subject: [android-developers] Re: ListView setOnTouchListener


  You should use the selectors for a list item and whenever you want to
  set a selection, call the listview's method for that. Doing it on
  touch, has a few bad effects, which are difficult to handle, or
  atleast you would need a few lines of code to handle specific
  gestures.

  On Oct 20, 10:41 am, Hendrik Greving fourhend...@gmail.com wrote:

I have a ListView and a database cursor which I set with 
setListAdapter. The
adapter is a SimpleCursorAdapter which takes a xml description for the
ListView items. How can I set a onTouch handler for every item, in 
order to
highlight when it's being touched?


  -- 
  You received this message because you are subscribed to the Google
  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 


-- 
You received this message because you are subscribed to the Google
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



  -- 
  Kumar Bibek
  http://techdroid.kbeanie.com
  http://www.kbeanie.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

-- 
You received this message because you are subscribed to the Google
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

Re: [android-developers] Re: ListView setOnTouchListener

2010-10-20 Thread Hendrik Greving
In case somebody is interested... I am using a shape now, set it on top and 
make it a little bit transparent. This works best.
  - Original Message - 
  From: Kumar Bibek 
  To: android-developers@googlegroups.com 
  Sent: Wednesday, October 20, 2010 12:02 AM
  Subject: Re: [android-developers] Re: ListView setOnTouchListener


  Set the selector xml to the item layout and not the listView. That should 
work. Your approach should also work. Can you post a screenshot of how it looks 
now?


  On Wed, Oct 20, 2010 at 12:29 PM, Hendrik Greving fourhend...@gmail.com 
wrote:

If I don't set drawSelectorOnTop, it does nothing. I've also tried getting 
the TextView and call tv.bringToFront(); within onItemClick of the 
AdapterView.OnItemClickListener. This doesn't do anything, too. Maybe it's 
called before the selection drawable is drawn :/ What's the standard way to do 
this?
  - Original Message - 
  From: Kumar Bibek 
  To: android-developers@googlegroups.com 
  Sent: Tuesday, October 19, 2010 11:51 PM
  Subject: Re: [android-developers] Re: ListView setOnTouchListener


  drawSelector on top, don't set it and try


  On Wed, Oct 20, 2010 at 12:13 PM, Hendrik Greving fourhend...@gmail.com 
wrote:

Ok

  lv.setDrawSelectorOnTop(true);
  lv.setSelector(R.drawable.list_selected);

does draw a drawable, but it wipes out the rest. I would only like to 
-of course - the background of the View which was the list item inthe 
unselected state. How would you do this?

- Original Message - From: Hendrik Greving 
fourhend...@gmail.com
To: android-developers@googlegroups.com
Sent: Tuesday, October 19, 2010 11:21 PM
Subject: Re: [android-developers] Re: ListView setOnTouchListener 




  Hmm. I tried ListView... 
lv.setOnItemSelectedListener(AdapterView.OnItemSelectedListener() 

  It seems the callback isn't even called for my ListView. I've also 
experimented with selection .xml file and setting this as a background for a 
View to bind to the SimpleCursorAdapter. I don't know if this is supposed to 
work either. I thought the first way (setOnItemSelectedListener) is supposed to 
work, actually..


  - Original Message - From: Kumar Bibek 
coomar@gmail.com
  To: Android Developers android-developers@googlegroups.com
  Sent: Tuesday, October 19, 2010 11:16 PM
  Subject: [android-developers] Re: ListView setOnTouchListener


  You should use the selectors for a list item and whenever you want to
  set a selection, call the listview's method for that. Doing it on
  touch, has a few bad effects, which are difficult to handle, or
  atleast you would need a few lines of code to handle specific
  gestures.

  On Oct 20, 10:41 am, Hendrik Greving fourhend...@gmail.com wrote:

I have a ListView and a database cursor which I set with 
setListAdapter. The
adapter is a SimpleCursorAdapter which takes a xml description for 
the
ListView items. How can I set a onTouch handler for every item, in 
order to
highlight when it's being touched?


  -- 
  You received this message because you are subscribed to the Google
  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 


-- 
You received this message because you are subscribed to the Google
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



  -- 
  Kumar Bibek
  http://techdroid.kbeanie.com
  http://www.kbeanie.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

-- 
You received this message because you are subscribed to the Google
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

[android-developers] ListView setOnTouchListener

2010-10-19 Thread Hendrik Greving
I have a ListView and a database cursor which I set with setListAdapter. The 
adapter is a SimpleCursorAdapter which takes a xml description for the 
ListView items. How can I set a onTouch handler for every item, in order to 
highlight when it's being touched? 


--
You received this message because you are subscribed to the Google
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] Dialog and ListView

2010-10-17 Thread Hendrik Greving
I am using a Dialog instead of a ContextMenu in order to be able to customie 
its look. I show the Dialog when long clicking on a ListView item. What's the 
easiest way to move the Dialog to the position of the ListView item?

-- 
You received this message because you are subscribed to the Google
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] sqlite

2010-10-16 Thread Hendrik Greving
I'd like to have a sqlite table with rows of 4 entries: a row id, a string and 
2 integers and possibly more data later. I want the string to be unique. What's 
the easiest way to write an adapter that insert new rows with automatically 
replacing if the string already exists? Does DatabaseUtils.InsertHelper help? 
What is this for actually? How can I use CONFLICT_REPLACE? I could probably get 
it working by making a query and then delete and inserting or something like 
that, but I'm sure there is a better way.

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

Re: [android-developers] Android system / API / replacing system libraries

2010-10-14 Thread Hendrik Greving
Where can I find this?
  - Original Message - 
  From: James Burley 
  To: android-developers@googlegroups.com 
  Sent: Wednesday, October 13, 2010 11:38 AM
  Subject: Re: [android-developers] Android system / API / replacing system 
libraries


  Watch the Android developer video titled something like all apps are created 
equal.  It should help you figure out how to do just that!

  On Oct 13, 2010 2:09 PM, HenSFO fourhend...@gmail.com wrote:
   Hi I'm engineer but more from a chip/assembler x86 level. I'm new to
   Android. Still figuring some general things out. I have written some
   apps, but have a general question. If I were to write an improved
   version of - let's say - TextView. Is it possible to make all app's on
   the system using this class, basically replace TextView? How are the
   java classes on the Android system, are they compiled, can I replace
   the library? Is this protected? Thanks for 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



  -- 
  You received this message because you are subscribed to the Google
  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

-- 
You received this message because you are subscribed to the Google
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 system / API / replacing system libraries

2010-10-13 Thread Hendrik Greving
Hi guys is there any input? Or maybe some pointers to something to read? 
This would be great


- Original Message - 
From: HenSFO fourhend...@gmail.com

To: Android Developers android-developers@googlegroups.com
Sent: Tuesday, October 12, 2010 8:26 AM
Subject: Android system / API / replacing system libraries



Hi I'm engineer but more from a chip/assembler x86 level. I'm new to
Android. Still figuring some general things out. I have written some
apps, but have a general question. If I were to write an improved
version of - let's say - TextView. Is it possible to make all app's on
the system using this class, basically replace TextView? How are the
java classes on the Android system, are they compiled, can I replace
the library? Is this protected? Thanks for 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


Re: [android-developers] Re: Android system / API / replacing system libraries

2010-10-13 Thread Hendrik Greving
Ok thanks that's what I thought but I wasnt sure
  - Original Message - 
  From: Kumar Bibek 
  To: android-developers@googlegroups.com 
  Sent: Wednesday, October 13, 2010 12:52 PM
  Subject: Re: [android-developers] Re: Android system / API / replacing system 
libraries


  Well, You cannot. You can use it in your app though, throughout. But the 
other apps wouldn't see this class unless you rebuild the OS and come out with 
a device.


  On Thu, Oct 14, 2010 at 1:20 AM, Hendrik Greving fourhend...@gmail.com 
wrote:

Hi guys is there any input? Or maybe some pointers to something to read? 
This would be great

- Original Message - From: HenSFO fourhend...@gmail.com
To: Android Developers android-developers@googlegroups.com
Sent: Tuesday, October 12, 2010 8:26 AM
Subject: Android system / API / replacing system libraries



  Hi I'm engineer but more from a chip/assembler x86 level. I'm new to
  Android. Still figuring some general things out. I have written some
  apps, but have a general question. If I were to write an improved
  version of - let's say - TextView. Is it possible to make all app's on
  the system using this class, basically replace TextView? How are the
  java classes on the Android system, are they compiled, can I replace
  the library? Is this protected? Thanks for 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



  -- 
  Kumar Bibek
  http://techdroid.kbeanie.com
  http://www.kbeanie.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

-- 
You received this message because you are subscribed to the Google
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