Re: [android-developers] Re: blocking UI thread when Yes/No AlertDialog is displayed

2009-12-29 Thread Romain Guy
If you block the UI thread, the dialog won't work. The user won't be
able to click it, and it might not even draw at all. So a very bad
idea :)

On Tue, Dec 29, 2009 at 10:33 PM, Frank Weiss  wrote:
> Just like Treking, I'm puzzled by Swapnil's desire to block the UI thread.
> Perhaps if he explained what he does not want the UI thread doing while the
> dialog is displayed, would shed light on the issue for all.
>
> On Dec 29, 2009 9:59 PM, "TreKing"  wrote:
>
>> I can put my code in listeners but still I dont want that thread to
>> continue its execution
>
> Which thread? The UI thread? I'm pretty sure you DO want the UI thread to
> continue it's execution. Why would you NOT?
> What are you trying to accomplish? I can't think of why you would want this
> behavior...
>
> -
> ...
>
> On Wed, Dec 30, 2009 at 12:27 AM, swapnil kamble 
> wrote: > > Thanks for your ...
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group...
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



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

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

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


[android-developers] Re: AppWidget Update on Orientation Change

2009-12-29 Thread Ryan
Frank I can see this working. However as my code is now, I use an
imageView in the xml layout files to display my photo, however I don't
point the xml file to the photo. I process the user selected photo,
then save it to the SD card and then in code point the imageView to
the file I just made. I save the photo file on the SD card using the
widgetID in the name so that I know what photo belongs to what widget
if there are multiple instances of the widget running. This prevents
me from pointing the xml layout file to the photo as I don't know what
it will be named until I get the widgetID at runtime. Any ideas?

- Ryan

On Dec 29, 10:53 pm, Frank Weiss  wrote:
> Clearly, you need two images, one or both scaled and cropped from the
> original. I think your question may be when is the best time to do that.
> That would depend on how you are storing the images, in res, on the file
> system, DB, where?
>
>
>
> On Tue, Dec 29, 2009 at 7:54 PM, Ryan  wrote:
> > Thanks, but I don't want a different layout. I want to use the same
> > layout. I just want to change the picture size that i use in the
> > imageview in the layout. I need to scale/crop the image so that it
> > fills the correct size in the screen, going from portrait to landscape
> > should make the image change aspect ratio, however I can only do that
> > by running my code again, but I am just trying to find the best way to
> > call my code.
>
> > - Ryan
>
> > On Dec 29, 9:46 pm, Guru  wrote:
> > > there is a thread whch explains how to do this.I could'nt google it
> > easily.
>
> > > You need to specify a different id for each of the layout.that is for
> > > example:
>
> > > sample.xml
> > > http://schemas.android.com/apk/res/android";
> > >     android:orientation="vertical" *android:id="landscape"    *
> > >     android:layout_width="fill_parent"
> > >     android:layout_height="fill_parent"
> > >     >.
>
> > > sample.xml
> > > http://schemas.android.com/apk/res/android";
> > >     android:orientation="vertical" *android:id="portrait"    *
> > >     android:layout_width="fill_parent"
> > >     android:layout_height="fill_parent"
> > >     >.
>
> > > On Wed, Dec 30, 2009 at 8:59 AM, Ryan  wrote:
> > > > I am developing a photo frame widget, all works except on an
> > > > orientation change to landscape mode my appwidget doesn't display
> > > > correctly as I have it set to portrait dimensions and it is too large
> > > > for the display. I would like to run some code to resize the image so
> > > > that everything displays correctly and it uses all the space that I
> > > > allot.
> > > > What is the correct way to do this?
> > > > I can think of 2 methods however both seem inefficient. The first
> > > > would be to register a broadcast reciever to take orientation changes,
> > > > however I don't want to redo my appwidget everytime the phone is
> > > > turned on its side as the majority of the time the homescreen is not
> > > > showing when the orientation is changed (ie other apps are used, and I
> > > > don't need my code running in the background). I only need it to run
> > > > when the home screen is shown.
> > > > The second would be to setup a service to manage my appwidget but that
> > > > also seems inefficient to be always running in the background.
>
> > > > What is correct method to do this?
>
> > > > Thanks,
>
> > > > - Ryan
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> > android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com > > >  cr...@googlegroups.com> > cr...@googlegroups.com>
> >  > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > Thanks and Regards
> > > Gurudutt P.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 > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: Bluetooth SPP question

2009-12-29 Thread Fred
Connected It was the UUID.  I have been hacking the bluetoothchat
example, and had left the UUID at the default.  Once I set it to the
SPP UUID it wakes up after the conect() call and starts sending the
packets like crazy.  Thanks for the pointer on the sdptool, too I was
able to get more information about the device I don't need now, but
may come in handy later.

Cheers, and thanks for the help moneytoo.

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


Re: [android-developers] Re: blocking UI thread when Yes/No AlertDialog is displayed

2009-12-29 Thread Frank Weiss
Just like Treking, I'm puzzled by Swapnil's desire to block the UI thread.
Perhaps if he explained what he does not want the UI thread doing while the
dialog is displayed, would shed light on the issue for all.

On Dec 29, 2009 9:59 PM, "TreKing"  wrote:

> I can put my code in listeners but still I dont want that thread to
continue its execution
Which thread? The UI thread? I'm pretty sure you DO want the UI thread to
continue it's execution. Why would you NOT?

What are you trying to accomplish? I can't think of why you would want this
behavior...

-
...

On Wed, Dec 30, 2009 at 12:27 AM, swapnil kamble 
wrote: > > Thanks for your ...
-- 

You received this message because you are subscribed to the Google Groups
"Android Developers" group...

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

Re: [android-developers] Re: AppWidget Update on Orientation Change

2009-12-29 Thread Guru
You can just check the orientation in the widgets call back method.But this
would not be an immediate change.

On Wed, Dec 30, 2009 at 10:23 AM, Frank Weiss  wrote:

> Clearly, you need two images, one or both scaled and cropped from the
> original. I think your question may be when is the best time to do that.
> That would depend on how you are storing the images, in res, on the file
> system, DB, where?
>
>
> On Tue, Dec 29, 2009 at 7:54 PM, Ryan  wrote:
>
>> Thanks, but I don't want a different layout. I want to use the same
>> layout. I just want to change the picture size that i use in the
>> imageview in the layout. I need to scale/crop the image so that it
>> fills the correct size in the screen, going from portrait to landscape
>> should make the image change aspect ratio, however I can only do that
>> by running my code again, but I am just trying to find the best way to
>> call my code.
>>
>> - Ryan
>>
>> On Dec 29, 9:46 pm, Guru  wrote:
>> > there is a thread whch explains how to do this.I could'nt google it
>> easily.
>> >
>> > You need to specify a different id for each of the layout.that is for
>> > example:
>> >
>> > sample.xml
>> > http://schemas.android.com/apk/res/android
>> "
>> > android:orientation="vertical" *android:id="landscape"*
>> > android:layout_width="fill_parent"
>> > android:layout_height="fill_parent"
>> > >.
>> >
>> > sample.xml
>> > http://schemas.android.com/apk/res/android
>> "
>> > android:orientation="vertical" *android:id="portrait"*
>> > android:layout_width="fill_parent"
>> > android:layout_height="fill_parent"
>> > >.
>> >
>> >
>> >
>> >
>> >
>> > On Wed, Dec 30, 2009 at 8:59 AM, Ryan  wrote:
>> > > I am developing a photo frame widget, all works except on an
>> > > orientation change to landscape mode my appwidget doesn't display
>> > > correctly as I have it set to portrait dimensions and it is too large
>> > > for the display. I would like to run some code to resize the image so
>> > > that everything displays correctly and it uses all the space that I
>> > > allot.
>> > > What is the correct way to do this?
>> > > I can think of 2 methods however both seem inefficient. The first
>> > > would be to register a broadcast reciever to take orientation changes,
>> > > however I don't want to redo my appwidget everytime the phone is
>> > > turned on its side as the majority of the time the homescreen is not
>> > > showing when the orientation is changed (ie other apps are used, and I
>> > > don't need my code running in the background). I only need it to run
>> > > when the home screen is shown.
>> > > The second would be to setup a service to manage my appwidget but that
>> > > also seems inefficient to be always running in the background.
>> >
>> > > What is correct method to do this?
>> >
>> > > Thanks,
>> >
>> > > - Ryan
>> >
>> > > --
>> > > You received this message because you are subscribed to the Google
>> > > Groups "Android Developers" group.
>> > > To post to this group, send email to
>> android-developers@googlegroups.com
>> > > To unsubscribe from this group, send email to
>> > > android-developers+unsubscr...@googlegroups.com> cr...@googlegroups.com>
>>  > > For more options, visit this group at
>> > >http://groups.google.com/group/android-developers?hl=en
>> >
>> > --
>> > Thanks and Regards
>> > Gurudutt P.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
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Thanks and Regards
Gurudutt P.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] Re: Loading 2.0.1 to ADP2

2009-12-29 Thread deuce4
Hi I'd also like to hear any information regarding upgrading the Ion
OS
does anyone have any info?

On Dec 25, 4:55 am, Ron Pinkas  wrote:
> Hi All,
>
> Please forgive my ignorance. Athough I see the following in the
> official description of the ADP2:
>
> --- 
> -
> Modify and rebuild the Android operating system, and flash it onto a
> phone.
> --- 
> -
>
> I'm not able to find anywhere a downloadable 2.0 or 2.0.1 for the
> ADP2, nor any indication that it could be done. To the contrary I see
> all kind of discussions suggesting it's either not possible, or at
> least not YET possible.
>
> May someone please explain a developer withOUT any Android specific
> background, what is so difficult in uplading a new version of an O/S
> to a device that's specifically desgined for such purpose?
>
> Do I really need to wait for HTC?
>
> Thanks in advance,
>
> Ron Pinkas

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


Re: [android-developers] Re: blocking UI thread when Yes/No AlertDialog is displayed

2009-12-29 Thread TreKing
>
> I can put my code in listeners but still I dont want that thread to
> continue its execution


Which thread? The UI thread? I'm pretty sure you DO want the UI thread to
continue it's execution. Why would you NOT?

What are you trying to accomplish? I can't think of why you would want this
behavior...

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking


On Wed, Dec 30, 2009 at 12:27 AM, swapnil kamble wrote:

> Thanks for your replies. I can put my code in listeners but still I dont
> want that thread to continue its execution, unless response is not given,
> just like what windows MessageBox.show() does.
>
> I have got a workaround for it, but its not at all a standard way. I will
> not use it too.
> Anyway from the given "Dialogs, Modal Dialogs and Blocking" thread it
> looks like in standards GUI APIs it is NOT possible.
>
> If anyone gets a way to do this by using some APIs, please reply to this
> thread.
>
> Thanks again.
>
>
> On Wed, Dec 30, 2009 at 6:07 AM, theSmith wrote:
>
>>
>> On Dec 29, 1:22 pm, TreKing  wrote:
>> > Um ... why don't you just put the code you want to execute in the
>> onClick
>> > handlers for the Yes and No options, respectively?
>> > That's pretty much the point of having them ...
>> >
>>
>> +1 for the win.
>>
>> I agree, just take what ever action is necessary and put it in the
>> onClick listeners.  Its really that simple
>>
>> -theSmith
>>
>> >
>> -
>> > TreKing - Chicago transit tracking app for Android-powered
>> deviceshttp://sites.google.com/site/rezmobileapps/treking
>> >
>> > On Tue, Dec 29, 2009 at 8:25 AM, Frank Weiss  wrote:
>> > > I assume you want a modal dialog. I'm pretty sure  blocking the UI
>> thread
>> > > is going about this wrong. For example, consider the Activity
>> lifecycle
>> > > callbacks which would be called when another Activity or Application
>> becomes
>> > > visible.
>> >
>> > > Here's an explanation I found by googling for android modal dialog:
>> > >http://groups.google.com/group/android-developers/browse_thread/threa.
>> ..
>> >
>> > > On Tue, Dec 29, 2009 at 3:52 AM, swapnil kamble <
>> swap.kam...@gmail.com>wrote:
>> >
>> > >> Hi ,
>> > >>   I am displaying Confirmation type dialog box. I want to pause
>> > >> execution of that thread until answer is provided by user, but since
>> this
>> > >> AlertDialog works asynchronously, I am facing problems in blocking
>> that
>> > >> thread but displaying AlertDialog and continue execution on answer. I
>> tried
>> > >> using wait notify between threads but didn't worked. Anybody Used
>> > >> AlertDialog.wait() method ?
>> > >> I am pasting my code here too,
>> >
>> > >>  AlertDialog.Builder builder =
>> new
>> > >> AlertDialog.Builder(Demo.ctxt);
>> >
>> > >> builder.setMessage("Do you want  to Trust testgenservercert")
>> > >>
>>  .setCancelable(false)
>> >
>> > >> .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
>> > >>  public void
>> > >> onClick(DialogInterface dialog, int id) {
>> >
>> > >> //uiThread.notify();
>> >
>> > >> System.out.println("Positive Button clicked");
>> > >>  }
>> > >>  })
>> >
>> > >> .setNegativeButton("No", new DialogInterface.OnClickListener() {
>> > >>  public void
>> > >> onClick(DialogInterface dialog, int id) {
>> >
>> > >> //uiThread.notify();
>> >
>> > >> System.out.println("Negative Button clicked");
>> >
>> > >>  }
>> > >>  });
>> > >> /*uiThread =
>> > >> Thread.currentThread();
>> > >> AlertDialog alert =
>> > >> builder.create();
>> > >> alert.show();
>> > >> synchronized(alert) {
>> > >> alert.wait();
>> > >> }*/
>> >
>> > >> --
>> > >> ...Swapnil
>> >
>> > >> || Hare Krishna Hare Krishna Krishna Krishna Hare Hare ||
>> > >> || Hare RamaHare Rama   Rama   RamaHare Hare ||
>> >
>> > >> --
>> > >> You received this message because you are subscribed to the Google
>> > >> Groups "Android Developers" group.
>> > >> To post to this group, send email to
>> android-developers@googlegroups.com
>> > >> To unsubscribe from this group, send email to
>> > >> android-developers+unsubscr...@googlegroups.com
>> 
>> >
>> > >> For more options, visit this group at
>> 

Re: [android-developers] Re: blocking UI thread when Yes/No AlertDialog is displayed

2009-12-29 Thread Alok Kulkarni
I dont know whether this will work or not but did you try the handler of
Android ?


public Handler ScreenHandler = new Handler() {
public void handleMessage(Message msg) {
// Handle on click.
   }
}
The above handler can be put in the UI thread.
And in your onClick
ScreenHandler.sendEmptyMessage(what);
//Or different logic for sending message.

On Wed, Dec 30, 2009 at 10:57 AM, swapnil kamble wrote:

> Thanks for your replies. I can put my code in listeners but still I dont
> want that thread to continue its execution, unless response is not given,
> just like what windows MessageBox.show() does.
>
> I have got a workaround for it, but its not at all a standard way. I will
> not use it too.
> Anyway from the given "Dialogs, Modal Dialogs and Blocking" thread it
> looks like in standards GUI APIs it is NOT possible.
>
> If anyone gets a way to do this by using some APIs, please reply to this
> thread.
>
> Thanks again.
>
>
> On Wed, Dec 30, 2009 at 6:07 AM, theSmith wrote:
>
>>
>> On Dec 29, 1:22 pm, TreKing  wrote:
>> > Um ... why don't you just put the code you want to execute in the
>> onClick
>> > handlers for the Yes and No options, respectively?
>> > That's pretty much the point of having them ...
>> >
>>
>> +1 for the win.
>>
>> I agree, just take what ever action is necessary and put it in the
>> onClick listeners.  Its really that simple
>>
>> -theSmith
>>
>> >
>> -
>> > TreKing - Chicago transit tracking app for Android-powered
>> deviceshttp://sites.google.com/site/rezmobileapps/treking
>> >
>> > On Tue, Dec 29, 2009 at 8:25 AM, Frank Weiss  wrote:
>> > > I assume you want a modal dialog. I'm pretty sure  blocking the UI
>> thread
>> > > is going about this wrong. For example, consider the Activity
>> lifecycle
>> > > callbacks which would be called when another Activity or Application
>> becomes
>> > > visible.
>> >
>> > > Here's an explanation I found by googling for android modal dialog:
>> > >http://groups.google.com/group/android-developers/browse_thread/threa.
>> ..
>> >
>> > > On Tue, Dec 29, 2009 at 3:52 AM, swapnil kamble <
>> swap.kam...@gmail.com>wrote:
>> >
>> > >> Hi ,
>> > >>   I am displaying Confirmation type dialog box. I want to pause
>> > >> execution of that thread until answer is provided by user, but since
>> this
>> > >> AlertDialog works asynchronously, I am facing problems in blocking
>> that
>> > >> thread but displaying AlertDialog and continue execution on answer. I
>> tried
>> > >> using wait notify between threads but didn't worked. Anybody Used
>> > >> AlertDialog.wait() method ?
>> > >> I am pasting my code here too,
>> >
>> > >>  AlertDialog.Builder builder =
>> new
>> > >> AlertDialog.Builder(Demo.ctxt);
>> >
>> > >> builder.setMessage("Do you want  to Trust testgenservercert")
>> > >>
>>  .setCancelable(false)
>> >
>> > >> .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
>> > >>  public void
>> > >> onClick(DialogInterface dialog, int id) {
>> >
>> > >> //uiThread.notify();
>> >
>> > >> System.out.println("Positive Button clicked");
>> > >>  }
>> > >>  })
>> >
>> > >> .setNegativeButton("No", new DialogInterface.OnClickListener() {
>> > >>  public void
>> > >> onClick(DialogInterface dialog, int id) {
>> >
>> > >> //uiThread.notify();
>> >
>> > >> System.out.println("Negative Button clicked");
>> >
>> > >>  }
>> > >>  });
>> > >> /*uiThread =
>> > >> Thread.currentThread();
>> > >> AlertDialog alert =
>> > >> builder.create();
>> > >> alert.show();
>> > >> synchronized(alert) {
>> > >> alert.wait();
>> > >> }*/
>> >
>> > >> --
>> > >> ...Swapnil
>> >
>> > >> || Hare Krishna Hare Krishna Krishna Krishna Hare Hare ||
>> > >> || Hare RamaHare Rama   Rama   RamaHare Hare ||
>> >
>> > >> --
>> > >> You received this message because you are subscribed to the Google
>> > >> Groups "Android Developers" group.
>> > >> To post to this group, send email to
>> android-developers@googlegroups.com
>> > >> To unsubscribe from this group, send email to
>> > >> android-developers+unsubscr...@googlegroups.com
>> 
>> >
>> > >> For more options, visit this group at
>> > >>http://groups.google.com/group/android-developers?hl=en
>> >
>> > >  --
>> > > You received this message because you are subscribed to the Google
>> > > Groups "Andr

Re: [android-developers] Re: blocking UI thread when Yes/No AlertDialog is displayed

2009-12-29 Thread swapnil kamble
Thanks for your replies. I can put my code in listeners but still I dont
want that thread to continue its execution, unless response is not given,
just like what windows MessageBox.show() does.

I have got a workaround for it, but its not at all a standard way. I will
not use it too.
Anyway from the given "Dialogs, Modal Dialogs and Blocking" thread it looks
like in standards GUI APIs it is NOT possible.

If anyone gets a way to do this by using some APIs, please reply to this
thread.

Thanks again.

On Wed, Dec 30, 2009 at 6:07 AM, theSmith  wrote:

>
> On Dec 29, 1:22 pm, TreKing  wrote:
> > Um ... why don't you just put the code you want to execute in the onClick
> > handlers for the Yes and No options, respectively?
> > That's pretty much the point of having them ...
> >
>
> +1 for the win.
>
> I agree, just take what ever action is necessary and put it in the
> onClick listeners.  Its really that simple
>
> -theSmith
>
> >
> -
> > TreKing - Chicago transit tracking app for Android-powered deviceshttp://
> sites.google.com/site/rezmobileapps/treking
> >
> > On Tue, Dec 29, 2009 at 8:25 AM, Frank Weiss  wrote:
> > > I assume you want a modal dialog. I'm pretty sure  blocking the UI
> thread
> > > is going about this wrong. For example, consider the Activity lifecycle
> > > callbacks which would be called when another Activity or Application
> becomes
> > > visible.
> >
> > > Here's an explanation I found by googling for android modal dialog:
> > >http://groups.google.com/group/android-developers/browse_thread/threa.
> ..
> >
> > > On Tue, Dec 29, 2009 at 3:52 AM, swapnil kamble  >wrote:
> >
> > >> Hi ,
> > >>   I am displaying Confirmation type dialog box. I want to pause
> > >> execution of that thread until answer is provided by user, but since
> this
> > >> AlertDialog works asynchronously, I am facing problems in blocking
> that
> > >> thread but displaying AlertDialog and continue execution on answer. I
> tried
> > >> using wait notify between threads but didn't worked. Anybody Used
> > >> AlertDialog.wait() method ?
> > >> I am pasting my code here too,
> >
> > >>  AlertDialog.Builder builder = new
> > >> AlertDialog.Builder(Demo.ctxt);
> >
> > >> builder.setMessage("Do you want  to Trust testgenservercert")
> > >>
>  .setCancelable(false)
> >
> > >> .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
> > >>  public void
> > >> onClick(DialogInterface dialog, int id) {
> >
> > >> //uiThread.notify();
> >
> > >> System.out.println("Positive Button clicked");
> > >>  }
> > >>  })
> >
> > >> .setNegativeButton("No", new DialogInterface.OnClickListener() {
> > >>  public void
> > >> onClick(DialogInterface dialog, int id) {
> >
> > >> //uiThread.notify();
> >
> > >> System.out.println("Negative Button clicked");
> >
> > >>  }
> > >>  });
> > >> /*uiThread =
> > >> Thread.currentThread();
> > >> AlertDialog alert =
> > >> builder.create();
> > >> alert.show();
> > >> synchronized(alert) {
> > >> alert.wait();
> > >> }*/
> >
> > >> --
> > >> ...Swapnil
> >
> > >> || Hare Krishna Hare Krishna Krishna Krishna Hare Hare ||
> > >> || Hare RamaHare Rama   Rama   RamaHare Hare ||
> >
> > >> --
> > >> You received this message because you are subscribed to the Google
> > >> Groups "Android Developers" group.
> > >> To post to this group, send email to
> android-developers@googlegroups.com
> > >> To unsubscribe from this group, send email to
> > >> android-developers+unsubscr...@googlegroups.com
> 
> >
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/android-developers?hl=en
> >
> > >  --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> 
> >
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-develope

[android-developers] drag and drop table rows?

2009-12-29 Thread Sean Neilan
Is it possible to drag and drop table rows in android? Say the user
holds down on a table row, the row would would become transparent and
be draggable around the screen & then depending where the user dropped
it, the table row would be inserted there.

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


Re: [android-developers] Re: AppWidget Update on Orientation Change

2009-12-29 Thread Frank Weiss
Clearly, you need two images, one or both scaled and cropped from the
original. I think your question may be when is the best time to do that.
That would depend on how you are storing the images, in res, on the file
system, DB, where?

On Tue, Dec 29, 2009 at 7:54 PM, Ryan  wrote:

> Thanks, but I don't want a different layout. I want to use the same
> layout. I just want to change the picture size that i use in the
> imageview in the layout. I need to scale/crop the image so that it
> fills the correct size in the screen, going from portrait to landscape
> should make the image change aspect ratio, however I can only do that
> by running my code again, but I am just trying to find the best way to
> call my code.
>
> - Ryan
>
> On Dec 29, 9:46 pm, Guru  wrote:
> > there is a thread whch explains how to do this.I could'nt google it
> easily.
> >
> > You need to specify a different id for each of the layout.that is for
> > example:
> >
> > sample.xml
> > http://schemas.android.com/apk/res/android";
> > android:orientation="vertical" *android:id="landscape"*
> > android:layout_width="fill_parent"
> > android:layout_height="fill_parent"
> > >.
> >
> > sample.xml
> > http://schemas.android.com/apk/res/android";
> > android:orientation="vertical" *android:id="portrait"*
> > android:layout_width="fill_parent"
> > android:layout_height="fill_parent"
> > >.
> >
> >
> >
> >
> >
> > On Wed, Dec 30, 2009 at 8:59 AM, Ryan  wrote:
> > > I am developing a photo frame widget, all works except on an
> > > orientation change to landscape mode my appwidget doesn't display
> > > correctly as I have it set to portrait dimensions and it is too large
> > > for the display. I would like to run some code to resize the image so
> > > that everything displays correctly and it uses all the space that I
> > > allot.
> > > What is the correct way to do this?
> > > I can think of 2 methods however both seem inefficient. The first
> > > would be to register a broadcast reciever to take orientation changes,
> > > however I don't want to redo my appwidget everytime the phone is
> > > turned on its side as the majority of the time the homescreen is not
> > > showing when the orientation is changed (ie other apps are used, and I
> > > don't need my code running in the background). I only need it to run
> > > when the home screen is shown.
> > > The second would be to setup a service to manage my appwidget but that
> > > also seems inefficient to be always running in the background.
> >
> > > What is correct method to do this?
> >
> > > Thanks,
> >
> > > - Ryan
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com cr...@googlegroups.com>
>  > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
> >
> > --
> > Thanks and Regards
> > Gurudutt P.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
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: VideoView playback fails on 2.0.1? MediaPlayer warnings in logcat

2009-12-29 Thread And-Rider
There is a bug filed regarding issue...

http://code.google.com/p/android/issues/detail?id=5696#makechanges

On Dec 29, 2:32 pm, And-Rider  wrote:
> Did any one have a solution for this issue...?
>
> I do have the same problem with 2.0.1
>
> On Dec 16, 11:19 pm, Morgane Plat  wrote:
>
> > Sorry I can't help you on your problem now since I don't even have videos
> > working with Android 2.0.
> > Maybe this will help though 
> > :http://www.mail-archive.com/android-developers@googlegroups.com/msg20...
>
> > However I'm curious about your videos, because I don't even have the sound
> > with my videos. Can you please provide me a sample video so that I can try ?
> > Also, are you testing on Wifi or 3G ? Emulator or device ? What protocol do
> > you use ? rtsp, mms, http ?
>
> > Cheers,
>
> > Morgane
>
>

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


Re: [android-developers] Re: custom keyboard

2009-12-29 Thread Dai Hiro
This class manages input method settings :
http://developer.android.com/reference/android/provider/Settings.Secure.html

Unfortunately you can only read those settings and not modify them.
I think you should find an other way to do what you want to do.

Kwaku

On Mon, Dec 28, 2009 at 5:38 PM, schwiz  wrote:
> Ok that was the problem thanks.  This leaves me with two questions,
> how do I enable the keyboard without making the user do it, and how do
> I make it the default keyboard for my app.  Thanks for the reply!
>
> On Dec 28, 10:06 am, Dai Hiro  wrote:
>> Hi,
>>
>> Did you activate it in Locale & Text Settings ?
>>
>> Kwaku
>>
>>
>>
>> On Sun, Dec 27, 2009 at 11:53 PM, schwiz  wrote:
>> > I am wanting to add a custom keyboard for my app, I was taking a look
>> > at the softkeyboard example on the included sample code in the SDK.
>> > When I install it in the emulator it isn't showing up though.  I try
>> > to access it by longpressing an input box and then clicking select
>> > input when the context menu pops up.  However, the latin keyboard made
>> > in the example doesn't show up as one of the options.  Am I missing
>> > something?  Anyone have advice or know of another example I can look
>> > at?
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to android-developers@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-developers+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> >http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: AppWidget Update on Orientation Change

2009-12-29 Thread Ryan
Thanks, but I don't want a different layout. I want to use the same
layout. I just want to change the picture size that i use in the
imageview in the layout. I need to scale/crop the image so that it
fills the correct size in the screen, going from portrait to landscape
should make the image change aspect ratio, however I can only do that
by running my code again, but I am just trying to find the best way to
call my code.

- Ryan

On Dec 29, 9:46 pm, Guru  wrote:
> there is a thread whch explains how to do this.I could'nt google it easily.
>
> You need to specify a different id for each of the layout.that is for
> example:
>
> sample.xml
> http://schemas.android.com/apk/res/android";
>     android:orientation="vertical" *android:id="landscape"    *
>     android:layout_width="fill_parent"
>     android:layout_height="fill_parent"
>     >.
>
> sample.xml
> http://schemas.android.com/apk/res/android";
>     android:orientation="vertical" *android:id="portrait"    *
>     android:layout_width="fill_parent"
>     android:layout_height="fill_parent"
>     >.
>
>
>
>
>
> On Wed, Dec 30, 2009 at 8:59 AM, Ryan  wrote:
> > I am developing a photo frame widget, all works except on an
> > orientation change to landscape mode my appwidget doesn't display
> > correctly as I have it set to portrait dimensions and it is too large
> > for the display. I would like to run some code to resize the image so
> > that everything displays correctly and it uses all the space that I
> > allot.
> > What is the correct way to do this?
> > I can think of 2 methods however both seem inefficient. The first
> > would be to register a broadcast reciever to take orientation changes,
> > however I don't want to redo my appwidget everytime the phone is
> > turned on its side as the majority of the time the homescreen is not
> > showing when the orientation is changed (ie other apps are used, and I
> > don't need my code running in the background). I only need it to run
> > when the home screen is shown.
> > The second would be to setup a service to manage my appwidget but that
> > also seems inefficient to be always running in the background.
>
> > What is correct method to do this?
>
> > Thanks,
>
> > - Ryan
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Thanks and Regards
> Gurudutt P.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


Re: [android-developers] AppWidget Update on Orientation Change

2009-12-29 Thread Guru
there is a thread whch explains how to do this.I could'nt google it easily.

You need to specify a different id for each of the layout.that is for
example:

sample.xml
http://schemas.android.com/apk/res/android";
android:orientation="vertical" *android:id="landscape"*
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>.

sample.xml
http://schemas.android.com/apk/res/android";
android:orientation="vertical" *android:id="portrait"*
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>.


On Wed, Dec 30, 2009 at 8:59 AM, Ryan  wrote:

> I am developing a photo frame widget, all works except on an
> orientation change to landscape mode my appwidget doesn't display
> correctly as I have it set to portrait dimensions and it is too large
> for the display. I would like to run some code to resize the image so
> that everything displays correctly and it uses all the space that I
> allot.
> What is the correct way to do this?
> I can think of 2 methods however both seem inefficient. The first
> would be to register a broadcast reciever to take orientation changes,
> however I don't want to redo my appwidget everytime the phone is
> turned on its side as the majority of the time the homescreen is not
> showing when the orientation is changed (ie other apps are used, and I
> don't need my code running in the background). I only need it to run
> when the home screen is shown.
> The second would be to setup a service to manage my appwidget but that
> also seems inefficient to be always running in the background.
>
> What is correct method to do this?
>
> Thanks,
>
> - Ryan
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Thanks and Regards
Gurudutt P.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] Re: Achieving evenly spaced buttons on a layout

2009-12-29 Thread Matt
Use a table layout, and give it the following attribute:
android:stretchColumns="*"
example:


 
   
   
 





On Dec 29, 6:06 pm, andrew android  wrote:
> Have you tried a table layout?
>
> On Dec 28, 9:03 pm, Robert  wrote:
>
>
>
> > I am developing a misterhouse frontend.  I have 9 image buttons that I
> > want to be evenly spaced on all sides.  
> > Seehttp://onlamp.com/onlamp/2004/11/11/graphics/mrhousemain.gif.  What
> > layout and xml parameters do I use to achieve this?

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


[android-developers] Re: How can I put a TextView on a Layout without using an xml-file? What is wrong in my code?

2009-12-29 Thread Martin
Thank you all! It works now with the layout.addView(tv);
Sorry for the easy questions. Some days ago, I was a total beginner
in Android-programming ;-)
Greetings, Martin

On 28 Dez., 14:48, Brion Emde  wrote:
> You need to add the TextView to the layout.
>
> Here's the revised program:
>
> package com.example.helloandroid;
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.widget.AbsoluteLayout;
> import android.widget.TextView;
>
> public class HelloAndroid extends Activity {
>     /** Called when the activity is first created. */
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         // setContentView(R.layout.main);
>         AbsoluteLayout layout = new AbsoluteLayout(this);
>         TextView tv = new TextView(layout.getContext());
>         tv.layout(10,10,100,100);
>         tv.setText("Hello World! :-)");
>         layout.addView(tv);
>         setContentView(layout);    }
>
> }
>
> On Dec 25, 7:59 am, Martin  wrote:
>
>
>
> > Hi!
>
> > Why doesn't write this program "Hello World! :-)" on my screen?
> > I know how I would do it with an xml-file, but I want to do it like
> > in the following program.
> > And how can I set the coordinates without setting the width and height
> > like with tv.layout(10,10,100,100); ?
>
> > Greetings, Martin
>
> > ---
>
> > package com.example.helloandroid;
>
> > import android.app.Activity;
> > import android.os.Bundle;
> > import android.widget.AbsoluteLayout;
> > import android.widget.TextView;
>
> > public class HelloAndroid extends Activity {
> >    /** Called when the activity is first created. */
> >   �...@override
> >    public void onCreate(Bundle savedInstanceState) {
> >        super.onCreate(savedInstanceState);
> >        AbsoluteLayout layout = new AbsoluteLayout(this);
> >        TextView tv = new TextView(layout.getContext());
> >        tv.layout(10,10,100,100);
>
> >        tv.setText("Hello World! :-)");
> >        setContentView(layout);
> >    }
>
> > }

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


[android-developers] Who loads the hardware / software codecs mentioned in the .cfg files

2009-12-29 Thread Sunit
hi,

   Have been trying to do a workaround on the Codecs.
I realise that the codecs are fetched from the .cfg files that too in
the albhatecial order of the cfg file name.
generally it is the hardware codec that is loaded first.

Now my query is,

1) Who queries or u can say parses these .cfg files to find which
Codec to be loaded.
2) How can i change this alphabetic order behaviour of Codec Loading.

Thanks in advance,
Sunit

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 can I access folders in res/drawable? Example: res/drawable/gameboard/image1.png and res/drawable/character/image1.png ?

2009-12-29 Thread Martin
Oh ok, thank you.

On 28 Dez., 19:09, Romain Guy  wrote:
> Folders in res/drawable are not supported at the moment.
>
>
>
>
>
> On Fri, Dec 25, 2009 at 7:08 AM, Martin  wrote:
> > Hi!
>
> > I am programming a game and I have MANY MANY images. Is there a way
> > how I can sort them in folders and access them in my program?
> > For example:
> > res/drawable/gameboard/image*.png
> > res/drawable/animals/image*.png
> > res/drawable/character/image*.png
>
> > Or do I HAVE to put all of them directly in res/drawable/* to be able
> > to use them in my program?
>
> > Greetings,
> > Martin
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them

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


[android-developers] AppWidget Update on Orientation Change

2009-12-29 Thread Ryan
I am developing a photo frame widget, all works except on an
orientation change to landscape mode my appwidget doesn't display
correctly as I have it set to portrait dimensions and it is too large
for the display. I would like to run some code to resize the image so
that everything displays correctly and it uses all the space that I
allot.
What is the correct way to do this?
I can think of 2 methods however both seem inefficient. The first
would be to register a broadcast reciever to take orientation changes,
however I don't want to redo my appwidget everytime the phone is
turned on its side as the majority of the time the homescreen is not
showing when the orientation is changed (ie other apps are used, and I
don't need my code running in the background). I only need it to run
when the home screen is shown.
The second would be to setup a service to manage my appwidget but that
also seems inefficient to be always running in the background.

What is correct method to do this?

Thanks,

- Ryan

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

2009-12-29 Thread android.vinny
HI All

Is Android Hardware Supports NFC .
I need some info regrading android hardware and NFC near field
communication .

please share it fif any body know about this.

Thnkas & regards

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


[android-developers] Re: Google Marketplace Chargeback Fee

2009-12-29 Thread Craigo
OK, so it's a fee charged by Google.  I hope they have to do some
manual work or there is some external cost, when a chargeback occurs.
And they are not just cashing in on our misfortune.


On Dec 28, 3:57 pm, Streets Of Boston  wrote:
> It a part of doing business using credit cards... usually these charge-
> back fees are higher. Just do a google-search for "chargeback fee" to
> see what it is and how much it usually costs.
>
> For purchases under $10, Google automatically charges back the
> customer's credit card in case of dispute. For purchases over $10,
> Google does an 'investigation'.
>
> When a 'charge back' fee is levied, it means that the customer
> complained to his/her credit-card company that a purchase wasn't made
> in his/her name and the purchase was fraudulent. There is nothing you
> can do about it, except for terminating your Google Checkout account.
>
> On Dec 27, 10:06 pm, Craigo  wrote:
>
> > Surely it isn't a "fine"?
>
> > Why would the I (the developer) be "fined" for a customer complaining
> > that the Google Marketplace incorrectly charged them?  I have nothing
> > to do with charging, AFAIK, I haven't done anything wrong (I didn't
> > request any charging or refund, the Marketplace just did it upon the
> > customers request)?
>
> > On Dec 27, 5:43 pm, André  wrote:
>
> > > I don't complain because I didn't care yet. Refunding within the first
> > > 24h after purchase is free of charge and the user can do this on his
> > > own. Sometimes I get mails about refunds and I redirect the customer
> > > to the official Google Checkout website. Never got any complaints
> > > after that.
>
> > > After the 24h have passed there's a "fine" if you're refunding a
> > > customer's purchase. This is called the chargeback fee you're speaking
> > > about.
>
> > > Best,
>
> > > -- Andréhttp://android.rabold.org
>
> > > On 27 Dez., 00:47, Craigo  wrote:
>
> > > > Hi,
>
> > > > I'm trying to understand the Google Marketplace Chargeback Fee.
>
> > > > A customer complained they did not authorize a charge from the Google
> > > > Marketplace for my app, and they got a refund.  I have no problem with
> > > > this.
>
> > > > However, Google then stings me with a $3 Chargeback Fee.  I don't
> > > > understand why?  Has the $3 fee come from the credit card company, and
> > > > Google are just passing it on to me?
>
> > > > Note:  There is a closed post on this, but I didn't see anyone explain
> > > > the 
> > > > fee:http://groups.google.com.au/group/android-developers/browse_thread/th...
>
> > > > Cheers.- Hide quoted text -
>
> > - Show quoted text -
>
>

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


Re: [android-developers] No Adobe Flash support for Eclair!?!

2009-12-29 Thread chris harper
Dianne

Really?
So what you are saying is that Android development doesn't really want
developers building applications that use Flash?
I can see your point on how Flash is tied to certain devices but I was
assuming that in 2010 more support from both the adobe and android camps
would be working together toward making flash more of  a standard so
developers can start writing some really cool apps to take advantage of
Flashes capabilities. As shown by this video by adobe:
http://www.adobe.com/devnet/devices/articles/htchero.html

So that was my current focus.

But it now sounds like if anyone wants to develop an Android app that uses
Flash it'll be more of a gamble and might not work for most devices or at
the least be a hassle for the end user to make it work because they would
have to install Flash plugins.

That kind of sucks but thank you for the information before I dove to deep
into my project.

It is kind of disappointing because if Android and Adobe can get together
and start supporting development of applications that use Flash then that
would be an Ace in the hole for making Android apps far better than the
IPhone.
Yes I know Adobe CS5 has a feature on compiling Flash into IPhone apps but
it's compiled code with MANY limitations and users still can not browse
Flash based websites or upload .swf files and load them dynamically (that
was the first route I took for my idea). :-)

My backup plan is to use OpenGL and I will take that route now but it just
didn't have as cool features for animation as Flash unless anyone else has
any other suggestions?

Thank you again Dianne
-Chris



On Tue, Dec 29, 2009 at 4:54 PM, Dianne Hackborn wrote:

> On Tue, Dec 29, 2009 at 1:45 PM, chris harper  wrote:
>
>> I am doing a proof of concept right now for an app that I want to do.
>> For my app to work I will need to interact certain system actions on the
>> phone with code in Flash (actionscript 2 which FlashLite supports).
>> I have not found a way for Java (i.e. an android app) to interact with
>> actionScript directly.
>>
>
> Hi, the platform currently doesn't support Flash.  I would ask that you
> please do not put applications up on the Market that rely on Flash, as they
> will be very tied to specific devices that may happen to have it.
>
> Even if at some point Flash is more generally supported on the platform, it
> may well be an optional plug-in for users to download, so you would want to
> think very seriously about whether you want rely on that with the attendant
> hassles for the user of having to install Flash to use your app.  And of
> course the minimum platform version your app would be compatible with is
> whichever one this feature appears on -- for example, however you get it to
> work with the HTC Hero will probably not match a standard platform facility,
> since this is a non-standard platform feature owned by HTC.
>
> Of course for futzing around with your own private app, have at it and do
> what you want.  But for things that are intended to go on market, please
> keep this in mind.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: Spinners

2009-12-29 Thread Christine
Just a piece of advice, when you have so many seemingly identical
textviews and spinners, it may be convenient for you to put the
attrebutes in a style and associate the styles with the spinner and
the textview. That way, you can change the layout and settings of all
spinners and textviews in one place. Saves you some typing too.


On Dec 30, 1:12 am, Brion Emde  wrote:
> At least one of your Spinners has android:layout_height="fill_parent".
> that could mess you up.
>
> On Dec 29, 12:47 pm, Duey Oxburger  wrote:
>
> > Hey All,
>
> > A spinner question:
>
> > I want to have multiple spinners working in the same view.  In my
> > list, the first spinner works, but the others are empty. Here's how my
> > main.xml looks:
>
> > 
> > http://schemas.android.com/apk/res/
> > android"
> >     android:orientation="vertical"
> >     android:padding="10dip"
> >     android:layout_width="fill_parent"
> >     android:layout_height="wrap_content">
>
> >      >         android:layout_width="fill_parent"
> >         android:layout_height="wrap_content"
> >         android:layout_marginTop="10dip"
> >         android:text="Build your Squad:"
> >     />
>
> >      >         android:layout_width="fill_parent"
> >         android:layout_height="wrap_content"
> >         android:layout_marginTop="10dip"
> >         android:text="Unit 1:"
> >     />
>
> >      >         android:id="@+id/spinner"
> >         android:layout_width="fill_parent"
> >         android:layout_height="wrap_content"
> >         android:drawSelectorOnTop="true"
> >         android:prompt="@string/planet_prompt"
> >     />
>
> >      >         android:layout_width="fill_parent"
> >         android:layout_height="wrap_content"
> >         android:layout_marginTop="10dip"
> >         android:text="Unit 2:"
> >     />
>
> >      >         android:id="@+id/spinner"
> >         android:layout_width="fill_parent"
> >         android:drawSelectorOnTop="true"
> >         android:prompt="@string/planet_prompt"
> >     android:layout_height="fill_parent"/>
>
> >      >         android:layout_width="fill_parent"
> >         android:layout_height="wrap_content"
> >         android:layout_marginTop="10dip"
> >         android:text="Unit 3:"
> >     />
>
> >      >         android:id="@+id/spinner"
> >         android:layout_width="fill_parent"
> >         android:layout_height="wrap_content"
> >         android:drawSelectorOnTop="true"
> >         android:prompt="@string/planet_prompt"
> >     />
>
> >          >         android:layout_width="fill_parent"
> >         android:layout_height="wrap_content"
> >         android:layout_marginTop="10dip"
> >         android:text="Unit 4:"
> >     />
>
> >      >         android:id="@+id/spinner"
> >         android:layout_width="fill_parent"
> >         android:layout_height="wrap_content"
> >         android:drawSelectorOnTop="true"
> >         android:prompt="@string/planet_prompt"
> >     />
>
> >      >         android:layout_width="fill_parent"
> >         android:layout_height="wrap_content"
> >         android:layout_marginTop="10dip"
> >         android:text="Unit 5:"
> >     />
>
> >      >         android:id="@+id/spinner"
> >         android:layout_width="fill_parent"
> >         android:layout_height="wrap_content"
> >         android:drawSelectorOnTop="true"
> >         android:prompt="@string/planet_prompt"
> >     />
>
> >      >         android:layout_width="fill_parent"
> >         android:layout_height="wrap_content"
> >         android:layout_marginTop="10dip"
> >         android:text="Unit 6:"
> >     />
>
> >      >         android:id="@+id/spinner"
> >         android:layout_width="fill_parent"
> >         android:layout_height="wrap_content"
> >         android:drawSelectorOnTop="true"
> >         android:prompt="@string/planet_prompt"
> >     />
>
> >      >         android:layout_width="fill_parent"
> >         android:layout_height="wrap_content"
> >         android:layout_marginTop="10dip"
> >         android:text="Unit 7:"
> >     />
>
> >      >         android:id="@+id/spinner"
> >         android:layout_width="fill_parent"
> >         android:layout_height="wrap_content"
> >         android:drawSelectorOnTop="true"
> >         android:prompt="@string/planet_prompt"
> >     />
>
> >      >         android:layout_width="fill_parent"
> >         android:layout_height="wrap_content"
> >         android:layout_marginTop="10dip"
> >         android:text="Unit 8:"
> >     />
>
> >      >         android:id="@+id/spinner"
> >         android:layout_width="fill_parent"
> >         android:layout_height="wrap_content"
> >         android:drawSelectorOnTop="true"
> >         android:prompt="@string/planet_prompt"
> >     />
>
> >      >         android:layout_width="fill_parent"
> >         android:layout_height="wrap_content"
> >         android:layout_marginTop="10dip"
> >         android:text="Unit 9:"
> >     />
>
> >      >         android:id="@+id/spinner"
> >         android:layout_width="fill_pa

[android-developers] Re: hashset problem

2009-12-29 Thread Robert Green
If you want order, you should use an ArrayList or a sorted Set.

On Dec 29, 5:25 am, raphael couturier 
wrote:
> Hi,
>
> I have a problem with the hashset implementation because the followinf
> little part of my code uses it and doesn't give the same result
> according to the version of android.
>
> Here is my code :
> HashSet hset=new HashSet();
> hset.add(new String("cat"));
> hset.add(new String("dog"));
> hset.add(new String("youpi"));
> hset.add(new String("argh"));
> hset.add(new String("cat"));
> hset.add(new String("why"));
> hset.add(new String("dummmy"));
>
> for(String s:hset)
>   Log.v("test",s);
>
> with android 1.5 I obtain :
>
> argh
> cat
> why
> youpi
> dog
> dummmy
>
> whereas with android 2.0 I obtain
> argh
> youpi
> cat
> dummmy
> dog
> why
>
> Does anyone have any idea of the problem?
>
> Thanks in advance
> Raphaël

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Achieving evenly spaced buttons on a layout

2009-12-29 Thread andrew android
Have you tried a table layout?

On Dec 28, 9:03 pm, Robert  wrote:
> I am developing a misterhouse frontend.  I have 9 image buttons that I
> want to be evenly spaced on all sides.  
> Seehttp://onlamp.com/onlamp/2004/11/11/graphics/mrhousemain.gif.  What
> layout and xml parameters do I use to achieve this?

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


Re: [android-developers] TabActivity how to show Contact activity in a tab.

2009-12-29 Thread Mark Murphy
maxsap wrote:
> Hello all I am developing an application and as part of it I would
> like to show a tabactivity and use the contact activity to let the
> user see,modify,or call a specified contact. my code is this:
> package com.WaveCally;
> 
> import android.app.AlertDialog;
> import android.app.TabActivity;
> import android.app.AlertDialog.Builder;
> import android.content.Intent;
> import android.os.Bundle;
> import android.provider.Contacts.People;
> import android.widget.TabHost;
> import android.widget.TabHost.TabSpec;
> 
> public class WaveCally extends TabActivity  {
> private TabHost mTabHost;
> private int PICK_CONTACT;
> 
>   /** Called when the activity is first created. */
> @Override
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.main);
> 
> mTabHost = getTabHost();
> try{
>   mTabHost.addTab(mTabHost.newTabSpec("Contacts").setIndicator
> ("TAB 1").setContent(R.id.ParentView));
>   mTabHost.addTab(mTabHost.newTabSpec("tab_test2").setIndicator
> ("Contacts").setContent(new Intent(Intent.ACTION_PICK,
> People.CONTENT_URI)));
>   mTabHost.addTab(mTabHost.newTabSpec("tab_test3").setIndicator
> ("TAB 3").setContent(R.id.textview3));
> }catch(java.lang.SecurityException ex){;
> }
> 
> mTabHost.setCurrentTab(0);
> 
> }
> 
> }
> 
> but when I run this programm I get a securityException even though I
> have all the needed permision on my manifest.

You can only put your own activities in tabs, not activities from the
system or third party apps.

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

Warescription: Three Android Books, Plus Updates, $35/Year

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


[android-developers] TabActivity how to show Contact activity in a tab.

2009-12-29 Thread maxsap
Hello all I am developing an application and as part of it I would
like to show a tabactivity and use the contact activity to let the
user see,modify,or call a specified contact. my code is this:
package com.WaveCally;

import android.app.AlertDialog;
import android.app.TabActivity;
import android.app.AlertDialog.Builder;
import android.content.Intent;
import android.os.Bundle;
import android.provider.Contacts.People;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

public class WaveCally extends TabActivity  {
private TabHost mTabHost;
private int PICK_CONTACT;

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

mTabHost = getTabHost();
try{
mTabHost.addTab(mTabHost.newTabSpec("Contacts").setIndicator
("TAB 1").setContent(R.id.ParentView));
mTabHost.addTab(mTabHost.newTabSpec("tab_test2").setIndicator
("Contacts").setContent(new Intent(Intent.ACTION_PICK,
People.CONTENT_URI)));
mTabHost.addTab(mTabHost.newTabSpec("tab_test3").setIndicator
("TAB 3").setContent(R.id.textview3));
}catch(java.lang.SecurityException ex){;
}

mTabHost.setCurrentTab(0);

}

}

but when I run this programm I get a securityException even though I
have all the needed permision on my manifest.
I tried to run only the intent for calling the contact and worked so I
think the problem occurs when triyng to show the contact activity as a
tab content. So the questions are :
how to make it work and call the contact activity and set it as the
content of a tab?
And why I can't set the contents with the above mentioned code?
thanks in advanced maxsap

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: blocking UI thread when Yes/No AlertDialog is displayed

2009-12-29 Thread theSmith

On Dec 29, 1:22 pm, TreKing  wrote:
> Um ... why don't you just put the code you want to execute in the onClick
> handlers for the Yes and No options, respectively?
> That's pretty much the point of having them ...
>

+1 for the win.

I agree, just take what ever action is necessary and put it in the
onClick listeners.  Its really that simple

-theSmith

> -
> TreKing - Chicago transit tracking app for Android-powered 
> deviceshttp://sites.google.com/site/rezmobileapps/treking
>
> On Tue, Dec 29, 2009 at 8:25 AM, Frank Weiss  wrote:
> > I assume you want a modal dialog. I'm pretty sure  blocking the UI thread
> > is going about this wrong. For example, consider the Activity lifecycle
> > callbacks which would be called when another Activity or Application becomes
> > visible.
>
> > Here's an explanation I found by googling for android modal dialog:
> >http://groups.google.com/group/android-developers/browse_thread/threa...
>
> > On Tue, Dec 29, 2009 at 3:52 AM, swapnil kamble 
> > wrote:
>
> >> Hi ,
> >>       I am displaying Confirmation type dialog box. I want to pause
> >> execution of that thread until answer is provided by user, but since this
> >> AlertDialog works asynchronously, I am facing problems in blocking that
> >> thread but displaying AlertDialog and continue execution on answer. I tried
> >> using wait notify between threads but didn't worked. Anybody Used
> >> AlertDialog.wait() method ?
> >> I am pasting my code here too,
>
> >>                                      AlertDialog.Builder builder = new
> >> AlertDialog.Builder(Demo.ctxt);
>
> >> builder.setMessage("Do you want  to Trust testgenservercert")
> >>                                                      .setCancelable(false)
>
> >> .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
> >>                                                          public void
> >> onClick(DialogInterface dialog, int id) {
>
> >> //uiThread.notify();
>
> >> System.out.println("Positive Button clicked");
> >>                                                                  }
> >>                                                      })
>
> >> .setNegativeButton("No", new DialogInterface.OnClickListener() {
> >>                                                          public void
> >> onClick(DialogInterface dialog, int id) {
>
> >> //uiThread.notify();
>
> >> System.out.println("Negative Button clicked");
>
> >>                                                                  }
> >>                                                      });
> >>                                         /*uiThread =
> >> Thread.currentThread();
> >>                                         AlertDialog alert =
> >> builder.create();
> >>                                         alert.show();
> >>                                         synchronized(alert) {
> >>                                                 alert.wait();
> >>                                         }*/
>
> >> --
> >> ...Swapnil
>
> >> || Hare Krishna Hare Krishna Krishna Krishna Hare Hare ||
> >> || Hare Rama    Hare Rama   Rama   Rama    Hare Hare ||
>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group.
> >> To post to this group, send email to android-developers@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> android-developers+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >>http://groups.google.com/group/android-developers?hl=en
>
> >  --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: hashset problem

2009-12-29 Thread Brion Emde
HashSet is not an ordered collection. The ordering is based on the the
hash value and however it represents the data internally. I am not
surprised at all that different versions of Android would give
different orderings.

On Dec 29, 4:25 am, raphael couturier 
wrote:
> Hi,
>
> I have a problem with the hashset implementation because the followinf
> little part of my code uses it and doesn't give the same result
> according to the version of android.
>
> Here is my code :
> HashSet hset=new HashSet();
> hset.add(new String("cat"));
> hset.add(new String("dog"));
> hset.add(new String("youpi"));
> hset.add(new String("argh"));
> hset.add(new String("cat"));
> hset.add(new String("why"));
> hset.add(new String("dummmy"));
>
> for(String s:hset)
>   Log.v("test",s);
>
> with android 1.5 I obtain :
>
> argh
> cat
> why
> youpi
> dog
> dummmy
>
> whereas with android 2.0 I obtain
> argh
> youpi
> cat
> dummmy
> dog
> why
>
> Does anyone have any idea of the problem?
>
> Thanks in advance
> Raphaël

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

2009-12-29 Thread Brion Emde
At least one of your Spinners has android:layout_height="fill_parent".
that could mess you up.

On Dec 29, 12:47 pm, Duey Oxburger  wrote:
> Hey All,
>
> A spinner question:
>
> I want to have multiple spinners working in the same view.  In my
> list, the first spinner works, but the others are empty. Here's how my
> main.xml looks:
>
> 
> http://schemas.android.com/apk/res/
> android"
>     android:orientation="vertical"
>     android:padding="10dip"
>     android:layout_width="fill_parent"
>     android:layout_height="wrap_content">
>
>              android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:layout_marginTop="10dip"
>         android:text="Build your Squad:"
>     />
>
>              android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:layout_marginTop="10dip"
>         android:text="Unit 1:"
>     />
>
>              android:id="@+id/spinner"
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:drawSelectorOnTop="true"
>         android:prompt="@string/planet_prompt"
>     />
>
>              android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:layout_marginTop="10dip"
>         android:text="Unit 2:"
>     />
>
>              android:id="@+id/spinner"
>         android:layout_width="fill_parent"
>         android:drawSelectorOnTop="true"
>         android:prompt="@string/planet_prompt"
>     android:layout_height="fill_parent"/>
>
>              android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:layout_marginTop="10dip"
>         android:text="Unit 3:"
>     />
>
>              android:id="@+id/spinner"
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:drawSelectorOnTop="true"
>         android:prompt="@string/planet_prompt"
>     />
>
>                  android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:layout_marginTop="10dip"
>         android:text="Unit 4:"
>     />
>
>              android:id="@+id/spinner"
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:drawSelectorOnTop="true"
>         android:prompt="@string/planet_prompt"
>     />
>
>              android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:layout_marginTop="10dip"
>         android:text="Unit 5:"
>     />
>
>              android:id="@+id/spinner"
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:drawSelectorOnTop="true"
>         android:prompt="@string/planet_prompt"
>     />
>
>              android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:layout_marginTop="10dip"
>         android:text="Unit 6:"
>     />
>
>              android:id="@+id/spinner"
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:drawSelectorOnTop="true"
>         android:prompt="@string/planet_prompt"
>     />
>
>              android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:layout_marginTop="10dip"
>         android:text="Unit 7:"
>     />
>
>              android:id="@+id/spinner"
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:drawSelectorOnTop="true"
>         android:prompt="@string/planet_prompt"
>     />
>
>              android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:layout_marginTop="10dip"
>         android:text="Unit 8:"
>     />
>
>              android:id="@+id/spinner"
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:drawSelectorOnTop="true"
>         android:prompt="@string/planet_prompt"
>     />
>
>              android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:layout_marginTop="10dip"
>         android:text="Unit 9:"
>     />
>
>              android:id="@+id/spinner"
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:drawSelectorOnTop="true"
>         android:prompt="@string/planet_prompt"
>     />
>
>              android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:layout_marginTop="10dip"
>         android:text="Unit 10:"
>     />
>
>              android:id="@+id/spinner"
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:drawSelectorOnTop="true"
>         android:prompt="@string/planet_prompt"
>     />
>     />
>
> 
>
> Any thoughts?...
>
> Thx,
>
> D

-- 
You received thi

[android-developers] Re: ProgressDialog during location tasks either won't show or force closes - I have tried everything!

2009-12-29 Thread andrew android
Thanks.  I was trying to create the ProgressDialog in OnCreate or
OnStart.  That must be the problem so what is the best approach to do
it immediately when theView is loading?I even tried
RunInUIThread?

Sorry for not including much trace before, by the way.  My mistake.  I
may try again later if still...



On Dec 28, 2:04 am, Chander Pechetty  wrote:
> That was not much help as I don't see any stacktrace.
>
> Are you passing the right context when you create the dialog, when you
> say it doesn't show up ?
> like so ... new ProgressDialog(YourActivity.this);
>
> Also you cannot touch any UI components in threads except the main UI
> thread or the Handlers, which might explain the force close.
>
> Please refer the docs for more info at 
> :http://developer.android.com/guide/topics/ui/dialogs.html#ProgressDialog
>
> On Dec 27, 10:10 pm,andrewandroid wrote:
>
>
>
> > Here is the logCat from one method I have tried - using basic thread
> > with progressdialog:
> > 12-27 11:07:46.365: INFO/ApplicationChangeReceiverAbc(5537):
> > com.hawkmoon.locabot.alpha added
> > 12-27 11:07:46.443: INFO/ApplicationChangeReceiverAbc(5537):
> > com.hawkmoon.locabot.alpha disable 1
> > 12-27 11:07:46.764: INFO/ActivityManager(1018): Process com.svox.pico
> > (pid 5532) has died.
> > 12-27 11:07:47.021: INFO/Process(5503): Sending signal. PID: 5503 SIG:
> > 9
> > 12-27 11:07:47.041: INFO/ActivityManager(1018): Process
> > com.android.vending (pid 5524) has died.
> > 12-27 11:07:47.053: INFO/WindowManager(1018): WIN DEATH: Window
> > {448c7438 Please wait... paused=false}
> > 12-27 11:07:47.053: INFO/ActivityManager(1018): Process
> > com.hawkmoon.locabot.alpha (pid 5503) has died.
> > 12-27 11:07:47.060: WARN/UsageStats(1018): Unexpected resume of
> > com.android.browser while already resumed in
> > com.hawkmoon.locabot.alpha
> > 12-27 11:07:47.068: ERROR/JavaBinder(1018): !!! FAILED BINDER
> > TRANSACTION !!!
> > 12-27 11:07:47.146: DEBUG/dalvikvm(5537): GC freed 774 objects / 66528
> > bytes in 273ms
> > 12-27 11:07:47.287: WARN/InputManagerService(1018): Window already
> > focused, ignoring focus gain of:
> > com.android.internal.view.iinputmethodclient$stub$pr...@4467cf08
> > 12-27 11:07:47.357: DEBUG/dalvikvm(5537): GC freed 312 objects / 17904
> > bytes in 94ms
> > 12-27 11:07:47.381: INFO/ActivityManager(1018): Start proc
> > jp.benishouga.clipstore:remote for broadcast
> > jp.benishouga.clipstore/.ClipboardObserver: pid=5544 uid=10061 gids=
> > {1015}
> > 12-27 11:07:47.412: INFO/dalvikvm(5544): Debugger thread not active,
> > ignoring DDM send (t=0x41504e4d l=38)
>
> > On Dec 26, 12:58 am, Chander Pechetty  wrote:
>
> > > post your stack trace on force close ...
>
> > > On Dec 25, 11:41 pm, Wayne Wenthin  wrote:
>
> > > > When you find out let me know.   I've had no luck either.
>
> > > > On Fri, Dec 25, 2009 at 6:50 
> > > > AM,andrewandroidwrote:
>
> > > > > ProgressDialog during location tasks either won't show or force closes
> > > > > - I have tried everything!
>
> > > > > I now have it in a Handler with a full 1 second delay (one method
> > > > > another post suggested) but it doesn't show.  I simply am stuck.
> > > > > Threads are usually force closing when I use those methods.
>
> > > > > What other tricks are there for this?
>
> > > > > Thanks!
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > > > Groups "AndroidDevelopers" group.
> > > > > To post to this group, send email 
> > > > > toandroid-develop...@googlegroups.com
> > > > > To unsubscribe from this group, send email to
> > > > >android-developers+unsubscr...@googlegroups.com > > > > s­cr...@googlegroups.com>
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/android-developers?hl=en
>
> > > > --
> > > > Writing code is one of few things
> > > > that teaches me I don't know everything.
>
> > > > Join the Closed Beta of Call Girl 
> > > > Managerhttp://www.fuligin.com/forums-Hidequoted text -
>
> > > - Show quoted text -

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


Re: [android-developers] Suppressing touch events with ACTION_CANCEL

2009-12-29 Thread Dianne Hackborn
ACTION_CANCEL lets you consume the current touch event stream until the next
up.

I would highly recommend that you not do this yourself, but use the APIs on
ViewGroup for intercepting touch events that will take care of these details
for you and ensure that the correct event flow occurs.

On Tue, Dec 29, 2009 at 10:04 AM, rahul  wrote:

> Hi,
>
> I am suppressing the touch events depending upon the size in the
> dispatchTouchEvent of View.java. If the event size is greater than the
> threshhold i m sending the event as ACTION_CANCEL to onTouchEvent. I
> wanted to know how ACTION_CANCEL works. In the android document it
> says it cancel the current gesture. What is the meaning of gesture (is
> it  ACTION_DOWN plus something which can happen between ACTION_UP) or
> is it individual event like ACTION_DOWN, ACTION_UP or ACTION_MOVE ?
>
> Thanks in advance.
>
> Rahul
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

Re: [android-developers] No Adobe Flash support for Eclair!?!

2009-12-29 Thread Dianne Hackborn
On Tue, Dec 29, 2009 at 1:45 PM, chris harper  wrote:

> I am doing a proof of concept right now for an app that I want to do.
> For my app to work I will need to interact certain system actions on the
> phone with code in Flash (actionscript 2 which FlashLite supports).
> I have not found a way for Java (i.e. an android app) to interact with
> actionScript directly.
>

Hi, the platform currently doesn't support Flash.  I would ask that you
please do not put applications up on the Market that rely on Flash, as they
will be very tied to specific devices that may happen to have it.

Even if at some point Flash is more generally supported on the platform, it
may well be an optional plug-in for users to download, so you would want to
think very seriously about whether you want rely on that with the attendant
hassles for the user of having to install Flash to use your app.  And of
course the minimum platform version your app would be compatible with is
whichever one this feature appears on -- for example, however you get it to
work with the HTC Hero will probably not match a standard platform facility,
since this is a non-standard platform feature owned by HTC.

Of course for futzing around with your own private app, have at it and do
what you want.  But for things that are intended to go on market, please
keep this in mind.

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

Re: [android-developers] Adobe AIR runtime can run on Android?

2009-12-29 Thread Mark Murphy
Lucas wrote:
> My doubt is if Adobe AIR runtime, for desktop apps, can be installed
> and run on Android.

Android does not natively support Flash, let alone AIR. Adobe does not
have a downloadable Flash player for Android, let alone an AIR runtime.

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

Android Development Wiki: http://wiki.andmob.org

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


[android-developers] Re: Microphone sample rates

2009-12-29 Thread niko20
Hi,

I know the G1 and the Droid can both do multiple sample rates. As far
as I know from reading posts, only the Samsung Moment is limited to
8000hz. I don't know of other devices tho.

-niko

On Dec 29, 8:52 am, RLScott  wrote:
> OK, can anyone give me any information at all on Android phones with a
> microphone sample rate of more than 8000 Hz?
>
> Robert Scott
> Ypsilanti, Michigan

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


[android-developers] Spinners

2009-12-29 Thread Duey Oxburger
Hey All,

A spinner question:

I want to have multiple spinners working in the same view.  In my
list, the first spinner works, but the others are empty. Here's how my
main.xml looks:


http://schemas.android.com/apk/res/
android"
android:orientation="vertical"
android:padding="10dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content">










































/>




Any thoughts?...

Thx,

D

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


[android-developers] Adding database to application

2009-12-29 Thread vg
Hi,
I am wondering if there is a way to do something like this.

Within a city  lets say San Diego, I have several zip codes and I want
the list of all those zip codes for a city in my database ?

Is it possible to bundle my application with a handful of such
databases?


Thanks,
Vishal

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


[android-developers] Questions about data persistence

2009-12-29 Thread cristiamterrera
Good community, I am developing an application data load information,
such an agenda, and I get the question of how to persist data?
to join the application, as besides the data also
persist the settings that are joining as preferences between
other things and information that is generated will persist in the
application?
someone can tell me roughly where it's the simplest
adequate?

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


[android-developers] What use for simple drawing on screen

2009-12-29 Thread hollowback
Hi, what is best way to create app in which I only need to draw simple
lines through onTouchEvent?
When i use invalidate everytime i draw any line, that erase lines i
draw before. But if I use some List structure to store drawed lines it
lose performance.
Is there any simple way to do it?

Thanks for reply

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


[android-developers] Suppressing touch events with ACTION_CANCEL

2009-12-29 Thread rahul
Hi,

I am suppressing the touch events depending upon the size in the
dispatchTouchEvent of View.java. If the event size is greater than the
threshhold i m sending the event as ACTION_CANCEL to onTouchEvent. I
wanted to know how ACTION_CANCEL works. In the android document it
says it cancel the current gesture. What is the meaning of gesture (is
it  ACTION_DOWN plus something which can happen between ACTION_UP) or
is it individual event like ACTION_DOWN, ACTION_UP or ACTION_MOVE ?

Thanks in advance.

Rahul

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

2009-12-29 Thread RLScott
OK, can anyone give me any information at all on Android phones with a
microphone sample rate of more than 8000 Hz?

Robert Scott
Ypsilanti, Michigan

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


[android-developers] unsubscribe

2009-12-29 Thread Jiawu Zhong


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

[android-developers] Adobe AIR runtime can run on Android?

2009-12-29 Thread Lucas
Hi everyone,
im from Argentina and this is mi 1st post, sorry for my poor english.

My doubt is if Adobe AIR runtime, for desktop apps, can be installed
and run on Android.

Recently i get a smartphone (Droid phone) and i want to use the multi-
touch API launch by Adobe, to mobile devices, and is ideal to test on
the smartphnoe directly, only if Adobe AIR can be run on Android

Thanks in advance.

Lucas

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

2009-12-29 Thread hollowback
Hi, i need to create app in which will user draw simple lines through
onTouchEvent.
It had to be possible to save drawed image as bitmap.
At Graphics | Android Developers I read there are 2 ways to do it. But
as i wrote with SurfaceView it is impossible to save it as bitmap.
But I don't know how to do that with other View objects.
In my onTouchEvent I use Path object to store coordinates.

Please could you tell me how to do it?

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


[android-developers] hashset problem

2009-12-29 Thread raphael couturier
Hi,

I have a problem with the hashset implementation because the followinf
little part of my code uses it and doesn't give the same result
according to the version of android.

Here is my code :
HashSet hset=new HashSet();
hset.add(new String("cat"));
hset.add(new String("dog"));
hset.add(new String("youpi"));
hset.add(new String("argh"));
hset.add(new String("cat"));
hset.add(new String("why"));
hset.add(new String("dummmy"));

for(String s:hset)
  Log.v("test",s);

with android 1.5 I obtain :

argh
cat
why
youpi
dog
dummmy

whereas with android 2.0 I obtain
argh
youpi
cat
dummmy
dog
why

Does anyone have any idea of the problem?

Thanks in advance
Raphaël

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


[android-developers] On distribution of APP

2009-12-29 Thread cristiamterrera
Good Community, I wonder if someone uploaded any application to
market sales of google android market? and if an earned some
selling silver or been uploaded for free?

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


[android-developers] Sony Ericsson Developer World on Android Developers

2009-12-29 Thread SonyEricsson DeveloperWorld
Hi all

This is the debut post of Sony Ericsson Developer World on this forum
and we are pleased to announce that our content submission portal,
https://submit.sonyericsson.com is now open for Android developers to
upload applications and games to PlayNow, Sony Ericsson’s one-stop
content store which operates in 70 countries.

Sony Ericsson Developer World is a global support program and web
portal totally dedicated to helping mobile developers achieve business
success by providing the documentation, tools, training, technical and
go-to-market support they need in their development process.

Our presence here is one more step in this direction. If you got any
queries, suggestions and grievances, just direct them to us.

Sony Ericsson Developer World can be accessed through 
http://developer.sonyericsson.com

Cheers

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


[android-developers] Sony Ericsson Developer World on Android Developers

2009-12-29 Thread SonyEricsson DeveloperWorld
Hi all

This is the debut post of Sony Ericsson Developer World on this forum
and we are pleased to announce that our content submission portal,
https://submit.sonyericsson.com is now open for Android developers to
upload applications and games to PlayNow, Sony Ericsson’s one-stop
content store which operates in 70 countries.

Sony Ericsson Developer World is a global support program and web
portal totally dedicated to helping mobile developers achieve business
success by providing the documentation, tools, training, technical and
go-to-market support they need in their development process.

Our presence here is one more step in this direction. If you got any
queries, suggestions and grievances, just direct them to us.

Sony Ericsson Developer World can be accessed through 
http://developer.sonyericsson.com

Cheers

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


[android-developers] How to retrieve sms number

2009-12-29 Thread snehal penurkar
Hello Freinds,

i am doing program for retrieving sms number. I am using BroadcastReciever.
Can anyone tell me how to  retrieve sms numbers?

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: open sourcing an app

2009-12-29 Thread Christine
Thanks for pointing that out, I should have done a search first :-)

On Dec 29, 11:52 pm, Greg Donald  wrote:
> On Tue, Dec 29, 2009 at 4:39 PM, Christine  wrote:
> > I haven't seen many open source android apps yet.
>
> There are quite a few actually:
>
> http://code.google.com/hosting/search?q=label:android
>
> --
> Greg Donaldhttp://destiney.com/

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


[android-developers] Re: Contact Picking on Motorola Cliq (1.5)?

2009-12-29 Thread jak.
Hello Suzanne,

I'm glad to hear that there is a fix in the works for this bug.
Are you aware that there is also a bug when using the create intent?

Intent(Intent.ACTION_INSERT,Contacts.People.CONTENT_URI);

This does allow me to create a new contact, but the result it sends
back to my onActivityResult callback is useless.

>>  protected void onActivityResult(int requestCode, int resultCode, Intent 
>> data) {}

Whenever the user is done creating a contact, I get a call to my on
activity result with resultCode set to 0 (AKA: RESULT_CANCELED), and
data is null;
Even though the contact creation was successful!

This is not the default Android behavior.
When a user uses this intent to create a new contact, the
onActivityResult should pass a -1 for the result (AKA: RESULT_OK).
And the Intent data should contain a Uri to the newly created contact,
accessible via data.getData().

Since Motorola's implementation of contacts sends back RESULT_CANCELED
for any contact insert, there's no way for our App that started the
Intent to know when we have a valid result to act on.

If Motorola completely re-implements parts of the Android OS, I really
wish they would be careful not break the programmer interfaces.
It makes us developers look bad when our Apps don't work on your
devices when It really isn't even our fault.

Thanks for your help.

On Dec 2, 1:19 pm, "suzanne.alexandra"
 wrote:
> I'm happy to say this bug has been fixed and is expected to be
> released toCLIQusers in an upcoming OTA upgrade. I would anticipate
> early next year for this.
>
> --
> Suzanne Alexandra
> Motorolahttp://developer.motorola.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


Re: [android-developers] open sourcing an app

2009-12-29 Thread Greg Donald
On Tue, Dec 29, 2009 at 4:39 PM, Christine  wrote:
> I haven't seen many open source android apps yet.

There are quite a few actually:

http://code.google.com/hosting/search?q=label:android


-- 
Greg Donald
http://destiney.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] open sourcing an app

2009-12-29 Thread Christine
I haven't seen many open source android apps yet. Can I make my app
gpl open source just like that? Or do I have to include legal
statements regarding the Android code that my app is using?

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


[android-developers] AudioTrack - Clicking Sounds

2009-12-29 Thread Business Talk
Do you know of any freeware application that can convert/generate
sounds in the PCM format? I am getting clicking sounds when playing
AudioTrack and I think it is because I am playing a wave file which is
a pcm with some headers. I downloaded a number of converters but all
of them generate wave files.

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


Re: [android-developers] No Adobe Flash support for Eclair!?!

2009-12-29 Thread Frank Weiss
Chris, sounds OK to me. I suppose using the WebView is to bridge between
Flash and Java as you indicated and to allow instant application updates
(instead of requiring install of a rich interface application).

However, the plumbing looks awful, I think you'd agree. I've wondered if
Adobe hasn't missed the boat by not having made Flash the mobile app
platform of choice, but that's another discussion.

On Tue, Dec 29, 2009 at 1:45 PM, chris harper  wrote:

> Hey Sena
>
> It looks like I have to do a little more research between Flash 9 and
> FlashLite. I will do that tonight. Thank you.
>
> Unfortunately I have the Sprint HTC HERO which as I recently found out is
> less open to find ROM updates. I will search for the Sense 2 that you
> referred to. I might get lucky. :-)
>
> I am doing a proof of concept right now for an app that I want to do.
> For my app to work I will need to interact certain system actions on the
> phone with code in Flash (actionscript 2 which FlashLite supports).
> I have not found a way for Java (i.e. an android app) to interact with
> actionScript directly.
>
> The bridge I found is javascript.
>
> ActionScript WILL interact with javascript.
> Java also interact with javascript as seen here with WebView.
> http://code.google.com/p/apps-for-android/
> Check out the *WebViewDemo.*
>
> So what I am trying to do is when an action happens ( for example the phone
> ringing or other events on the phone)  that triggers a call to javascript
> which will then in turn send an action to the actionScript within flash
> which will then perform an animation or something.
> If I can only find a way to actually display the flash content within
> WebView.
>
> I might be out in right field on this and if I am please feel free to give
> me a virtual slap around but this is the only way I can find to do what I
> want.
>
> -Chris
>
> On Tue, Dec 29, 2009 at 1:20 PM, Sena Gbeckor-Kove  wrote:
>
>> Hi Chris,
>>
>> From what I kwow there are quite a few differences between Flash 9 and
>> Flash Lite. A quick Google should fill you in.
>>
>> You'll definitely need one of the standard Hero roms unless somebody has
>> hacked the Flash files onto a custom rom. If you must have something more
>> recent you might want to track down the Sense 2 rom. I know that runs on
>> Hero. There are videos of it floating about. Or just wait, for 2 months for
>> HTC to drop the official 2.x update.
>>
>> I must say I'm intrigued as to why you want to create such a WebView when
>> only Hero owners will be able to use it at present. Of course once Flash
>> 10.1 turns up for Android everybody should be able to play.
>>
>> Q2 2010?
>>
>> S
>>   On 29 Dec 2009, at 17:51, chris harper wrote:
>>
>>
>> Sena - I picked up a book on writing Flash content for mobile devices and
>> from I understand from the book is that FlashLite is based off of Flash 9.
>> They are essentially the same thing. Where anything written for Flash 9
>> (with actionscript 2) can be run in FlashLite. That is my current
>> understanding between the two. There might be minor differences.I did
>> flash my HTC HERO about a month ago and that thought did cross my mind that
>> maybe the FlashLite got messed up in the process. So my current thought
>> process is to FLASH HTC's newest ROM onto my Hero:
>>
>> http://www.htc.com/uk/SupportViewNews.aspx?dl_id=671&news_id=254
>>
>> I think this will be my best bet for getting the most updated Flash from
>> HTC onto my HERO and (hopefully if the moons align) be able to write a
>> little WebView client to read .swf files.
>>
>> -Chris
>>
>>
>>
>> On Tue, Dec 29, 2009 at 7:00 AM, Sena Gbeckor-Kove wrote:
>>
>>> If you've flashed you Hero with somethign else you'll have removed the
>>> Flash Plugin. Unless you have a cracked ROM that includes Flash.
>>>
>>> S
>>>
>>>
>>>   On 28 Dec 2009, at 20:30, chris harper wrote:
>>>
>>>   Ok. It is becoming clear now.
>>>
>>> Flash is licensed per device. So even though you have different devices
>>> all running Android, only the ones that are licensed for Flash can implement
>>> it. Is that correct?
>>>
>>> I didn't mention that I do have an HTC Hero (as well as my android
>>> development phone). It is running Firmware version 1.5.
>>> I also tried doing the WebView as stated in the article testing on this
>>> device and also got the same result as my android development phone when
>>> trying to view a .swf (a screen full of random characters).
>>>
>>> From what you told me it sounds like I need to go down the road of
>>> continuing to test my WebView stub on my HTC Hero and maybe looking into why
>>> my flashlite plugin doesn't seem to be working with my WebView stub code?
>>>
>>> Does that sound about right to you Mark?
>>>
>>> Thank you again, this really does help me alot.
>>>
>>> -Chris
>>>
>>>
>>>
>>> On Mon, Dec 28, 2009 at 12:10 PM, Mark Murphy 
>>> wrote:
>>>
 chris harper wrote:
 > According to this article it is had been done and is possible:
 >
 http://www.fla

[android-developers] Re: How can i stop a thread in a Activity?

2009-12-29 Thread theSmith
That would work also, you just have to remember that function calls
are never free and the GC on android is annoying enough as it is, no
need to give it more stuff to do.

-theSmith

On Dec 29, 1:43 pm, jotobjects  wrote:
> Why not just call Thread.isInterrupted() instead of using the
> volatile?
>
> On Dec 29, 9:24 am, theSmith  wrote:
>
> > I found this article to be very insightful because I too am just
> > learning about managing multiple 
> > threads.http://articles.techrepublic.com.com/5100-10878_11-5144546.html
>
> > I ended up using a shared volatile variable that is check when I'm
> > doing this that take alot of time in the background thread, if it's
> > false the thread will exit accordingly.  Also in my app's onStop()
> > method I make sure to check to see if the thread is running and stop
> > it if it is.
>
> > -theSmith
>
> > On Dec 18, 5:44 pm, Streets Of Boston  wrote:
>
> > > Calling interrupt() only works if your thread is interruptable and if
> > > your thread handles interruptions appropriately.
>
> > > Your thread only is interrupted if the thread is doing I/O or is in a
> > > wait-state (having called wait() on Object).
>
> > > If you want to have background threads that do one-shot jobs and then
> > > wait, use AsyncTask or the java.util.concurrent's ExecutorService .
>
> > > And, you'd better read up on concurrent programming a little :-) It
> > > can be tricky.
>
> > > On Dec 16, 11:26 pm, Matt  wrote:
>
> > > > Try storing the newly spawned thread as a field or collection in the
> > > > appropriate class.  Then when you need to kill the thread, retrieve it
> > > > and call Thread.interrupt().
>
> > > > Matt
>
> > > > On Dec 9, 6:15 pm, Richard Zhao  wrote:
>
> > > > > My problem is:
> > > > > Activity A called Activity B, and in Activity B, it start a background
> > > > > thread to do some client-server work. But it maybe takes too much
> > > > > time. So i add a cancel button to call the stop() method to stop the
> > > > > thread, and call finish() to finish the Activity B and go back to
> > > > > Activity A. Although it is back to Activity A, the thread isn't stop
> > > > > immediately.
>
> > > > > Can i just call the finish() to go back to Activity A, and leave the
> > > > > thread to exit by itself?
> > > > > If it is not the right way, which is?
>
> > > > > Thanks for any help.- Hide quoted text -
>
> > > > - Show quoted text -

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


[android-developers] Re: Android “hover” event i n custom layout

2009-12-29 Thread k_day
I suppose one way to do this is to capture touch events at the layout
level, and then loop through all the layouts to see if an imageview is
under that point, though that sounds inefficient.

Is there any better way to find which view is at a given point?

Also, is it true that any touch event on an imageview will always
start with an ACTION_DOWN? I would like to switch focus to another
view when a finger is dragged over it.

On Dec 26, 11:06 pm, k_day  wrote:
> I have a custom layout that I have written that basically just
> displays a bunch of ImageViews. I am handing onTouch events for all
> the ImageViews in my layout. However, if a user touches one imageView
> and then drags over another ImageView, I would like to be able to
> handle that as well.
>
> How would I go about capturing this behavior?

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


Re: [android-developers] No Adobe Flash support for Eclair!?!

2009-12-29 Thread chris harper
Hey Sena

It looks like I have to do a little more research between Flash 9 and
FlashLite. I will do that tonight. Thank you.

Unfortunately I have the Sprint HTC HERO which as I recently found out is
less open to find ROM updates. I will search for the Sense 2 that you
referred to. I might get lucky. :-)

I am doing a proof of concept right now for an app that I want to do.
For my app to work I will need to interact certain system actions on the
phone with code in Flash (actionscript 2 which FlashLite supports).
I have not found a way for Java (i.e. an android app) to interact with
actionScript directly.

The bridge I found is javascript.

ActionScript WILL interact with javascript.
Java also interact with javascript as seen here with WebView.
http://code.google.com/p/apps-for-android/
Check out the *WebViewDemo.*

So what I am trying to do is when an action happens ( for example the phone
ringing or other events on the phone)  that triggers a call to javascript
which will then in turn send an action to the actionScript within flash
which will then perform an animation or something.
If I can only find a way to actually display the flash content within
WebView.

I might be out in right field on this and if I am please feel free to give
me a virtual slap around but this is the only way I can find to do what I
want.

-Chris

On Tue, Dec 29, 2009 at 1:20 PM, Sena Gbeckor-Kove  wrote:

> Hi Chris,
>
> From what I kwow there are quite a few differences between Flash 9 and
> Flash Lite. A quick Google should fill you in.
>
> You'll definitely need one of the standard Hero roms unless somebody has
> hacked the Flash files onto a custom rom. If you must have something more
> recent you might want to track down the Sense 2 rom. I know that runs on
> Hero. There are videos of it floating about. Or just wait, for 2 months for
> HTC to drop the official 2.x update.
>
> I must say I'm intrigued as to why you want to create such a WebView when
> only Hero owners will be able to use it at present. Of course once Flash
> 10.1 turns up for Android everybody should be able to play.
>
> Q2 2010?
>
> S
> On 29 Dec 2009, at 17:51, chris harper wrote:
>
>
> Sena - I picked up a book on writing Flash content for mobile devices and
> from I understand from the book is that FlashLite is based off of Flash 9.
> They are essentially the same thing. Where anything written for Flash 9
> (with actionscript 2) can be run in FlashLite. That is my current
> understanding between the two. There might be minor differences. I did
> flash my HTC HERO about a month ago and that thought did cross my mind that
> maybe the FlashLite got messed up in the process. So my current thought
> process is to FLASH HTC's newest ROM onto my Hero:
>
> http://www.htc.com/uk/SupportViewNews.aspx?dl_id=671&news_id=254
>
> I think this will be my best bet for getting the most updated Flash from
> HTC onto my HERO and (hopefully if the moons align) be able to write a
> little WebView client to read .swf files.
>
> -Chris
>
>
>
> On Tue, Dec 29, 2009 at 7:00 AM, Sena Gbeckor-Kove  wrote:
>
>> If you've flashed you Hero with somethign else you'll have removed the
>> Flash Plugin. Unless you have a cracked ROM that includes Flash.
>>
>> S
>>
>>
>> On 28 Dec 2009, at 20:30, chris harper wrote:
>>
>> Ok. It is becoming clear now.
>>
>> Flash is licensed per device. So even though you have different devices
>> all running Android, only the ones that are licensed for Flash can implement
>> it. Is that correct?
>>
>> I didn't mention that I do have an HTC Hero (as well as my android
>> development phone). It is running Firmware version 1.5.
>> I also tried doing the WebView as stated in the article testing on this
>> device and also got the same result as my android development phone when
>> trying to view a .swf (a screen full of random characters).
>>
>> From what you told me it sounds like I need to go down the road of
>> continuing to test my WebView stub on my HTC Hero and maybe looking into why
>> my flashlite plugin doesn't seem to be working with my WebView stub code?
>>
>> Does that sound about right to you Mark?
>>
>> Thank you again, this really does help me alot.
>>
>> -Chris
>>
>>
>>
>> On Mon, Dec 28, 2009 at 12:10 PM, Mark Murphy wrote:
>>
>>> chris harper wrote:
>>> > According to this article it is had been done and is possible:
>>> >
>>> http://www.flashmobileblog.com/2009/08/12/flash-development-with-android-part2/
>>>
>>> The very first sentence of that post:
>>>
>>> "As we already know by now the HTC Hero supports Flash in the browser,
>>> and by double tapping on Flash content it will be played in full screen
>>> mode."
>>>
>>> You will note that this says "HTC Hero". The HTC Hero is a device, for
>>> which HTC licensed a Flash (Lite) implementation.
>>>
>>> > But again like I stated before, after downloading the latest source
>>> > code, building it, flashing it to my development phone and flash still
>>> > not working I am having my doubts (and gr

[android-developers] Touch handling sleep not helping enough on 1.5/1.6

2009-12-29 Thread Robert Green
Hey guys,

I'm really in a bind here.  I've got this new game engine that's
almost done but the input system is killing me.  I have a virtual
analog stick on the screen and it works great, especially on Android
2.0 (Droid) but on any 1.5/1.6 device, the touching is causing my game
to crawl.

I know all of the standard stuff - I pipe my input events into a queue
for my main game thread and then sleep for 16ms which should ensure
that no more than 60 motion events are dispatched per second.  That
works fine but even so, just touching the screen, even with my event
handling code commented out (except for the sleep, of course), drops
my game from 30FPS to 20FPS.  It's really bad.  I bound some keyboard
keys to the movement to replace the touch controls for testing and the
game maintained a great framerate.  That won't work because most
phones now only have touchscreens so I really need to figure this one
out.

"Wait for Android 2.0" is not a great answer, either.

So far I've tried;

Activity.onTouchEvent with a 16, 20, 32, 50ms sleep before returning
Activity.dispatchTouchEvent with a 16,20,32 and 50ms sleep
Commented out all code except the sleep to test - problem is still
there, so it's not my hander.

What else can I do?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: No Adobe Flash support for Eclair!?!

2009-12-29 Thread Skid
The browsers on my Droid (Milestone) forwards me Adobe's site that
tells me:
"Adobe Flash Player 10.1 is coming to Android 2.0 and future releases
in the first half of 2010."

Nice and vague but there you are.

On Dec 28, 6:07 pm, chris harper  wrote:
> I kept reading about how one of the biggest news about eclair coming
> out in 2010 is that  support for Flash 10 (or ANY Flash for that
> matter) will be built into it.
>
> This does not appear to be the case for the fact that I download all
> the latest source code for Eclair, built and installed Eclair onto my
> development phone over the Christmas break and to my surprise/
> disappointment there is absolutely no support for Flash when I try to
> view with the browser. I tried plugin's and searching for missing .apk
> installs for Flash but I found nothing.
>
> Unless I am missing something (i.e. maybe a side tree build for
> flash?)  and if I did then I apologize but from what I can tell as of
> now the Eclair build does and will not support flash.
>
> If anyone knows ANYTHING on this topic on this please update for us.
>
> Thank you
>
> -Chris

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


Re: [android-developers] No Adobe Flash support for Eclair!?!

2009-12-29 Thread Sena Gbeckor-Kove
Hi Chris,

From what I kwow there are quite a few differences between Flash 9 and Flash 
Lite. A quick Google should fill you in.

You'll definitely need one of the standard Hero roms unless somebody has hacked 
the Flash files onto a custom rom. If you must have something more recent you 
might want to track down the Sense 2 rom. I know that runs on Hero. There are 
videos of it floating about. Or just wait, for 2 months for HTC to drop the 
official 2.x update.

I must say I'm intrigued as to why you want to create such a WebView when only 
Hero owners will be able to use it at present. Of course once Flash 10.1 turns 
up for Android everybody should be able to play.

Q2 2010?

S
On 29 Dec 2009, at 17:51, chris harper wrote:

> 
> Sena - I picked up a book on writing Flash content for mobile devices and 
> from I understand from the book is that FlashLite is based off of Flash 9. 
> They are essentially the same thing. Where anything written for Flash 9 (with 
> actionscript 2) can be run in FlashLite. That is my current understanding 
> between the two. There might be minor differences.
> 
> I did flash my HTC HERO about a month ago and that thought did cross my mind 
> that maybe the FlashLite got messed up in the process. So my current thought 
> process is to FLASH HTC's newest ROM onto my Hero:
> 
> http://www.htc.com/uk/SupportViewNews.aspx?dl_id=671&news_id=254
> 
> I think this will be my best bet for getting the most updated Flash from HTC 
> onto my HERO and (hopefully if the moons align) be able to write a little 
> WebView client to read .swf files.
> 
> -Chris
> 
> 
> 
> On Tue, Dec 29, 2009 at 7:00 AM, Sena Gbeckor-Kove  wrote:
> If you've flashed you Hero with somethign else you'll have removed the Flash 
> Plugin. Unless you have a cracked ROM that includes Flash.
> 
> S
> 
> 
> On 28 Dec 2009, at 20:30, chris harper wrote:
> 
>> Ok. It is becoming clear now.
>> 
>> Flash is licensed per device. So even though you have different devices all 
>> running Android, only the ones that are licensed for Flash can implement it. 
>> Is that correct?
>> 
>> I didn't mention that I do have an HTC Hero (as well as my android 
>> development phone). It is running Firmware version 1.5.   
>> I also tried doing the WebView as stated in the article testing on this 
>> device and also got the same result as my android development phone when 
>> trying to view a .swf (a screen full of random characters).
>> 
>> From what you told me it sounds like I need to go down the road of 
>> continuing to test my WebView stub on my HTC Hero and maybe looking into why 
>> my flashlite plugin doesn't seem to be working with my WebView stub code?
>> 
>> Does that sound about right to you Mark?
>> 
>> Thank you again, this really does help me alot.
>> 
>> -Chris
>> 
>> 
>> 
>> On Mon, Dec 28, 2009 at 12:10 PM, Mark Murphy  
>> wrote:
>> chris harper wrote:
>> > According to this article it is had been done and is possible:
>> > http://www.flashmobileblog.com/2009/08/12/flash-development-with-android-part2/
>> 
>> The very first sentence of that post:
>> 
>> "As we already know by now the HTC Hero supports Flash in the browser,
>> and by double tapping on Flash content it will be played in full screen
>> mode."
>> 
>> You will note that this says "HTC Hero". The HTC Hero is a device, for
>> which HTC licensed a Flash (Lite) implementation.
>> 
>> > But again like I stated before, after downloading the latest source
>> > code, building it, flashing it to my development phone and flash still
>> > not working I am having my doubts (and greatly wondering how this guy
>> > said it is working).
>> 
>> That is because he is referring to the HTC Hero.
>> 
>> > Do you know if this is even somewhat possible (maybe a FlashLite plugin
>> > I am missing or something?).
>> 
>> This presumably will work on an HTC Hero -- I haven't tried it. It will
>> not work on devices that did not license Flash (Lite) from Adobe. It
>> most definitely will not work from the Android open source tree, because
>> Flash is not open source.
>> 
>> --
>> Mark Murphy (a Commons Guy)
>> http://commonsware.com | http://twitter.com/commonsguy
>> 
>> Android App Developer Books: http://commonsware.com/books
>> 
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>> 
>> 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/

[android-developers] Re: Bluetooth SPP question

2009-12-29 Thread Fred
Very useful feedback, thank you.  I will give sdptool a try on my
linux laptop to see what the device capabilities are, and when I have
that I will also use the UUID you gave, again, 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: Phone calls recording on 2.0

2009-12-29 Thread Matt
You can watch this thread:
http://code.google.com/p/android/issues/detail?id=2117

I don't think it works on any phones yet.  There is some speculation
it might work on the Nexus one.

matt

On Dec 29, 11:36 am, "appforce.org"  wrote:
> I would like to ask Google engineers or anyone, if there is known
> device that supports voice call audio recording?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Trying to get rid of my last few Long calculations in my game and completely turn it into FP format. System.currentTimeMillis() giving me a headache.

2009-12-29 Thread a1


On 29 Gru, 17:49, Mika  wrote:
> OH sorry guys, my bad, I wasn't specific enough.
> I'm TRYING To shift myself into fixed point(FP) world and trying to
> get rid of the long calculations :) So.. does the topic make more
> sense now? Sorry for being such a numnum and not realising that FP =
> fixed point AND floating point. D'oh.
>
> But yeah, any help how to get rid of the remaining long calculation?

By writing "shift into fixed" I meant you can simply do:

int time_15_16 = ((int) (now - last) << 16) / 1000;

since difference betweend now and last update time cannot overflow.

--
Bart Janusz

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Get body movement (e.g. turn around)

2009-12-29 Thread Moritzz
Well, I chose another way now:
I'm just looking at the compass (calibration required) and check with
a switch-case if the phone was turned. That's not the "good" approach
but it works for now and as I'm just working on a prototype that
should be fine for now. As the user is supposed to look on the screen
while using my app I don't think people would start turning the phone
but not themselves.
Thanks for your help anyway!

Cheers


On Dec 29, 4:32 pm, Frank Weiss  wrote:
> Using the (magnetic) compass would require less coding, I suppose. However,
> is it available on all your target devices and is it accurate enough?
>
> I should defer to someone who's actually used the compass sensor. In the
> meantime, you could put together a test app in just a few minutes. You could
> base it on the following accelerometer test 
> code:http://stuffthathappens.com/blog/2009/03/15/android-accelerometer/
>
> On Tue, Dec 29, 2009 at 7:11 AM, Matt  wrote:
> > Isn't it possible to use the compass magnet to track direction?
>
> > Matt
>
> > On Dec 29, 7:07 am, Frank Weiss  wrote:
> > > It's doubtful you can literally tell if the person has turned around. I
> > > think you're trying to infer that, by assuming the person is holding the
> > > device a certain way in relation to his or her body..
>
> > > Perhaps by that assumption, the device moves in a 360° arc through space,
> > > not on an axis intersecting the device (simple bearing). It should be
> > > possible to track the position of the device through the arc via the
> > > accelerometer and infer the body movement you are trying to figure out.
>
> > > On Tue, Dec 29, 2009 at 2:18 AM, Moritzz 
> > wrote:
> > > > Okay, I came up with an idea now but I can't implement it. Basically I
> > > > need to implement sthg like a real compass. I also found an
> > > > application like that in the market: Compass. But I have no clue how
> > > > they got that thing working properly. Does anyone have some experience
> > > > with the "orientation" and "magnetic field" sensors?
>
> > > > On Dec 27, 6:40 pm, Moritzz  wrote:
> > > > > I'm working on an app that needsbodymovements as inputs. So
> > > > > basically I want to know if a person turns around completely (360°).
> > > > > If a the person does sthg happens inside the application. My problem
> > > > > for now is: How to figure out if a person turned around?
> > > > > I don't see an approach with gps as the person is not moving enough.
> > > > > So I thought about the compass or acceleration sensor but I have no
> > > > > clue how to manage that. I'd really appreciate some ideas / hints /
> > > > > tipps!
>
> > > > > Cheers
>
> > > > > Moritz
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> > android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: How can i stop a thread in a Activity?

2009-12-29 Thread jotobjects
Why not just call Thread.isInterrupted() instead of using the
volatile?

On Dec 29, 9:24 am, theSmith  wrote:
> I found this article to be very insightful because I too am just
> learning about managing multiple 
> threads.http://articles.techrepublic.com.com/5100-10878_11-5144546.html
>
> I ended up using a shared volatile variable that is check when I'm
> doing this that take alot of time in the background thread, if it's
> false the thread will exit accordingly.  Also in my app's onStop()
> method I make sure to check to see if the thread is running and stop
> it if it is.
>
> -theSmith
>
> On Dec 18, 5:44 pm, Streets Of Boston  wrote:
>
> > Calling interrupt() only works if your thread is interruptable and if
> > your thread handles interruptions appropriately.
>
> > Your thread only is interrupted if the thread is doing I/O or is in a
> > wait-state (having called wait() on Object).
>
> > If you want to have background threads that do one-shot jobs and then
> > wait, use AsyncTask or the java.util.concurrent's ExecutorService .
>
> > And, you'd better read up on concurrent programming a little :-) It
> > can be tricky.
>
> > On Dec 16, 11:26 pm, Matt  wrote:
>
> > > Try storing the newly spawned thread as a field or collection in the
> > > appropriate class.  Then when you need to kill the thread, retrieve it
> > > and call Thread.interrupt().
>
> > > Matt
>
> > > On Dec 9, 6:15 pm, Richard Zhao  wrote:
>
> > > > My problem is:
> > > > Activity A called Activity B, and in Activity B, it start a background
> > > > thread to do some client-server work. But it maybe takes too much
> > > > time. So i add a cancel button to call the stop() method to stop the
> > > > thread, and call finish() to finish the Activity B and go back to
> > > > Activity A. Although it is back to Activity A, the thread isn't stop
> > > > immediately.
>
> > > > Can i just call the finish() to go back to Activity A, and leave the
> > > > thread to exit by itself?
> > > > If it is not the right way, which is?
>
> > > > Thanks for any help.- Hide quoted text -
>
> > > - Show quoted text -

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


[android-developers] SMS text garbled using native Messaging app when message spans two text messages?

2009-12-29 Thread Mark Wyszomierski
Hi,

I'm working with the sms intent. Testing this on 2.0 emulators.

If I use the built-in messaging app to create a text message which
spans two messages, the receiving emulator displays the received
message as garbled text. Looks like it's encoded or compressed etc.
Does anyone else see this? Is this just an issue with the emulators,
and won't happen on a real device? If I send a message < 160
characters, the other emulator gets it ok.

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: Debugging on mobile 2

2009-12-29 Thread LeGeNDuS
thanks for all!, I have seen why it doesnt work...
android:debuggable=true lacked in the manifiest, now it works (I
didn't know it was neccesary...)


On 29 dic, 18:32, LeGeNDuS  wrote:
> Hello!, thanks for the answers.
>
> Yes I have enbled the USB debugging. My device is a HTC hero of Orange
> (in spain). It takes the android 1.5 (I don't know how to update it).
> I have installed the USB tool that comes with the setup of the SDK,
> and well, when I want to debug on the device (or trying at
> least... ;) ) I connect the USB to the PC and the device and when I
> click on run it install the APP and run it... When I click on debug,
> it does exactly the same (install if there is a change, and run) and
> never stops on the breakpoints used (and that breakpoints works with
> the emulator).
>
> On 28 dic, 08:41, sunit nair  wrote:
>
>
>
> > please check if u have enabled the USB debugging option on the device.
>
> > On Mon, Dec 28, 2009 at 5:38 PM, Frank Weiss  wrote:
> > > Please give details about your device and how you connect to it for
> > > debbing.
>
> > > On Dec 28, 2009 12:16 AM, "LeGeNDuS"  wrote:
>
> > > I had open this one:
>
> > >http://groups.google.com/group/android-developers/browse_thread/threa...
>
> > > But now, I can't asnwer in that post. I says to me that "it has been
> > > published" (my message) But it's not true, because I have tried to put
> > > 5 or 6 times to put a messages there and it never appears. So I reopen
> > > it. I hope now it works...
>
> > > I answer to Frank:
>
> > > Yes, I have used the breakpoints, and it works fine when I use the
> > > emulator, it stops where it must stop. But in the device, it doens't
> > > work I don't know why
>
> > > 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 > >  cr...@googlegroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> > >  --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com > >  cr...@googlegroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > Cheers,
> > Sunit
>
> > Marie von 
> > Ebner-Eschenbach
> > - "Even a stopped clock is right twice a day."

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

2009-12-29 Thread appforce.org

I would like to ask Google engineers or anyone, if there is known
device that supports voice call audio recording?

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

2009-12-29 Thread LeGeNDuS
Hello!, thanks for the answers.

Yes I have enbled the USB debugging. My device is a HTC hero of Orange
(in spain). It takes the android 1.5 (I don't know how to update it).
I have installed the USB tool that comes with the setup of the SDK,
and well, when I want to debug on the device (or trying at
least... ;) ) I connect the USB to the PC and the device and when I
click on run it install the APP and run it... When I click on debug,
it does exactly the same (install if there is a change, and run) and
never stops on the breakpoints used (and that breakpoints works with
the emulator).

On 28 dic, 08:41, sunit nair  wrote:
> please check if u have enabled the USB debugging option on the device.
>
>
>
>
>
> On Mon, Dec 28, 2009 at 5:38 PM, Frank Weiss  wrote:
> > Please give details about your device and how you connect to it for
> > debbing.
>
> > On Dec 28, 2009 12:16 AM, "LeGeNDuS"  wrote:
>
> > I had open this one:
>
> >http://groups.google.com/group/android-developers/browse_thread/threa...
>
> > But now, I can't asnwer in that post. I says to me that "it has been
> > published" (my message) But it's not true, because I have tried to put
> > 5 or 6 times to put a messages there and it never appears. So I reopen
> > it. I hope now it works...
>
> > I answer to Frank:
>
> > Yes, I have used the breakpoints, and it works fine when I use the
> > emulator, it stops where it must stop. But in the device, it doens't
> > work I don't know why
>
> > 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 > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> >  --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Cheers,
> Sunit
>
> Marie von 
> Ebner-Eschenbach
> - "Even a stopped clock is right twice a day."

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Crop a Picture after Using Camera to Take It

2009-12-29 Thread Wysie
Hi all,

After doing some reading, I realized it can't be done so simply. My
modded Contacts source is at http://github.com/Wysie, you can take a
look if you're interested. Also, here's what I did to get it working:

private void doTakePhotoAction() {
// http://2009.hfoss.org/Tutorial:Camera_and_Gallery_Demo
// 
http://stackoverflow.com/questions/1050297/how-to-get-the-url-of-the-captured-image
// http://www.damonkohler.com/2009/02/android-recipes.html
// http://www.firstclown.us/tag/android/
// The one I used to get everything working:
http://groups.google.com/group/android-developers/msg/2ab62c12ee99ba30

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

//Wysie_Soh: Create path for temp file
mImageCaptureUri = Uri.fromFile(new File
(Environment.getExternalStorageDirectory(),
"tmp_contact_" + String.valueOf
(System.currentTimeMillis()) + ".jpg"));

intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT,
mImageCaptureUri);

try {
intent.putExtra("return-data", true);
startActivityForResult(intent, PICK_FROM_CAMERA);
} catch (ActivityNotFoundException e) {
//Do nothing for now
}
}

protected void onActivityResult(int requestCode, int resultCode,
Intent data) {
if (resultCode != RESULT_OK) {
return;
}

switch (requestCode) {

case CROP_FROM_CAMERA: {
//Wysie_Soh: After a picture is taken, it will go to
PICK_FROM_CAMERA, which will then come here
//after the image is cropped.

final Bundle extras = data.getExtras();

if (extras != null) {
Bitmap photo = extras.getParcelable("data");

mPhoto = photo;
mPhotoChanged = true;
mPhotoImageView.setImageBitmap(photo);
setPhotoPresent(true);
}

//Wysie_Soh: Delete the temporary
file
File f = new File(mImageCaptureUri.getPath());
if (f.exists()) {
f.delete();
}

InputMethodManager mgr = (InputMethodManager)
getSystemService(Context.INPUT_METHOD_SERVICE);
mgr.showSoftInput(mPhotoImageView,
InputMethodManager.SHOW_IMPLICIT);

break;
}

case PICK_FROM_CAMERA: {
//Wysie_Soh: After an image is taken and saved to the
location of mImageCaptureUri, come here
//and load the crop editor, with the necessary parameters
(96x96, 1:1 ratio)

Intent intent = new Intent
("com.android.camera.action.CROP");
intent.setClassName("com.android.camera",
"com.android.camera.CropImage");

intent.setData(mImageCaptureUri);
intent.putExtra("outputX", 96);
intent.putExtra("outputY", 96);
intent.putExtra("aspectX", 1);
intent.putExtra("aspectY", 1);
intent.putExtra("scale", true);
intent.putExtra("return-data", true);
startActivityForResult(intent, CROP_FROM_CAMERA);

break;

}
}
}

Hope it helps :)

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


[android-developers] Logs from framework.jar

2009-12-29 Thread Michael Scott
Hi,

Why does no logprints from the framework-code (Telephony) show up in
logcat? Is there a setting somewhere I should turn on or something?

Thanks,
Michael

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


Re: [android-developers] blocking UI thread when Yes/No AlertDialog is displayed

2009-12-29 Thread TreKing
Um ... why don't you just put the code you want to execute in the onClick
handlers for the Yes and No options, respectively?
That's pretty much the point of having them ...

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking


On Tue, Dec 29, 2009 at 8:25 AM, Frank Weiss  wrote:

> I assume you want a modal dialog. I'm pretty sure  blocking the UI thread
> is going about this wrong. For example, consider the Activity lifecycle
> callbacks which would be called when another Activity or Application becomes
> visible.
>
> Here's an explanation I found by googling for android modal dialog:
> http://groups.google.com/group/android-developers/browse_thread/thread/5616a220c97a13fc/5e722e601f33d884#5e722e601f33d884
>
> On Tue, Dec 29, 2009 at 3:52 AM, swapnil kamble wrote:
>
>> Hi ,
>>   I am displaying Confirmation type dialog box. I want to pause
>> execution of that thread until answer is provided by user, but since this
>> AlertDialog works asynchronously, I am facing problems in blocking that
>> thread but displaying AlertDialog and continue execution on answer. I tried
>> using wait notify between threads but didn't worked. Anybody Used
>> AlertDialog.wait() method ?
>> I am pasting my code here too,
>>
>>  AlertDialog.Builder builder = new
>> AlertDialog.Builder(Demo.ctxt);
>>
>> builder.setMessage("Do you want  to Trust testgenservercert")
>>  .setCancelable(false)
>>
>> .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
>>  public void
>> onClick(DialogInterface dialog, int id) {
>>
>>
>> //uiThread.notify();
>>
>> System.out.println("Positive Button clicked");
>>  }
>>  })
>>
>> .setNegativeButton("No", new DialogInterface.OnClickListener() {
>>  public void
>> onClick(DialogInterface dialog, int id) {
>>
>>
>> //uiThread.notify();
>>
>>
>> System.out.println("Negative Button clicked");
>>
>>  }
>>  });
>> /*uiThread =
>> Thread.currentThread();
>> AlertDialog alert =
>> builder.create();
>> alert.show();
>> synchronized(alert) {
>> alert.wait();
>> }*/
>>
>>
>> --
>> ...Swapnil
>>
>> || Hare Krishna Hare Krishna Krishna Krishna Hare Hare ||
>> || Hare RamaHare Rama   Rama   RamaHare Hare ||
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Droid/Milestone: GL_OES_framebuffer_object reported but not working

2009-12-29 Thread Hexage
Hi,

I'm trying to use the framebuffer object extension on Milestone with
2.0 firmware. The extension is reported by OpenGL but when you try to
use it then my app aborts. No message, no stacktrace, nothing.

Here is a simple code snippet for creating a framebuffer object:

int createFBO(GL11 gl) {
  boolean hasFBO = isGLExtensionAvailable
("GL_OES_framebuffer_object"); // internal function for GL_EXTENSIONS
lookup
  if (! hasFBO)
return 0;

  if (! (gl instanceof GL11ExtensionPack))
return 0;
  GL11ExtensionPack glext = (GL11ExtensionPack)gl;

  int[] handles = new int[1];
  glext.glGenFramebuffersOES(1, handles, 0); // aborts on Milestone
  return handles[0];
}

Has anyone had any luck using FBO?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Trying to get rid of my last few Long calculations in my game and completely turn it into FP format. System.currentTimeMillis() giving me a headache.

2009-12-29 Thread Lance Nanek
Fixed point can still fit a good 30 seconds or so worth of whole
milliseconds, can't it? Are you ever going to have updates more than
30 seconds apart?

Even if you are, you can just convert to seconds. Use the integer
representing portion of the fixed point from 1<<16 up for whole
seconds. Use the fraction representing portion below that for the
remainder.

That said, I'm working on a game where all the values passed to OpenGL
are fixed point and most of the calculations are as well. I just pass
the time delta around as a non-fixed point integer, however.

It's never a fraction and never passed to OpenGL directly, so you
aren't forced to convert it. The various speed constants in the game
take into account that it is much smaller than if it were shifted into
fixed point is all.

By the way, you may want to use SystemClock.uptimeMillis() instead of
System.currentTimeMillis(). System.currentTimeMillis() is documented
as jumping around occasionally:
http://developer.android.com/reference/android/os/SystemClock.html

On Dec 29, 10:25 am, Mika  wrote:
> Like the topic of the thread says. In my game I would like to turn all
> the calculations into FP format. I can eliminate pretty much
> everything else but I still need to do the the following calculation
> in long format.
>
> Code:
> long t = this.lastUpdateTime - System.currentTimeMillis();
>
> The value I get from this is the time passed since last frame, which
> is like.. two digit millisecond value, which naturally is more than
> good for FP stuff. After that calculation I turn the resulting value
> into FP integer and use it with the rest of my calculations but I'd
> like to get rid of that long calculation too. Any ideas how to go
> around this to do it in FP format?
>
> I mean, I'm pretty sure I cannot just go and do a normal conversion to
> FP format in this style:
> Code:
> int fpT = t * (1<<16);
>
> because there is always the change that it'll overflow and as the
> numbers that System.currentTimeMillis() give out are BIG.
>
> So any advice how to keep the same "accuracy" of the timer but get rid
> of the long calculation and have it replaced with nice and fast FP
> calculation. Any advices on how to trim down the
> System.currentTimeMillis() or what ever to get around this are greatly
> appreciated.
>
> Cheers guys.

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

2009-12-29 Thread sdphil
interestingly enough, on a device T-Mobile G2, things are fast - like
on the order that I would expect - 10 to 15 seconds.  so i guess this
is less important, however, it's still troubling that it's so slow on
the simulator.

On Dec 29, 9:14 am, sdphil  wrote:
> hi,
>
> I am trying to do AES decryption like this --
>
> Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
> cipher.init(Cipher.DECRYPT_MODE, aesKey);
> cipher.update(encryBytes, 0, encrByteCount);
>
> And it is taking me about 2.5+ seconds to run just the cipher.update
> (i.e. I excluded the init and getInstance() calls) for 65KB of data --
> which seems way too long.
>
> What this translates to (roughly) 60 seconds for a 1.5MB file.  Which
> is uber slow.
>
> I *am* actually seeing 60 or so seconds when I try to decrypt that big
> of a file (looping through and feeding buffers).
>
> Does anybody know why AES decryption is so slow on Android?  A co-
> worker is seeing times around 10 seconds for the same file on a RIM
> device.
>
> 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: How can i stop a thread in a Activity?

2009-12-29 Thread theSmith
I found this article to be very insightful because I too am just
learning about managing multiple threads.
http://articles.techrepublic.com.com/5100-10878_11-5144546.html

I ended up using a shared volatile variable that is check when I'm
doing this that take alot of time in the background thread, if it's
false the thread will exit accordingly.  Also in my app's onStop()
method I make sure to check to see if the thread is running and stop
it if it is.

-theSmith

On Dec 18, 5:44 pm, Streets Of Boston  wrote:
> Calling interrupt() only works if your thread is interruptable and if
> your thread handles interruptions appropriately.
>
> Your thread only is interrupted if the thread is doing I/O or is in a
> wait-state (having called wait() on Object).
>
> If you want to have background threads that do one-shot jobs and then
> wait, use AsyncTask or the java.util.concurrent's ExecutorService .
>
> And, you'd better read up on concurrent programming a little :-) It
> can be tricky.
>
> On Dec 16, 11:26 pm, Matt  wrote:
>
> > Try storing the newly spawned thread as a field or collection in the
> > appropriate class.  Then when you need to kill the thread, retrieve it
> > and call Thread.interrupt().
>
> > Matt
>
> > On Dec 9, 6:15 pm, Richard Zhao  wrote:
>
> > > My problem is:
> > > Activity A called Activity B, and in Activity B, it start a background
> > > thread to do some client-server work. But it maybe takes too much
> > > time. So i add a cancel button to call the stop() method to stop the
> > > thread, and call finish() to finish the Activity B and go back to
> > > Activity A. Although it is back to Activity A, the thread isn't stop
> > > immediately.
>
> > > Can i just call the finish() to go back to Activity A, and leave the
> > > thread to exit by itself?
> > > If it is not the right way, which is?
>
> > > Thanks for any help.- Hide quoted text -
>
> > - Show quoted text -

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


[android-developers] Re: Reminder: IRC office hours tomorrow

2009-12-29 Thread theSmith
Thanks for those Megha.

Is there any plan to add responses to the 12/17 and 12/22 meetings?  I
find this an excellent resource issues/problems/insight that I think
should be available.

-theSmith

On Dec 18, 5:39 pm, Megha Joshi  wrote:
> Check out the answers to questions from the 12/15 office hours 
> here:http://moderator.appspot.com/#15/e=120951&t=11fd95
>
> 2009/12/17 Megha Joshi 
>
> > We are still considering whether to provide transcripts depending on its
> > demand.
>
> > There is a list of questions asked during office hours here.We will be
> > updating it with answers soon:.
> >http://moderator.appspot.com/#15/e=120951&t=11fd95
>
> > For today's office hours at 5pm PST you could post your questions at:
> >http://moderator.appspot.com/#15/e=120951&t=121ce5&f=121ce6
>
> > Thanks,
> > Megha
>
> > 2009/12/16 theSmith 
>
> > Megha,
>
> >> Is there a transcript of previous office hours (just one I believe) /
> >> future office hours?
>
> >> By transcript I mean exactly what was said during the session,
> >> available for those who were unable to actually be on IRC at that
> >> time.
>
> >> Thanks,
>
> >> Chris
>
> >> On Dec 14, 7:02 pm, Megha Joshi  wrote:
> >> > Hi Everyone,
>
> >> > Just a quick reminder that our IRC office hour session is taking place
> >> > tomorrow morning, 9:00-10:00 a.m. PST. Please join us with your
> >> technical
> >> > questions at:
>
> >> > irc://irc.freenode.net#android-dev <
> >>http://irc.freenode.net/#android-dev>
>
> >> > Thanks,
> >> > Megha
>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group.
> >> To post to this group, send email to android-developers@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> android-developers+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >>http://groups.google.com/group/android-developers?hl=en

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


[android-developers] AES decryption is slow....

2009-12-29 Thread sdphil
hi,

I am trying to do AES decryption like this --

Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
cipher.init(Cipher.DECRYPT_MODE, aesKey);
cipher.update(encryBytes, 0, encrByteCount);

And it is taking me about 2.5+ seconds to run just the cipher.update
(i.e. I excluded the init and getInstance() calls) for 65KB of data --
which seems way too long.

What this translates to (roughly) 60 seconds for a 1.5MB file.  Which
is uber slow.

I *am* actually seeing 60 or so seconds when I try to decrypt that big
of a file (looping through and feeding buffers).

Does anybody know why AES decryption is so slow on Android?  A co-
worker is seeing times around 10 seconds for the same file on a RIM
device.

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


Re: [android-developers] Portrait vs landscape using sensor

2009-12-29 Thread Frank Weiss
This may a related issue. When using the accelerometer sensor on Droid when
I hold the device with the display plane vertical, like when taking a
picture, the y axis is minus one g, regardless of lanscap or portrait
orientation.

On Dec 18, 2009 10:50 AM, "Mark Wyszomierski"  wrote:

Hi,

I'm trying to detect landscape vs portrait orientation with the
following:

 public void onSensorChanged(SensorEvent event) {
 float pitch = event.values[2];
 if (pitch <= 45 && pitch >= -45) {
// portrait
 }
 else if (pitch < -45) {
// landscape
 }
 else if (pitch > 45) {
// landscape
 }
 }

anyone have something more robust? It works pretty well, except if the
phone is in a landscape orientation, and the user starts to 'flatten'
it out, starts thinking it's in the portrait orientation again,

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

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

Re: [android-developers] Trying to get rid of my last few Long calculations in my game and completely turn it into FP format. System.currentTimeMillis() giving me a headache.

2009-12-29 Thread Frank Weiss
Do you really think that calculating the difference between two floats is
faster than calculating the difference between two longs?

On Dec 29, 2009 7:25 AM, "Mika"  wrote:

Like the topic of the thread says. In my game I would like to turn all
the calculations into FP format. I can eliminate pretty much
everything else but I still need to do the the following calculation
in long format.

Code:
long t = this.lastUpdateTime - System.currentTimeMillis();


The value I get from this is the time passed since last frame, which
is like.. two digit millisecond value, which naturally is more than
good for FP stuff. After that calculation I turn the resulting value
into FP integer and use it with the rest of my calculations but I'd
like to get rid of that long calculation too. Any ideas how to go
around this to do it in FP format?

I mean, I'm pretty sure I cannot just go and do a normal conversion to
FP format in this style:
Code:
int fpT = t * (1<<16);

because there is always the change that it'll overflow and as the
numbers that System.currentTimeMillis() give out are BIG.

So any advice how to keep the same "accuracy" of the timer but get rid
of the long calculation and have it replaced with nice and fast FP
calculation. Any advices on how to trim down the
System.currentTimeMillis() or what ever to get around this are greatly
appreciated.

Cheers guys.

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

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

[android-developers] Re: AudioTrack stop/release

2009-12-29 Thread Business Talk
Thanks Olivier,

It is very helpful Olivier, I am just curious about MP3 players, They
are able to stop playing with a very small latency. It seems like they
would have to repeatedly write into a very small buffer. Do you think
that is the case?

My scenario is very similar to the MP3 players. I don’t know when the
stop action is going to take place so writing zeros might not work. So
the only solution is to use small buffer. I will see how it goes.
Thanks


On Dec 29, 11:23 am, Olivier Guilyardi  wrote:
> On 12/25/2009 02:00 PM, Business Talk wrote:
>
> > I keep posting this message hoping that maybe somebody from google
> > (media group in particular) monitors the group.  I need to stop the
> > AudioTrack, regardless what's in the buffer, immediately when
> > executing the stop/release. The AudioTrack plays in the STREAM mode.
> > It appears that the AudioTrack finishes playing what's in the buffer
> > and than stops. It seems that it's such a fundamental flaw since there
> > are so many audio applications out there.
>
> I don't think that your question relates to AudioTrack in particular, but to
> dealing with audio buffers in general, and especially when these buffers are 
> too
> large.
>
> On almost any platform and API I can think of, if the audio buffer is large 
> then
> you have to deal with a rather noticeable latency. And I think that your 
> problem
> is indeed about latency.
>
> Instead of starting/stopping the AudioTrack as you do, which is a quite heavy
> operation (thread, locks, IPC, etc..), I would first recommend that you fill 
> the
> buffer with zeros whenever sound has to stop.
>
> But if your buffer is large then there will be a noticeable delay between the
> moment you actually write zeros and the moment the sound becomes silent (yet,
> that should be faster than actually calling play() or stop()).
>
> For instance, I'm quite successfully using AudioTrack with a buffer size of 
> 4096
> frames, which at 22050Hz, induces (at least) a 185ms delay. That is quite a 
> lot
> IMO, and I don't think you can reduce that in Android's current state. I would
> even say than 8092 frames seems a safer choice.
>
> But many audio applications out there know how to deal with a such latency, 
> even
> if it is about hundreds of milliseconds. It is not always possible, but in 
> some
> case it is, especially if you can:
>
> (1) measure the output latency
> (2) anticipate audio output events
>
> So that you start playing sounds (or silence) in advance, taking the latency
> into account.
>
> You can approximate (1) with: latency = bufferSize / sampleRate
>
> Whether (2) is possible or not depends on you app. If it isn't and that
> 200-400ms latency is too much for you then I recommend that you star the
> following issue to encourage Google to address it as soon as 
> possible:http://code.google.com/p/android/issues/detail?id=3434
>
> --
>   Olivier

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


Re: [android-developers] No Adobe Flash support for Eclair!?!

2009-12-29 Thread chris harper
Sena - I picked up a book on writing Flash content for mobile devices and
from I understand from the book is that FlashLite is based off of Flash 9.
They are essentially the same thing. Where anything written for Flash 9
(with actionscript 2) can be run in FlashLite. That is my current
understanding between the two. There might be minor differences.I did flash
my HTC HERO about a month ago and that thought did cross my mind that maybe
the FlashLite got messed up in the process. So my current thought process is
to FLASH HTC's newest ROM onto my Hero:

http://www.htc.com/uk/SupportViewNews.aspx?dl_id=671&news_id=254

I think this will be my best bet for getting the most updated Flash from HTC
onto my HERO and (hopefully if the moons align) be able to write a little
WebView client to read .swf files.

-Chris



On Tue, Dec 29, 2009 at 7:00 AM, Sena Gbeckor-Kove  wrote:

> If you've flashed you Hero with somethign else you'll have removed the
> Flash Plugin. Unless you have a cracked ROM that includes Flash.
>
> S
>
>
> On 28 Dec 2009, at 20:30, chris harper wrote:
>
> Ok. It is becoming clear now.
>
> Flash is licensed per device. So even though you have different devices all
> running Android, only the ones that are licensed for Flash can implement it.
> Is that correct?
>
> I didn't mention that I do have an HTC Hero (as well as my android
> development phone). It is running Firmware version 1.5.
> I also tried doing the WebView as stated in the article testing on this
> device and also got the same result as my android development phone when
> trying to view a .swf (a screen full of random characters).
>
> From what you told me it sounds like I need to go down the road of
> continuing to test my WebView stub on my HTC Hero and maybe looking into why
> my flashlite plugin doesn't seem to be working with my WebView stub code?
>
> Does that sound about right to you Mark?
>
> Thank you again, this really does help me alot.
>
> -Chris
>
>
>
> On Mon, Dec 28, 2009 at 12:10 PM, Mark Murphy wrote:
>
>> chris harper wrote:
>> > According to this article it is had been done and is possible:
>> >
>> http://www.flashmobileblog.com/2009/08/12/flash-development-with-android-part2/
>>
>> The very first sentence of that post:
>>
>> "As we already know by now the HTC Hero supports Flash in the browser,
>> and by double tapping on Flash content it will be played in full screen
>> mode."
>>
>> You will note that this says "HTC Hero". The HTC Hero is a device, for
>> which HTC licensed a Flash (Lite) implementation.
>>
>> > But again like I stated before, after downloading the latest source
>> > code, building it, flashing it to my development phone and flash still
>> > not working I am having my doubts (and greatly wondering how this guy
>> > said it is working).
>>
>> That is because he is referring to the HTC Hero.
>>
>> > Do you know if this is even somewhat possible (maybe a FlashLite plugin
>> > I am missing or something?).
>>
>> This presumably will work on an HTC Hero -- I haven't tried it. It will
>> not work on devices that did not license Flash (Lite) from Adobe. It
>> most definitely will not work from the Android open source tree, because
>> Flash is not open source.
>>
>> --
>> Mark Murphy (a Commons Guy)
>> http://commonsware.com | http://twitter.com/commonsguy
>>
>> Android App Developer Books: http://commonsware.com/books
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
>
>

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

[android-developers] Re: Trying to get rid of my last few Long calculations in my game and completely turn it into FP format. System.currentTimeMillis() giving me a headache.

2009-12-29 Thread Mika
OH sorry guys, my bad, I wasn't specific enough.
I'm TRYING To shift myself into fixed point(FP) world and trying to
get rid of the long calculations :) So.. does the topic make more
sense now? Sorry for being such a numnum and not realising that FP =
fixed point AND floating point. D'oh.

But yeah, any help how to get rid of the remaining long calculation?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Trying to get rid of my last few Long calculations in my game and completely turn it into FP format. System.currentTimeMillis() giving me a headache.

2009-12-29 Thread a1
Well, yes, you can simply shift to fixed since t is difference which I
should be around 20.
But what's the point? I'm using floating point exclusively for
calculations, and really do
not have problems with performance. If you do not perform heavy
calculations it doesn't matter,
and if you do interpreter overhead will kill your performance anyway.

--
Bart Janusz
www.beepstreet.com

On Dec 29, 4:25 pm, Mika  wrote:
> Like the topic of the thread says. In my game I would like to turn all
> the calculations into FP format. I can eliminate pretty much
> everything else but I still need to do the the following calculation
> in long format.
>
> Code:
> long t = this.lastUpdateTime - System.currentTimeMillis();
>
> The value I get from this is the time passed since last frame, which
> is like.. two digit millisecond value, which naturally is more than
> good for FP stuff. After that calculation I turn the resulting value
> into FP integer and use it with the rest of my calculations but I'd
> like to get rid of that long calculation too. Any ideas how to go
> around this to do it in FP format?
>
> I mean, I'm pretty sure I cannot just go and do a normal conversion to
> FP format in this style:
> Code:
> int fpT = t * (1<<16);
>
> because there is always the change that it'll overflow and as the
> numbers that System.currentTimeMillis() give out are BIG.
>
> So any advice how to keep the same "accuracy" of the timer but get rid
> of the long calculation and have it replaced with nice and fast FP
> calculation. Any advices on how to trim down the
> System.currentTimeMillis() or what ever to get around this are greatly
> appreciated.
>
> Cheers guys.

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

2009-12-29 Thread Digambar
I know that but Webkit development is not platform feature. Its more
of application than platform feature and so I thought its good to post
here.

Anyway sorry to disturb you

cheers
Digambar

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


[android-developers] JetCreator

2009-12-29 Thread Business Talk
Using the JetCreator, I have created an ‘App Controller’ event and
assigned a track number = 2 to it. Yet, track = 0 is passed to the
onJetEvent listener method. Any Ideas?

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


[android-developers] Re: Display Contacts "You don't have any contacts to display" possibly caused by NullPointerException: null

2009-12-29 Thread Scott W
Hi,

If anyone could help me find the code for queryEntities function?

I've been looking at the ViewContactActivity.java and digging through
the querying code gets me to the following function call under
AsyncQueryHandler.java:

resolver.queryEntities(args.uri, args.selection, args.selectionArgs,
args.orderBy);

I've been trying to find out how this function works by going through
the git repository and had no real joy, help would be appreciated.

Scott

On Dec 18, 10:43 am, Scott W  wrote:
> Just a quick follow-up:
>
> Using the built-in search facility, I am able to "view" names, however
> no information is displayed. I believe the problem here is the same as
> the Names list. Looking at res/layout-finger/contact_card_layout.xml
> in Eclipse is a NullPointerException: null. Again, LogCat shows no
> error output.
>
> Interestingly, when I search for a name, the search suggestions box
> displays contact information e.g. phone number, email address but
> selecting the name doesn't show this information.
>
> In addition, the "Edit" button is greyed out and not selectable.
>
> I have done some testing and the queries for Names are not being
> directed to Android's Contacts provider.
>
> Cheers,
> Scott

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


Re: [android-developers] AudioTrack stop/release

2009-12-29 Thread Olivier Guilyardi
On 12/25/2009 02:00 PM, Business Talk wrote:
> I keep posting this message hoping that maybe somebody from google
> (media group in particular) monitors the group.  I need to stop the
> AudioTrack, regardless what's in the buffer, immediately when
> executing the stop/release. The AudioTrack plays in the STREAM mode.
> It appears that the AudioTrack finishes playing what's in the buffer
> and than stops. It seems that it's such a fundamental flaw since there
> are so many audio applications out there.

I don't think that your question relates to AudioTrack in particular, but to
dealing with audio buffers in general, and especially when these buffers are too
large.

On almost any platform and API I can think of, if the audio buffer is large then
you have to deal with a rather noticeable latency. And I think that your problem
is indeed about latency.

Instead of starting/stopping the AudioTrack as you do, which is a quite heavy
operation (thread, locks, IPC, etc..), I would first recommend that you fill the
buffer with zeros whenever sound has to stop.

But if your buffer is large then there will be a noticeable delay between the
moment you actually write zeros and the moment the sound becomes silent (yet,
that should be faster than actually calling play() or stop()).

For instance, I'm quite successfully using AudioTrack with a buffer size of 4096
frames, which at 22050Hz, induces (at least) a 185ms delay. That is quite a lot
IMO, and I don't think you can reduce that in Android's current state. I would
even say than 8092 frames seems a safer choice.

But many audio applications out there know how to deal with a such latency, even
if it is about hundreds of milliseconds. It is not always possible, but in some
case it is, especially if you can:

(1) measure the output latency
(2) anticipate audio output events

So that you start playing sounds (or silence) in advance, taking the latency
into account.

You can approximate (1) with: latency = bufferSize / sampleRate

Whether (2) is possible or not depends on you app. If it isn't and that
200-400ms latency is too much for you then I recommend that you star the
following issue to encourage Google to address it as soon as possible:
http://code.google.com/p/android/issues/detail?id=3434

--
  Olivier

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


Re: [android-developers] java access from Android Webkit plugin

2009-12-29 Thread Mark Murphy
Digambar wrote:
> has anybody tried to access Java class from Android Webkit plugin?

The Android SDK does not support development of WebKit plugins. Please
do not cross-post to multiple lists.

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

Android App Developer Books: http://commonsware.com/books

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


[android-developers] java access from Android Webkit plugin

2009-12-29 Thread Digambar
Hi,

has anybody tried to access Java class from Android Webkit plugin?


I am trying to do but there is no reliable way to access with JNI. So
if anybody has tried please reply.


here is example of what I want -


JS in webage access plugin and plugin accesses JAVA class/application
to access Android platform.


Regards
Digambar

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

2009-12-29 Thread fala70
is there somebody can answer me ?

how can I do to show an image YCbCr_420_SP directly on surfaceview ?

On 27 Dic, 17:50, fala70  wrote:
> Looking the doc with class SurfaceHolder is possibile set the kind of
> surface format. I need to show images YCbCr_420_SP format. If I set
> YCbCr_420_SP format is not clear after how I can set the data. With
> Canvas object I can draw only bitmap format and not YCbCr_420_SP.
> Then my question is : can I draw directly on surface using
> YCbCr_420_SP data ? how ?
>
> 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: How to test if app is shown on Market for all screensizes

2009-12-29 Thread ChristianF
I need to bring this issue (not seeing copyprotected apps in the
market) up again.
GOOGLE please give us an update when to expect this issue fixed!!!

You are keeping loyal and honest customers from their leglay bought
applications away
and hinder us to spend more money on the market!!! This hurts your
developers!

Its been more than a month than this issue came up with the launch of
the Milestone in europe.

In the UK the problem was fixed within days but the unlocked phones
are still waiting.
What is the problem??? Respond to your customers.

regards
Christian


On 18 Dez., 20:51, "Justin (Google Employee)"  wrote:
> The problem of some Milestone devices not seeing copy protected apps
> is one we continue to work on addressing. We are working with the OEM
> to resolve the root cause.
>
> > You guys are funny. Android Market on HTC Tattoo does not show
> > applications that do not implicitly declare that they support its
> > screen. It definitely has nothing to do with CAMERA permission or
> > whatsoever
>
> This is false. As previously stated, *if* the app requires the
> android.permission.CAMERA manifest, it *must* state that it does not
> require autofocus in  in order to show on Tattoo. This
> is because the camera permission, if granted, implies access to an
> autofocus camera. The request must be modified to not require
> autofocus with . Admittedly this is not as developer-
> friendly as it could be, its the result of a lack of foresight in our
> original design.
>
> A separate issue is that apps that do not explicitly support
> sdkVersion 4 or above will not be shown to Tattoo because it contains
> a "small" screen. "small" screen devices did not exist before Android
> 1.6 (sdkVersion 4) and apps may break when shrunk to fit the smaller
> screen. Apps declaring support for sdkVersion 4 or above will be
> assumed to support small screens, unless stated otherwise in the
>  element.
>
> Regards,
> Justin
> Android Team @ Google
>
> On Dec 9, 3:38 pm, Paul Turchenko  wrote:
>
> > You guys are funny. AndroidMarketon HTC Tattoo does not show
> > applications that do not implicitly declare that they support its
> > screen. It definitely has nothing to do with CAMERA permission or
> > whatsoever. I do agree that Google could post some clear explanations
> > what exactly AndroidMarkettakes into account when he decides that
> > application should not show up (I'm pretty sure that it's a server
> > side of AndroidMarketwho makes these decisions). And it has nothing
> > to do with device vendor since it just includes AndroidMarketin
> > their firmwares.
>
> > Please stop blaming phone vendors. Google is the only one to blame for
> > Android Market behavior.
>
> > On Nov 18, 11:58 am, blindfold  wrote:
>
> > > Same thing with me, I have copy protection turned off in Android
> > >Market.
>
> > > It would be good now to get some feedback from Google or HTC on
> > > whether it is a bug.
>
> > > On Nov 18, 9:54 am, Klaus Kartou  wrote:
>
> > > > We haven't turned copy protection on for ourapp, and it is still not
> > > > visible on HTC Tattoo/HTC Dragon.
> > > > Please, Google is this a known issue?
>
> > > > On Tue, Nov 17, 2009 at 11:02 AM, Aspidoff  wrote:
> > > > > I noticed this problem when the new Droid Eris came out. At first, i
> > > > > started messing with minsdk and even lowered it to "2" but that didnt
> > > > > fix it, the apps didnt show up in themarket. I ran through Verizon
> > > > > and Sprint stores for days to try to get this to work.
>
> > > > > I dont think Google people even know the problem exist. I am surprised
> > > > > that this problem hasnt been fixed for such a long time now. Anyway,
> > > > > the reason why you can 't see yourappon HTC Hero/Eris or any other
> > > > > 1.5 phones is because you have copy protection set to "On". You can
> > > > > turn this off in your developer console when logged in to your Android
> > > > >Marketaccount and editing your application description/title
>
> > > > > cheers!
>
> > > > > On Nov 17, 1:19 am, Klaus Kartou  wrote:
> > > > > > Is there any Google people that can shed some light on this issue?
>
> > > > > > On Mon, Nov 16, 2009 at 4:42 PM, blindfold 
> > > > > >  > > > > >wrote:
>
> > > > > > > Thanks Phil!
>
> > > > > > > Indeed this is very strange. As I understand it,allAndroid 1.6 
> > > > > > > apps
> > > > > > > should by default be visible to HTC Tattoo on the AndroidMarket, 
> > > > > > > and
> > > > > > > use of the camera should not matter. I had even tested myappto 
> > > > > > > show
> > > > > > > OK on a 240x320 screen using the emulator, and cannot think of
> > > > > > > anything else to correct. I was thinking of trying an empty 
> > > > > > >  > > > > > > screens> element in case documentation is ambiguous, but even so 
> > > > > > > it
> > > > > > > would not seem to make sense to have the CAMERA dependency. 
> > > > > > > Hopefully
> > > > > > > HTC or Android developers (Romain?) will figure it out soon, 
> > > > > > > because

Re: [android-developers] Re: Get body movement (e.g. turn around)

2009-12-29 Thread Frank Weiss
Using the (magnetic) compass would require less coding, I suppose. However,
is it available on all your target devices and is it accurate enough?

I should defer to someone who's actually used the compass sensor. In the
meantime, you could put together a test app in just a few minutes. You could
base it on the following accelerometer test code:
http://stuffthathappens.com/blog/2009/03/15/android-accelerometer/
On Tue, Dec 29, 2009 at 7:11 AM, Matt  wrote:

> Isn't it possible to use the compass magnet to track direction?
>
> Matt
>
> On Dec 29, 7:07 am, Frank Weiss  wrote:
> > It's doubtful you can literally tell if the person has turned around. I
> > think you're trying to infer that, by assuming the person is holding the
> > device a certain way in relation to his or her body..
> >
> > Perhaps by that assumption, the device moves in a 360° arc through space,
> > not on an axis intersecting the device (simple bearing). It should be
> > possible to track the position of the device through the arc via the
> > accelerometer and infer the body movement you are trying to figure out.
> >
> >
> >
> > On Tue, Dec 29, 2009 at 2:18 AM, Moritzz 
> wrote:
> > > Okay, I came up with an idea now but I can't implement it. Basically I
> > > need to implement sthg like a real compass. I also found an
> > > application like that in the market: Compass. But I have no clue how
> > > they got that thing working properly. Does anyone have some experience
> > > with the "orientation" and "magnetic field" sensors?
> >
> > > On Dec 27, 6:40 pm, Moritzz  wrote:
> > > > I'm working on an app that needsbodymovements as inputs. So
> > > > basically I want to know if a person turns around completely (360°).
> > > > If a the person does sthg happens inside the application. My problem
> > > > for now is: How to figure out if a person turned around?
> > > > I don't see an approach with gps as the person is not moving enough.
> > > > So I thought about the compass or acceleration sensor but I have no
> > > > clue how to manage that. I'd really appreciate some ideas / hints /
> > > > tipps!
> >
> > > > Cheers
> >
> > > > Moritz
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com cr...@googlegroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Trying to get rid of my last few Long calculations in my game and completely turn it into FP format. System.currentTimeMillis() giving me a headache.

2009-12-29 Thread Mark Murphy
Mika wrote:
> Like the topic of the thread says. In my game I would like to turn all
> the calculations into FP format.

That is the wrong direction to be going. Floating-point calculations are
awful on mobile devices, since they usually lack floating-point
hardware. Your game will perform better if you eliminate as many
floating-point calculations as possible, replacing them with fixed-point
equivalents.

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

Android App Developer Training: http://commonsware.com/training

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


[android-developers] Trying to get rid of my last few Long calculations in my game and completely turn it into FP format. System.currentTimeMillis() giving me a headache.

2009-12-29 Thread Mika
Like the topic of the thread says. In my game I would like to turn all
the calculations into FP format. I can eliminate pretty much
everything else but I still need to do the the following calculation
in long format.

Code:
long t = this.lastUpdateTime - System.currentTimeMillis();


The value I get from this is the time passed since last frame, which
is like.. two digit millisecond value, which naturally is more than
good for FP stuff. After that calculation I turn the resulting value
into FP integer and use it with the rest of my calculations but I'd
like to get rid of that long calculation too. Any ideas how to go
around this to do it in FP format?

I mean, I'm pretty sure I cannot just go and do a normal conversion to
FP format in this style:
Code:
int fpT = t * (1<<16);

because there is always the change that it'll overflow and as the
numbers that System.currentTimeMillis() give out are BIG.

So any advice how to keep the same "accuracy" of the timer but get rid
of the long calculation and have it replaced with nice and fast FP
calculation. Any advices on how to trim down the
System.currentTimeMillis() or what ever to get around this are greatly
appreciated.

Cheers guys.

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

2009-12-29 Thread Abhi
Hi

Your suggestion sounds good. But I haven't been able to figure out how
to use tags with buttons to determine the position. Would you be able
to give me an example?

Thanks,

Abhi

On Dec 22, 10:30 am, WoodManEXP  wrote:
> Although I use ListView a lot it has always been a little confusing to
> understand how it manages its views returned from BaseAdapter.getView
> ().
>
> If you know you have just the six list rows, which is not a lot, then
> every time BaseAdapter.getView() is called create the view hierarchy,
> with the button in each row, and return it.
>
> Of course for each button attach a listener with setOnClickListener
> and that listener will get called whenever the button is clicked/
> touched. You can use the tag field of the button view to help you
> determine at click time which button has been clicked.
>
> Or you can instantiate a separate listener for each button and set
> something in the listener class to is the view clicked.
>
> Make the listener a private class under the containing Activity and it
> can easily get at all the state contained in the Activity. Or make the
> Activity an implementer of View.OnClickListener and just pass
> Activity.this to setOnClickListener.
>
> In all cases onClick(View v) will be called whenever the button is
> clicked/touched.
>
> Hope this helps…
>
> On Dec 22, 8:58 am,Abhi wrote:
>
>
>
> > Hi guys,
>
> > All I need is a listview with 6 items, each having an icon, textview
> > and a button/imageview. I want to be able to click the button/
> > imageview to open up a new activity and each row opens up a different
> > activity.
>
> > Any suggestions?
>
> >Abhi
>
> > On Dec 21, 8:11 pm,Abhi wrote:
>
> > > Hi,
>
> > > I am using excerpts from this website 
> > > -http://www.androidguys.com/2008/07/14/fancy-listviews-part-one/
> > > (under Dynamic) to build my own ListView with 6 list rows. I am doing
> > > the exact same thing, but with a button added to each row. I want to
> > > be able to listen to each button click and take action according to
> > > the position of the button pressed.
>
> > > I don't know how to use the onClick and Listener in the above case.
> > > Any help would be appreciated. I have posted this question a number of
> > > times but haven't been able to receive a satisfactory reply.
>
> > > I see that the original post is from Mark Murphy who is an active
> > > member of this group. If I hear from him, nothing like it!
>
> > > Thanks,
>
> > > Abhishek- Hide quoted text -
>
> - Show quoted text -

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


[android-developers] Inflating error after animation run

2009-12-29 Thread arnouf
Hi all,

I apply an animation on my current displayed layout. I set an
animation listener. When animation is ended, I'm trying to load a
layout, using inflater, inside the current layout. But I've always the
following error :
ERROR/AndroidRuntime(2315): android.view.InflateException: Binary XML
file line #7: Error inflating class java.lang.reflect.Constructor

Do you know if I can call a callback to check if the current layout is
loaded correctly before to call gatLayoutinflater ?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Get body movement (e.g. turn around)

2009-12-29 Thread Matt
Isn't it possible to use the compass magnet to track direction?

Matt

On Dec 29, 7:07 am, Frank Weiss  wrote:
> It's doubtful you can literally tell if the person has turned around. I
> think you're trying to infer that, by assuming the person is holding the
> device a certain way in relation to his or her body..
>
> Perhaps by that assumption, the device moves in a 360° arc through space,
> not on an axis intersecting the device (simple bearing). It should be
> possible to track the position of the device through the arc via the
> accelerometer and infer the body movement you are trying to figure out.
>
>
>
> On Tue, Dec 29, 2009 at 2:18 AM, Moritzz  wrote:
> > Okay, I came up with an idea now but I can't implement it. Basically I
> > need to implement sthg like a real compass. I also found an
> > application like that in the market: Compass. But I have no clue how
> > they got that thing working properly. Does anyone have some experience
> > with the "orientation" and "magnetic field" sensors?
>
> > On Dec 27, 6:40 pm, Moritzz  wrote:
> > > I'm working on an app that needsbodymovements as inputs. So
> > > basically I want to know if a person turns around completely (360°).
> > > If a the person does sthg happens inside the application. My problem
> > > for now is: How to figure out if a person turned around?
> > > I don't see an approach with gps as the person is not moving enough.
> > > So I thought about the compass or acceleration sensor but I have no
> > > clue how to manage that. I'd really appreciate some ideas / hints /
> > > tipps!
>
> > > Cheers
>
> > > Moritz
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


  1   2   >