[android-developers] Re: You must supply a resource ID for a TextView

2009-09-25 Thread Wouter

Np the headers are using a separate layout file..

On 25 sep, 00:04, Marco Nelissen marc...@android.com wrote:
 On Thu, Sep 24, 2009 at 2:12 PM, Wouter wouterg...@gmail.com wrote:

  On 24 sep, 22:53, Marco Nelissen marc...@android.com wrote:
  On Thu, Sep 24, 2009 at 1:41 PM, Wouter wouterg...@gmail.com wrote:

   I have no problem with the data mapping and TextViews.

  The stack trace and crash you're seeing indicate otherwise.
  Unless you're doing something specific in bindView, the adapter
  expects each list item layout to be the same. You are overriding
  getView and returning different kinds of views, so I would take
  another look at that, and make sure that those two kinds of views are
  compatible.

  Each list item layout is the same. it uses R.layout.cinema_row!
  The weird is it makes my list with headers (when i use
  seperatedlistadapter) and when i scroll down, it crashes and gives
  this error.
  Really will take a look at it, if not i will put my source code here!

   It fully works
   when i don't use a seperatedList adapter..
   So there is problem with this seperatedListAdapter..
   Is there another way i can use to divide my list in sections with
   headers?

  I don't know what effect you're trying to achieve, but in general you
  can override bindView and/or getView to make each item look exactly
  the way you want.

  I have a list of movies with a release date. all the movies with same
  date has to be listed under a header with date.. And every list item
  has same layout, really don't get it :(

 Every list item, including the header items? In other words: do your
 header items use the same layout as your other list items?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to take a screencast demo of app

2009-09-25 Thread an00na

Fine, I expected that.
Looking forward to your screencasting util.
On Sep 25, 2009, at 12:30 PM, Mark Murphy wrote:

 DroidEx

--
A ghost writing code with soul @ http://wangling.me/.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] spinner item selection event

2009-09-25 Thread Shrenik Vikam

on spinner item selection i want to do some processing depending on
the selection item
like Java has ItemStateChangeListener
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Disactive animation on activity start

2009-09-25 Thread Daniel Johansson

Hi! Why not just post the solution here? I'm looking to solve the same
problem, and probably many others too!

On Jul 31, 4:15 pm, arnouf arnaud.far...@gmail.com wrote:
 Done! It's working now. Thanks a lot Diane!
 Mark, contact me to have the solution :)

 On 31 juil, 10:30, arnouf arnaud.far...@gmail.com wrote:

  Hello Diane,

  Thanks, but do I have set my animation style on both activities or
  just one?
 ActivityA is callingActivityB: I have to set animation onActivity
  A,ActivityB or both?

  Regards

  On 30 juil, 15:43, Dianne Hackborn hack...@android.com wrote:

   Just set the animation style on your window to not have anyanimations.

   On Thu, Jul 30, 2009 at 1:01 AM,arnoufarnaud.far...@gmail.com wrote:

Hi all,

Is it possible to disactive the animation between activities provided
to user with cupcake 1.5?

User can set a preference with 1.5 to set animation onactivity
launch. I would like disactive theseanimationsinside my app
containing different activities.

Is it possible?

Regards

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

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



[android-developers] Re: GC question.

2009-09-25 Thread Jiri

Thank you both, that was what I needed to know.

J

Mark Murphy wrote:
 Actually, the OP's example is final, not static.
 
 Final references cannot be pointed to null, as they cannot be modified.
 However, they are also not static, so they should be garbage collected
 once the containing object (an activity in this case) itself is garbage
 collected.
 
 Static references remains on memory until the process where your activity
 is
 running is destroyed.

 So, in order to avoid memory leaks, point the reference to null in
 onDestroy()

 Regards,

 Felipe Silveira

 On Thu, Sep 24, 2009 at 10:58 AM, Jiri jiriheitla...@googlemail.com
 wrote:

 I have a simple question, in my ctivity i define a static private as so:

 private final FileFetcher ff = new FileFetcher();

 what happens when this activity is destroyed, is the reference to the
 FileFetcher completly gone, and can everything be marked for GC?

 Or would it better to write

 private FileFetcher ff;

 and the in my onCreate instantiate the FileFetcher and nullify it in the
 onDestroy method?
 
 

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



[android-developers] Re: How to force soft keyboard to be visible?

2009-09-25 Thread Dianne Hackborn
Those arguments are FLAGS.  Specifying 0 (none of the flags) gives you the
default behavior, which for hiding is always.  The flags are used to limit
when it hides to certain situations.  If you just want to force the keyboard
to close, use hideSoftInputFromWindow(view.getWindowToken(), 0).

The long press on menu is implemented by just doing
toggleSoftInput(view.getWindowToken(), InputMethodManager.SHOW_FORCED, 0);

You probably don't want to use SHOW_FORCED yourself (this is why it isn't
the default) because that will leave the IME displayed when the user moves
to another activity (even in another application), mostly regardless of what
that application's default preference is.

Note also:

http://developer.android.com/reference/android/view/inputmethod/InputMethodManager.html#hideSoftInputFromWindow(android.os.IBinder,%20int,%20android.os.ResultReceiver)

http://developer.android.com/reference/android/view/inputmethod/InputMethodManager.html#showSoftInput(android.view.View,%20int,%20android.os.ResultReceiver)

http://developer.android.com/reference/android/view/inputmethod/InputMethodManager.html#isFullscreenMode()

On Thu, Sep 24, 2009 at 10:14 PM, James W jpbwebs...@gmail.com wrote:


 Dwass, dont know if this helps, but I finally got it to work reliably
 for my particular needs.

 I have a dialog with a single edit, and I wanted to softkeyboard to
 automatically show when the dialog was opened, and be closed when the
 dialog was closed. In other words, identical behaviour to the
 EditTextPreference when used in a PreferenceScreen.

 In my OnCreate() I have:

InputMethodManager imm = (InputMethodManager)
 SingleEditDialog.this.getContext().getSystemService
 (Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput
 (InputMethodManager.SHOW_FORCED,InputMethodManager.HIDE_IMPLICIT_ONLY);

 Which shows the keyboard when the dialog is opened. Like you, I had
 trouble getting the thing to hide when I close the dialog, I tried
 calling toggleSoftInput again but no amount of changing the settings
 seems to work. It is not entirely clear what is going on here, and I
 am not sure why there is not a .HIDE_FORCED option. It is my app, why
 can't I control when the keyboard is shown?

 In the end, as I only had one edit field, I was able to use another
 method to hide it,

imm.hideSoftInputFromWindow(singleedittext.getWindowToken(),
 0);

 where singleedittext is my EditText view.

 Incidentally, there doesn't appear to be a corresponding
 showSoftInputForWindow() call, though, which is again odd.

 Anyway, it now works perfectly. Hope this helps someone else!



 On Sep 22, 4:06 pm, dwass dw...@sharpmind.de wrote:
  Hi Dianne,
 
  You say that the G1 has akeyboardand so the IME is not shown by
  default. I don't understand that statement. Yes, the G1 has akeyboard,
 but it isn't always OPEN. Especially if the device is in
  portrait mode, thekeyboardis probably NEVER open. The device should
  be smart enough so that it opens thekeyboardif there is nokeyboard
  open. Either that, or we need a way to show thekeyboardwhen we want
  to (and hide it again when we don't).
 
  My current problem is this: When I start an activity, the first
  EditText field in the layout is focused automatically, but the
 softkeyboardis not automatically shown. The user must either click (with
  trackball) or touch the field to open the softkeyboard. IMHO the
  developer should be able to say that he wants thekeyboardshown at
  this point.
 
  Any suggestions? I've tried all the force showkeyboard suggestions
  and they sometimes do work, but usually you get stuck with
 thekeyboardbeing shown after you leave the field and this causes more
  problems that it solves.
 
  Thanks,
  -DWass
 
 
 
   On Sep 19, 8:42 am, Dianne Hackborn hack...@android.com wrote:
 
The G1 has akeyboard, so it works as I said -- the IME is not shown
 by
default.  This is a policy decision of the platform.
 
On a myTouch, since it doesn't have akeyboard, the IME will be shown
 by
default in various cases (for example when you enter the edit
 contacts
screen) when the app has indicated that is desired with the input
 options.
 
--
Dianne Hackborn
Android framework engineer- Hide quoted text -
 
  - Show quoted text -
 



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

[android-developers] Focus android widget.

2009-09-25 Thread Manjunatha M
Hi,
Is there a way to highlight the widget in the android home screen by using
DPAD, and on selecting the widget using the keypad, launches the app for the
widget. Where do I make change in Launcher.java or workspace.java???

-- 
Regards,
Manjunatha

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] where to know that the apps selected for ADC2?

2009-09-25 Thread manoj

Hi all,

Is there any official website that specifies the list of apps that are
selected for ADC2 first round?

Thanks,
Manoj.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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-beginners] Focus android widget.

2009-09-25 Thread Romain Guy
No change needed, make the widget focusable/clickable.

On Sep 25, 2009 12:05 AM, Manjunatha M man...@gmail.com wrote:

Hi,
Is there a way to highlight the widget in the android home screen by using
DPAD, and on selecting the widget using the keypad, launches the app for the
widget. Where do I make change in Launcher.java or workspace.java???

-- 
Regards,
Manjunatha


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: VideoRecorder and VideoPlayer

2009-09-25 Thread fala70

Yes sorry Marco, I want mean  MediaRecorder and MediaPlayer. Then I
think that the only solution is try to make a porting of ffmpeg
libavcodec using ndk. Other suggestion ?

On 25 Set, 02:21, Marco Nelissen marc...@android.com wrote:
 VideoRecorder and VideoPlayer don't exist in the Android SDK.
 If you meant MediaRecorder and MediaPlayer, then the answer to your
 question is no. At best, you could have a local proxy on the phone to
 feed data to MediaPlayer for playback.



 On Thu, Sep 24, 2009 at 5:15 PM,fala70fal...@gmail.com wrote:

  Hi,

  I need to understand if the classes VideoRecorder and VideoPlayer, can
  work without files but using directly the frames audio and video.. I
  need to encode and decode frame h263 and amr without use any file
  containare. It is possible, I didn't see nothing about 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] Re: [android-beginners] Re: Focus android widget.

2009-09-25 Thread Manjunatha M
should i make the layout of the widget as focusable? or is there any other
way to do that??

On Fri, Sep 25, 2009 at 12:38 PM, Romain Guy romain...@google.com wrote:

 No change needed, make the widget focusable/clickable.

 On Sep 25, 2009 12:05 AM, Manjunatha M man...@gmail.com wrote:

 Hi,
 Is there a way to highlight the widget in the android home screen by using
 DPAD, and on selecting the widget using the keypad, launches the app for the
 widget. Where do I make change in Launcher.java or workspace.java???

 --
 Regards,
 Manjunatha



 



-- 
Regards,
Manjunatha

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



[android-developers] How to delete file when file is created by another app

2009-09-25 Thread A.TNG

Hi,

I have this problem. Two apps: app_a and service_s. Service_S creates
file in /tmp. After create this file, service_s uses
FileUtils.setPermission to change file mode to 666. Then app_a tries
to delete this file. But I always failed when deleting. It seems the
files are private. One application cannot delete files which another
application creates.

Is there any way to delete this file?

Thanks a lot.

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



[android-developers] Re: How to save a canvas to disk

2009-09-25 Thread gjs

Hi,

That is why I gave you a complete working example ( maybe try it
yourself ). But not knowing your code I could only guess about when
you would want to call the saveView() method I provided.

I guess that you would call the saveView() method when the user
requests that your KidsPaintView view should save their 'drawing'
either to a file or to set as the wallpaper.

I imagine that you would provide a menu option button, or some
touchscreen or keyboard button to allow the user to trigger that
action - when they had finished making their 'drawing'. I just used
the trackball/dpad center button as an example to demonstrate
triggering and saving the view.

In my example I used 'SomeView' to represent your KidsPaintView and
put the saveView() method in the Activity, but you could also put the
saveView() method or some equivalent code inside your KidsPaintView
view if you wish.

You should also realize that you CAN just call draw( canvas ) on your
KidsPaintView as your class extends View so it (automatically)
inherits the View.draw( canvas ) method... You just need to ensure
that you create and use a new canvas and a new bitmap when calling the
draw( canvas) method, as I said originally and demonstrated with the
code posted.

Good luck !

Regards

On Sep 25, 12:45 am, limtc thyech...@gmail.com wrote:
 Thanks!

 I think the part that I am confused is that I never used view.draw
 (canvas) code in my program so I don't know when to call it... at this
 moment, says I wanted to clear a screen, this is my code in the view:

     public void clearScreen() {
         gradient = false;
         dots.clear();
         invalidate(); // this will call the onDraw and pass in the
 canvas
     }

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



[android-developers] Re: How to delete file when file is created by another app

2009-09-25 Thread Mark Murphy

 I have this problem. Two apps: app_a and service_s.

Why two apps?

 Service_S creates file in /tmp.

There is no /tmp in Android.

 After create this file, service_s uses
 FileUtils.setPermission to change file mode to 666. Then app_a tries
 to delete this file. But I always failed when deleting. It seems the
 files are private. One application cannot delete files which another
 application creates.

 Is there any way to delete this file?

You would need to also set permission on the directory to 666 -- in Linux,
deleting a file is considered an operation on the directory.

Bear in mind that by doing this, any application on the system can read
and manipulate files in this directory. There is likely a more secure
means of data sharing than this that your apps can use. Or, have them both
be a single app.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



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



[android-developers] Re: Now ADC2 judging has begun.

2009-09-25 Thread Beowolve

You can't, it will be downloaded automatically by the judging
application.

I have read How can I skip on almost any blog reporting about the
judging
application, this needs some improvement...

@Google guys:
A normal user will not find the ADC2 judging application. I have two
guys
sitting next to me with a android phone. Both would not know about the
contest without me, not to forget the application itself. So if you
want
some REAL users to download and judge, then make this more public!

Very disappointing how this is handled so far...

On 25 Sep., 07:24, manoj manojkumar.m...@gmail.com wrote:
 Hi all,

 I didnt find my app in the market ( I searched in the cyrket.com
 site). How can I download my app from the market?

 please help me.

 Thanks,
 Manoj.

 On Sep 25, 3:06 am, Maps.Huge.Info (Maps API Guru)

 cor...@gmail.com wrote:
  Oop!

  You can hit the menu button and then Skip - that should be more
  obvious to the users.

  -John Coryat

  What Zip Code?

  Radar Now!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Soft Keyboard

2009-09-25 Thread tauntz
The problem with long-pressing-menu not working is this: HTC Hero. It just
does NOT work there with the default keyboard.
I got also reports about people being not able to open the virtual keyboard
on their phones - I suggested them to try long-clicking the menu (following
Romain Guys suggestions) and I thought that everything is fine - till I got
my hands on HTC Hero - you can long-press the menu for 2 days in a row - it
still does not open the virtual keyboard there.

The bottom line is that due to platform fragmentation there's no standard
way to bring up the keyboard - different platform implementations use a
totally different concept for it. If you want to support such devices, you
could detect if a device is a HTC Hero/(or some other device that does not
use long-menu-press) and if it is, then use a different layout in your app
(eg display a button that brings up the virtual keyboard). Or do some other
ugly ugly hacks (I'll burn in hell for suggesting this, right?:P)


Tauno

On Thu, Sep 24, 2009 at 10:40 PM, Eric Carman ewcarma...@gmail.com wrote:


 Thank you both for your response.

 If the application is written for Android 1.1, does this change
 anything in regards to and there is a keyboard selected and it allows
 this? I would think that in such an app, since it doesn't know about
 soft keyboards, the system soft keyboard would be selected and would
 allow this. But perhaps there is more to this. Are you possibly
 suggesting that they've installed one of the alternate keyboards? That
 would be interesting.

 Again, this works on an emulator which I've defined to have no
 keyboard, so that is encouraging. At least I think it helps to rule
 out the caveat where the app isn't consuming the event, but I will
 check this out to be sure as I do catch key events - just not long-
 press menu ones, at least not intentionally.

 I guess now I would need to know what to tell the user to look for on
 their device such that they can get this functionality to work.
 Assuming I can get them to contact me or bother to read my web site.

 Would the keyboard selected refer to the Settings | Locale  Date |
 Keyboard [Checked] option?
 And then I guess I could refer them to the keyboard settings option
 below that to investigate further.

 Best Regards,
 Eric



 On Sep 24, 1:14 pm, Dianne Hackborn hack...@android.com wrote:
  Long press menu forces the keyboard to be displayed, as long as the app
  doesn't completely consume that key event, and there is a keyboard
 selected
  and it allows this (the default behavior is to allow it).
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see
 and
  answer them.
 


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



[android-developers] Re: Soft Keyboard

2009-09-25 Thread Dianne Hackborn
On Fri, Sep 25, 2009 at 1:18 AM, tauntz tau...@gmail.com wrote:

 The problem with long-pressing-menu not working is this: HTC Hero. It just
 does NOT work there with the default keyboard.


Then they changed/broke something.  (Which of those it is probably depends
on whether it is their IME doing this or actually the framework being
broken).  At any rate, long press on menu has ALWAYS been there purely as a
very last resort for pre-1.5 apps that couldn't have been written knowing
about input methods.  It is a super-sucky mechanism to get to the soft
keyboard, and anyone writing an app today really should assume it doesn't
exist and provide a decent UI as part of their app.


 The bottom line is that due to platform fragmentation there's no standard
 way to bring up the keyboard - different platform implementations use a
 totally different concept for it.


Long press on menu is NOT what you should be making your users do.
Seriously.  It sucks.  Who would guess that is how you get to a keyboard?
Please give them a decent UI.


 If you want to support such devices, you could detect if a device is a HTC
 Hero/(or some other device that does not use long-menu-press) and if it is,
 then use a different layout in your app (eg display a button that brings up
 the virtual keyboard). Or do some other ugly ugly hacks (I'll burn in hell
 for suggesting this, right?:P)


It's easy: if there isn't a hard keyboard (which can control resource
selection as well as being info available in Resources.getConfiguration()),
then make a UI that interacts in a nice way with the soft keyboard.  Also
consider doing this even if there is a hard keyboard.  Like, uh, the
standard platform and apps do everywhere.  You -never- make people use long
press on menu to enter text.  Because it sucks.

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

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

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



[android-developers] Search in Maps !

2009-09-25 Thread MarcoCanali

I want insert a search function in my android project like search
function in Android Maps application. Anyone has a solution ??

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



[android-developers] Re: How to delete file when file is created by another app

2009-09-25 Thread A.TNG



On Sep 25, 3:46 pm, Mark Murphy mmur...@commonsware.com wrote:
  I have this problem. Two apps: app_a and service_s.

 Why two apps?

  Service_S creates file in /tmp.

 There is no /tmp in Android.

  After create this file, service_s uses
  FileUtils.setPermission to change file mode to 666. Then app_a tries
  to delete this file. But I always failed when deleting. It seems the
  files are private. One application cannot delete files which another
  application creates.

  Is there any way to delete this file?

 You would need to also set permission on the directory to 666 -- in Linux,
 deleting a file is considered an operation on the directory.

 Bear in mind that by doing this, any application on the system can read
 and manipulate files in this directory. There is likely a more secure
 means of data sharing than this that your apps can use. Or, have them both
 be a single app.


Great thanks. Your replay is really helpful. :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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-beginners] Re: Focus android widget.

2009-09-25 Thread Manjunatha M
 Hi Romain,
I tried with the following xml.

?xml version=1.0 encoding=utf-8?
appwidget-provider xmlns:android=
http://schemas.android.com/apk/res/android;
android:minWidth=146dp
android:minHeight=146dp
android:focusable=true
android:updatePeriodMillis=8640
android:initialLayout=@layout/widget_new
/

But no luck.. Could you please help me on this??

On Fri, Sep 25, 2009 at 12:38 PM, Romain Guy romain...@google.com wrote:

 No change needed, make the widget focusable/clickable.

 On Sep 25, 2009 12:05 AM, Manjunatha M man...@gmail.com wrote:

 Hi,
 Is there a way to highlight the widget in the android home screen by using
 DPAD, and on selecting the widget using the keypad, launches the app for the
 widget. Where do I make change in Launcher.java or workspace.java???

 --
 Regards,
 Manjunatha



 



-- 
Regards,
Manjunatha

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Now ADC2 judging has begun.

2009-09-25 Thread Cédric Berger

On Fri, Sep 25, 2009 at 10:07, Beowolve beowo...@gmail.com wrote:
 A normal user will not find the ADC2 judging application. I have two
 guys

- I could not see the judging application by just browsing the market.
I only found it making a search on challenge. (from french SFR
phone).
Is it me or is it kind of hidden ? (not in a category ?)

- BTW looks like it is not localized... my phone is in French locale
but Judging application is in english.

- I thought the judging application indicated you could come back to
your ratings. Is it possible ? and how ?
Because you could really want re-evaluate your ratings after making
other votes, to be more consistent in your way or rating them, or
realize you completely missed the point on a given application (or for
example did not understand it would only be useful with GPS on, and
you evaluated in your basement...), ...

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Soft Keyboard

2009-09-25 Thread tauntz

 At any rate, long press on menu has ALWAYS been there purely as a very last 
 resort for pre-1.5 apps that couldn't have been written knowing about input 
 methods.  It is a super-sucky mechanism to get to the soft keyboard, and 
 anyone writing an app today really should assume it doesn't exist and provide 
 a decent UI as part of their app.

Understood. I was just under the impression that long pressing the
menu is the suggested way how apps should work maybe based on
http://code.google.com/p/android/issues/detail?id=3577 and
http://groups.google.com/group/android-developers/browse_thread/thread/ca26e331dce350eb/10802a8263b52c72

 Long press on menu is NOT what you should be making your users do.  
 Seriously.  It sucks.  Who would guess that is how you get to a keyboard?  
 Please give them a decent UI.

Of course it sucks - no argument against that - but IMO cluttering the
user-interface with open virtual keyboard buttons sucks even more.
What's the minimum size of an UI item that is big enough so the user
can touch this with his/her finger? 42px on a standard
Dream/Magic/Hero screen? That is almost 10% of all the screen
real-estate for an app with a titlebar (speaking of height). Or when
you'd put that option to the menu, it would still require the user to
press menu once and then go and find the open virtual keyboard item
and press it. Sucky, isn't it?

 It's easy: if there isn't a hard keyboard (which can control resource 
 selection as well as being info available in Resources.getConfiguration()), 
 then make a UI that interacts in a nice way with the soft keyboard.  Also 
 consider doing this even if there is a hard keyboard.  Like, uh, the standard 
 platform and apps do everywhere.  You -never- make people use long press on 
 menu to enter text.  Because it sucks.

Uh, are we using the same devices here? I have a Magic here and when I
want to do filtering then:
* Home launcher - no UI for opening virtual keyboard, I have to long press menu
* Contacts - no UI for opening virtual keyboard, I have to long press menu
..are there any more places where you can filter lists in built-in apps? :)


Would it be an option to not tell developers that you need to design
a separate layout for every activity that has a listview that is
filterable (beacuse well - why would you want to have this
button/menu item on devices where there's a hardware keyboard?) and to
tell device manufacturers/IME developers to follow one simple rule -
long-pressing the menu should open the virtual keyboard? That would
at least create a standardized way of opening the keyboard. Imagine if
really every app designer is going to design their apps with open
virtual keyboard buttons - what the end users will get is n+1
applications that each have this option in different places and it
looks totally different in different apps - some have it under menu -
search, some have it under menu - filter, some have it on the screen
in green, some have it orange,  some use one icon, others use a
different icon, some have it at the top of the screen, some at the
bottom.. For the user that'll be a total mess if they have to learn
how to open the keyboard for every application that they install. THAT
sucks, doesn't it?

I don't really care if it'll be long-press menu or devices start to
have a standalone open keyboard hardware button or the framework
will automatically detect open keyboard gestures or whatever. My
point is that can we please have one standard way of opening the
keyboard so the user knows that when I want to open the keyboard in
ANY application, I have to do X?
I don't want to start an argument in the style Your approach sucks
more than mine!!!, really. I just think that the current situation we
are in, sucks :)


Tauno

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Now ADC2 judging has begun.

2009-09-25 Thread Che

Did anyone get a confirmation e-mail that they got pass the
application screening?

Would've been nice if we got notice about whether our applications
were accepted or rejected.

Also, did anyone notice that the ADC2 application can sometimes be a
bit of a cpu hog when running in the background? Sort of degrades the
judges' experience - especially in the case of real-time games.

With skipping allowed, do the number of votes count towards the
overall grade of an application? Playing around with the judging app,
I found myself skimming through a lot of apps just because I didn't
want to activate my gps. Different apps require different amounts of
time to judge, but I think few of us will be willing to put a large
amount of time into an app before succumbing to the thought of 'what
the next one will be like'. If the number of votes are not taken into
consideration, I foresee a large number of 'niche' apps making it
through to the next round (would an app with one five star rating in
all categories be the best?). If not, we'll see the prettier, less
time consuming, easy to jump into apps dominating. I suppose splitting
everything into 10 categories does help balance things a bit.

:(
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Overlay class and Event Handlers

2009-09-25 Thread Neilz

Surely someone must have some experience or knowledge of this?

On Sep 23, 10:23 pm, Neilz neilhorn...@googlemail.com wrote:
 Hi all. Maybe I don't understand the concept of event handlers, but
 this doesn't seem to work the way I would expect.

 The Overlay class, and its subclass ItemizedOverlay, have a number of
 event handlers, which I've been playing around with:

     onTap(GeoPoint p, MapView mapView)
     onTap(int index)
     onTouchEvent(android.view.MotionEvent event, MapView mapView)

 Now all these events seem to work fine, individually. But if you
 implement more than one of them, only one of them works. From my
 previous experience with events (from applets etc.) I don't recall any
 restrictions on the number of events that can be handled at once.

 For me, any one of these calls doesn't really give me enough info. I
 may want to know if someone has clicked one of my overlays, but I may
 also want to know if someone has tapped elsewhere on the map. What's
 going on here, am I missing something?

 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] All apps are created equal; how to install/uninstall.

2009-09-25 Thread RS

Since the judging app isn't part of the firmware/system group, was
just wondering, how come the ADC2 judging app manages to install and
uninstall .. oh well, probably through market but can other apps do
the same? How?

Or is it possible only by apps that are from the same UID as the
market app?
Thought apps installed externally can't get into system group or
install permissions.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Weird behavior of java.util.Preferences

2009-09-25 Thread leden

Hi all!
My app needs to save its state before being killed, and since that
state is really small (one Long), I've decided to use
java.util.Preferences. I use it like the way I would be using in any
Java application (and never had problems), though I am not sure this
is the correct way here on Android platform:
private static final Preferences prefs = Preferences.userNodeForPackage
(WordChoice.class);

I update preferences in onPause() method, to ensure that data is
always persisted no matter how my app ends:
Here is that fragment of code:
protected void onPause() {
super.onPause();
prefs.putLong(currIndex, somePositiveValue);
}

Everything works perfectly on emulator, but when I install my app onto
my g1 phone, the preferences doesn't work the way they are supposed to
work - it seems that SOMETHING clears them every time my application
is killed.
Here is the example of output of my application:
(FIRST STARTUP)
no entry found for currIndex
(STOPPED)
(STARTUP)
currIndex = 25
(STOPPED)
(STARTUP)
currIndex = 83
(KILLED i.e. from ASTRO or via terminal-emulator or killed by system)
(STARTUP)
no entry found for currIndex -- what the ...??

I really don't understand this behavior. I also tried flushing the
preferences but doesn't help.
Then I changed the code in onPause() method so that it first persists
data then calls super.onPause() but then the even worse scenario
occurs - preferences are cleared on random (about 50% to be cleared)
no matter how my app ends.

Please help me by giving, I have already spend a few hours struggling
with this issue with no success.
I would be grateful if someone posted an example of how to permanently
store that a single Long and how retrieve it, so that it works when
an application is killed.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Can I set Activity android:enabled by java code?

2009-09-25 Thread NY


android:enabled can be set at AndroidManifest.xml

activity
android:name=MyActivity
android:enabled=true

How can I set the attr true or false in my programm?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Soft Keyboard

2009-09-25 Thread James Webster
On the Hero and I guess other Androids as well, there is the Search
hardware button. This works in Hero Contacts AND in Launcher, bringing up
the soft keyboard. Not particulary intuitive I grant you, as you tend to
look for a button to do that on screen, but it does make sense.

Of course, in Android tapping any field which would takes text input always
brings up the keyboard anyway, so it is only an issue in Hero's list apps
because there isn't a default edit field which you can tap to start typing,
and thus auto-show the keyboard.
Is it not the same on the Magic?


2009/9/25 tauntz tau...@gmail.com


  At any rate, long press on menu has ALWAYS been there purely as a very
 last resort for pre-1.5 apps that couldn't have been written knowing about
 input methods.  It is a super-sucky mechanism to get to the soft keyboard,
 and anyone writing an app today really should assume it doesn't exist and
 provide a decent UI as part of their app.

 Understood. I was just under the impression that long pressing the
 menu is the suggested way how apps should work maybe based on
 http://code.google.com/p/android/issues/detail?id=3577 and

 http://groups.google.com/group/android-developers/browse_thread/thread/ca26e331dce350eb/10802a8263b52c72

  Long press on menu is NOT what you should be making your users do.
 Seriously.  It sucks.  Who would guess that is how you get to a keyboard?
 Please give them a decent UI.

 Of course it sucks - no argument against that - but IMO cluttering the
 user-interface with open virtual keyboard buttons sucks even more.
 What's the minimum size of an UI item that is big enough so the user
 can touch this with his/her finger? 42px on a standard
 Dream/Magic/Hero screen? That is almost 10% of all the screen
 real-estate for an app with a titlebar (speaking of height). Or when
 you'd put that option to the menu, it would still require the user to
 press menu once and then go and find the open virtual keyboard item
 and press it. Sucky, isn't it?

  It's easy: if there isn't a hard keyboard (which can control resource
 selection as well as being info available in Resources.getConfiguration()),
 then make a UI that interacts in a nice way with the soft keyboard.  Also
 consider doing this even if there is a hard keyboard.  Like, uh, the
 standard platform and apps do everywhere.  You -never- make people use long
 press on menu to enter text.  Because it sucks.

 Uh, are we using the same devices here? I have a Magic here and when I
 want to do filtering then:
 * Home launcher - no UI for opening virtual keyboard, I have to long press
 menu
 * Contacts - no UI for opening virtual keyboard, I have to long press menu
 ..are there any more places where you can filter lists in built-in apps? :)


 Would it be an option to not tell developers that you need to design
 a separate layout for every activity that has a listview that is
 filterable (beacuse well - why would you want to have this
 button/menu item on devices where there's a hardware keyboard?) and to
 tell device manufacturers/IME developers to follow one simple rule -
 long-pressing the menu should open the virtual keyboard? That would
 at least create a standardized way of opening the keyboard. Imagine if
 really every app designer is going to design their apps with open
 virtual keyboard buttons - what the end users will get is n+1
 applications that each have this option in different places and it
 looks totally different in different apps - some have it under menu -
 search, some have it under menu - filter, some have it on the screen
 in green, some have it orange,  some use one icon, others use a
 different icon, some have it at the top of the screen, some at the
 bottom.. For the user that'll be a total mess if they have to learn
 how to open the keyboard for every application that they install. THAT
 sucks, doesn't it?

 I don't really care if it'll be long-press menu or devices start to
 have a standalone open keyboard hardware button or the framework
 will automatically detect open keyboard gestures or whatever. My
 point is that can we please have one standard way of opening the
 keyboard so the user knows that when I want to open the keyboard in
 ANY application, I have to do X?
 I don't want to start an argument in the style Your approach sucks
 more than mine!!!, really. I just think that the current situation we
 are in, sucks :)


 Tauno

 


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



[android-developers] application code for SDK 1.5 and 1.6

2009-09-25 Thread EPecorari

Hello,
suppose I have one application developerd for SDK 1.5 and after the
issues of the 1.6 I want to add some of the new features in my app but
continuing to support SDK 1.5, do I need to mantian two different
projects and two different source code?

Thanks for the help

Emanuele
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 activity as overlay over other app

2009-09-25 Thread Mann

finally I found my answer.

On Sep 23, 4:41 pm, Mann mannka...@gmail.com wrote:
 Greetings
 Is it possible to create an Android activity as an overlay above other
 application? If yes, please provide me a pointer.

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



[android-developers] Re: application code for SDK 1.5 and 1.6

2009-09-25 Thread Mark Murphy

 suppose I have one application developerd for SDK 1.5 and after the
 issues of the 1.6 I want to add some of the new features in my app but
 continuing to support SDK 1.5, do I need to mantian two different
 projects and two different source code?

You can use the reflection techniques described here:

http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



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



[android-developers] Re: Can I set Activity android:enabled by java code?

2009-09-25 Thread Mark Murphy




 android:enabled can be set at AndroidManifest.xml

 activity
 android:name=MyActivity
 android:enabled=true

 How can I set the attr true or false in my programm?

There is a method on PackageManager to do that (setComponentEnabled()?
something like that)

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



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



[android-developers] Re: run Android app on iPhone

2009-09-25 Thread zeeshan

do i need to rewrite my existing android code for COCOA touch support?


On Sep 25, 3:53 am, Shawn Brown big.coffee.lo...@gmail.com wrote:
 HI,

 Has anyone tried this cross compiler to get their Android app to run
 on an iPhone?

 http://xmlvm.org/android/

 Shawn
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] ACTION_NEW_OUTGOING_CALL, abort

2009-09-25 Thread Lee

Hello,

I'm interested in selectively blocking phone calls. In the docs on
this intent I see:

...for example, a parental control application might verify that the
user is authorized to place the call at that time,
...
Any BroadcastReceiver receiving this Intent *must not* abort the
broadcast.

Blocking calls using this method seems to work fine, are there ill-
effects to be expected ?

And if you don't abort the broadcast, what action is the parental
control  application mentioned first supposed  to take ?

Thanks for any hints,

Lee
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 activity as overlay over other app

2009-09-25 Thread Neilz

Well, please provide your answer and details, it would be useful for
others!

On Sep 25, 11:19 am, Mann mannka...@gmail.com wrote:
 finally I found my answer.

 On Sep 23, 4:41 pm, Mann mannka...@gmail.com wrote:

  Greetings
  Is it possible to create an Android activity as an overlay above other
  application? If yes, please provide me a pointer.

  MANN


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] ddms doesn't work (issue 2545)

2009-09-25 Thread Stefan

Hello,

i am developing on a Mac OS X 10.4 (german version) and with android
sdk 1.6 r1.
The emulator only receive one lat/lon-value 0.0 if i tryy to send some
a pair aof lat/lon value.

I read the issue 2545 (http://code.google.com/p/android/issues/detail?
id=2545)

So i change the following settings in the emulator (because i read in
an other thread, that only the english locale work) to:

Custom locale: en - English
Settings - Date and time: Automatic: off, Select time: GMT+01:00,
British Summer Time, Use 24-hours: on, Select date: 2009-12-31

If i send one value (lat/lon), the emulator receive 0.0 0.0 and after
that, the emulator receive no data.
I test it with german locate, too. But the same error occur. What
setting is wrong??

My gpx file, which i later want to use looks like:
?xml version=1.0 encoding=utf-8?
gpxxmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns=http://www.topografix.com/GPX/1/1; version=1.1
creator=i
xsi:schemaLocation=http://www.topografix.com/GPX/1/1
http://www.topografix.com/GPX/1/1/gpx.xsd;

. (some wpts)

trk
nameHUHU/name
trkseg
trkpt lat=50.8780618 lon=6.6014193
name value=CITY/
time2009-09-25T13:58:14Z/time
/trkpt

...

/trkseg
/trk
/gpx

Thanks,
Stefan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Weird behavior of java.util.Preferences

2009-09-25 Thread Lance Nanek

I've never tried java.util.Preferences on Android, but
android.content.SharedPreferences has been working great. The official
example uses Boolean, but it supports Long as well:
http://developer.android.com/intl/fr/guide/topics/data/data-storage.html#pref

On Sep 25, 6:10 am, leden leden...@gmail.com wrote:
 Hi all!
 My app needs to save its state before being killed, and since that
 state is really small (one Long), I've decided to use
 java.util.Preferences. I use it like the way I would be using in any
 Java application (and never had problems), though I am not sure this
 is the correct way here on Android platform:
 private static final Preferences prefs = Preferences.userNodeForPackage
 (WordChoice.class);

 I update preferences in onPause() method, to ensure that data is
 always persisted no matter how my app ends:
 Here is that fragment of code:
 protected void onPause() {
         super.onPause();
         prefs.putLong(currIndex, somePositiveValue);

 }

 Everything works perfectly on emulator, but when I install my app onto
 my g1 phone, the preferences doesn't work the way they are supposed to
 work - it seems that SOMETHING clears them every time my application
 is killed.
 Here is the example of output of my application:
 (FIRST STARTUP)
 no entry found for currIndex
 (STOPPED)
 (STARTUP)
 currIndex = 25
 (STOPPED)
 (STARTUP)
 currIndex = 83
 (KILLED i.e. from ASTRO or via terminal-emulator or killed by system)
 (STARTUP)
 no entry found for currIndex -- what the ...??

 I really don't understand this behavior. I also tried flushing the
 preferences but doesn't help.
 Then I changed the code in onPause() method so that it first persists
 data then calls super.onPause() but then the even worse scenario
 occurs - preferences are cleared on random (about 50% to be cleared)
 no matter how my app ends.

 Please help me by giving, I have already spend a few hours struggling
 with this issue with no success.
 I would be grateful if someone posted an example of how to permanently
 store that a single Long and how retrieve it, so that it works when
 an application is killed.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] is it possible to receive incoming call automatically?

2009-09-25 Thread Nemat

Hi frnds

is it possible in Android If call is received from user defined
number, it should be picked up automatically with no sign and speaker
should be turned on. Its history must be deleted.

need urgent help

Thanks in advance
Nemat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] 3D Primitives in opengl ES (sphere)

2009-09-25 Thread androidDeveloper

Anyone know how to draw a 3D-sphere with OpenGL ES in android?

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: application code for SDK 1.5 and 1.6

2009-09-25 Thread Emanuele

Thanks a lot for the tip. So using this technique the application will
be anyway installed in the device (if I don't specify the
minorSDKVersion in the manifest.xml) even if the device SDK doesn't
have the class I use in the Reflection or wrapper class?

Thanks
Emanuele

On 25 Set, 12:35, Mark Murphy mmur...@commonsware.com wrote:
  suppose I have one application developerd for SDK 1.5 and after the
  issues of the 1.6 I want to add some of the new features in my app but
  continuing to support SDK 1.5, do I need to mantian two different
  projects and two different source code?

 You can use the reflection techniques described here:

 http://android-developers.blogspot.com/2009/04/backward-compatibility...

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Downloading ADC2 judging application

2009-09-25 Thread karthikr


Hi Guys,

I currently have a HTC magic(Airtel-Android) which does not have the
Android Market application on it.

Is there anyway that I can download the judging application and use
it?

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



[android-developers] Take an action when soft keyboard is launched

2009-09-25 Thread Thomas

Hi All,

I'd like to take an action always when soft keyboard is shown or
hidden. In my activity there is a menu that I want to hide when soft
keyboard is launched and this menu needs to be shown when soft
keyboard is hidden.

Does anyone have an idea about how to do that?

Thanks all

Thomas

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



[android-developers] can i play gif?

2009-09-25 Thread zeeshan

Hi Dear,

i am trying to play a gif by

  is = context.getResources().openRawResource
(R.drawable.animated_gif);
  mMovie = Movie.decodeStream(is);

but mMovie remains null.

BitmapDecode.java example in apiDemo is not working either

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



[android-developers] Touchscreen support

2009-09-25 Thread Jesper Nordenberg

I'm running Android on a Beagle Board and want to add support for
input from the Xenarc 706TSA touchscreen. When I plug it in it's
identified as:

generic-usb 0003:0EEF:0001.0004: input: USB HID v2.10 Pointer [eGalax
Inc. USB TouchController] on usb-ehci-omap.0-2.3/input0

There's also an error:

drivers/hid/usbhid/hid-core.c: usb_submit_urb(ctrl) failed

When I touch the screen there seems to be some kind of response as the
focus disappears, but I cant press anything on the screen. I get touch
events when using getevent.

Can someone help?

/Jesper Nordenberg

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Soft Keyboard

2009-09-25 Thread tauntz

On Fri, Sep 25, 2009 at 1:13 PM, James Webster jpbwebs...@gmail.com wrote:
 On the Hero and I guess other Androids as well, there is the Search
 hardware button. This works in Hero Contacts AND in Launcher, bringing up
 the soft keyboard. Not particulary intuitive I grant you, as you tend to
 look for a button to do that on screen, but it does make sense.

This brings up the global search and can not be used for filtering
ListViews in apps that use global search. (or however it is called:
http://developer.android.com/reference/android/app/Activity.html#onSearchRequested%28%29)

 Of course, in Android tapping any field which would takes text input always
 brings up the keyboard anyway, so it is only an issue in Hero's list apps
 because there isn't a default edit field which you can tap to start typing,
 and thus auto-show the keyboard.
 Is it not the same on the Magic?

The problem is that sometimes (for example filterint ListViews) you do
not have a field to focus. It's not just an issue in Heros list of
apps but it's an issue in all apps that provide filtering for their
ListViews.


Tauno

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Now ADC2 judging has begun.

2009-09-25 Thread Maps.Huge.Info (Maps API Guru)

I have to agree that any complex or involved apps will not make it
with the way the judging app is written. Google should have made it so
you could keep the apps you're judging for a while at least, in some
sort of special directory, so you could use them for a few days before
deciding if they were worth it or not. Making instant decisions on how
good it is will defeat a number of well deserving apps.

On the other hand, all my entries are exactly the type that can be
easily judged in this fashion. They require no user input, no
instructions, no sign in or registration, barely any knowledge about
the actual topic and are easy to understand, so for me, the app is
slanted in my favor... Good on that but it would be better for the
developer community if this thing was written so the apps would stay
around for at least the judging period.

-John Coryat

What Zip Code?

Radar Now!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] event for button on headphone chord...

2009-09-25 Thread sdphil

okay, first a couple of gripes --

gripe 1: why oh why t-mobile/htc did you decide to make a phone with a
non-standard USB/Power connector?  I mean seriously, wth!!!  just what
the world needs, yet another frigging connector.

gripe 2: what's up with providing a multi-media phone without a
standard 2.5mm headphone jack?  it's hard to take you seriously as a
smartphone without a regular headphone jack!

now that I have those gripes out of the way :), how do you detect when
a user clicks on the button on the headphone connector.  the button on
the connector that goes from the non-standard usb plug to the female
headphone jack.

tia.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: You must supply a resource ID for a TextView

2009-09-25 Thread Marco Nelissen

So there's your problem then, probably. The adapter expects each item
to have the same items, so that it can assign the fields from your
Cursor to the corresponding items in your list item layout. In other
words, if your normal list item contains items with IDs A, B and C,
them your section list items should also have items with IDs A, B
and C, and those items should have the same type in both layouts as
well. In your case, it looks like you have a TextView with a given ID
in one layout, whereas in the other layout that same ID is either used
for something that is not a TextView, or isn't present at all.
If you need some of the items in your list to be different between
your normal and section layouts, then you should override bindView
and handle that in there.



On Thu, Sep 24, 2009 at 11:06 PM, Wouter wouterg...@gmail.com wrote:

 Np the headers are using a separate layout file..

 On 25 sep, 00:04, Marco Nelissen marc...@android.com wrote:
 On Thu, Sep 24, 2009 at 2:12 PM, Wouter wouterg...@gmail.com wrote:

  On 24 sep, 22:53, Marco Nelissen marc...@android.com wrote:
  On Thu, Sep 24, 2009 at 1:41 PM, Wouter wouterg...@gmail.com wrote:

   I have no problem with the data mapping and TextViews.

  The stack trace and crash you're seeing indicate otherwise.
  Unless you're doing something specific in bindView, the adapter
  expects each list item layout to be the same. You are overriding
  getView and returning different kinds of views, so I would take
  another look at that, and make sure that those two kinds of views are
  compatible.

  Each list item layout is the same. it uses R.layout.cinema_row!
  The weird is it makes my list with headers (when i use
  seperatedlistadapter) and when i scroll down, it crashes and gives
  this error.
  Really will take a look at it, if not i will put my source code here!

   It fully works
   when i don't use a seperatedList adapter..
   So there is problem with this seperatedListAdapter..
   Is there another way i can use to divide my list in sections with
   headers?

  I don't know what effect you're trying to achieve, but in general you
  can override bindView and/or getView to make each item look exactly
  the way you want.

  I have a list of movies with a release date. all the movies with same
  date has to be listed under a header with date.. And every list item
  has same layout, really don't get it :(

 Every list item, including the header items? In other words: do your
 header items use the same layout as your other list items?
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: event for button on headphone chord...

2009-09-25 Thread Marco Nelissen

On Fri, Sep 25, 2009 at 7:57 AM, sdphil phil.pellouch...@gmail.com wrote:

 okay, first a couple of gripes --

 gripe 1: why oh why t-mobile/htc did you decide to make a phone with a
 non-standard USB/Power connector?  I mean seriously, wth!!!  just what
 the world needs, yet another frigging connector.

The connector on the phone accepts a standard mini USB connector just fine.

 gripe 2: what's up with providing a multi-media phone without a
 standard 2.5mm headphone jack?  it's hard to take you seriously as a
 smartphone without a regular headphone jack!

 now that I have those gripes out of the way :), how do you detect when
 a user clicks on the button on the headphone connector.  the button on
 the connector that goes from the non-standard usb plug to the female
 headphone jack.

It is first delivered to the foreground app as a regular key event.
If the app lets it fall through, it is then broadcast as an intent so
that background apps can get it too.
This is almost impossible to get right when multiple background apps
are interested in that button, so I suggest you don't use this feature
(it *will* change in the future).

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ProgressBar doesn't allow control of visibility in AppWidgetProvider App Widget?

2009-09-25 Thread kenpark

Hej.

I do not really get the intent of the class
android.widget.RemoteViews. What is its proper use case?

Regards.

On 10 Aug., 16:50, Craig craig.det...@gmail.com wrote:
 Thanks Jeff, the work-around works well.

 On Aug 7, 7:45 pm, Jeff Sharkey jshar...@android.com wrote:

  Doh, good catch.  The View.setVisibility() method is marked with the
  @android.view.RemotableViewMethod annotation, which is what allows it
  to be called through RemoteViews.  In this case,ProgressBaractually
  overrides the default View implementation, but without adding that
  annotation.  (This is why it throws the exception.)

  One quick workaround is to wrap theProgressBarinto a simple view
  like FrameLayout, and then setVisibility() on that wrapper.

  j

  On Fri, Aug 7, 2009 at 3:49 PM, Craigcraig.det...@gmail.com wrote:

   I was trying to set a progress bar to View.INVISIBLE or View.GONE, or
   View.VISIBLE inside an AppWidgetProvider. However, it doesn't seem to
   want to do it. Settingvisibilityworks fine with TextView fields or
   ImageView fields or ImageButtons. However,ProgressBardoesn't seem to
   work. It doesn't make sense that just the progress bar type isn't
   supported for controllingvisibility. Has anyone else seen this
   problem?

   The code:

     �...@override
      public void onUpdate(Context context, AppWidgetManager
   appWidgetManager, int[] appWidgetIds) {

          RemoteViews updateViews = new RemoteViews(context.getPackageName(),
   R.layout.a_widget_home_screen);

          updateViews.setViewVisibility(R.id.progress_bar,
   View.VISIBLE);
      }

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

          ProgressBarandroid:id=@+id/progress_bar
                  android:layout_height=32px
                  android:layout_width=32px
                  android:indeterminate=true
                  android:layout_marginLeft=110px
                  android:layout_marginTop=120px
                  android:visibility=gone
                  /

   /RelativeLayout

   This is the error:

   08-07 17:42:42.633: WARN/AppWidgetHostView(102): updateAppWidget
   couldn't find any view, using error view
   08-07 17:42:42.633: WARN/AppWidgetHostView(102):
   android.widget.RemoteViews$ActionException: view:
   android.widget.ProgressBarcan't use method with RemoteViews:
   setVisibility(int)
   08-07 17:42:42.633: WARN/AppWidgetHostView(102):     at
   android.widget.RemoteViews$ReflectionAction.apply(RemoteViews.java:
   443)
   08-07 17:42:42.633: WARN/AppWidgetHostView(102):     at
   android.widget.RemoteViews.performApply(RemoteViews.java:855)
   08-07 17:42:42.633: WARN/AppWidgetHostView(102):     at
   android.widget.RemoteViews.apply(RemoteViews.java:832)
   08-07 17:42:42.633: WARN/AppWidgetHostView(102):     at
   android.appwidget.AppWidgetHostView.updateAppWidget
   (AppWidgetHostView.java:167)
   08-07 17:42:42.633: WARN/AppWidgetHostView(102):     at
   android.appwidget.AppWidgetHost.updateAppWidgetView(AppWidgetHost.java:
   243)
   08-07 17:42:42.633: WARN/AppWidgetHostView(102):     at
   android.appwidget.AppWidgetHost$UpdateHandler.handleMessage
   (AppWidgetHost.java:73)
   08-07 17:42:42.633: WARN/AppWidgetHostView(102):     at
   android.os.Handler.dispatchMessage(Handler.java:99)
   08-07 17:42:42.633: WARN/AppWidgetHostView(102):     at
   android.os.Looper.loop(Looper.java:123)
   08-07 17:42:42.633: WARN/AppWidgetHostView(102):     at
   android.app.ActivityThread.main(ActivityThread.java:3948)
   08-07 17:42:42.633: WARN/AppWidgetHostView(102):     at
   java.lang.reflect.Method.invokeNative(Native Method)
   08-07 17:42:42.633: WARN/AppWidgetHostView(102):     at
   java.lang.reflect.Method.invoke(Method.java:521)
   08-07 17:42:42.633: WARN/AppWidgetHostView(102):     at
   com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
   (ZygoteInit.java:782)
   08-07 17:42:42.633: WARN/AppWidgetHostView(102):     at
   com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
   08-07 17:42:42.633: WARN/AppWidgetHostView(102):     at
   dalvik.system.NativeStart.main(Native Method)

  --
  Jeff Sharkey
  jshar...@android.com


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



[android-developers] ADT对eclipse的要 求

2009-09-25 Thread ms99 ster
各位:

我昨天还在郁闷为什么9.0的ADT不可用,以为是我的文件坏了,但是我今天从新拷贝了一份回来还是不行,原来是eclipse版本的问题,我的eclipse版本是Eclipse
SDK  Version: 3.4.0,文档说3.3或者更新的版本就可以啊?


Thanks Muchly

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Now ADC2 judging has begun.

2009-09-25 Thread Sheenmue

Is it me or there are a lot of problems when trying to download and
install apps? Several times I had to go back to ADC2 app because the
app to review wasn't downloading, other times the app was downloaded
but wasn't installed and in several occasions download progress
stopped at 0% and I had to cancel and start again several times.

I never had this kind of problems with Android Market.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: event for button on headphone chord...

2009-09-25 Thread Mark Murphy

 now that I have those gripes out of the way :), how do you detect when
 a user clicks on the button on the headphone connector.  the button on
 the connector that goes from the non-standard usb plug to the female
 headphone jack.

Try watching for ACTION_MEDIA_BUTTON broadcast Intents using a
BroadcastReceiver.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



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



[android-developers] Re: Now ADC2 judging has begun.

2009-09-25 Thread ander...@phdgaming.com

I've reviewed around 20 apps so far - never a problem with downloading
or installing myself. Using a T-mobile G1 and I restarted it after I
initially downloaded the ADC app.

On Sep 25, 11:27 am, Sheenmue sheenmu...@gmail.com wrote:
 Is it me or there are a lot of problems when trying to download and
 install apps? Several times I had to go back to ADC2 app because the
 app to review wasn't downloading, other times the app was downloaded
 but wasn't installed and in several occasions download progress
 stopped at 0% and I had to cancel and start again several times.

 I never had this kind of problems with Android Market.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 my tracks in map

2009-09-25 Thread Ken H

I really thought this would be an easy thing to do...

I've built an app, and one of the things it does is show my current
position on the little google map on the phone. I walk around it and
it shows my speed, direction and position just fine.

Now what I want to do is show my tracks. I don't want to loose any of
the dots showing where I was -- I want it paint a trail of everywhere
I go. Simple, no?

I think my problem is I don't really understand overlays. Can I re-use
an overlay? That was my first instinct...rather than clear all the old
overlays on the mapview, make a new one, stick a dot on it and place
it in the mapview I wanted to grab the current overlay and *add a new
dot to it and put it back on the mapview. But I can seem to get that
to work. Just out of curiosity I even try not clearing the old
overlays and just adding new ones...that took about two minutes the
bring the phone to its knees.

Anybody have any ideas? A direction I can be pointed in? I know this
can be done, but I've spent a week searching with no joy.

Ken
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Now ADC2 judging has begun.

2009-09-25 Thread Maps.Huge.Info (Maps API Guru)

Last night I reviewed about 20 apps also and had no problems at all.
Today, I've not been able to review a single one. I get stuck in the
download stage as well.

It's probably due to the higher volume on the market right now.
Perhaps someone at Google forgot to throw some switch to turn on
additional servers?

-John Coryat

What Zip Code?

Radar Now!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Touchscreen support

2009-09-25 Thread Mark Murphy

Questions about porting Android are best asked on the android-porting
Google Group:

http://groups.google.com/group/android-porting

 I'm running Android on a Beagle Board and want to add support for
 input from the Xenarc 706TSA touchscreen. When I plug it in it's
 identified as:

 generic-usb 0003:0EEF:0001.0004: input: USB HID v2.10 Pointer [eGalax
 Inc. USB TouchController] on usb-ehci-omap.0-2.3/input0

 There's also an error:

 drivers/hid/usbhid/hid-core.c: usb_submit_urb(ctrl) failed

 When I touch the screen there seems to be some kind of response as the
 focus disappears, but I cant press anything on the screen. I get touch
 events when using getevent.

 Can someone help?

 /Jesper Nordenberg

 



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



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



[android-developers] Re: 3D Primitives in opengl ES (sphere)

2009-09-25 Thread Dan Sherman
Might wanna look into basic OpenGL tutorials (many of them will explain
this), and then its only very small changes to switch to OpenGL ES.

On Fri, Sep 25, 2009 at 9:14 AM, androidDeveloper stepmas...@googlemail.com
 wrote:


 Anyone know how to draw a 3D-sphere with OpenGL ES in android?

 Thanks!
 


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



[android-developers] how to read trace file

2009-09-25 Thread Eddified

Sometimes in LogCat I'll see
Wrote stack trace to '/data/anr/traces.txt'

But when using the DDMS perspective, File Explorer View, I can't see
anything in the data directory, I'm assuming because permission
denied. Is there a way (short of rooting my ion device) to read what's
in that text file?

Is there perhaps an android app for developers that will show the
contents of the file? It would seem there would have to be some way of
reading the file without rooting the device, otherwise why does the
o.s. write it out?

How can I read this file?

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



[android-developers] android 1.5 and 1.6 versions of SDK sitting side by side...

2009-09-25 Thread sdphil

i read the migration notes for 1.6 and I could not tell if 1.5 and 1.6
can co-exist side by side.

i need to build applications for both 1.5 and 1.6, and i only have one
build machine.

other than changing my PATH variable, are there any other gotchas?
especially for an automated build process which will need to build
images for both platforms.

also, i am a bit concerned about updating the ADT plugin.  if I do
that (update the ADT plugin), will that screw up my development on/for
1.5?

tia.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Soft Keyboard

2009-09-25 Thread Eric Carman

Tauno and everyone else, thank you for your responses here.

Tauno, I have to agree with you that while long-press menu is not
intuitively obvious, it appears to be a standard means of bringing up
the soft keyboard (when it works) and said standard should be
maintained.

After all, it would seem to me that this type of operation is provided
at the OS level and the applications should not be required to provide
their own buttons, etc. to force the thing up when it has been closed
by the user or otherwise not automatically provided. And while long-
press menu may be an ugly way to implement this feature, it has the
benefit of precedence - it was the means provided for first in
Android.

So, I think we can conclude that the Hero implementation of Android is
broken, deliberately or otherwise isn't important. The question then
is, what is a user to do on a phone that is running an Android app and
has no means to bring up the soft keyboard? So far, they've chosen to
complain about the app on the market. Which is unfortunate, because
the Android 1.1 app can't force the keyboard if it wanted to.

Now that the OS fails to provide for this functionality consistently,
it falls on the app to provide it - in my case, leaving any users of
the older OS without an update path until their service providers
provide updates. Maybe that isn't an issue, but I have no way of
knowing. I'm also not convinced that relying on an OS feature (which
hasn't been deprecated as far as I can tell) constitutes a bad UI
design.

Tauno also makes an excellent point about consistency where multiple
apps now have to implement workarounds via buttons (which eat up a lot
of screen real estate), menus (which may be full of other app specific
options, now forcing them to a more list), and graphic consistency.
Its ashamed. I would have hoped that the Android OS, when implemented
on a new device might have a set of minimum standards that they comply
with - even if it is on a voluntary basis that might earn them a
certification or something - just spit-balling here.

I really like the fact that Android has the ability to have different
input methods, that developers can build their own for general use or
specifically for use with their app. This flexibility is great and
will certainly help the OS to adapt to a number of new platforms.
However, with great power comes great responsibility. The OS needs to
make this flexibility transparent to the app. The app shouldn't care
if the input comes from a physical keyboard, a soft keyboard, a
bluetooth keyboard, or some futuristic neural implant. It should just
recognize that some key has been pressed and deal with it. Likewise,
this flexibility requires that the OS provide the means to determine
the input method by default (of course the app can override).

Any hope the Hero will be fixed - assuming the Hero implementation is
even considered broken by the vendor? What other surprises are we in
store for with the other new phones that will be released? Has anyone
seen anything resembling a consistent way for an application to handle
this in the wild?

Again, thank you for the continued discussion.

Also, I hope this doesn't sound like a rant, but rather a brain-dump -
for what its worth.

Best Regards,
Eric


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



[android-developers] Re: how to read trace file

2009-09-25 Thread Dianne Hackborn
adb shell cat /data/anr/traces.txt

On Fri, Sep 25, 2009 at 9:21 AM, Eddified eddie.bis...@gmail.com wrote:


 Sometimes in LogCat I'll see
 Wrote stack trace to '/data/anr/traces.txt'

 But when using the DDMS perspective, File Explorer View, I can't see
 anything in the data directory, I'm assuming because permission
 denied. Is there a way (short of rooting my ion device) to read what's
 in that text file?

 Is there perhaps an android app for developers that will show the
 contents of the file? It would seem there would have to be some way of
 reading the file without rooting the device, otherwise why does the
 o.s. write it out?

 How can I read this file?

 



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

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

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



[android-developers] Re: ACTION_NEW_OUTGOING_CALL, abort

2009-09-25 Thread Dianne Hackborn
Er the documentation right above and below what you quoted talks about
canceling calls:

Once the broadcast is finished, the resultData is used as the actual number
to call. If null, no call will be placed.
...

For consistency, any receiver whose purpose is to prohibit phone calls
should have a priority of 0, to ensure it will see the final phone number to
be dialed. Any receiver whose purpose is to rewrite phone numbers to be
called should have a positive priority. Negative priorities are reserved for
the system for this broadcast; using them may cause problems.


On Fri, Sep 25, 2009 at 4:03 AM, Lee lee.wil...@googlemail.com wrote:


 Hello,

 I'm interested in selectively blocking phone calls. In the docs on
 this intent I see:

 ...for example, a parental control application might verify that the
 user is authorized to place the call at that time,
 ...
 Any BroadcastReceiver receiving this Intent *must not* abort the
 broadcast.

 Blocking calls using this method seems to work fine, are there ill-
 effects to be expected ?

 And if you don't abort the broadcast, what action is the parental
 control  application mentioned first supposed  to take ?

 Thanks for any hints,

 Lee
 



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

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

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



[android-developers] Re: 3D Primitives in opengl ES (sphere)

2009-09-25 Thread Nightwolf

Take a look at demo apps from SDK. Some of them draw a cube. You need
to do similar thing to display a sphere. AFAIK there is no way to draw
3D sphere using some single command. You need to generate vertices,
put them in vertex buffer and call DrawArrays or DrawElements
function.

On Sep 25, 5:14 pm, androidDeveloper stepmas...@googlemail.com
wrote:
 Anyone know how to draw a 3D-sphere with OpenGL ES in android?

 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] Device bug: Data SMS not received on Samsung Galaxy

2009-09-25 Thread whitemice

Background:A code contained in a Data SMS is required to authenticate
the MSISDN of the device running our product.

Bug: When I receive a data SMS on the Samsung Galaxy, the Intent
“android.intent.action.DATA_SMS_RECEIVED” is not thrown and the Data
SMS arrives in the Inbox as a blank text message.  Any data contained
in the Data SMS seems to be lost once it arrives in the Inbox.

I have filed this bug here:
http://code.google.com/p/android/issues/detail?id=4018

I have made a little app to test this functionality.  It detects the
MSISDN (not working on many devices) or lets you enter it, and then
send either a Data SMS or a Text Message.  The app will then display
any incoming Data or Text SMSs by the intent they throw and allow you
to interrogate the native Inbox to determine what data was saved.
http://tinyurl.com/y8jspgv  -- Info
http://tinyurl.com/yannsxb -- ZIP source + APK

Is there any known workaround for this situation?
Regards
Mark

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



[android-developers] Re: how to read trace file

2009-09-25 Thread Eddified

Works. Thanks.

On Sep 25, 10:49 am, Dianne Hackborn hack...@android.com wrote:
 adb shell cat /data/anr/traces.txt



 On Fri, Sep 25, 2009 at 9:21 AM, Eddified eddie.bis...@gmail.com wrote:

  Sometimes in LogCat I'll see
  Wrote stack trace to '/data/anr/traces.txt'

  But when using the DDMS perspective, File Explorer View, I can't see
  anything in the data directory, I'm assuming because permission
  denied. Is there a way (short of rooting my ion device) to read what's
  in that text file?

  Is there perhaps an android app for developers that will show the
  contents of the file? It would seem there would have to be some way of
  reading the file without rooting the device, otherwise why does the
  o.s. write it out?

  How can I read this file?

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

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



[android-developers] Re: 关于eclips e和ADT的问题

2009-09-25 Thread ms99 ster
确实是eclipse版本的问题,因为家里网速的原因,我没有条件换eclipse版本,只好又弄了半天。

这之前我又发了一封邮件求助是不是eclipse版本的问题,请忽略

对于ADT不能直接把feture和plugin目录拷过来使用,不能用的原因我也不知道,但是使用eclipse在线更新却可以成功更新到0.9.3。


Thanks Muchly


2009/9/25 James Wang jameswangc...@gmail.com

 Hi,
 I think you should ask question in English. This is a English Group.

 我首先怀疑你的Eclipse的版本。你最好使用Galileo,或者比Galileo低一个版本的。

 因为我在这两个版本上使用0.9.3都没有问题。

 0.8的确实不能用在1.5r3上。

 On Sep 24, 11:48 pm, ms99 ster ms99s...@gmail.com wrote:
  各位:
 
 
 今天解压了eclipse以后添加ADT0.9.1,结果却不能用,创建project的菜单里边不能创建android的project,只好又找到0.8.0的也放了进去才可以。
 还有,performance-- android众SDK
  Location选择android-sdk-windows-1.5_r3提示Could not find D:\Program
  Files\ec...dk-windows-1.5_r3\tools\aapt.exe!
是不是ADT和SDK升级时候都必须有老的版本才行?
 
  Thanks Muchly
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: You must supply a resource ID for a TextView

2009-09-25 Thread Wouter

On 25 sep, 16:57, Marco Nelissen marc...@android.com wrote:
 So there's your problem then, probably. The adapter expects each item
 to have the same items, so that it can assign the fields from your
 Cursor to the corresponding items in your list item layout. In other
 words, if your normal list item contains items with IDs A, B and C,
 them your section list items should also have items with IDs A, B
 and C, and those items should have the same type in both layouts as
 well.

So if i understand this good if have to use the same layout file for
my header file (that only needs a TextView) and my list item (with
much more information and many TextViews and a ImageView).

My list_header.xml file is like this:

?xml version=1.0 encoding=UTF-8?
 TextView

 xmlns:android=http://schemas.android.com/apk/res/android;
 android:id=@+id/list_header_title
 android:layout_width=fill_parent
 android:layout_height=wrap_content
 android:text=header
 android:textColor=#FF
 android:gravity=center_vertical|left
android:paddingLeft=20dip

  android:background=@drawable/settings_header
 android:textAppearance=?android:attr/textAppearanceSmall
 /

I use this to set up a text for my heade. I use the
seperatedlistadapter from here:
http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/

In your case, it looks like you have a TextView with a given ID
 in one layout, whereas in the other layout that same ID is either used
 for something that is not a TextView, or isn't present at all.

And I don't have a textview with the same ID.

 If you need some of the items in your list to be different between
 your normal and section layouts, then you should override bindView
 and handle that in there.

And how can i do that? I now use getView to make my list items in my
custom adapter and i only do this for my seperatedlistadapter:

adapter.addSection(parsed, new cinemaAdapter(this,
R.layout.list_header, cinema));

How can i use BindView then? I will give you my source code if you
want!

 On Thu, Sep 24, 2009 at 11:06 PM, Wouter wouterg...@gmail.com wrote:

  Np the headers are using a separate layout file..

  On 25 sep, 00:04, Marco Nelissen marc...@android.com wrote:
  On Thu, Sep 24, 2009 at 2:12 PM, Wouter wouterg...@gmail.com wrote:

   On 24 sep, 22:53, Marco Nelissen marc...@android.com wrote:
   On Thu, Sep 24, 2009 at 1:41 PM, Wouter wouterg...@gmail.com wrote:

I have no problem with the data mapping and TextViews.

   The stack trace and crash you're seeing indicate otherwise.
   Unless you're doing something specific in bindView, the adapter
   expects each list item layout to be the same. You are overriding
   getView and returning different kinds of views, so I would take
   another look at that, and make sure that those two kinds of views are
   compatible.

   Each list item layout is the same. it uses R.layout.cinema_row!
   The weird is it makes my list with headers (when i use
   seperatedlistadapter) and when i scroll down, it crashes and gives
   this error.
   Really will take a look at it, if not i will put my source code here!

It fully works
when i don't use a seperatedList adapter..
So there is problem with this seperatedListAdapter..
Is there another way i can use to divide my list in sections with
headers?

   I don't know what effect you're trying to achieve, but in general you
   can override bindView and/or getView to make each item look exactly
   the way you want.

   I have a list of movies with a release date. all the movies with same
   date has to be listed under a header with date.. And every list item
   has same layout, really don't get it :(

  Every list item, including the header items? In other words: do your
  header items use the same layout as your other list items?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: 关于eclips e和ADT的问题

2009-09-25 Thread ms99 ster
Hi, James
Sorry for my mistake.
I don't think I can describe my question carefully in english,
but I'll try next time.


Thanks Muchly


2009/9/25 James Wang jameswangc...@gmail.com

 Hi,
 I think you should ask question in English. This is a English Group.

 我首先怀疑你的Eclipse的版本。你最好使用Galileo,或者比Galileo低一个版本的。

 因为我在这两个版本上使用0.9.3都没有问题。

 0.8的确实不能用在1.5r3上。

 On Sep 24, 11:48 pm, ms99 ster ms99s...@gmail.com wrote:
  各位:
 
 
 今天解压了eclipse以后添加ADT0.9.1,结果却不能用,创建project的菜单里边不能创建android的project,只好又找到0.8.0的也放了进去才可以。
 还有,performance-- android众SDK
  Location选择android-sdk-windows-1.5_r3提示Could not find D:\Program
  Files\ec...dk-windows-1.5_r3\tools\aapt.exe!
是不是ADT和SDK升级时候都必须有老的版本才行?
 
  Thanks Muchly
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ADT对eclips e的要求

2009-09-25 Thread ms99 ster
Please ignore this mail.

Best Regards




2009/9/25 ms99 ster ms99s...@gmail.com

 各位:

 我昨天还在郁闷为什么9.0的ADT不可用,以为是我的文件坏了,但是我今天从新拷贝了一份回来还是不行,原来是eclipse版本的问题,我的eclipse版本是Eclipse
 SDK  Version: 3.4.0,文档说3.3或者更新的版本就可以啊?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Home Screen Detection

2009-09-25 Thread Hong
Thanks!

It works great!  The best ADC II entry I've seen so far :)

On Thu, Sep 24, 2009 at 4:50 PM, GodsMoon godsm...@gmail.com wrote:


 Hong,
 I hope you like it.

 If you have any issues please email me :)



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Notification of SMS messages: android.provider.Telephony.SMS_RECEIVED

2009-09-25 Thread Tom Gibara
I have an application that registers a BroadcastReceiver for Intents
actioned android.provider.Telephony.SMS_RECEIVED. I'm, aware that this was
removed from the documentation between 0.9 and 1.0, though it has continued
to function since.
I've never been totally clear about the status of this Intent. Something
that adds to my confusion is that there is a permission called RECEIVE_SMS
which is even used as an example in the security documentation:

For example, an application that needs to monitor incoming SMS messages
would specify:

manifest xmlns:android=http://schemas.android.com/apk/res/android;
package=com.android.app.myapp 

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

/manifest

taken from http://developer.android.com/guide/topics/security/security.html

This broadcast is extremely useful for applications (and if it was removed,
I'd hope that it was replaced by something equivalent) but I dislike being
dependent upon it without knowing its future. Can anyone provide any
clarifications on its current or future status?

Tom

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ACTION_NEW_OUTGOING_CALL, abort

2009-09-25 Thread Lee

Don't know how I missed that, sorry for wasting your time.

Lee

On Sep 25, 5:52 pm, Dianne Hackborn hack...@android.com wrote:
 Er the documentation right above and below what you quoted talks about
 canceling calls:

 Once the broadcast is finished, the resultData is used as the actual number
 to call. If null, no call will be placed.
 ...

 For consistency, any receiver whose purpose is to prohibit phone calls
 should have a priority of 0, to ensure it will see the final phone number to
 be dialed. Any receiver whose purpose is to rewrite phone numbers to be
 called should have a positive priority. Negative priorities are reserved for
 the system for this broadcast; using them may cause problems.



 On Fri, Sep 25, 2009 at 4:03 AM, Lee lee.wil...@googlemail.com wrote:

  Hello,

  I'm interested in selectively blocking phone calls. In the docs on
  this intent I see:

  ...for example, a parental control application might verify that the
  user is authorized to place the call at that time,
  ...
  Any BroadcastReceiver receiving this Intent *must not* abort the
  broadcast.

  Blocking calls using this method seems to work fine, are there ill-
  effects to be expected ?

  And if you don't abort the broadcast, what action is the parental
  control  application mentioned first supposed  to take ?

  Thanks for any hints,

  Lee

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

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



[android-developers] Re: Peer-to-peer phone application?

2009-09-25 Thread Roman ( T-Mobile USA)

Right now there is no real P2P possible on Android using the
official SDK APIs.

In case of Wifi there is no support of Ad-Hoc. You could try to use a
multicast approach where you try first to discover which devices are
in the WLAN. Problem with multicast/broadcast on Wifi is that your
network performance gets impacted very fast when you add the number of
clients in the network. Also the type of traffic in the WLAN
influences the throughput.

If you think about using a central server then I would not all your
setup P2P anymore.

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.


On Sep 24, 4:48 pm, Dan Sherman impact...@gmail.com wrote:
 Put a server between them, and have each of them talk to the server.

 NAT punchthrough and such isn't easy, and to be honest, with a game, you
 want some sort of central system to make sure everything is legit
 (anti-cheating) :)

 - Dan

 On Thu, Sep 24, 2009 at 5:21 PM, Silver sunsilverdra...@gmail.com wrote:

  Hello all,

  I'm with a group of college students making a multiplayer game as a
  class project on the Android platform for the G1. Our primary goal is
  to allow multiple phones (or for the sake of initial testing, a phone
  and an emulator on a PC) to communicate with one another. Our game is
  turn based, and we've been looking into TCP/IP and VNC proxy servers
  to transfer data between the game clients on each phone, but none of
  them seem particularly simple to implement. We've been through many
  articles documenting how difficult peer-to-peer connections are on the
  Android platform.

  What would some viable network protocols to use for the sake of our
  project and how should we go about setting them up?

  Thanks,
  S


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Computational cost of calling getReadableDatabase or getWriteableDatabase?

2009-09-25 Thread Agus
I am doing a batch insert for N items and I have to call
getWriteableDatabase method N times in my dbhelper method.
and I find that the insertion time is slow takes  ~9 secs for 50 rows with
~10 columns.
How to improve the speed of a batch insertion, or maybe calling
getWritebableDatabase is an expensive operation time-wise?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] G1 crashing BatteryStatsImpl.writeLocked() OOM

2009-09-25 Thread rflexor

Hi,

I'm currently looking into an error that has been haunting my device
for some days now. Today I was able to get a stacktrace. Symptom: G1
reboots seemingly intermittently without further notices in the middle
of anything (or nothing) I'm doing at that time.

09-25 09:07:15.567: DEBUG/dalvikvm(406): GC freed 19553 objects /
1006480 bytes in 463ms
09-25 09:07:15.567: INFO/dalvikvm-heap(406): Forcing collection of
SoftReferences for 1579296-byte allocation
09-25 09:07:15.938: DEBUG/dalvikvm(406): GC freed 1889 objects / 87040
bytes in 372ms
09-25 09:07:15.947: ERROR/dalvikvm-heap(406): Out of memory on a
1579296-byte allocation.
09-25 09:07:15.947: INFO/dalvikvm(406): ProcessStats prio=5 tid=17
RUNNABLE
09-25 09:07:15.947: INFO/dalvikvm(406):   | group=main sCount=0
dsCount=0 s=0 obj=0x43956658
09-25 09:07:15.947: INFO/dalvikvm(406):   | sysTid=416 nice=0
sched=0/0 handle=1315504
09-25 09:07:15.947: INFO/dalvikvm(406):   at android.os.Parcel.marshall
(Native Method)
09-25 09:07:15.977: INFO/dalvikvm(406):   at
com.android.internal.os.BatteryStatsImpl.writeLocked
(BatteryStatsImpl.java:2175)
09-25 09:07:16.007: INFO/dalvikvm(406):   at
com.android.server.am.ActivityManagerService.updateCpuStatsNow
(ActivityManagerService.java:1421)
09-25 09:07:16.007: INFO/dalvikvm(406):   at
com.android.server.am.ActivityManagerService$3.run
(ActivityManagerService.java:1331)
09-25 09:07:16.027: WARN/dalvikvm(406): threadid=17: thread exiting
with uncaught exception (group=0x4000fe70)
09-25 09:07:16.027: ERROR/AndroidRuntime(406): Uncaught handler:
thread ProcessStats exiting due to uncaught exception
09-25 09:07:16.027: ERROR/AndroidRuntime(406): *** EXCEPTION IN SYSTEM
PROCESS.  System will crash.
09-25 09:07:16.037: ERROR/AndroidRuntime(406):
java.lang.OutOfMemoryError
09-25 09:07:16.037: ERROR/AndroidRuntime(406): at
android.os.Parcel.marshall(Native Method)
09-25 09:07:16.037: ERROR/AndroidRuntime(406): at
com.android.internal.os.BatteryStatsImpl.writeLocked
(BatteryStatsImpl.java:2175)
09-25 09:07:16.037: ERROR/AndroidRuntime(406): at
com.android.server.am.ActivityManagerService.updateCpuStatsNow
(ActivityManagerService.java:1421)
09-25 09:07:16.037: ERROR/AndroidRuntime(406): at
com.android.server.am.ActivityManagerService$3.run
(ActivityManagerService.java:1331)
09-25 09:07:16.337: INFO/Process(406): Sending signal. PID: 406 SIG:

Has anyone ever seen something like this? I think it's strange that
the OS tries to alloc 1579296 bytes for a status-update parcel ...

Thanks   rflexor

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



[android-developers] Re: Problem to count number of days between Two dates...

2009-09-25 Thread Benjamin

Instead of calculating the difference based on the date (month-day-
year) you could calculate it by the difference of the time since
1.1.1970. You would use getTime() on both, then get the difference
between them. Then you can divide this by 86.400.000 (which is the
milliseconds in a day) to get the exact number of days between the two
dates.

Best regards,
Benjamin

On Sep 25, 5:45 am, ragavendran s sraghav.ra...@gmail.com wrote:
 I want to calculate the difference between two Dates..Can anybody tell
 how to calculate the difference between two days

 Here is my Codeit Displays Calendar and it displays the Local Time
 Zone

 Thanks in Advance...

 With regards,

 Raghav.S

 public class datedisplay extends Activity {
     private TextView mDateDisplay,dis;
     private Button mPickDate;

     private int mYear;
     private int mMonth;
     private int mDay;
     private float days;

    private long diff;
     static final int DATE_DIALOG_ID = 0;

     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.main);

         // capture our View elements
         mDateDisplay = (TextView) findViewById(R.id.dateDisplay);
         mPickDate = (Button) findViewById(R.id.pickDate);
         dis = (TextView) findViewById(R.id.dis);
         // add a click listener to the button
         mPickDate.setOnClickListener(new View.OnClickListener() {
             public void onClick(View v) {
                 showDialog(DATE_DIALOG_ID);
             }
         });

         // get the current date
         final Calendar c = Calendar.getInstance();
         final Calendar c1=Calendar.getInstance();

         mYear = c.get(Calendar.YEAR);
         mMonth = c.get(Calendar.MONTH);
         mDay = c.get(Calendar.DAY_OF_MONTH);

         // display the current date
         updateDisplay();
     }
     @Override
     protected Dialog onCreateDialog(int id) {
         switch (id) {
         case DATE_DIALOG_ID:
             return new DatePickerDialog(this,mDateSetListener,mYear, mMonth,
 mDay);
         }
         return null;
     }
     private DatePickerDialog.OnDateSetListener mDateSetListener =
         new DatePickerDialog.OnDateSetListener() {

             public void onDateSet(DatePicker view, int year,
                                   int monthOfYear, int dayOfMonth) {
                 mYear = year;
                 mMonth = monthOfYear;
                 mDay = dayOfMonth;
                 updateDisplay();

             }
         };

         private void updateDisplay() {

             mDateDisplay.setText(
                 new StringBuilder()
                         // Month is 0 based so add 1
                         .append(mMonth + 1).append(-)
                         .append(mDay).append(-)
                 .append(mYear).append( ));

         }

 }



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Issue with adapter redrawing when GridView Item

2009-09-25 Thread Jeffrey

I'm working on a program that generates dice, lots of dice. I finally
found out how to make an adapter to display an image dynamically, but
now I have a new problem. The dice that are generated/displayed by the
Adapter change if they scroll off the screen. Basically every time
each die image moves into view it is re-randomizing what die it needs
to show. I also need it to log the die results to a separate file, but
I don't know where to stick that code, seeing as it would add dice to
the list every time a die is re-drawn.  This is my current code:


public View getView(int position, View convertView, ViewGroup parent)
{
ImageView imageView;
if (convertView == null) {
imageView = new ImageView(mContext);
imageView.setLayoutParams(new GridView.LayoutParams(75,
75));
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
imageView.setPadding(1, 1, 1, 1);
} else {
imageView = (ImageView) convertView;
}
Random RollDie = new Random();
Die1 = RollDie.nextInt(6);
Die1Copy = Die1;
if(((Die1Copy += QuickShoot.BSFinal)  6)) {
Die1 += 6;
}
imageView.setImageResource(DieResult[Die1]);
return imageView;
}
// references to our images
private Integer[] DieResult = {
R.drawable.die1, R.drawable.die2,
R.drawable.die3, R.drawable.die4,
R.drawable.die5, R.drawable.die6,
R.drawable.die1under, R.drawable.die2under,
R.drawable.die3under, R.drawable.die4under,
R.drawable.die5under, R.drawable.die6under
};
}

If anyone knows how I can make it generate a Die for a set position
and then not redraw please let me know you will save my life!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Clickable URLs in EditText when using ArrowKeyMovementMethod

2009-09-25 Thread Abhilash

Is there a way to make URLs in a EditText clickable when the
MovementMethod is set to ArrowKeyMovementMethod?

~Abhilash

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Inertial Sensor on HTC Hero

2009-09-25 Thread LVMH

Hello,

I am trying to develop an indoor inertial navigation system on the HTC
hero with the built-in accelerometer and digital compass.

As far as I know about hardware, the accelerometer chip is the Bosch
Sensortec's 3-axis BMA150 and the digital compass is Asahi Kasei's
AK8973 (similar to iPhone). I am not sure about the accuracy of each
sensor but the digital compass seems to function fairly well in the
iPhone.

What I am doing is getting accelerometer samples and magnetic field
samples at the SENSOR_DELAY_FASTEST (seems to me around 10 - 20 ms per
sample)

Then I creates a threshold of ±1 m/s^2 for every output of
accelerometer to filter out which sample is gravity (9.807f). The same
is applied for output from the digital compass (with threshold of ± 5
microtesla). I intended to use this filter to provide the correct
gravity and geomagnetic field for the SensorManager.getRotationMatrix
to work correctly (I am not sure if this method would actual provide
better result).

From the rotation matrix created above, I simply use getOrientation to
get the heading (north) and convert the output from the accelerometer
from the device coordination system to the Earth's coordination system
by multiplying to the rotation matrix.

** My question **
The result I am getting is completely not usable. It seems that the
heading is very inaccurate thus making the rotation matrix
inaccurate.
Even when I applied kalman filter, the result is still far from being
usable.
I wonder if anyone has approached this problem before and if there is
some better way to do it.

Thanks,
lvmh

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Adding Components Programmatically

2009-09-25 Thread Safy

Hi,

  I am new to Android development. I have been searching google to add
multiple components to a View programmatically .i.e add TextField,
Button, etc one below the other.


I could only find examples where they have used XML to design the UI.
If i want to add the components programmatically how can I do that or
I will have design the UI only using the XML.



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] Toronto Android Users Group

2009-09-25 Thread Simon Chang

Hi all,

I'm organizing a community of Toronto software developers/vendors
interested in building mobile apps with the Android platform ... Check
this out ...

http://www.torontoandroid.org/

The group provide a place where Android developers connect with each
others, share knowledge and learn from others. Embrace and make
contributions to the open source community.

Meetings are fun and technical, with presentations done by Android
gurus, open discussions and demos. The purpose is to provide you ...
the Android enthusiast ... a place to learn more about the technology,
ask questions and meet other people.

Simon

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] EditText.onKeyUp() doesn't catch all keys

2009-09-25 Thread CG

Dear all,

I'm writing a little dictionary application for Android 1.5, and I'd
like to catch the user's keystrokes in an EditText instance. The
following code recognizes all keys, which are typed in in the Android
emulator:

  new EditText(this) {
@Override
public boolean onKeyUp(final int key, final KeyEvent event) {
  Log.i(Key:, Integer.toString(key));
}
  };

..which is fine! But I open and use the soft keyboard, most input
(except for e.g. the ENTER key) is ignored. Could anyone tell me
what's the best/easiest way to identify and process these user inputs?

Thanks for your attention,
Christian


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: wifi RA certificate issue

2009-09-25 Thread Alex Danvy

I really can't understand how it works, if it works, myself. It's
disappointing.

Alex

On Sep 9, 7:40 pm, Adam a.scier...@gmail.com wrote:
 hi all,
 Have you notice that user is not able to importWIFIRAcertificatetoandroid. 
 i'm using HTC Hero and i was really surprised when i failed
 to add newcertificateto mywificonnection.  it is possible even on
 symbian so... you can edit advanced settings and then select add 
 newcertificate, but than nothing happens like there would be only todo
 comment block in code... I hope somebody will fix it because i don't
 want to root my phone in order to have this functionality available.

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



[android-developers] How to run GPS based application (WikiTude) in Android SDK Emulator?

2009-09-25 Thread raghavendra k

Hi All,

Currently I am writing an Android application which uses 
WikiTude
API. I installed the WikiTude browser application in the Android SDK
emulator from Android Market (To get Android Market in emulator I
followed this link 
http://forum.xda-developers.com/archive/index.php/t-529170.html).

When I run the WikiTude browser application in emulator it asks 
me
to set location settings. I enabled “Enable GPS satellites” option 
run the application, again it make an alert for location settings. I
am not able to run this application. Please help me.

Can anyone tell me is it possible to run GPS based application 
in
Android Emulator? Or not?

  If it is, Is there any work around to run
GPS based application in emulator?

   Any help will be greatly appreciated…

   Thanks in Advance……..
Raghavendra K

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] notify on incoming email

2009-09-25 Thread Nemat

Hi frndz.

Is it possible in Android to get notified when an email comes into the
inbox?

or we can say is there any interception on incoming email in Android?

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



[android-developers] how to modify emulator launcher main screen?

2009-09-25 Thread Ashwini

hi,

   when emulator launcher is launched, it launches with default first
launcher screen. I want to change that to some other screen. how to do
it?

I checked apps/Launcher/src/com/android/launcher/Launcher.java.
I think i change setContentView(R.layout.launcher) to my xml file(i.e
setContentView(R.layout.trailpg) ) but where to copy my trailpg.xml
file. I checked in Launcher/res folder( in layout or layout-land or
layout-port).

whether above analysis is correct? if yes where to put the file.

plz provide me soln to modify the emulator launcher main screen

regards,
Ashwini

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] FILL_AND_STROKE does not seem to work with rectangles!

2009-09-25 Thread Keith

I haven't posted this as a bug because it is so basic I can only think
that there must be something that I am missing.

Basically the FILL_AND_STROKE style is not respected for rectangles.

Steps to reproduce:
0. Using Cupcake 1.5 (android-sdk-mac_x86-1.5_r3) (problem occurs on
emulator and on Android G1 dev phone)
1. Create a custom view, extending/deriving from View.
2. Create an onDraw method like the following code.

@Override
protected void onDraw(final Canvas canvas)
{
super.onDraw(canvas);

final Paint paint = new Paint();
paint.setAntiAlias(true);
paint.setColor(android.graphics.Color.BLUE);
paint.setStyle(Paint.Style.FILL_AND_STROKE);
canvas.drawRect(0, 0, 100, 100, paint);
canvas.drawCircle(110 + 50, 110 + 50, 50, paint);
}

What you will see is a rectangle that is stroked but NOT filled and a
circle that is stroked AND filled appropriately.

Since this is a basic drawing operation I can only surmise that there
must be an additional step to drawing rectangles that is not
documented. I cannot seem to find any reference to this problem as an
open issue or posted anywhere.

So would someone mind pointing me at the problem? Or is it a bug that
has just somehow slipped through?

Thanks in advance for your response,

Keith

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ProgressDialog doesnt show when called...?

2009-09-25 Thread Daniele Baroncelli

 i put up the progress dialog in the onPreExecute(). the activity can
 then just call execute(), and is otherwise decoupled from the task
 entirely.

 i do all my HTTP stuff this way.


I am definitely missing somethings, as I don't understand how I can
show the progress dialog in the onPreExecute()

1) if the progress dialog is passed as a parameter to the asynctask:
how can you access that parameter from the preExecute?
as far as I understood you can access the parameters only from the
doInBackground() method

2) if the progress dialof is instantiated in the onPreExecute():
which value did you use for the context parameter required in the
costructor ProgressDialog(Context) ?

I'll be very glad to anyone who would clear these doubts out

Cheers

Daniele

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



[android-developers] How to use the sample projects

2009-09-25 Thread benbenbenben

Hello,

How can I use the Sample projects of Android in my project?

Do I need to import the Sample project (as library) and then extend an
Activity from the Sample project in my project? Or do I need to copy
the code I need into the project?

Thanks in advance!

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



[android-developers] Re: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-25 Thread g...@garethmurfin.co.uk

Hey guys, nice thread. I submitted Sonorox a musical toy for
Android. You can view the trailer for it here 
http://www.youtube.com/watch?v=H9SHxsUKfVc
and also the official website here: http://www.alphasoftware.org/sonorox/

I coded all of the site and Android stuff and really enjoyed working
with Android, well mostly, the sound stuff was a bit of a pain :-)

Gaz

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



[android-developers] Is Android able to connect to WPA Enterprise Wi-Fi networks ?

2009-09-25 Thread Alex Danvy

A Wi-Fi device running Android looks like being able to connect to a
secured Wi-Fi access point using WEP, WPA, etc.
I actually can't figure how to setup a WPA Enterprise secured Wi-Fi
connection wich requires a certificate.
I can't find a way to import a security certificate.
I went to Settings app, Wireless controls menu, Wi-Fi settings
menu, clicked the Advanced menu,
Security certificates menu, clicked Add certificates menu to get
an empty list.
I tried to put the .cer file on the SD card but the list is still
empty.
Does someone have any idea ?

Alex

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Multiple Framebuffer devices(dynamically change) support for Surfaceflinger.

2009-09-25 Thread Pankaj

Hi Dianne,

We have hardware acceleration support and that supports multiple frame
buffer device display ( as we have tested it with driver test
application). but how to fit that into SurfaceFlinger is the issue.
As per our study and understanding of SurfaceFlinger we have done few
changes as below:
1: Instead of mGraphicsPlane, take array of GraphicsPlane,
mGraphicsPlane[2] //for 2 displays fb0 and fb1
2: First Initialize main display DisplayHardware by passing dpy as 0
(Modified the constructor of the Display Hardware), then secondary
DisplayHardware by passing dpy as 1.
3: From init of DisplayHardware pass dpy to EGLDisplaySurface's
mapFrameBuffer and based on dpy value open /dev/graphics/fb0 or fb1.
4: Add a new interface API to the surfaceflinger so that secondary
display could be initilized as and when required.
5: Modified the threadLoop so that each of the APIs handlePageFlip(),
handleRepaint(), unlock Clients() will be called for both displays
dpy-0 and dpy-1.

There are following issues that I am not that much clear.
1: Does we need to modify the OpenGL|ES initialization based on the
DisplayId (dpy) or it will remain same for both display?
2: Does any chnage in the libagl is required for support of multiple
frame buffer support?
3: We have kept the mWormHoleRegion separate for both GrpahicsPlane (0
and 1), so whether we require to maintain different mDirtyRegion and
mInvalidate region for both GrpahicsPlane?
4: How the Layer created on different grphics plane will be composed
to display on the same physical screen?

It will be nice if you can focus some more light on the above issues.

Thanks and Regards,
Pankaj Dubey

On Sep 16, 1:34 am, Dianne Hackborn hack...@android.com wrote:
 Hi, these kinds of questions should be posted to android-porting.

 And I think you are looking at a pretty serious change, especially if you
 intend to have a production quality result that supports hardware
 acceleration.

 On Mon, Sep 14, 2009 at 10:52 PM, Robin Gujjar robin.guj...@gmail.comwrote:



  Hi All,

  As suface flinger uses fb0 for rendering the image and video. i want
  to change the frame buffer devices dynamically for rendering the image
  on the screen one time on Fb0 other time on Fb1. i am looking into the
  surface flinger code. but we are not able to get the pointer where to
  change for this. can simeone please give us some pointer.

  thanks

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

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

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



[android-developers] Re: ADT Eclipse Plugin: Can't install - No Repository Found

2009-09-25 Thread Sudheesh J

I faced similar issue with the ADT plugin integration with Eclipse 3.5
for Java (Galileo), behind a very restrictive proxy.
The eclipse proxy configuration also didn't help to resolve the issue.

Then I followed
 http://developer.android.com/sdk/1.6_r1/installing.html#Troubleshooting,
i.e, manually downloaded the plug in and configured it without any
issues.

Later, I tried the first method (direct update from eclipse) from a
direct connection, which was successful.

I have not tried it on Eclipse classic, but till now, I don't see any
reason why I should.

regards,
Sudheesh

On Sep 25, 4:49 am, David Rea d...@daverea.com wrote:
 Update: Turns out, the ADK doesn't play nice with Eclipse for Java
 Developers. Works great on Eclipse Classic.

 Posting this for anyone else who might be Googling in search of a solution
 for this issue, as I haven't seen this distinction mentioned in any other
 threads.

 Regards,
 Dave

 On Thu, Sep 24, 2009 at 7:13 PM, David Rea d...@daverea.com wrote:
  Hi All-

  I'm having a lot of difficulty installing the ADT plug in under
  Eclipse 3.5 (Galileo)... I have tried both http and https access to
  the Eclipse update site, and in both cases I get the following errors:

  An error occurred while collecting items to be installed:
  No repository found containing: binary,org.eclipse.jdt_root,
  3.5.1.r351_v20090810-0600-7r88FEoFI0WTo6Az-1qFRHm37ChJ
  (second line repeated about 20x for various missing files)

  I found a post (http://tinyurl.com/yc2cr28) where removing/re-adding
  the source URL in Eclipse is also recommended. This didn't help the
  No repository found errors.

  Has anyone else experienced/resolved this issue? I am running the
  Eclipse for Java Developers from Eclipse.org, and the Sun Java 5
  JDK.

  Thanks,
  Dave

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Adding Components Programmatically

2009-09-25 Thread Mark Murphy

   I am new to Android development. I have been searching google to add
 multiple components to a View programmatically .i.e add TextField,
 Button, etc one below the other.

 I could only find examples where they have used XML to design the UI.
 If i want to add the components programmatically how can I do that or
 I will have design the UI only using the XML.

Use normal constructors (e.g., new TextView(this);) and add them manually
to their containers (layout.add(textview, params);).

Bear in mind that if you do this, you will have much work in front of you
to handle:

-- screen rotations (portrait versus landscape)
-- multiple screen dimensions (QVGA, HVGA, WVGA)
-- multiple screen sizes (3, 3.5, 5)

The layout framework was designed to make it easier to swap in and out
different layouts for those different device characteristics.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



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



[android-developers] Re: Computational cost of calling getReadableDatabase or getWriteableDatabase?

2009-09-25 Thread Marco Nelissen

Why are you calling getWriteableDatabase so often? You should only
need to call it once, and then use that database for all your
insertions.
Also, batch insert generally means you insert multiple items at
once, so you should only need to do one call to bulkInsert(), and
hence one call to getWriteableDatabase.



On Fri, Sep 25, 2009 at 11:00 AM, Agus agus.sant...@gmail.com wrote:
 I am doing a batch insert for N items and I have to call
 getWriteableDatabase method N times in my dbhelper method.
 and I find that the insertion time is slow takes  ~9 secs for 50 rows with
 ~10 columns.
 How to improve the speed of a batch insertion, or maybe calling
 getWritebableDatabase is an expensive operation time-wise?



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Computational cost of calling getReadableDatabase or getWriteableDatabase?

2009-09-25 Thread Mark Murphy

 Also, batch insert generally means you insert multiple items at
 once, so you should only need to do one call to bulkInsert(), and
 hence one call to getWriteableDatabase.

bulkInsert() is only for content providers; it is not implemented on
SQLiteDatabase.

If there is a way to do a bulk insert in SQLite, without bulkInsert(), I'd
be interested to know -- thanks!

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



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



[android-developers] Problem sending special signs through TCP/IP to Android Phone

2009-09-25 Thread Micke

Hello,

If I try to use the code below to read characters that is sended from
C# to an Android phone I get problem reading specials signs for
example swedish letters like ÅÄÖ gets abit wierd.

Do anyone have some tips for me that I can change here to enable to
get special signs? ( The code below works on a normal java application
but not on android platform) (The text I send is sended from C# to
Android JAVA.).

If someone have any pointers to give me I would be happy.


try {
  ServerSocket ss = new ServerSocket(1234);
  Socket test = ss.accept();
  InputStream is = test.getInputStream();
  DataInputStream dis = new DataInputStream(is);
  char c = dis.readChar();
  while (c != -1) {
System.out.print(Read char =  + c);
c = dis.readChar();
  }
  System.out.print(Read char =  + c);
} catch (IOException e) {
  // TODO Auto-generated catch block
  e.printStackTrace();
}

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] apikey for MapView

2009-09-25 Thread jotobjects

The MapView add-on sample uses an apparently dummy apikey in the
layout xml that looks like this -

   android:apiKey=apisamples

That doesn't look like the kind of apikey you get when you register
for the Android Maps API.  The sample application is built and signed
with the debug certificate just like any other app with the SDK.  So
how does the MapView demo get around the requirement for a valid
apiKey?  I actually tried apisamples as the apiKey in my own app but
that didn't work - you just get a blank view with no map tiles.


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



[android-developers] Re: Is Android able to connect to WPA Enterprise Wi-Fi networks ?

2009-09-25 Thread Roman ( T-Mobile USA)

Alex,

Check out the following discussion

http://forums.t-mobile.com/tmbl/board/message?board.id=Android_MRthread.id=106

Find information on WifiHelper at 
http://www.androlib.com/android.application.fan-wifi-jmjE.aspx

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Sep 25, 3:38 am, Alex Danvy a...@danvy.tv wrote:
 A Wi-Fi device running Android looks like being able to connect to a
 secured Wi-Fi access point using WEP, WPA, etc.
 I actually can't figure how to setup a WPA Enterprise secured Wi-Fi
 connection wich requires a certificate.
 I can't find a way to import a security certificate.
 I went to Settings app, Wireless controls menu, Wi-Fi settings
 menu, clicked the Advanced menu,
 Security certificates menu, clicked Add certificates menu to get
 an empty list.
 I tried to put the .cer file on the SD card but the list is still
 empty.
 Does someone have any idea ?

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



  1   2   >