[android-developers] Re: Relationship between Activities & Dialogs: Recommended usage suggestions.

2009-10-05 Thread Android Development
btw Dianne,
In the docs (http://developer.android.com/guide/topics/ui/dialogs.html ),
they do say that we may create a dialog outside onCreateDialog method which
is not owned by/attached to an activity.

However, we may assign an owner by calling
setOwnerActivity(Activity)
method.
I was referring to this in option # 2.

I think the docs meant the explicit call to new Dialog in that section?


On Tue, Oct 6, 2009 at 11:46 AM, Android Development wrote:

> Thanks for the answer Dianne.
> Yes, i meant calling new Dialog manually in option 2. I will save the
> instance state and go about it that way.
>
>
> On Tue, Oct 6, 2009 at 11:39 AM, Dianne Hackborn wrote:
>
>> I'm not sure what you mean by option 2 -- an application should pretty
>> much never create a dialog that is not owned by an activity.  It needs to be
>> associated with an owning activity to be properly Z-ordered and otherwise
>> managed with other apps/activities.
>>
>> If you are talking about the difference between using onCreateDialog() vs.
>> manually calling new Dialog() to display a dialog on the activity, well in
>> the second case your activity just need to take care of all of the
>> management of the dialog without really much help from the system: in
>> particular, make sure that you properly save and restore its state as your
>> activity's onSaveInstanceState() is called and you later receive that state
>> in onCreate().
>>
>>
>> On Mon, Oct 5, 2009 at 10:34 PM, Android Development > > wrote:
>>
>>> Hello,
>>> I have a requirement for showing dialogs in my application. Alert dialogs
>>> fulfill by needs for now.
>>>
>>> I wish to discuss..and conceptually understand in the process, the exact
>>> relationship between the Activity that is being displayed at a given point
>>> of time...and the Dialog that pops up on the screen.
>>>
>>> The Android documentation provides us with 2 options regarding this:
>>>
>>> 1. To bind the dialog with the activity, making the current activity the
>>> 'owner' of this dialog for managing its state. In this case, we create the
>>> Dialog in the onCreateDialog callback.
>>>
>>> 2. To create a dialog 'outside' of the activity's context, where the
>>> activity is no longer the owner of this dialog.
>>>
>>> I wish to understand what extra liabilities will the developer face if I
>>> follow Option # 2?
>>>
>>> My requirement is for option 2 above. I wish to display a dialog for an
>>> incoming call. However, the user may be at any 'page' (activity) of my
>>> application when the call is received. Hence, i cannot predict the activity
>>> that would be displaying at that instant, when i need to display the dialog
>>> for the incoming call.
>>>
>>> My questions are as follows:
>>>
>>> a) Who manages the Dialog state in case of Option 2 and how ?
>>>
>>> b) What if the user flips the screen when the dialog is being displayed
>>> by following Option 2 above ?
>>>
>>> c) Can any user defined object (Eg: CallManager in my case) be assigned
>>> the owner of the Dialog being displayed ?
>>>
>>> Any insight/answers are very much appreciated
>>>
>>> Thanks for the help
>>>
>>> Best Regards
>>>
>>> AD.
>>>
>>>
>>>
>>
>>
>> --
>> Dianne Hackborn
>> Android framework engineer
>> hack...@android.com
>>
>> Note: please don't send private questions to me, as I don't have time to
>> provide private support, and so won't reply to such e-mails.  All such
>> questions should be posted on public forums, where I and others can see and
>> answer them.
>>
>>
>> >>
>>
>

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



[android-developers] Re: Android Game Framework ?

2009-10-05 Thread Fred Grott(Android Expert)

Yeah Rokon is somewhat real rough as he did not even switch to JetBoy
game sound track engine which is in Android 1.6 now..

On Oct 5, 4:57 pm, vetch  wrote:
> I do not know if Rokon is good or great. I looked through his code -
> for me it looks like early alpha stage. Besides, it has licensing
> "issues", so I prefer to writing my own, that I really understand.
>
> I hope Google knows how badly Android needs embedded game framework.
>
> On 5 Paź, 23:43, Dan Sherman  wrote:
>
> > But its a community effort... The guy from Rokon was on here looking for
> > help on his (very well designed) game engine, could be very neat if it got
> > some power behind it.
>
> > Look at the iphone (as hopefully a decent example), theres not much there in
> > terms of game frameworks.  Someone ported cocos2d which ended up doing quite
> > well.
>
> > XNA is a bad example, as it was built for something that only does games,
> > and has been since ported to other places.  Google doesn't build games...
>
> > - Dan
>
> > On Mon, Oct 5, 2009 at 5:34 PM, vetch  wrote:
>
> > > very funny :) but I think, you did not understand my point.
>
> > > I think about game engine framework embedded in SDK.
>
> > > Google done great job with UI framework, hardware interfaces and
> > > others, so I think, creating another high level framework for games,
> > > should not be a problem for them.
>
> > > On 5 Paź, 23:25, Dan Sherman  wrote:
> > > >http://lmgtfy.com/?q=android+game+framework
>
> > > > On Mon, Oct 5, 2009 at 5:17 PM, vetch  wrote:
>
> > > > > Me, and I think, many other developers, always tried to write some
> > > > > game.
>
> > > > > Problem with a game, is a complexity of technic stuff. Complexity,
> > > > > means learning. Learning is great, but takes time.
>
> > > > > I think, Android needs a game framework. Something like SDL or more,
> > > > > XNA from Microsoft. Of course, we can use Canvas to draw, but it is
> > > > > slow. We can use OpenGL, but after two days of learning I still do not
> > > > > know how to draw f** background. Of course, I will do that. Some
> > > > > day :) But state and flags-ful OGL interface is really hard to
> > > > > understand if you go from wonderful world of objective thinking.
>
> > > > > I just want to focus on creating art, not wondering how to create
> > > > > tools for that.
>
> > > > > I'm worrying, really worring about Android and games. M$ has XNA,
> > > > > porting it to Zune with Tegra. After that, XNA will come to WinMo. If
> > > > > you ever used C# and XNA, you know, how simple and great it is. What
> > > > > does it mean ? Thousands of games for Microsoft Mobile Junk and still
> > > > > no great games for Android. Worst. Many Android developers will go to
> > > > > WinMo for XNA. Many games will be easily ported from Xbox Arcade too.
>
> > > > > And we will be wasting time, wondering, how to get 25fps from Canvas
> > > > > or OpenGL. Without sound.
>
> > > > > Now, I think, is the time to do something with that. Android really
> > > > > needs something like XNA, to allow us producing games without all that
> > > > > technic stuff like OpenGL, game loops with managing threads, times,
> > > > > buffers, right pixel format settings and others.
>
> > > > > What you think about official game framework for Android ?
>
> > > > > Is Google working on something like that ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Status bar notifications only for touch screens ?

2009-10-05 Thread Android Development
Ok. Thanks for the clarification.

On Tue, Oct 6, 2009 at 11:41 AM, Dianne Hackborn wrote:

> No.  Android is currently not intended to work on a non-touch device.
> Please don't add menu items for the notifications on the off-chance that you
> will run on a non-touch device; if someone builds such a device (or the
> platform is updated to support them), then access to the status bar will be
> dealt with in an appropriate way that applications don't need to worry
> about.
>
>
> On Mon, Oct 5, 2009 at 10:20 PM, Android Development 
> wrote:
>
>> All right. Thanks for the replies. It would be nice if this is documented
>> somewhere.
>> Instead of navigating to Home -->Menu and then notifications, is it not
>> possible to click on the Menu button in the current activity and then
>> navigate to Notifications directly from the currently displayed activity ?
>>
>> Best Regards.
>>
>>
>> On Mon, Oct 5, 2009 at 11:02 PM, Romain Guy  wrote:
>>
>>>
>>> It's possible to access the notifications without a touch screen
>>> though. Home > Menu > Notifications.
>>>
>>> On Mon, Oct 5, 2009 at 10:08 AM, Dianne Hackborn 
>>> wrote:
>>> > Android currently requires a touch screen.  If someone makes a phone
>>> without
>>> > a touch screen, they can come up with whatever way they want to get at
>>> the
>>> > notifications.  Either way, you can always get to them by going home
>>> and
>>> > selecting notifications from the menu, though obviously this is less
>>> than
>>> > convenient.
>>> >
>>> > On Mon, Oct 5, 2009 at 3:08 AM, Android Development <
>>> indodr...@gmail.com>
>>> > wrote:
>>> >>
>>> >> I was creating a status bar notification in my application. Once the
>>> >> notification was received, i had to drag the upper part of the screen
>>> >> to view it fully and then clicked on it.
>>> >>
>>> >> What if the phone does not have a touch screen ? How will the user
>>> >> bring the status bar notification's content into the foreground
>>> >> without dragging ?
>>> >>
>>> >> Best Regards
>>> >>
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > Dianne Hackborn
>>> > Android framework engineer
>>> > hack...@android.com
>>> >
>>> > Note: please don't send private questions to me, as I don't have time
>>> to
>>> > provide private support, and so won't reply to such e-mails.  All such
>>> > questions should be posted on public forums, where I and others can see
>>> and
>>> > answer them.
>>> >
>>> >
>>> > >
>>> >
>>>
>>>
>>>
>>> --
>>> 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
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>
> >
>

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



[android-developers] Re: Relationship between Activities & Dialogs: Recommended usage suggestions.

2009-10-05 Thread Android Development
Thanks for the answer Dianne.
Yes, i meant calling new Dialog manually in option 2. I will save the
instance state and go about it that way.


On Tue, Oct 6, 2009 at 11:39 AM, Dianne Hackborn wrote:

> I'm not sure what you mean by option 2 -- an application should pretty much
> never create a dialog that is not owned by an activity.  It needs to be
> associated with an owning activity to be properly Z-ordered and otherwise
> managed with other apps/activities.
>
> If you are talking about the difference between using onCreateDialog() vs.
> manually calling new Dialog() to display a dialog on the activity, well in
> the second case your activity just need to take care of all of the
> management of the dialog without really much help from the system: in
> particular, make sure that you properly save and restore its state as your
> activity's onSaveInstanceState() is called and you later receive that state
> in onCreate().
>
>
> On Mon, Oct 5, 2009 at 10:34 PM, Android Development 
> wrote:
>
>> Hello,
>> I have a requirement for showing dialogs in my application. Alert dialogs
>> fulfill by needs for now.
>>
>> I wish to discuss..and conceptually understand in the process, the exact
>> relationship between the Activity that is being displayed at a given point
>> of time...and the Dialog that pops up on the screen.
>>
>> The Android documentation provides us with 2 options regarding this:
>>
>> 1. To bind the dialog with the activity, making the current activity the
>> 'owner' of this dialog for managing its state. In this case, we create the
>> Dialog in the onCreateDialog callback.
>>
>> 2. To create a dialog 'outside' of the activity's context, where the
>> activity is no longer the owner of this dialog.
>>
>> I wish to understand what extra liabilities will the developer face if I
>> follow Option # 2?
>>
>> My requirement is for option 2 above. I wish to display a dialog for an
>> incoming call. However, the user may be at any 'page' (activity) of my
>> application when the call is received. Hence, i cannot predict the activity
>> that would be displaying at that instant, when i need to display the dialog
>> for the incoming call.
>>
>> My questions are as follows:
>>
>> a) Who manages the Dialog state in case of Option 2 and how ?
>>
>> b) What if the user flips the screen when the dialog is being displayed by
>> following Option 2 above ?
>>
>> c) Can any user defined object (Eg: CallManager in my case) be assigned
>> the owner of the Dialog being displayed ?
>>
>> Any insight/answers are very much appreciated
>>
>> Thanks for the help
>>
>> Best Regards
>>
>> AD.
>>
>>
>>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>
> >
>

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



[android-developers] Re: Is it possible for me to create a custom window like android:windowNoTitle

2009-10-05 Thread Dianne Hackborn
There are a number of examples in ApiDemos, such as the theme used by this
sample:

http://developer.android.com/guide/samples/ApiDemos/src/com/example/android/apis/app/TranslucentActivity.html

On Mon, Oct 5, 2009 at 10:00 PM, Karthik P  wrote:

> Any idea on this?
>
>
> On Mon, Oct 5, 2009 at 7:05 PM, Karthik P  wrote:
>
>> Any idea how do I create a custom window like android:windowNoTitle or
>> android:Dialog?
>> Karthik
>>
>
>
> >
>


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

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

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



[android-developers] Re: Does anyone has the documentation of window manager?

2009-10-05 Thread Dianne Hackborn
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=services/java/com/android/server/WindowManagerService.java

Um, have fun...?

On Mon, Oct 5, 2009 at 10:13 PM, Karthik P  wrote:

> Can someone point me where the documentation of window manager is present?
>
> Karthik
>
> >
>


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

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

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



[android-developers] Re: Status bar notifications only for touch screens ?

2009-10-05 Thread Dianne Hackborn
No.  Android is currently not intended to work on a non-touch device.
Please don't add menu items for the notifications on the off-chance that you
will run on a non-touch device; if someone builds such a device (or the
platform is updated to support them), then access to the status bar will be
dealt with in an appropriate way that applications don't need to worry
about.

On Mon, Oct 5, 2009 at 10:20 PM, Android Development wrote:

> All right. Thanks for the replies. It would be nice if this is documented
> somewhere.
> Instead of navigating to Home -->Menu and then notifications, is it not
> possible to click on the Menu button in the current activity and then
> navigate to Notifications directly from the currently displayed activity ?
>
> Best Regards.
>
>
> On Mon, Oct 5, 2009 at 11:02 PM, Romain Guy  wrote:
>
>>
>> It's possible to access the notifications without a touch screen
>> though. Home > Menu > Notifications.
>>
>> On Mon, Oct 5, 2009 at 10:08 AM, Dianne Hackborn 
>> wrote:
>> > Android currently requires a touch screen.  If someone makes a phone
>> without
>> > a touch screen, they can come up with whatever way they want to get at
>> the
>> > notifications.  Either way, you can always get to them by going home and
>> > selecting notifications from the menu, though obviously this is less
>> than
>> > convenient.
>> >
>> > On Mon, Oct 5, 2009 at 3:08 AM, Android Development <
>> indodr...@gmail.com>
>> > wrote:
>> >>
>> >> I was creating a status bar notification in my application. Once the
>> >> notification was received, i had to drag the upper part of the screen
>> >> to view it fully and then clicked on it.
>> >>
>> >> What if the phone does not have a touch screen ? How will the user
>> >> bring the status bar notification's content into the foreground
>> >> without dragging ?
>> >>
>> >> Best Regards
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Dianne Hackborn
>> > Android framework engineer
>> > hack...@android.com
>> >
>> > Note: please don't send private questions to me, as I don't have time to
>> > provide private support, and so won't reply to such e-mails.  All such
>> > questions should be posted on public forums, where I and others can see
>> and
>> > answer them.
>> >
>> >
>> > >
>> >
>>
>>
>>
>> --
>> 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
>>
>>
>>
>
> >
>


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

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

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



[android-developers] Re: Relationship between Activities & Dialogs: Recommended usage suggestions.

2009-10-05 Thread Dianne Hackborn
I'm not sure what you mean by option 2 -- an application should pretty much
never create a dialog that is not owned by an activity.  It needs to be
associated with an owning activity to be properly Z-ordered and otherwise
managed with other apps/activities.

If you are talking about the difference between using onCreateDialog() vs.
manually calling new Dialog() to display a dialog on the activity, well in
the second case your activity just need to take care of all of the
management of the dialog without really much help from the system: in
particular, make sure that you properly save and restore its state as your
activity's onSaveInstanceState() is called and you later receive that state
in onCreate().

On Mon, Oct 5, 2009 at 10:34 PM, Android Development wrote:

> Hello,
> I have a requirement for showing dialogs in my application. Alert dialogs
> fulfill by needs for now.
>
> I wish to discuss..and conceptually understand in the process, the exact
> relationship between the Activity that is being displayed at a given point
> of time...and the Dialog that pops up on the screen.
>
> The Android documentation provides us with 2 options regarding this:
>
> 1. To bind the dialog with the activity, making the current activity the
> 'owner' of this dialog for managing its state. In this case, we create the
> Dialog in the onCreateDialog callback.
>
> 2. To create a dialog 'outside' of the activity's context, where the
> activity is no longer the owner of this dialog.
>
> I wish to understand what extra liabilities will the developer face if I
> follow Option # 2?
>
> My requirement is for option 2 above. I wish to display a dialog for an
> incoming call. However, the user may be at any 'page' (activity) of my
> application when the call is received. Hence, i cannot predict the activity
> that would be displaying at that instant, when i need to display the dialog
> for the incoming call.
>
> My questions are as follows:
>
> a) Who manages the Dialog state in case of Option 2 and how ?
>
> b) What if the user flips the screen when the dialog is being displayed by
> following Option 2 above ?
>
> c) Can any user defined object (Eg: CallManager in my case) be assigned the
> owner of the Dialog being displayed ?
>
> Any insight/answers are very much appreciated
>
> Thanks for the help
>
> Best Regards
>
> AD.
>
> >
>


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

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

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



[android-developers] peel effect in android

2009-10-05 Thread rohit

Hello Experts,

I would like to implement the peeling effect in my android page
transition...
can anyone let me know that how would I implement it..

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



[android-developers] Relationship between Activities & Dialogs: Recommended usage suggestions.

2009-10-05 Thread Android Development
Hello,
I have a requirement for showing dialogs in my application. Alert dialogs
fulfill by needs for now.

I wish to discuss..and conceptually understand in the process, the exact
relationship between the Activity that is being displayed at a given point
of time...and the Dialog that pops up on the screen.

The Android documentation provides us with 2 options regarding this:

1. To bind the dialog with the activity, making the current activity the
'owner' of this dialog for managing its state. In this case, we create the
Dialog in the onCreateDialog callback.

2. To create a dialog 'outside' of the activity's context, where the
activity is no longer the owner of this dialog.

I wish to understand what extra liabilities will the developer face if I
follow Option # 2?

My requirement is for option 2 above. I wish to display a dialog for an
incoming call. However, the user may be at any 'page' (activity) of my
application when the call is received. Hence, i cannot predict the activity
that would be displaying at that instant, when i need to display the dialog
for the incoming call.

My questions are as follows:

a) Who manages the Dialog state in case of Option 2 and how ?

b) What if the user flips the screen when the dialog is being displayed by
following Option 2 above ?

c) Can any user defined object (Eg: CallManager in my case) be assigned the
owner of the Dialog being displayed ?

Any insight/answers are very much appreciated

Thanks for the help

Best Regards

AD.

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

2009-10-05 Thread N4Spd

http://hit-mob.com/forums/viewtopic.php?f=7&t=18

On Oct 4, 1:41 am, Rana  wrote:
> I want know about IP camera in Android. Please mention details if
> known to you..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Some few ques about android browser?

2009-10-05 Thread AJ

Hi all group members,

I had few questions about the android browser.

1- What is maximum page size supported in browser?
2- What is maximum URL length (in char) of  browser?

I looked in the browser code but did not answers for that.

Any help would be useful.


Thanks,
AJ

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Status bar notifications only for touch screens ?

2009-10-05 Thread Android Development
All right. Thanks for the replies. It would be nice if this is documented
somewhere.
Instead of navigating to Home -->Menu and then notifications, is it not
possible to click on the Menu button in the current activity and then
navigate to Notifications directly from the currently displayed activity ?

Best Regards.

On Mon, Oct 5, 2009 at 11:02 PM, Romain Guy  wrote:

>
> It's possible to access the notifications without a touch screen
> though. Home > Menu > Notifications.
>
> On Mon, Oct 5, 2009 at 10:08 AM, Dianne Hackborn 
> wrote:
> > Android currently requires a touch screen.  If someone makes a phone
> without
> > a touch screen, they can come up with whatever way they want to get at
> the
> > notifications.  Either way, you can always get to them by going home and
> > selecting notifications from the menu, though obviously this is less than
> > convenient.
> >
> > On Mon, Oct 5, 2009 at 3:08 AM, Android Development  >
> > wrote:
> >>
> >> I was creating a status bar notification in my application. Once the
> >> notification was received, i had to drag the upper part of the screen
> >> to view it fully and then clicked on it.
> >>
> >> What if the phone does not have a touch screen ? How will the user
> >> bring the status bar notification's content into the foreground
> >> without dragging ?
> >>
> >> Best Regards
> >>
> >>
> >
> >
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see
> and
> > answer them.
> >
> >
> > >
> >
>
>
>
> --
> 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] Does anyone has the documentation of window manager?

2009-10-05 Thread Karthik P
Can someone point me where the documentation of window manager is present?

Karthik

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



[android-developers] Re: Is it possible for me to create a custom window like android:windowNoTitle

2009-10-05 Thread Karthik P
Any idea on this?

On Mon, Oct 5, 2009 at 7:05 PM, Karthik P  wrote:

> Any idea how do I create a custom window like android:windowNoTitle or
> android:Dialog?
> Karthik
>

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



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

2009-10-05 Thread Tom

Created a list we can all add to and comment on :

http://www.cakeforcerberus.com

On Sep 1, 10:41 am, Lout  wrote:
> While you developers relax... would you mind sharing what apps to
> expect through this challenge.. and anything else you wish to share
> about ADC2 submissions... well anything including the fact: 'thank
> God, no more sleep less nights'!
>
> Am collecting information about the challenge (ADC2) for a news
> article as am with cnet (and AP). Pitch your app if you have already
> published or would soon publish on the market too.
>
> Your app name and description, web link if any, experience with
> ADC2, ... anything would be useful for our article(s).
>
> And do you feel that there would have been more submissions than in
> ADC1?
> Is the competition going to be tougher or less profound as you were
> allowed to put up apps not published before 1st Aug only?
>
> Do you think that all apps that didn't try for ADC1 should have had a
> chance?
>
> Congratulations on your submissions while you wait for the next
> phase.
> Thanks,
> Lout Reilly
> ps: Moderators we request you to let this through so that you too get
> some feedback.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Switching Activity.

2009-10-05 Thread Chang

Thank you! James!!

By your help, I solved problem.

BR
Chang.

On 10월6일, 오후1시09분, James Yum  wrote:
> Hi Chang,
> You can call finish() in the first activity after you've launched the second
> activity.
>
> Cheers,
> James
>
>
>
> On Mon, Oct 5, 2009 at 7:33 PM, Chang  wrote:
>
> > Hi group members.
>
> > I have a question about activity switching.
>
> > From menu, I launched a new application.(my test application). and
> > first activity was shown.
>
> > and I moved to second activity by clicking button in first activity.
> > in second activity, I pressd back button.
>
> > Normally,  backed to first activity. but i wish to back to home screen.
> > (first activity was skipped)
>
> > How can i do? please give me your advice :)
>
> > Thank you.
> > Chang.- 원본 텍스트 숨기기 -
>
> - 원본 텍스트 보기 -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] ADC2 Submission List

2009-10-05 Thread Tom

Hello,

Every since I submitted my app to the ADC I've been curious what other
apps were submitted and what the competition looked like. Slogging
through a bunch of apps through the judging application didn't seem
like the most efficient way to do that. I've created a little app to
add, view and comment on ADC2 submissions. I'm hoping this will be
useful for all us ADC2 developers that are interested in what else is
out there.

Check it out and add your app if you haven't already! Also, if you
want to chip in and add any apps you judge, that would be great!

http://www.cakeforcerberus.com

Thanks

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



[android-developers] Re: Switching Activity.

2009-10-05 Thread James Yum
Hi Chang,
You can call finish() in the first activity after you've launched the second
activity.

Cheers,
James

On Mon, Oct 5, 2009 at 7:33 PM, Chang  wrote:

>
> Hi group members.
>
> I have a question about activity switching.
>
> From menu, I launched a new application.(my test application). and
> first activity was shown.
>
> and I moved to second activity by clicking button in first activity.
> in second activity, I pressd back button.
>
> Normally,  backed to first activity. but i wish to back to home screen.
> (first activity was skipped)
>
> How can i do? please give me your advice :)
>
> Thank you.
> Chang.
>
> >
>

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

2009-10-05 Thread Robert Green

Can I guess that you're trying that on the emulator?

String extensions = gl.glGetString(GL10.GL_EXTENSIONS);
Log.i(TAG, "GL Extensions [" + extensions + "]");

Add that into your Renderer.onSurfaceCreated() so that you can see
what extensions are available on the platform you're developing for.
I recommend adding a method to check if point_sprite is supported in
that list and if so, use them, but if not, perhaps developing a Gl10
equivalent that is used for a backup is a good idea.

I do that for mipmaps.  If hardware support is there, I let it
generate them, otherwise I have a loop that creates and uploads them.

On Oct 5, 7:57 pm, Scott  wrote:
> Can someone confirm for me that point sprites are not currently
> supported in Android? Calling gl.glEnable(GL11.GL_POINT_SPRITE_OES) is
> triggering a GL_INVALID_ENUM error, so I assume this is the case, but
> I'd appreciate a confirmation before I proceed with an alternate
> design.
>
> Thank you,
> 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
-~--~~~~--~~--~--~---



[android-developers] Re: OpenGL ES flickering problems - double buffered?

2009-10-05 Thread Robert Green

David,

Thanks for the explanation.  I think I just took fairness for granted
and didn't realize that it was not guaranteed.  I like the acquire()/
release() of semaphore.  It's simple and sweet.  I already do that
with my world to synchronize the logic and renderer but stuck to a
small synchronized block for input because it works fine in that area.

Jeremy,

Sorry, I didn't realize that it was only the last few objects in your
display list.  Can you do a test if you haven't already?  Can you cut
out all but 1 or so of the cows in the display list and see if it
still flickers?  Basically mess with what you're drawing until you
start to see where problems occur?

On Oct 5, 5:05 pm, David Minor  wrote:
> I notice in your article the issue you describe seems to be
> synchronization "fairness", i.e. Java doesn't make any fairness
> guarantees about serving threads in the order they are waiting (though
> I believe many Java implementations do). Have you tried the Semaphore
> class? It allows you to specify whether it's fair or not in the
> constructor.
>
> On Oct 5, 12:10 pm, Robert Green  wrote:
>
> > By the way, I don't recommend handling input the way you are.  I
> > switched all my games to use input pipelines and they have saved me a
> > load of trouble.  I get super fast response and don't have to
> > synchronize with a common thread mutex, which I have always had issues
> > with it not giving up the lock to another thread.  I wrote an article
> > just now that you can take a look at if you're interested in switching
> > -http://www.rbgrn.net/content/342-using-input-pipelines-your-android-game
>
> > On Oct 5, 9:27 am, Jeremy Slade  wrote:
>
> > > I'm definitely not getting anywhere close to that limit
> > > (GL_MAX_ELEMENTS_VERTICES).
>
> > > I'm pretty close to a root cause for at least a large percentage of
> > > the flickering events... It has something to do with my thread
> > > synchronization, but it's not obvious to me how it causes the flicker.
>
> > > I have three threads:
> > > * main / UI thread
> > > * logic thread
> > > * rendering thread (created by GLSurfaceView)
>
> > > The majority of the flickering happens when I do something to generate
> > > UI events (touch the screen, move the trackball, etc).  I end up
> > > passing a message to the logic thread, which may be sleeping:
>
> > >     public void queueGameEvent(GameEvent ev) {
> > >         synchronized(mGameLoop) {
> > >             if ( first_event != null ) first_event.next_event = ev;
> > >             else first_event = ev;
> > >             ev.next_event = null;
> > >             //mGameLoop.notifyAll(); // wake sleeping threads
> > >         }
> > >     }
>
> > > When I have the notfyAll() call enabled, it flickers badly.  Without
> > > it, I rarely see flickers (still some, though).  That method is called
> > > from the UI thread, and should result in waking up the logic thread.
> > > Any ideas on how / why that affects the rendering?
>
> > > Thanks,
> > > Jeremy
>
> > > On Oct 4, 6:05 pm, Robert Green  wrote:
>
> > > > The G1 reports 65536 for that parameter.
>
> > > > On Oct 4, 7:06 am, RichardC  wrote:
>
> > > > > You could try
>
> > > > > glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &value);
>
> > > > > Have not tried this myself but found it in
>
> > > > >http://gpwiki.org/forums/viewtopic.php?t=8839
>
> > > > > On Oct 4, 7:36 am, Jeremy Slade  wrote:
>
> > > > > > I did wonder about the OpenGL command buffer limit -- any way to
> > > > > > verify for sure that I am hitting it?
>
> > > > > > I would be surprised if that's the case, though -- it's not a real
> > > > > > complex scene, maybe 3000-4000 textured triangles.  But I'll admit 
> > > > > > to
> > > > > > being almost a complete novice where OpenGL is concerned...
>
> > > > > > The various meshes are all done with glDrawElements().  95% of this 
> > > > > > is
> > > > > > in the cow mesh -- same mesh drawn w/ different transforms, and
> > > > > > different textures bound each time.  The mesh itself uses ~54k of
> > > > > > memory for vertices + normals + tex coords.  How big is the OpenGL
> > > > > > buffer?  seems like it's got to be significantly larger than that.
>
> > > > > > On Oct 3, 1:29 pm, RichardC  wrote:
>
> > > > > > > If I remember correctly OpenGL internally has a limit to the 
> > > > > > > number of
> > > > > > > items it can hold in it's display list.  When the list gets full 
> > > > > > > it's
> > > > > > > starts drawing rather than dropping your items.  To achieve this 
> > > > > > > it
> > > > > > > flips the buffers and draws the remaining items on the live 
> > > > > > > screen.
>
> > > > > > > If I am remembering correcly this could explain what you are 
> > > > > > > seeing.
>
> > > > > > > --
> > > > > > > Ruchard
>
> > > > > > > On Oct 3, 8:08 pm, Jeremy Slade  wrote:
>
> > > > > > > > I'm trying to clean up some rendering issues for a 3D game --
> > > > > > > > CowPotato (http://www.cyrket.com/package/
> > > > > > > > com.froogloid.android.c

[android-developers] Re: mapview key problems

2009-10-05 Thread ian

That is a very good suggestion about copying the debug.keystore from
the working machine and \i will try it in the morning when I have
access to it again

I didn't quite understand the second part;

> - How about your release certificate? does the app signed with it (and
> using the release api key) work?
>

but I will think it over. I think the answer to the question is no,
Nothing so far has worked on the netbook when mapview was involved.
All crash with a force close. However on the machine upstairs,
everything seems to work like with my previous computer.


On Oct 6, 12:05 am, Xavier Ducrohet  wrote:
> - You could do is copy the debug keystore
> (HOME/.android/debug.keystore) from the machine that works, and copy
> it in the machine that doesn't work, and then you can use the API keys
> associated with that working keystore.
> - How about your release certificate? does the app signed with it (and
> using the release api key) work?
>
>
>
> On Mon, Oct 5, 2009 at 7:47 PM, ian  wrote:
>
> > Now I had a trojan which I fixed with hijackthis, stinger and AVG, but
> > even after a cleanup, my mapview problems continue.
>
> > I was able to easily install and run hello MapView on another computer
> > upstairs in 15 minutes. The two computers share the same internet
> > line, I used my same Google login identity, both had the same trojan
> > fix and the mapview installations were identical, I believe, except
> > for different api keys for each machine. Yikes!
>
> > My code which will not run on my new netbook is very simple and as
> > follows:
>
> > package ian.com.return2;
>
> > import com.google.android.maps.MapActivity;
>
> > import android.app.Activity;
> > import android.os.Bundle;
>
> > public class return2 extends MapActivity {
> >    /** Called when the activity is first created. */
> >   �...@override
> >    public void onCreate(Bundle savedInstanceState) {
> >        super.onCreate(savedInstanceState);
> >        setContentView(R.layout.main);
> >    }
>
> >   �...@override
> >    protected boolean isRouteDisplayed() {
> >        return false;
> >    }
>
> > 
> > 
> > http://schemas.android.com/apk/res/
> > android"
> >    android:orientation="vertical"
> >    android:layout_width="fill_parent"
> >    android:layout_height="fill_parent"
> >    >
> >  >    android:layout_width="fill_parent"
> >    android:layout_height="wrap_content"
> >    android:text="@string/hello"
> >    />
>
> >         >        android:id="@+id/mapview"
> >        android:layout_width="fill_parent"
> >        android:layout_height="fill_parent"
> >        android:clickable="true"
> >   android:apiKey="0lrAHi7hTTo7YOitmrL3PXPH-QxHrM8beCxk_HA"
> >    />
>
> > 
>
> > /
> > 
> > http://schemas.android.com/apk/res/android";
> >      package="ian.com.return2"
> >      android:versionCode="1"
> >      android:versionName="1.0">
> >    
> >         >                  android:label="@string/app_name">
> >            
> >                
> >                 > android:name="android.intent.category.LAUNCHER" />
> >            
> >        
> > 
> >    
> >    
> > 
> > 
> > ///
>
> > keytool returned this"
>
> > Keystore type: JKS
> > Keystore provider: SUN
>
> > Your keystore contains 1 entry
>
> > androiddebugkey, Oct 5, 2009, PrivateKeyEntry,
> > Certificate fingerprint (MD5): FA:23:52:C8:54:1F:2B:D0:D5:A7:55:E7:AB:
> > 97:1E:4C
> > ///
>
> > Google provided this:
>
> >   android:apiKey="0lrAHi7hTTo7YOitmrL3PXPH-QxHrM8beCxk_HA"
> > 
>
> > So what could be the problem? I feel loike this machine is spooked
> > although it will tun Android apps happily on the emulator if they do
> > not have a mapview. But my eight semi-complete commercial apps all
> > rely on MapView...
>
> > On Oct 5, 12:21 pm, ian  wrote:
> >> You know, I think this could be a virus problem blocking my access to
> >> the google site. I'm running a scan for Conficket now
>
> >> On Oct 5, 11:52 am, ian  wrote:
>
> >> > Thanks for the comment. Yes I followed those steps over and over. I do
> >> > need a new API key for the new machine but seem to have hit a problem
> >> > I can't resolve.
>
> >> > I wonder if one can apply too many times, or be blocked for some other
> >> > reason. Google returns what appears to be a working key.
>
> >> > Maybe this machine could be generating a erroneous debug.keystore file?
>
> >> > > I am using the keytool in jre6\bin. Maybe another keytool?
>
> >> > I'll try to setup on another machine later and see if I can make it
> >> > display mapview. I briefly tried this yesterday and seemed to get the
> >> > same problem. The other machine also shares the same internet line and
> >> > myGoogle log in name would be the same.
>
> >> > If I figure this outy I'll post my solution to the problem.
>
> >> > .
> >> > On Oct

[android-developers] Re: api key

2009-10-05 Thread ragavendran s
check whether u gave INTERNET permission or not..

On Mon, Oct 5, 2009 at 3:49 PM, android  wrote:

>
> I put the API key in the code and in XML but does not make me see the
> maps which could be the problem??? thanks
>
> >
>

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



[android-developers] Re: mapview key problems

2009-10-05 Thread ian

I just retried it after deleting the old debug.keystore and running a
couple of simple non-mapview apps until debug-keystore was
regenerated.

The new keytool result was different:

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

androiddebugkey, Oct 6, 2009, PrivateKeyEntry,
Certificate fingerprint (MD5): 8D:9F:08:7F:5D:E8:4F:81:BA:
84:69:40:99:85:44:4F



Ans so was the new map api key from Google:
   

This new api key didn't work either.

Isn't this supposed to remain stable unless the android is re-
installed?






On Oct 5, 11:47 pm, ian  wrote:
> Now I had a trojan which I fixed with hijackthis, stinger and AVG, but
> even after a cleanup, my mapview problems continue.
>
> I was able to easily install and run hello MapView on another computer
> upstairs in 15 minutes. The two computers share the same internet
> line, I used my same Google login identity, both had the same trojan
> fix and the mapview installations were identical, I believe, except
> for different api keys for each machine. Yikes!
>
> My code which will not run on my new netbook is very simple and as
> follows:
>
> package ian.com.return2;
>
> import com.google.android.maps.MapActivity;
>
> import android.app.Activity;
> import android.os.Bundle;
>
> public class return2 extends MapActivity {
>     /** Called when the activity is first created. */
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.main);
>     }
>
>     @Override
>     protected boolean isRouteDisplayed() {
>         return false;
>     }
>
> 
> 
> http://schemas.android.com/apk/res/
> android"
>     android:orientation="vertical"
>     android:layout_width="fill_parent"
>     android:layout_height="fill_parent"
>     >
>      android:layout_width="fill_parent"
>     android:layout_height="wrap_content"
>     android:text="@string/hello"
>     />
>
>                  android:id="@+id/mapview"
>         android:layout_width="fill_parent"
>         android:layout_height="fill_parent"
>         android:clickable="true"
>    android:apiKey="0lrAHi7hTTo7YOitmrL3PXPH-QxHrM8beCxk_HA"
>     />
>
> 
>
> /
> 
> http://schemas.android.com/apk/res/android";
>       package="ian.com.return2"
>       android:versionCode="1"
>       android:versionName="1.0">
>     
>                            android:label="@string/app_name">
>             
>                 
>                  android:name="android.intent.category.LAUNCHER" />
>             
>         
> 
>     
>     
> 
> 
> ///
>
> keytool returned this"
>
> Keystore type: JKS
> Keystore provider: SUN
>
> Your keystore contains 1 entry
>
> androiddebugkey, Oct 5, 2009, PrivateKeyEntry,
> Certificate fingerprint (MD5): FA:23:52:C8:54:1F:2B:D0:D5:A7:55:E7:AB:
> 97:1E:4C
> ///
>
> Google provided this:
>
>    android:apiKey="0lrAHi7hTTo7YOitmrL3PXPH-QxHrM8beCxk_HA"
> 
>
> So what could be the problem? I feel loike this machine is spooked
> although it will tun Android apps happily on the emulator if they do
> not have a mapview. But my eight semi-complete commercial apps all
> rely on MapView...
>
> On Oct 5, 12:21 pm, ian  wrote:
>
> > You know, I think this could be a virus problem blocking my access to
> > the google site. I'm running a scan for Conficket now
>
> > On Oct 5, 11:52 am, ian  wrote:
>
> > > Thanks for the comment. Yes I followed those steps over and over. I do
> > > need a new API key for the new machine but seem to have hit a problem
> > > I can't resolve.
>
> > > I wonder if one can apply too many times, or be blocked for some other
> > > reason. Google returns what appears to be a working key.
>
> > > Maybe this machine could be generating a erroneous debug.keystore file?
>
> > > > I am using the keytool in jre6\bin. Maybe another keytool?
>
> > > I'll try to setup on another machine later and see if I can make it
> > > display mapview. I briefly tried this yesterday and seemed to get the
> > > same problem. The other machine also shares the same internet line and
> > > myGoogle log in name would be the same.
>
> > > If I figure this outy I'll post my solution to the problem.
>
> > > .
> > > On Oct 5, 12:46 am, Xavier Ducrohet  wrote:
>
> > > > Since you reinstall ed a new machine, you have a new debug keystore
> > > > with a different certificate which has a different MD5 fingerprint.
>
> > > > Did you follow the instructions
> > > > (http://code.google.com/android/add-ons/google-apis/mapkey.html) to
> > > > get a new API key that matches your new certificate?
>
> > > > Xav
>
> > > > On Sun, Oct 4, 2009 at 10:40 AM, ian  wrote:
>
> > > > > Last week my old laptop failed, so I am re-Installing my apps on a new
> > > > > machine, an HP netbook with an

[android-developers] Re: hangs on launching unit tests

2009-10-05 Thread Brett Chabot

Unfortunately, this sounds like a known problem that occurs
intermittently. Does it work if you retry the 'run as > android junit'
step?

Brett.

2009/10/3 Cyryl Płotnicki-Chudyk :
>
> Hi there !
> I got a problem launching unit tests.
> I did:
> * new android project in eclipse, new android test project in eclipse
> * added one test case, added one test suite
> * run as-> android junit test hangs on "Launching instrumentation
> android.test.InstrumentationTestRunner on device emulator-5556"
>
> I got eclipse galileo, newest ADT and android 1.6 sdk
>
> >
>

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



[android-developers] Re: is it possible to use JUnit4 for testing android apps ?

2009-10-05 Thread Brett Chabot

No, the Android 1.6 platform does not support JUnit4.

2009/10/3 Cyryl Płotnicki-Chudyk :
>
> I got 'no JUnit3 tests' info when trying to use JUnit4-only tests
> under android 1.6
>
> >
>

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



[android-developers] ScrollView child layout

2009-10-05 Thread aaron

I have several ListViews in a vertical LinearLayout.  They extend
beyond the screen so I wrapped the LinearLayout in a ScrollView.  That
works, but each of my ListViews in my LinearLayout shows with room for
two entries, whether there are 0 or 3 entries in the list.  Without
the ScrollView, they show correctly, taking the amount of space
required by the number of entries in each list.  I tried calling
requestLayout() on the ScrollView after the adapters fill out the
views, but that didn't seem to affect the layout.  Any ideas?

Thanks,
Aaron

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



[android-developers] Re: How to take snapshots (Screen shots) of a web page

2009-10-05 Thread AJ

Cool :)

On Oct 5, 10:02 pm, Umesh  wrote:
> Hi Ajit,
> Thanks a lot, this proved to be really a worth while information.
>
> Umesh.
>
> 
> From: AJ To: Android Developers 
> 
> Sent: Mon, 5 October, 2009 6:45:48 PM
> Subject: [android-developers] Re: How to take snapshots (Screen shots) of a 
> web page
>
> This would work fine if you take snapshot of visible portion of
> webpage.
>
> Thanks,
> AJ
>
> On Oct 5, 6:11 pm, AJ  wrote:
>
>
>
> > Hi Umesh,
>
> > check the following link
>
> >http://groups.google.com/group/android-discuss/browse_thread/thread/c...
>
> > Thanks,
> > AJ
>
> > On Oct 5, 4:25 pm, Umesh  wrote:
>
> > > Hi all,
>
> > > I want to implement a functionality, wherein I need to take a snapshot 
> > > (Screen Shot)  of a web page opened in android browser, and store that 
> > > image on sdcard . The image can be either in jpeg or png format. Can some 
> > > one guide me with a piece of sample code as how to accomplish this.
>
> > > Thanks in advance.
> > > Umesh.
>
> > >       Yahoo! India has a new look. Take a sneak 
> > > peekhttp://in.yahoo.com/trynew
>
>       Keep up with people you care about with Yahoo! India Mail. Learn 
> how.http://in.overview.mail.yahoo.com/connectmore
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: mapview key problems

2009-10-05 Thread Xavier Ducrohet

- You could do is copy the debug keystore
(HOME/.android/debug.keystore) from the machine that works, and copy
it in the machine that doesn't work, and then you can use the API keys
associated with that working keystore.
- How about your release certificate? does the app signed with it (and
using the release api key) work?

On Mon, Oct 5, 2009 at 7:47 PM, ian  wrote:
>
> Now I had a trojan which I fixed with hijackthis, stinger and AVG, but
> even after a cleanup, my mapview problems continue.
>
> I was able to easily install and run hello MapView on another computer
> upstairs in 15 minutes. The two computers share the same internet
> line, I used my same Google login identity, both had the same trojan
> fix and the mapview installations were identical, I believe, except
> for different api keys for each machine. Yikes!
>
> My code which will not run on my new netbook is very simple and as
> follows:
>
> package ian.com.return2;
>
> import com.google.android.maps.MapActivity;
>
> import android.app.Activity;
> import android.os.Bundle;
>
> public class return2 extends MapActivity {
>    /** Called when the activity is first created. */
>   �...@override
>    public void onCreate(Bundle savedInstanceState) {
>        super.onCreate(savedInstanceState);
>        setContentView(R.layout.main);
>    }
>
>   �...@override
>    protected boolean isRouteDisplayed() {
>        return false;
>    }
>
> 
> 
> http://schemas.android.com/apk/res/
> android"
>    android:orientation="vertical"
>    android:layout_width="fill_parent"
>    android:layout_height="fill_parent"
>    >
>     android:layout_width="fill_parent"
>    android:layout_height="wrap_content"
>    android:text="@string/hello"
>    />
>
>                android:id="@+id/mapview"
>        android:layout_width="fill_parent"
>        android:layout_height="fill_parent"
>        android:clickable="true"
>   android:apiKey="0lrAHi7hTTo7YOitmrL3PXPH-QxHrM8beCxk_HA"
>    />
>
> 
>
> /
> 
> http://schemas.android.com/apk/res/android";
>      package="ian.com.return2"
>      android:versionCode="1"
>      android:versionName="1.0">
>    
>                          android:label="@string/app_name">
>            
>                
>                 android:name="android.intent.category.LAUNCHER" />
>            
>        
> 
>    
>    
> 
> 
> ///
>
> keytool returned this"
>
>
> Keystore type: JKS
> Keystore provider: SUN
>
> Your keystore contains 1 entry
>
> androiddebugkey, Oct 5, 2009, PrivateKeyEntry,
> Certificate fingerprint (MD5): FA:23:52:C8:54:1F:2B:D0:D5:A7:55:E7:AB:
> 97:1E:4C
> ///
>
> Google provided this:
>
>   android:apiKey="0lrAHi7hTTo7YOitmrL3PXPH-QxHrM8beCxk_HA"
> 
>
> So what could be the problem? I feel loike this machine is spooked
> although it will tun Android apps happily on the emulator if they do
> not have a mapview. But my eight semi-complete commercial apps all
> rely on MapView...
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Oct 5, 12:21 pm, ian  wrote:
>> You know, I think this could be a virus problem blocking my access to
>> the google site. I'm running a scan for Conficket now
>>
>> On Oct 5, 11:52 am, ian  wrote:
>>
>> > Thanks for the comment. Yes I followed those steps over and over. I do
>> > need a new API key for the new machine but seem to have hit a problem
>> > I can't resolve.
>>
>> > I wonder if one can apply too many times, or be blocked for some other
>> > reason. Google returns what appears to be a working key.
>>
>> > Maybe this machine could be generating a erroneous debug.keystore file?
>>
>> > > I am using the keytool in jre6\bin. Maybe another keytool?
>>
>> > I'll try to setup on another machine later and see if I can make it
>> > display mapview. I briefly tried this yesterday and seemed to get the
>> > same problem. The other machine also shares the same internet line and
>> > myGoogle log in name would be the same.
>>
>> > If I figure this outy I'll post my solution to the problem.
>>
>> > .
>> > On Oct 5, 12:46 am, Xavier Ducrohet  wrote:
>>
>> > > Since you reinstall ed a new machine, you have a new debug keystore
>> > > with a different certificate which has a different MD5 fingerprint.
>>
>> > > Did you follow the instructions
>> > > (http://code.google.com/android/add-ons/google-apis/mapkey.html) to
>> > > get a new API key that matches your new certificate?
>>
>> > > Xav
>>
>> > > On Sun, Oct 4, 2009 at 10:40 AM, ian  wrote:
>>
>> > > > Last week my old laptop failed, so I am re-Installing my apps on a new
>> > > > machine, an HP netbook with an Atom 270 chip..
>>
>> > > > Eclipse andf Android seemed to install fine until I add a mapView. For
>> > > > some reason, my new map API key fails to work. I tried erasing the old
>> > > > debug.keystore and changing the time settings

[android-developers] Re: mapview key problems

2009-10-05 Thread ian

Now I had a trojan which I fixed with hijackthis, stinger and AVG, but
even after a cleanup, my mapview problems continue.

I was able to easily install and run hello MapView on another computer
upstairs in 15 minutes. The two computers share the same internet
line, I used my same Google login identity, both had the same trojan
fix and the mapview installations were identical, I believe, except
for different api keys for each machine. Yikes!

My code which will not run on my new netbook is very simple and as
follows:

package ian.com.return2;

import com.google.android.maps.MapActivity;

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

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

@Override
protected boolean isRouteDisplayed() {
return false;
}



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






/

http://schemas.android.com/apk/res/android";
  package="ian.com.return2"
  android:versionCode="1"
  android:versionName="1.0">












///

keytool returned this"


Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

androiddebugkey, Oct 5, 2009, PrivateKeyEntry,
Certificate fingerprint (MD5): FA:23:52:C8:54:1F:2B:D0:D5:A7:55:E7:AB:
97:1E:4C
///

Google provided this:

   android:apiKey="0lrAHi7hTTo7YOitmrL3PXPH-QxHrM8beCxk_HA"


So what could be the problem? I feel loike this machine is spooked
although it will tun Android apps happily on the emulator if they do
not have a mapview. But my eight semi-complete commercial apps all
rely on MapView...














On Oct 5, 12:21 pm, ian  wrote:
> You know, I think this could be a virus problem blocking my access to
> the google site. I'm running a scan for Conficket now
>
> On Oct 5, 11:52 am, ian  wrote:
>
> > Thanks for the comment. Yes I followed those steps over and over. I do
> > need a new API key for the new machine but seem to have hit a problem
> > I can't resolve.
>
> > I wonder if one can apply too many times, or be blocked for some other
> > reason. Google returns what appears to be a working key.
>
> > Maybe this machine could be generating a erroneous debug.keystore file?
>
> > > I am using the keytool in jre6\bin. Maybe another keytool?
>
> > I'll try to setup on another machine later and see if I can make it
> > display mapview. I briefly tried this yesterday and seemed to get the
> > same problem. The other machine also shares the same internet line and
> > myGoogle log in name would be the same.
>
> > If I figure this outy I'll post my solution to the problem.
>
> > .
> > On Oct 5, 12:46 am, Xavier Ducrohet  wrote:
>
> > > Since you reinstall ed a new machine, you have a new debug keystore
> > > with a different certificate which has a different MD5 fingerprint.
>
> > > Did you follow the instructions
> > > (http://code.google.com/android/add-ons/google-apis/mapkey.html) to
> > > get a new API key that matches your new certificate?
>
> > > Xav
>
> > > On Sun, Oct 4, 2009 at 10:40 AM, ian  wrote:
>
> > > > Last week my old laptop failed, so I am re-Installing my apps on a new
> > > > machine, an HP netbook with an Atom 270 chip..
>
> > > > Eclipse andf Android seemed to install fine until I add a mapView. For
> > > > some reason, my new map API key fails to work. I tried erasing the old
> > > > debug.keystore and changing the time settings, but no success after
> > > > two dozen tries. Just inserting the map key into the .xml breaks the
> > > > app.
>
> > > > I had eight mapview apps running before on my old machine and I am
> > > > following the same steps (I think). Now even the Hello |M|apView
> > > > tutorial code fails to start.
>
> > > > Anybody have any suggestions as I am frustrated by this major
> > > > unforeseen delay?
>
> > > > Ian in Nova Scotia, Canada
>
> > > --
> > > Xavier Ducrohet
> > > Android SDK Tech Lead
> > > Google Inc.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Switching Activity.

2009-10-05 Thread Chang

Hi group members.

I have a question about activity switching.

>From menu, I launched a new application.(my test application). and
first activity was shown.

and I moved to second activity by clicking button in first activity.
in second activity, I pressd back button.

Normally,  backed to first activity. but i wish to back to home screen.
(first activity was skipped)

How can i do? please give me your advice :)

Thank you.
Chang.

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



[android-developers] Create Bitmap from android.graphics.Path

2009-10-05 Thread Felix

Hi,

I am banging my head against the wall trying to create a Bitmap from a
Path object (android.graphics.Path). Is there any way to do this? I've
browsed through most of the classes now but can't seem to find any way
to do it.

Actually, what I have is a Path that consists of many cubic Bezier
curves. It is really expensive to draw with canvas.drawPath(). So I
figured that I could perhaps "cache" the Bitmap of this Path by
converting the Path to a Bitmap once and then just drawing the Bitmap
every time instead of calling canvas.drawPath().

Is there any way to create a Bitmap from this Path?

Or is there a smarter way to draw tha Path multiple times without
having to recalculate all of the Beziers? For example, if I created a
ShapeDrawable from PathShape from the Path, and just draw the
ShapeDrawable objects every time, would that be more efficient than
drawing the Path every time?

Thanks very much in advance for your answers!

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



[android-developers] Point Sprite support

2009-10-05 Thread Scott

Can someone confirm for me that point sprites are not currently
supported in Android? Calling gl.glEnable(GL11.GL_POINT_SPRITE_OES) is
triggering a GL_INVALID_ENUM error, so I assume this is the case, but
I'd appreciate a confirmation before I proceed with an alternate
design.

Thank you,
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
-~--~~~~--~~--~--~---



[android-developers] Re: Audio Routing in 1.6

2009-10-05 Thread Doug

Update...

The android.jar (1.6) distributed as part of the Mac Eclipse bundle
doesn't contain the WiredHeadset methods, but the source does seem to
have it... is this just a distro issue?

Doug

On Oct 5, 1:20 pm, Doug  wrote:
> My application uses a MediaPlayer object to play MP3 files.
> Up until v1.6 came out I was doing the following:
>
> 1. Create the player
> 2. Get (and save) the current Audio Routing for
> "AudioManager.MODE_NORMAL" (i.e. "Media" playback) -- so I can restore
> it later when I'm done
> 3. Prepare Stream
> 4. Set new Audio Routing for "AudioManager.MODE_NORMAL" BEFORE I start
> playback (this is based on an application setting, which may/will be
> different from the setting chosen for Music playback)
> 5. Start Playback
> 6. During playback the user may choose to use a different playback
> device, so in that case I would change the routing and the audio would
> behave as expected.
> 7. After playback is complete, restore the saved routing so other apps
> aren't affected by me.
>
> With 1.6 the 'getAudioRouting(x)' and 'setAudioRouting(x,y,z)' have
> been deprecated in favor of a bunch of getter and setter methods for
> each of the possible options.
>
> Here is where my problems start.
>
> a) Users who have had their phone update automatically to 1.6 can no
> longer exert any control over the audio device... it is set to speaker
> and nothing they can do can change that.
> b) When it comes to the *new* methods that the release notes say to
> call... well... a number of them seem to be missing
>    i) is/setSpeakerPhoneOn - present
>    ii) is/setBluetoothA2dpOn - present
>    iii) is/setBluetoothScoOn - present
>    iii) is/setWiredHeadsetOn - MISSING
>    iv) is/setEarpieceOn (or handset, whatever) - MISSING, and not even
> documented!
>    v) There doesn't seem to be a way to specify just which kind of
> audio I'm trying to adjust (unless the 'setMode' method is app vs
> system specific).
>
> Any thoughts on how I can get the functionality back to 1.1/1.5 - for
> now it just seems broken.
>
> Doug
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: [adb ddms] i can't see my samsung galaxy on windows seven 64 bits

2009-10-05 Thread dan raaka
Didn't the one in the CD work ?

-Dan


On Sun, Oct 4, 2009 at 9:57 PM, Raphael  wrote:

>
> Is this for Windows? I believe you should ask Samsung for a driver.
>
> Si c'est pour Windows, je pense que tu devrais demander un pilote a
> Samsung.
>
> R/
>
> On Sun, Oct 4, 2009 at 10:51 AM, letroll 
> wrote:
> >
> > Hi all,
> >
> > Sorry for my bad english, I'm french!
> >
> > I want use my phone for debugging  in eclipse, but there nothing in
> > driver of sdk 1.6 for samsung galaxy anyone can help me?
> >
> > Bonjour tout le monde!
> >
> > J'aimerai utiliser mon samsung galaxy pour débuger mes applications
> > dans eclipse, mais il n'y a pas encore de pilote dans le sdk 1.6.
> > Quelqu'un peut m'aider?
>
> >
>

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



[android-developers] localization of settings application

2009-10-05 Thread Dan Raaka

The strings displayed under Settings -> Locale & text -> Select locale
-> Locale list
doesn't seem to display the in the locale selected, even after making
sure that the all the strings under frameworks/base/core/res/res/ are
properly translated.

Any ideas what is going wrong here? or is this app picking up strings
from another place which we have missed the translations.

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



[android-developers] mount other usb devices to android gphone

2009-10-05 Thread jonathan

is it possible to mount another usb device x to gphone and then create
a program that communites to x on the usb port?  X is used for
capturing data and gphone will be used for analysis/display.
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: where is sleep/screen behavior documented?

2009-10-05 Thread Richard Schilling

O.K.  I'll dive into PowerManagerService then - that's a good place to
look more into.

I agree this should be discussed on Android Porting as well.  I'm just
more worried about how applications are affected for the moment.

But, I'll keep an eye on porting in the meantime.  I imagine someone
else has similar thoughts.

Cheers,

Richard Schilling



On Oct 5, 3:16 pm, Dianne Hackborn  wrote:
> Hi Richard, sorry I really don't have time to go into detail on this stuff
> at this point (and don't personally know enough to cover everything
> anyway).  Ultimately the source code -- in particular PowerManagerService
> and the keyguard interactions as start in PhoneWindowManager -- is the
> ultimate specification, and these things change over time (for example in
> Eclair the press menu to unlock behavior will be different at least on some
> class of devices).  And many parts of this are intended to be fairly easy to
> customize by a manufacturer to work most appropriately for their device.
>
> Finally, this really sounds like the discussion should be on
> android-porting; this doesn't look like stuff that is relevant to third
> party developers.
>
> On Mon, Oct 5, 2009 at 2:21 PM, Richard Schilling <
>
>
>
> richard.rootwirel...@gmail.com> wrote:
>
> > Thanks Yusuf.  That's helpful - I am very familiar with that
> > documentation. I was looking for something more though.  I'm hoping to
> > see a more comprehensive discussion about this behavior.  I need to
> > put together something for QA testers.  No state can be left un-
> > described for what I need.
>
> > And thank you Dianne.  As always - a big help.  This makes sense.
> > What's not complete on my list, though is how a dark screen, phone
> > components, and wake locks relate.  I am not just looking for
> > documentation on DIM wake lock and full wake lock.  There are
> > additional use cases here:
>
> > * menu lock on/off (must press the menu button): what affects that?
> > How do wake locks affect that?
>
> > * dark screen versus a fully functional phone: for the complete list
> > of sensors and application services (e.g TelephonyService notification
> > to my TelephonyListener, Wifi antenna, and sensors), how do wake locks
> > affect each one?  When does each one get turned off?
>
> > * how do each power state affect Timer class objects and application
> > threads - for both foreground apps and background services?
>
> > * when the user forces the screen to go dark by pressing the end-call
> > button, what power state/wake lock state am I in?
>
> > * when the application forces the screen to go dark by calling
> > PowerManager.
>
> > I also have the following case that I need to prove is working
> > properly:
>
> > 1. A RTC clock alarm fires an intent and wakes up the phone.
> > 2. The application catches the intent and gets a wake lock. A
> > background service is ran (no UI involved).
> > 3. The wake lock is a dim wake lock, but the screen doesn't come on
> > (that great).
> > 4. The application does its processing then releases the wake lock(s)
> > it acquired when responding to the intent.
>
> > I believe it is.  The more comprehensive information I'm looking
> > proves it.
>
> > Thanks again.
>
> > Richard Schilling
>
> > On Oct 1, 1:05 pm, Dianne Hackborn  wrote:
> > > Unless there is a third party app messing with you, there is something
> > > broken with your software.  The typical behavior is:
>
> > > - Screen dims after the screen-off timeout sets in preferences, and then
> > > turns off (and locks) a few seconds later.
> > > - Screen turns off and locks with you press them end call / power button.
>
> > > This can be changed by applications -- for example most apps that play
> > > videos turn on the option to keep the screen on while the video is
> > playing,
> > > so then you will need to manually press the power key to make it turn
> > off.
> > > Apps can also hold wake locks to impact how the device goes to sleep,
> > though
> > > they need to be granted the power permission to do so.  (No permission is
> > > needed to simply keep the screen on while your window is in the
> > foreground.)
>
> > > On Thu, Oct 1, 2009 at 12:24 PM, Richard Schilling <
>
> > > richard.rootwirel...@gmail.com> wrote:
>
> > > > I'm looking around and trying to find out where sleep behavior is
> > > > documented - and I mean in the general sense.
>
> > > > When the phone is left alone:
> > > > * Sometimes the phone screen dims and doesn't shut off.
> > > > * Sometimes the phone screen goes dark in five seconds
> > > > * Sometimes the menu lock happens.
> > > > * Sometimes the menu lock doesn't happen.
> > > > * Sometimes the only way to darken the screen is to push the power
> > > > button.
>
> > > > What's not clear is what triggers these different states.   I'm
> > > > looking for a complete list I can use in testing and application
> > > > validation.
>
> > > > Can anyone point me in the right direction?
>
> > > > Thanks.
>
> > > > Richard Schilling
> > > 

[android-developers] Few random question about the android mechanics.

2009-10-05 Thread pro

Hi All,

I'm trying to figure out few, perhaps easy!, things -

1) How do I figure out what event(s) triggered invocation of onDraw()
method of a view?. I've a canvas with a button, std. app menu, and I
seem to get 3 calls to onDraw() without even touching ( meaning
clicking the mouse) on emulator's screen. My guess is that it is
dependent on the number of elements ( like control, txt etc. i.e
probably the number of child widgets) on the view !!

2) If I touch the screen with my fat finger, what x,y coordinate I
will get in touch event?. It seems like that it is no longer a point
event, but a whole bunch of pixel points?

thanks
-pro

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

2009-10-05 Thread jotobjects

Thanks for those clarifications - this is very helpful.  Two more
questions:

I created a jar file in my project lib directory and used some classes
in the jar file.  It works when I install it, but when I look at the
apk file (with jar -t) I don't see the lib directory.  When I look on
the device with adb shell I see an empty lib directory.  So where does
my jar file wind up in the apk and on the device?  I'm guessing it's
been bundled in the classes.dex file but I don't know how to examine
the contents of the dex file.

Regarding the Maps api.  I see what might be the implementation jar
in /data/dalvik-cache named
sys...@framework@com.google.android.maps@classes.dex
Is that the "shared library" aka "external library" (i.e., not a
native linux .so shared library)?

On Oct 2, 7:33 pm, Xavier Ducrohet  wrote:
> On Fri, Oct 2, 2009 at 1:29 PM,jotobjects wrote:
>
> > This is an area that I am confused about also.  The term "external
> > library" is perhaps overloaded with a different meaning in Android SDK
> > vs. in Eclipse build environment (which I don't use anyway).
> > Apparently this term in Android refers to a Linux platform shared
> > library?
>
> Correct they are optional system-level libraries.
>
> > I think Dianne in this thread is saying that the  is
> > only for shared libraries that are built-in to the device (emulator
> > image)?
>
> Yes. Since the maps library is Google proprietary, it's not part of
> the default SDK system image, and we ship a Google add-on that not
> only gives access to the API, but also includes a custom emulator
> system image that does have this system library.
>
> > And an application can NOT install a shared library?
>
> Correct.
>
> > Also I think that if you have a jar in your project lib directory that
> > WILL be included in the apk package?
>
> Correct in Ant, in Eclipse you have to add it to the build path.
>
> > And finally, from a recent thread, note that the maps.jar included
> > with the SDK is a stub for compile time linking and is NOT the
> > complete maps API that has to be installed on the device as a shared
> > library outside the application's control as mentioned above.
>
> That is correct. Like android.jar, maps.jar only contains the public
> API. It does not include all classes the maps library present on the
> system, and the included classes have no code (they all throw an
> exception).
>
> Xav
> --
> Xavier Ducrohet
> Android SDK Tech Lead
> Google Inc.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Editing Strings.xml from inside .java

2009-10-05 Thread Dianne Hackborn
Not at all, sorry.

On Mon, Oct 5, 2009 at 4:11 PM, JasonMP  wrote:

>
> Is it possible to edit a string in my strings.xml from within my java
> code?  I'd like my app_name to be changed dynamically based off of
> user input.
> >
>


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

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

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



[android-developers] Editing Strings.xml from inside .java

2009-10-05 Thread JasonMP

Is it possible to edit a string in my strings.xml from within my java
code?  I'd like my app_name to be changed dynamically based off of
user input.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Update to 1.6 stops some ADC2 apps from working

2009-10-05 Thread bellapariah

Hi John,

Our app is using a documented API (coded as specified in
documentation) and it is still not working correctly. Even if the
former wasn't the case, I disagree with your assertion that "if your
apps are failing because you used undocumented options in the SDK,
then you only have yourself to blame". Even if the problem was an
undocumented option, the terms and conditions state that we are
developing for 1.5 so as long as the app ran fine on 1.5 I don't see
why developers should be blamed for issues the arise from Google's
choice to update platform in middle of the contest.

"a. SUBMISSION OF ENTRIES: To qualify for a Prize, an "Entry" to the
Challenge consists of an original application that is written using a
version of the Android Software Development Kit ("SDK") (available at
http://developer.android.com) that validly executes on Android version
1.5. The SDK contains instructions, documentation, and all necessary
tools to enable a Participant to build an Android application."

Shelby

On Oct 5, 12:49 pm, "Maps.Huge.Info (Maps API Guru)"
 wrote:
> To me, the right thing to do would be to stop the first phase of this
> contest now, select the to 200 apps, figure out which ones bomb from
> 1.6 and give the developer a change to only change the bits that are
> causing the problems. There would have to be some controls to prevent
> upgrades and assurances to the rest of the developers that nothing
> else was changed to improve their apps or allow everyone to update,
> which would probably really annoy the heck out of anyone who figured
> out they had a problem on September 2nd and didn't make it to the
> finals.
>
> On the other hand, if your apps are failing because you used
> undocumented options in the SDK, then you only have yourself to
> blame...
>
> -John Coryat
>
> "Radar Now!"
>
> "What Zip Code?"
>
> On Oct 5, 2:18 pm, bellapariah  wrote:
>
>
>
> > Someone from Google please comment or at least give contact info! My
> > issue has to do with one of Google's API changes for 1.6 so it isn't
> > even a programming error on my part. I'm sure my ADC2 entry will get
> > low scores from everyone that upgrades to 1.6 since they can no longer
> > join rooms (calling issue with 1.6), and therefore cannot test the
> > app. Google should at least issue a statement letting testers know
> > that upgrading to 1.6 may cause some apps to stop working and to
> > please skip these so that 1.5 testers can give them an accurate
> > review.
>
> > Has Google completely abandoned this contest? Why have they not been
> > actively participating, answering developer questions, and building
> > buzz and excitement around the contest? This contest is supposed to
> > persuade programmers to develop for Android, not screw them over after
> > months of hard work then ignore them when their is a problem. Maybe if
> > their are enough developers affected we can get the attention of tech
> > sites and get some publicity for the issue.
>
> > Shelby
>
> > On Oct 4, 11:31 pm, bellapariah  wrote:
>
> > > I just got the 1.6 download and found out myADC2app is not working
> > > anymore. Works fine on 1.5 but people with 1.6 can't log in. Guess
> > > that explains the sudden drop in new accounts being created (We got
> > > around 70 testers before numbers plummeted to 5 to 6 over the
> > > weekend). :(  If Google planned to release 1.6 in the middle of a
> > > contest, they should have informed developers and given them the tools
> > > to test their app on this platform. We spent months on creating a high
> > > quality app for this contest and now people can't even judge it! There
> > > are probably hundreds of other developers that spent sleepless nights
> > > working their butt off to finish before the deadline just to have
> > > their chances decimated by google. All I can say is that I'm extremely
> > > disappointed in the way Google has handled this entire contest and I
> > > think it is extremely unfair and inconsiderate the way they are
> > > treating developers that they are supposed to be attracting to the
> > > Android platform.
>
> > > Shelby
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: where is sleep/screen behavior documented?

2009-10-05 Thread Dianne Hackborn
Hi Richard, sorry I really don't have time to go into detail on this stuff
at this point (and don't personally know enough to cover everything
anyway).  Ultimately the source code -- in particular PowerManagerService
and the keyguard interactions as start in PhoneWindowManager -- is the
ultimate specification, and these things change over time (for example in
Eclair the press menu to unlock behavior will be different at least on some
class of devices).  And many parts of this are intended to be fairly easy to
customize by a manufacturer to work most appropriately for their device.

Finally, this really sounds like the discussion should be on
android-porting; this doesn't look like stuff that is relevant to third
party developers.

On Mon, Oct 5, 2009 at 2:21 PM, Richard Schilling <
richard.rootwirel...@gmail.com> wrote:

>
> Thanks Yusuf.  That's helpful - I am very familiar with that
> documentation. I was looking for something more though.  I'm hoping to
> see a more comprehensive discussion about this behavior.  I need to
> put together something for QA testers.  No state can be left un-
> described for what I need.
>
> And thank you Dianne.  As always - a big help.  This makes sense.
> What's not complete on my list, though is how a dark screen, phone
> components, and wake locks relate.  I am not just looking for
> documentation on DIM wake lock and full wake lock.  There are
> additional use cases here:
>
> * menu lock on/off (must press the menu button): what affects that?
> How do wake locks affect that?
>
> * dark screen versus a fully functional phone: for the complete list
> of sensors and application services (e.g TelephonyService notification
> to my TelephonyListener, Wifi antenna, and sensors), how do wake locks
> affect each one?  When does each one get turned off?
>
> * how do each power state affect Timer class objects and application
> threads - for both foreground apps and background services?
>
> * when the user forces the screen to go dark by pressing the end-call
> button, what power state/wake lock state am I in?
>
> * when the application forces the screen to go dark by calling
> PowerManager.
>
> I also have the following case that I need to prove is working
> properly:
>
> 1. A RTC clock alarm fires an intent and wakes up the phone.
> 2. The application catches the intent and gets a wake lock. A
> background service is ran (no UI involved).
> 3. The wake lock is a dim wake lock, but the screen doesn't come on
> (that great).
> 4. The application does its processing then releases the wake lock(s)
> it acquired when responding to the intent.
>
>
> I believe it is.  The more comprehensive information I'm looking
> proves it.
>
> Thanks again.
>
> Richard Schilling
>
>
>
>
>
>
>
>
> On Oct 1, 1:05 pm, Dianne Hackborn  wrote:
> > Unless there is a third party app messing with you, there is something
> > broken with your software.  The typical behavior is:
> >
> > - Screen dims after the screen-off timeout sets in preferences, and then
> > turns off (and locks) a few seconds later.
> > - Screen turns off and locks with you press them end call / power button.
> >
> > This can be changed by applications -- for example most apps that play
> > videos turn on the option to keep the screen on while the video is
> playing,
> > so then you will need to manually press the power key to make it turn
> off.
> > Apps can also hold wake locks to impact how the device goes to sleep,
> though
> > they need to be granted the power permission to do so.  (No permission is
> > needed to simply keep the screen on while your window is in the
> foreground.)
> >
> > On Thu, Oct 1, 2009 at 12:24 PM, Richard Schilling <
> >
> >
> >
> > richard.rootwirel...@gmail.com> wrote:
> >
> > > I'm looking around and trying to find out where sleep behavior is
> > > documented - and I mean in the general sense.
> >
> > > When the phone is left alone:
> > > * Sometimes the phone screen dims and doesn't shut off.
> > > * Sometimes the phone screen goes dark in five seconds
> > > * Sometimes the menu lock happens.
> > > * Sometimes the menu lock doesn't happen.
> > > * Sometimes the only way to darken the screen is to push the power
> > > button.
> >
> > > What's not clear is what triggers these different states.   I'm
> > > looking for a complete list I can use in testing and application
> > > validation.
> >
> > > Can anyone point me in the right direction?
> >
> > > Thanks.
> >
> > > Richard Schilling
> > > Mobile Operating Systems Engineer
> > > Root Wireless, Inc.
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see
> and
> > answer them.
> >
>


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

Note: please don't send private questions to

[android-developers] Re: OpenGL ES flickering problems - double buffered?

2009-10-05 Thread David Minor

Is there any synchronization between the rendering thread and the game
logic thread?

On Oct 5, 7:27 am, Jeremy Slade  wrote:
> I'm definitely not getting anywhere close to that limit
> (GL_MAX_ELEMENTS_VERTICES).
>
> I'm pretty close to a root cause for at least a large percentage of
> the flickering events... It has something to do with my thread
> synchronization, but it's not obvious to me how it causes the flicker.
>
> I have three threads:
> * main / UI thread
> * logic thread
> * rendering thread (created by GLSurfaceView)
>
> The majority of the flickering happens when I do something to generate
> UI events (touch the screen, move the trackball, etc).  I end up
> passing a message to the logic thread, which may be sleeping:
>
>     public void queueGameEvent(GameEvent ev) {
>         synchronized(mGameLoop) {
>             if ( first_event != null ) first_event.next_event = ev;
>             else first_event = ev;
>             ev.next_event = null;
>             //mGameLoop.notifyAll(); // wake sleeping threads
>         }
>     }
>
> When I have the notfyAll() call enabled, it flickers badly.  Without
> it, I rarely see flickers (still some, though).  That method is called
> from the UI thread, and should result in waking up the logic thread.
> Any ideas on how / why that affects the rendering?
>
> Thanks,
> Jeremy
>
> On Oct 4, 6:05 pm, Robert Green  wrote:
>
> > The G1 reports 65536 for that parameter.
>
> > On Oct 4, 7:06 am, RichardC  wrote:
>
> > > You could try
>
> > > glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &value);
>
> > > Have not tried this myself but found it in
>
> > >http://gpwiki.org/forums/viewtopic.php?t=8839
>
> > > On Oct 4, 7:36 am, Jeremy Slade  wrote:
>
> > > > I did wonder about the OpenGL command buffer limit -- any way to
> > > > verify for sure that I am hitting it?
>
> > > > I would be surprised if that's the case, though -- it's not a real
> > > > complex scene, maybe 3000-4000 textured triangles.  But I'll admit to
> > > > being almost a complete novice where OpenGL is concerned...
>
> > > > The various meshes are all done with glDrawElements().  95% of this is
> > > > in the cow mesh -- same mesh drawn w/ different transforms, and
> > > > different textures bound each time.  The mesh itself uses ~54k of
> > > > memory for vertices + normals + tex coords.  How big is the OpenGL
> > > > buffer?  seems like it's got to be significantly larger than that.
>
> > > > On Oct 3, 1:29 pm, RichardC  wrote:
>
> > > > > If I remember correctly OpenGL internally has a limit to the number of
> > > > > items it can hold in it's display list.  When the list gets full it's
> > > > > starts drawing rather than dropping your items.  To achieve this it
> > > > > flips the buffers and draws the remaining items on the live screen.
>
> > > > > If I am remembering correcly this could explain what you are seeing.
>
> > > > > --
> > > > > Ruchard
>
> > > > > On Oct 3, 8:08 pm, Jeremy Slade  wrote:
>
> > > > > > I'm trying to clean up some rendering issues for a 3D game --
> > > > > > CowPotato (http://www.cyrket.com/package/
> > > > > > com.froogloid.android.cowpotato).  I could use some help on one 
> > > > > > issue.
>
> > > > > > Basically I'm seeing some flickering, like the next frame is getting
> > > > > > flushed before everything is drawn.  It is definitely the last few
> > > > > > items in my display list that seem to flicker -- if I reorder the
> > > > > > list, it's always the last part of the list that flickers.
>
> > > > > > I understand that the GLSurfaceView automatically provides double-
> > > > > > buffering -- it certainly appears to be the case looking at the
> > > > > > source.  So any suggestions as to why I might be seeing flicker?  I
> > > > > > put counters into the drawing methods to make sure that all the
> > > > > > objects are called each frame, they just don't show up on screen all
> > > > > > the time.
>
> > > > > > Any insight would be appreciated.
>
> > > > > > Jeremy
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: OpenGL ES flickering problems - double buffered?

2009-10-05 Thread David Minor

I notice in your article the issue you describe seems to be
synchronization "fairness", i.e. Java doesn't make any fairness
guarantees about serving threads in the order they are waiting (though
I believe many Java implementations do). Have you tried the Semaphore
class? It allows you to specify whether it's fair or not in the
constructor.

On Oct 5, 12:10 pm, Robert Green  wrote:
> By the way, I don't recommend handling input the way you are.  I
> switched all my games to use input pipelines and they have saved me a
> load of trouble.  I get super fast response and don't have to
> synchronize with a common thread mutex, which I have always had issues
> with it not giving up the lock to another thread.  I wrote an article
> just now that you can take a look at if you're interested in switching
> -http://www.rbgrn.net/content/342-using-input-pipelines-your-android-game
>
> On Oct 5, 9:27 am, Jeremy Slade  wrote:
>
> > I'm definitely not getting anywhere close to that limit
> > (GL_MAX_ELEMENTS_VERTICES).
>
> > I'm pretty close to a root cause for at least a large percentage of
> > the flickering events... It has something to do with my thread
> > synchronization, but it's not obvious to me how it causes the flicker.
>
> > I have three threads:
> > * main / UI thread
> > * logic thread
> > * rendering thread (created by GLSurfaceView)
>
> > The majority of the flickering happens when I do something to generate
> > UI events (touch the screen, move the trackball, etc).  I end up
> > passing a message to the logic thread, which may be sleeping:
>
> >     public void queueGameEvent(GameEvent ev) {
> >         synchronized(mGameLoop) {
> >             if ( first_event != null ) first_event.next_event = ev;
> >             else first_event = ev;
> >             ev.next_event = null;
> >             //mGameLoop.notifyAll(); // wake sleeping threads
> >         }
> >     }
>
> > When I have the notfyAll() call enabled, it flickers badly.  Without
> > it, I rarely see flickers (still some, though).  That method is called
> > from the UI thread, and should result in waking up the logic thread.
> > Any ideas on how / why that affects the rendering?
>
> > Thanks,
> > Jeremy
>
> > On Oct 4, 6:05 pm, Robert Green  wrote:
>
> > > The G1 reports 65536 for that parameter.
>
> > > On Oct 4, 7:06 am, RichardC  wrote:
>
> > > > You could try
>
> > > > glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &value);
>
> > > > Have not tried this myself but found it in
>
> > > >http://gpwiki.org/forums/viewtopic.php?t=8839
>
> > > > On Oct 4, 7:36 am, Jeremy Slade  wrote:
>
> > > > > I did wonder about the OpenGL command buffer limit -- any way to
> > > > > verify for sure that I am hitting it?
>
> > > > > I would be surprised if that's the case, though -- it's not a real
> > > > > complex scene, maybe 3000-4000 textured triangles.  But I'll admit to
> > > > > being almost a complete novice where OpenGL is concerned...
>
> > > > > The various meshes are all done with glDrawElements().  95% of this is
> > > > > in the cow mesh -- same mesh drawn w/ different transforms, and
> > > > > different textures bound each time.  The mesh itself uses ~54k of
> > > > > memory for vertices + normals + tex coords.  How big is the OpenGL
> > > > > buffer?  seems like it's got to be significantly larger than that.
>
> > > > > On Oct 3, 1:29 pm, RichardC  wrote:
>
> > > > > > If I remember correctly OpenGL internally has a limit to the number 
> > > > > > of
> > > > > > items it can hold in it's display list.  When the list gets full 
> > > > > > it's
> > > > > > starts drawing rather than dropping your items.  To achieve this it
> > > > > > flips the buffers and draws the remaining items on the live screen.
>
> > > > > > If I am remembering correcly this could explain what you are seeing.
>
> > > > > > --
> > > > > > Ruchard
>
> > > > > > On Oct 3, 8:08 pm, Jeremy Slade  wrote:
>
> > > > > > > I'm trying to clean up some rendering issues for a 3D game --
> > > > > > > CowPotato (http://www.cyrket.com/package/
> > > > > > > com.froogloid.android.cowpotato).  I could use some help on one 
> > > > > > > issue.
>
> > > > > > > Basically I'm seeing some flickering, like the next frame is 
> > > > > > > getting
> > > > > > > flushed before everything is drawn.  It is definitely the last few
> > > > > > > items in my display list that seem to flicker -- if I reorder the
> > > > > > > list, it's always the last part of the list that flickers.
>
> > > > > > > I understand that the GLSurfaceView automatically provides double-
> > > > > > > buffering -- it certainly appears to be the case looking at the
> > > > > > > source.  So any suggestions as to why I might be seeing flicker?  
> > > > > > > I
> > > > > > > put counters into the drawing methods to make sure that all the
> > > > > > > objects are called each frame, they just don't show up on screen 
> > > > > > > all
> > > > > > > the time.
>
> > > > > > > Any insight would be appreciated.
>
> > > > > > > Jeremy
>
>

[android-developers] Re: OpenGL ES flickering problems - double buffered?

2009-10-05 Thread Jeremy Slade

I do sleep between touch events in the UI thread, after posting the
event to the logic thread.

On Oct 5, 10:19 am, RichardC  wrote:
> Have you tried adding sleep(32) (or sleep(16), you need to experiment
> with the values) to your on onTouchEvent handler?  There is a known
> issue with the GUI thread being bombarded with touch events when the
> user touches the screen.  The effect of these events can be to starve
> your other threads of CPU time.
>
> On Oct 5, 3:27 pm, Jeremy Slade  wrote:
>
> > I'm definitely not getting anywhere close to that limit
> > (GL_MAX_ELEMENTS_VERTICES).
>
> > I'm pretty close to a root cause for at least a large percentage of
> > the flickering events... It has something to do with my thread
> > synchronization, but it's not obvious to me how it causes theflicker.
>
> > I have three threads:
> > * main / UI thread
> > * logic thread
> > * rendering thread (created by GLSurfaceView)
>
> > The majority of the flickering happens when I do something to generate
> > UI events (touch the screen, move the trackball, etc).  I end up
> > passing a message to the logic thread, which may be sleeping:
>
> >     public void queueGameEvent(GameEvent ev) {
> >         synchronized(mGameLoop) {
> >             if ( first_event != null ) first_event.next_event = ev;
> >             else first_event = ev;
> >             ev.next_event = null;
> >             //mGameLoop.notifyAll(); // wake sleeping threads
> >         }
> >     }
>
> > When I have the notfyAll() call enabled, it flickers badly.  Without
> > it, I rarely see flickers (still some, though).  That method is called
> > from the UI thread, and should result in waking up the logic thread.
> > Any ideas on how / why that affects the rendering?
>
> > Thanks,
> > Jeremy
>
> > On Oct 4, 6:05 pm, Robert Green  wrote:
>
> > > The G1 reports 65536 for that parameter.
>
> > > On Oct 4, 7:06 am, RichardC  wrote:
>
> > > > You could try
>
> > > > glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &value);
>
> > > > Have not tried this myself but found it in
>
> > > >http://gpwiki.org/forums/viewtopic.php?t=8839
>
> > > > On Oct 4, 7:36 am, Jeremy Slade  wrote:
>
> > > > > I did wonder about theOpenGLcommand buffer limit -- any way to
> > > > > verify for sure that I am hitting it?
>
> > > > > I would be surprised if that's the case, though -- it's not a real
> > > > > complex scene, maybe 3000-4000 textured triangles.  But I'll admit to
> > > > > being almost a complete novice whereOpenGLis concerned...
>
> > > > > The various meshes are all done with glDrawElements().  95% of this is
> > > > > in the cow mesh -- same mesh drawn w/ different transforms, and
> > > > > different textures bound each time.  The mesh itself uses ~54k of
> > > > > memory for vertices + normals + tex coords.  How big is theOpenGL
> > > > > buffer?  seems like it's got to be significantly larger than that.
>
> > > > > On Oct 3, 1:29 pm, RichardC  wrote:
>
> > > > > > If I remember correctlyOpenGLinternally has a limit to the number of
> > > > > > items it can hold in it's display list.  When the list gets full 
> > > > > > it's
> > > > > > starts drawing rather than dropping your items.  To achieve this it
> > > > > > flips the buffers and draws the remaining items on the live screen.
>
> > > > > > If I am remembering correcly this could explain what you are seeing.
>
> > > > > > --
> > > > > > Ruchard
>
> > > > > > On Oct 3, 8:08 pm, Jeremy Slade  wrote:
>
> > > > > > > I'm trying to clean up some rendering issues for a 3D game --
> > > > > > > CowPotato (http://www.cyrket.com/package/
> > > > > > > com.froogloid.android.cowpotato).  I could use some help on one 
> > > > > > > issue.
>
> > > > > > > Basically I'm seeing some flickering, like the next frame is 
> > > > > > > getting
> > > > > > > flushed before everything is drawn.  It is definitely the last few
> > > > > > > items in my display list that seem toflicker-- if I reorder the
> > > > > > > list, it's always the last part of the list that flickers.
>
> > > > > > > I understand that the GLSurfaceView automatically provides double-
> > > > > > > buffering -- it certainly appears to be the case looking at the
> > > > > > > source.  So any suggestions as to why I might be seeingflicker?  I
> > > > > > > put counters into the drawing methods to make sure that all the
> > > > > > > objects are called each frame, they just don't show up on screen 
> > > > > > > all
> > > > > > > the time.
>
> > > > > > > Any insight would be appreciated.
>
> > > > > > > Jeremy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: OpenGL ES flickering problems - double buffered?

2009-10-05 Thread Jeremy Slade

I do the "if anything updated" check in the game logic thread.  If
something is changed, I post the requestRender() to the renderer.  For
continuous-mode rendering, that shouldn't have any effect, as the
renderer will update regardless.

And as I explained in the original post, it is not the full scene that
flickers, only the last item(s) in the display list.

I appreciate all the random thoughts and suggestions, though!


Jeremy


On Oct 5, 2:25 pm, Robert Green  wrote:
> Jeremy,
>
> I just gotta ask.  Is there any possibility that through an
> optimization or any other way, there is a case where you're not
> clearing and not drawing sometimes when a frame is drawn?  I'm just
> imagining a piece of code that says, "Did anything change?  No?  Then
> just return."  That would causeflicker.
>
> On Oct 5, 3:17 pm, Jeremy Slade  wrote:
>
> > I'm trying to convert from using RENDERMODE_CONTINUOUSLY to
> > RENDERMODE_WHEN_DIRTY, to reduce overall system load -- the game view
> > is static a fair % of the time.  It hasn't been working reliably,
> > probably for the reasons you describe in that post.
>
> > My input handling is essentially the same as what you describe as an
> > input pipeline, except for the mutex object -- it makes sense to use a
> > more specific mutex rather than the whole game loop.  I will give that
> > a try -- I
>
> > However, I don't think that helps much to explain the flickering.  But
> > I'll reserve judgement until I have a chance to try it :)
>
> > Jeremy
>
> > On Oct 5, 1:10 pm, Robert Green  wrote:
>
> > > I just thought of something.  You said your logic thread sleeps?  Are
> > > you using RENDERMODE_CONTINUOUSLY?
>
> > > Here's a shot in the dark.  I feel like your renderer isn't clearing
> > > the color buffer and isn't drawing anything, and that maybe happens
> > > when there's a certain state of the logic thread somehow.  Drawing a
> > > frame without clearing the color buffer and without drawing anything
> > > will make for some wild flickering but the image will still be there,
> > > just flickery.  I noticed that when I was messing with skyboxes and
> > > had my clear command off.
>
> > > By the way, I don't recommend handling input the way you are.  I
> > > switched all my games to use input pipelines and they have saved me a
> > > load of trouble.  I get super fast response and don't have to
> > > synchronize with a common thread mutex, which I have always had issues
> > > with it not giving up the lock to another thread.  I wrote an article
> > > just now that you can take a look at if you're interested in switching
> > > -http://www.rbgrn.net/content/342-using-input-pipelines-your-android-game
>
> > > On Oct 5, 9:27 am, Jeremy Slade  wrote:
>
> > > > I'm definitely not getting anywhere close to that limit
> > > > (GL_MAX_ELEMENTS_VERTICES).
>
> > > > I'm pretty close to a root cause for at least a large percentage of
> > > > the flickering events... It has something to do with my thread
> > > > synchronization, but it's not obvious to me how it causes theflicker.
>
> > > > I have three threads:
> > > > * main / UI thread
> > > > * logic thread
> > > > * rendering thread (created by GLSurfaceView)
>
> > > > The majority of the flickering happens when I do something to generate
> > > > UI events (touch the screen, move the trackball, etc).  I end up
> > > > passing a message to the logic thread, which may be sleeping:
>
> > > >     public void queueGameEvent(GameEvent ev) {
> > > >         synchronized(mGameLoop) {
> > > >             if ( first_event != null ) first_event.next_event = ev;
> > > >             else first_event = ev;
> > > >             ev.next_event = null;
> > > >             //mGameLoop.notifyAll(); // wake sleeping threads
> > > >         }
> > > >     }
>
> > > > When I have the notfyAll() call enabled, it flickers badly.  Without
> > > > it, I rarely see flickers (still some, though).  That method is called
> > > > from the UI thread, and should result in waking up the logic thread.
> > > > Any ideas on how / why that affects the rendering?
>
> > > > Thanks,
> > > > Jeremy
>
> > > > On Oct 4, 6:05 pm, Robert Green  wrote:
>
> > > > > The G1 reports 65536 for that parameter.
>
> > > > > On Oct 4, 7:06 am, RichardC  wrote:
>
> > > > > > You could try
>
> > > > > > glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &value);
>
> > > > > > Have not tried this myself but found it in
>
> > > > > >http://gpwiki.org/forums/viewtopic.php?t=8839
>
> > > > > > On Oct 4, 7:36 am, Jeremy Slade  wrote:
>
> > > > > > > I did wonder about theOpenGLcommand buffer limit -- any way to
> > > > > > > verify for sure that I am hitting it?
>
> > > > > > > I would be surprised if that's the case, though -- it's not a real
> > > > > > > complex scene, maybe 3000-4000 textured triangles.  But I'll 
> > > > > > > admit to
> > > > > > > being almost a complete novice whereOpenGLis concerned...
>
> > > > > > > The various meshes are all done with glDrawElements().  95% of 
> > > > > > > this

[android-developers] Re: Android Game Framework ?

2009-10-05 Thread vetch


I do not know if Rokon is good or great. I looked through his code -
for me it looks like early alpha stage. Besides, it has licensing
"issues", so I prefer to writing my own, that I really understand.

I hope Google knows how badly Android needs embedded game framework.


On 5 Paź, 23:43, Dan Sherman  wrote:
> But its a community effort... The guy from Rokon was on here looking for
> help on his (very well designed) game engine, could be very neat if it got
> some power behind it.
>
> Look at the iphone (as hopefully a decent example), theres not much there in
> terms of game frameworks.  Someone ported cocos2d which ended up doing quite
> well.
>
> XNA is a bad example, as it was built for something that only does games,
> and has been since ported to other places.  Google doesn't build games...
>
> - Dan
>
> On Mon, Oct 5, 2009 at 5:34 PM, vetch  wrote:
>
> > very funny :) but I think, you did not understand my point.
>
> > I think about game engine framework embedded in SDK.
>
> > Google done great job with UI framework, hardware interfaces and
> > others, so I think, creating another high level framework for games,
> > should not be a problem for them.
>
> > On 5 Paź, 23:25, Dan Sherman  wrote:
> > >http://lmgtfy.com/?q=android+game+framework
>
> > > On Mon, Oct 5, 2009 at 5:17 PM, vetch  wrote:
>
> > > > Me, and I think, many other developers, always tried to write some
> > > > game.
>
> > > > Problem with a game, is a complexity of technic stuff. Complexity,
> > > > means learning. Learning is great, but takes time.
>
> > > > I think, Android needs a game framework. Something like SDL or more,
> > > > XNA from Microsoft. Of course, we can use Canvas to draw, but it is
> > > > slow. We can use OpenGL, but after two days of learning I still do not
> > > > know how to draw f** background. Of course, I will do that. Some
> > > > day :) But state and flags-ful OGL interface is really hard to
> > > > understand if you go from wonderful world of objective thinking.
>
> > > > I just want to focus on creating art, not wondering how to create
> > > > tools for that.
>
> > > > I'm worrying, really worring about Android and games. M$ has XNA,
> > > > porting it to Zune with Tegra. After that, XNA will come to WinMo. If
> > > > you ever used C# and XNA, you know, how simple and great it is. What
> > > > does it mean ? Thousands of games for Microsoft Mobile Junk and still
> > > > no great games for Android. Worst. Many Android developers will go to
> > > > WinMo for XNA. Many games will be easily ported from Xbox Arcade too.
>
> > > > And we will be wasting time, wondering, how to get 25fps from Canvas
> > > > or OpenGL. Without sound.
>
> > > > Now, I think, is the time to do something with that. Android really
> > > > needs something like XNA, to allow us producing games without all that
> > > > technic stuff like OpenGL, game loops with managing threads, times,
> > > > buffers, right pixel format settings and others.
>
> > > > What you think about official game framework for Android ?
>
> > > > Is Google working on something like that ?
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to set button background color?

2009-10-05 Thread Nicholas Key

I'd give it a try :)

Thanks!

On Oct 5, 6:20 am, "Mark Murphy"  wrote:
> > On Oct 4, 8:40 pm, "Mark Murphy"  wrote:
> >> > I have a question about setting thebackgroundcolorfor buttons.
> >> > When I am using btn.setBackgroundColor(Color.RED), the entire button
> >> > turns into a red rectangle.
>
> >> Correct.
>
> >> > Is there actually a workaround to achieve this?
>
> >> What is "this"?
>
> > "this" refers to the intention to set the button with a Redbackground
> >color.
> > I actually meant to ask if there are any other ways to set the button
> > with a Redbackgroundcolor.
>
> > :)
>
> Option #1: Use a redcolor, as you did there. Downside: your button will
> appear to be no longer focusable or clickable, since the different button
> UI states for those events are actually part of the buttonbackground.
>
> Option #2: Create a StateListDrawable, perhaps through a  XML
> file in res/drawable/. Clone the XML from the XML used by Android for
> buttons by default, and replace whichever states you want with a solid 
> redcolor, or a red .9.png file, or something.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] When Softkeyboard in emulator appears, EditText view donot scroll up

2009-10-05 Thread purvi

Hi,

I have a query. With SDK 1.5, I have a editText box at the very end of
the screen in potrait mode. So when I click on this edittext box, the
soft keyboard appears and the view should scroll up so that the user
can see the cursor in editbox to type in. But with me as the view
donot scroll up.

My .xml layout is as follows:

   
   
  
   
   
   


Can anyone please help me out how can I make the view scroll by itself
when the soft keyboard appears?

Thanks.
Regards,
Purvi

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



[android-developers] Hello

2009-10-05 Thread purvi

I am an android developer and want to join this group to learn as well
as contribute.
Thanks.
Regards,
Purvi

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

2009-10-05 Thread Dan Sherman
But its a community effort... The guy from Rokon was on here looking for
help on his (very well designed) game engine, could be very neat if it got
some power behind it.

Look at the iphone (as hopefully a decent example), theres not much there in
terms of game frameworks.  Someone ported cocos2d which ended up doing quite
well.

XNA is a bad example, as it was built for something that only does games,
and has been since ported to other places.  Google doesn't build games...

- Dan

On Mon, Oct 5, 2009 at 5:34 PM, vetch  wrote:

>
> very funny :) but I think, you did not understand my point.
>
> I think about game engine framework embedded in SDK.
>
> Google done great job with UI framework, hardware interfaces and
> others, so I think, creating another high level framework for games,
> should not be a problem for them.
>
>
> On 5 Paź, 23:25, Dan Sherman  wrote:
> > http://lmgtfy.com/?q=android+game+framework
> >
> > On Mon, Oct 5, 2009 at 5:17 PM, vetch  wrote:
> >
> > > Me, and I think, many other developers, always tried to write some
> > > game.
> >
> > > Problem with a game, is a complexity of technic stuff. Complexity,
> > > means learning. Learning is great, but takes time.
> >
> > > I think, Android needs a game framework. Something like SDL or more,
> > > XNA from Microsoft. Of course, we can use Canvas to draw, but it is
> > > slow. We can use OpenGL, but after two days of learning I still do not
> > > know how to draw f** background. Of course, I will do that. Some
> > > day :) But state and flags-ful OGL interface is really hard to
> > > understand if you go from wonderful world of objective thinking.
> >
> > > I just want to focus on creating art, not wondering how to create
> > > tools for that.
> >
> > > I'm worrying, really worring about Android and games. M$ has XNA,
> > > porting it to Zune with Tegra. After that, XNA will come to WinMo. If
> > > you ever used C# and XNA, you know, how simple and great it is. What
> > > does it mean ? Thousands of games for Microsoft Mobile Junk and still
> > > no great games for Android. Worst. Many Android developers will go to
> > > WinMo for XNA. Many games will be easily ported from Xbox Arcade too.
> >
> > > And we will be wasting time, wondering, how to get 25fps from Canvas
> > > or OpenGL. Without sound.
> >
> > > Now, I think, is the time to do something with that. Android really
> > > needs something like XNA, to allow us producing games without all that
> > > technic stuff like OpenGL, game loops with managing threads, times,
> > > buffers, right pixel format settings and others.
> >
> > > What you think about official game framework for Android ?
> >
> > > Is Google working on something like that ?
> >
> >
> >
>

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



[android-developers] Re: why is my app asking to access phone calls and storage?

2009-10-05 Thread Jarcikon

Chris,

I am having the same problem. This is due to the update to Donut (1.6
SDK).  According to the docs, if you set targetSdkVersion in your
manifest file to "4" these permissions should not appear unless
specifically requested.  However, I have tried this and it is not
working for me.

Does anyone have a solution?

Mike

On Sep 18, 8:54 am, ch13fw  wrote:
> I am working on a widget and have it pretty much how I like it, but I
> have one problem.  When I package it and install it, it says in the
> "allow this application to" portion that it wants access 
> tophonecallsandstorage.  I know this will be a no-go if I want anyone to
> ever use it.
>
> I have not set up any permissions.  Same thing happens even if I make
> Hello World.
>
> Sorry if this has been ask before, but I have searched quite a bit
> looking for an answer.
>
> Chris

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



[android-developers] set default APN programmatically

2009-10-05 Thread Fernando

Is there a way to set the default APN through code?
I'm trying with this snippet:


String id = null;
Uri contentUri = 
Uri.parse("content://telephony/carriers/
preferapn");
Cursor cursor = null;
ContentResolver resolver = getContentResolver();

try {
cursor = resolver.query(contentUri, new 
String[]{"_id"}, null,
null, null);
if (cursor != null) {
while (cursor.moveToNext()) {
id = cursor.getString(0);
System.out.println("Found APN with id: " + 
id);
}
}
} catch (Exception ex){
//Handle exceptions here
} finally {
if (cursor != null) cursor.close();
}
if(id != null){
 ContentValues values = new ContentValues();
 values.put(id, "new apn value"); //does this works?
 resolver.update(contentUri, values, null, null);
}

However, once it is done, if we read again the default APN it remains
unchanged. I'm testing this on sdk 1.5.
Thanks in advance.

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



[android-developers] Re: why is my app asking to access phone calls and storage?

2009-10-05 Thread Jarcikon

Chris,

I am having this same problem.  I am assuming you are compiling on
Android 1.6 SDK?  These permissions are granted by default for older
apps, but need to be specifically requested for apps targeting 1.6.

If you change android:targetSdkVersion to "4" then you shouldn't see
these permissions requested.  However, I have my targetSdkVersion set
to 4 and these permissions are still on the list when I go to install
my app.  I also have not specifically requested either of these
permissions.

Anyone else change their targetSdkVersion to 4 and still having this
problem?

Mike

On Sep 18, 8:54 am, ch13fw  wrote:
> I am working on a widget and have it pretty much how I like it, but I
> have one problem.  When I package it and install it, it says in the
> "allow this application to" portion that it wants access 
> tophonecallsandstorage.  I know this will be a no-go if I want anyone to
> ever use it.
>
> I have not set up any permissions.  Same thing happens even if I make
> Hello World.
>
> Sorry if this has been ask before, but I have searched quite a bit
> looking for an answer.
>
> Chris

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



[android-developers] Re: Android Game Framework ?

2009-10-05 Thread vetch

very funny :) but I think, you did not understand my point.

I think about game engine framework embedded in SDK.

Google done great job with UI framework, hardware interfaces and
others, so I think, creating another high level framework for games,
should not be a problem for them.


On 5 Paź, 23:25, Dan Sherman  wrote:
> http://lmgtfy.com/?q=android+game+framework
>
> On Mon, Oct 5, 2009 at 5:17 PM, vetch  wrote:
>
> > Me, and I think, many other developers, always tried to write some
> > game.
>
> > Problem with a game, is a complexity of technic stuff. Complexity,
> > means learning. Learning is great, but takes time.
>
> > I think, Android needs a game framework. Something like SDL or more,
> > XNA from Microsoft. Of course, we can use Canvas to draw, but it is
> > slow. We can use OpenGL, but after two days of learning I still do not
> > know how to draw f** background. Of course, I will do that. Some
> > day :) But state and flags-ful OGL interface is really hard to
> > understand if you go from wonderful world of objective thinking.
>
> > I just want to focus on creating art, not wondering how to create
> > tools for that.
>
> > I'm worrying, really worring about Android and games. M$ has XNA,
> > porting it to Zune with Tegra. After that, XNA will come to WinMo. If
> > you ever used C# and XNA, you know, how simple and great it is. What
> > does it mean ? Thousands of games for Microsoft Mobile Junk and still
> > no great games for Android. Worst. Many Android developers will go to
> > WinMo for XNA. Many games will be easily ported from Xbox Arcade too.
>
> > And we will be wasting time, wondering, how to get 25fps from Canvas
> > or OpenGL. Without sound.
>
> > Now, I think, is the time to do something with that. Android really
> > needs something like XNA, to allow us producing games without all that
> > technic stuff like OpenGL, game loops with managing threads, times,
> > buffers, right pixel format settings and others.
>
> > What you think about official game framework for Android ?
>
> > Is Google working on something like that ?
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 Game Framework ?

2009-10-05 Thread Dan Sherman
http://lmgtfy.com/?q=android+game+framework

On Mon, Oct 5, 2009 at 5:17 PM, vetch  wrote:

>
> Me, and I think, many other developers, always tried to write some
> game.
>
> Problem with a game, is a complexity of technic stuff. Complexity,
> means learning. Learning is great, but takes time.
>
> I think, Android needs a game framework. Something like SDL or more,
> XNA from Microsoft. Of course, we can use Canvas to draw, but it is
> slow. We can use OpenGL, but after two days of learning I still do not
> know how to draw f** background. Of course, I will do that. Some
> day :) But state and flags-ful OGL interface is really hard to
> understand if you go from wonderful world of objective thinking.
>
> I just want to focus on creating art, not wondering how to create
> tools for that.
>
> I'm worrying, really worring about Android and games. M$ has XNA,
> porting it to Zune with Tegra. After that, XNA will come to WinMo. If
> you ever used C# and XNA, you know, how simple and great it is. What
> does it mean ? Thousands of games for Microsoft Mobile Junk and still
> no great games for Android. Worst. Many Android developers will go to
> WinMo for XNA. Many games will be easily ported from Xbox Arcade too.
>
> And we will be wasting time, wondering, how to get 25fps from Canvas
> or OpenGL. Without sound.
>
> Now, I think, is the time to do something with that. Android really
> needs something like XNA, to allow us producing games without all that
> technic stuff like OpenGL, game loops with managing threads, times,
> buffers, right pixel format settings and others.
>
> What you think about official game framework for Android ?
>
> Is Google working on something like that ?
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: where is sleep/screen behavior documented?

2009-10-05 Thread Richard Schilling

Thanks Yusuf.  That's helpful - I am very familiar with that
documentation. I was looking for something more though.  I'm hoping to
see a more comprehensive discussion about this behavior.  I need to
put together something for QA testers.  No state can be left un-
described for what I need.

And thank you Dianne.  As always - a big help.  This makes sense.
What's not complete on my list, though is how a dark screen, phone
components, and wake locks relate.  I am not just looking for
documentation on DIM wake lock and full wake lock.  There are
additional use cases here:

* menu lock on/off (must press the menu button): what affects that?
How do wake locks affect that?

* dark screen versus a fully functional phone: for the complete list
of sensors and application services (e.g TelephonyService notification
to my TelephonyListener, Wifi antenna, and sensors), how do wake locks
affect each one?  When does each one get turned off?

* how do each power state affect Timer class objects and application
threads - for both foreground apps and background services?

* when the user forces the screen to go dark by pressing the end-call
button, what power state/wake lock state am I in?

* when the application forces the screen to go dark by calling
PowerManager.

I also have the following case that I need to prove is working
properly:

1. A RTC clock alarm fires an intent and wakes up the phone.
2. The application catches the intent and gets a wake lock. A
background service is ran (no UI involved).
3. The wake lock is a dim wake lock, but the screen doesn't come on
(that great).
4. The application does its processing then releases the wake lock(s)
it acquired when responding to the intent.


I believe it is.  The more comprehensive information I'm looking
proves it.

Thanks again.

Richard Schilling








On Oct 1, 1:05 pm, Dianne Hackborn  wrote:
> Unless there is a third party app messing with you, there is something
> broken with your software.  The typical behavior is:
>
> - Screen dims after the screen-off timeout sets in preferences, and then
> turns off (and locks) a few seconds later.
> - Screen turns off and locks with you press them end call / power button.
>
> This can be changed by applications -- for example most apps that play
> videos turn on the option to keep the screen on while the video is playing,
> so then you will need to manually press the power key to make it turn off.
> Apps can also hold wake locks to impact how the device goes to sleep, though
> they need to be granted the power permission to do so.  (No permission is
> needed to simply keep the screen on while your window is in the foreground.)
>
> On Thu, Oct 1, 2009 at 12:24 PM, Richard Schilling <
>
>
>
> richard.rootwirel...@gmail.com> wrote:
>
> > I'm looking around and trying to find out where sleep behavior is
> > documented - and I mean in the general sense.
>
> > When the phone is left alone:
> > * Sometimes the phone screen dims and doesn't shut off.
> > * Sometimes the phone screen goes dark in five seconds
> > * Sometimes the menu lock happens.
> > * Sometimes the menu lock doesn't happen.
> > * Sometimes the only way to darken the screen is to push the power
> > button.
>
> > What's not clear is what triggers these different states.   I'm
> > looking for a complete list I can use in testing and application
> > validation.
>
> > Can anyone point me in the right direction?
>
> > Thanks.
>
> > Richard Schilling
> > Mobile Operating Systems Engineer
> > Root Wireless, Inc.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Android Game Framework ?

2009-10-05 Thread vetch

Me, and I think, many other developers, always tried to write some
game.

Problem with a game, is a complexity of technic stuff. Complexity,
means learning. Learning is great, but takes time.

I think, Android needs a game framework. Something like SDL or more,
XNA from Microsoft. Of course, we can use Canvas to draw, but it is
slow. We can use OpenGL, but after two days of learning I still do not
know how to draw f** background. Of course, I will do that. Some
day :) But state and flags-ful OGL interface is really hard to
understand if you go from wonderful world of objective thinking.

I just want to focus on creating art, not wondering how to create
tools for that.

I'm worrying, really worring about Android and games. M$ has XNA,
porting it to Zune with Tegra. After that, XNA will come to WinMo. If
you ever used C# and XNA, you know, how simple and great it is. What
does it mean ? Thousands of games for Microsoft Mobile Junk and still
no great games for Android. Worst. Many Android developers will go to
WinMo for XNA. Many games will be easily ported from Xbox Arcade too.

And we will be wasting time, wondering, how to get 25fps from Canvas
or OpenGL. Without sound.

Now, I think, is the time to do something with that. Android really
needs something like XNA, to allow us producing games without all that
technic stuff like OpenGL, game loops with managing threads, times,
buffers, right pixel format settings and others.

What you think about official game framework for Android ?

Is Google working on something like that ?

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



[android-developers] access to data from the rtsp stream

2009-10-05 Thread Swisti

Hi,

The android.hardware package contains two methods:
onPictureTaken 
http://developer.android.com/reference/android/hardware/Camera.PictureCallback.html
and onPreviewFrame 
http://developer.android.com/reference/android/hardware/Camera.PreviewCallback.html
Is it possible similar access to data from the rtsp stream?

If not, it is possible to switch the buffer from
SURFACE_TYPE_PUSH_BUFFERS to SURFACE_TYPE_NORMAL and get data from
this buffer?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Wake Locks and the Cellular antenna...

2009-10-05 Thread Richard Schilling

I believe the antenna does in fact stay on.

I fully expect, too that the phone state listener won't get notified
of changes if the CPU is asleep.

It just appears that the telephony listener is not informed of
telephony changes unless there is at least a dim wake lock.  Partial
wake lock isn't enough.

I wonder if this is a bug or a feature request that can be filed ?

Richard Schilling


On Oct 1, 5:34 am, G  wrote:
> It seems indeed clear that the antenna stays on ... however, is it
> guaranteed that
> a phone state listener is notified of telephony state changes when the
> main CPU
> is asleep?
>
> Thanks,
>
> On Oct 1, 3:27 am, Dianne Hackborn  wrote:
>
> > I must be missing something here...  the antenna stays on even if no wake
> > locks are held, so the radio CPU can wake up the main CPU when there is an
> > incoming phone call or data traffic.
>
> > On Wed, Sep 30, 2009 at 3:54 PM, RichardSchilling<
>
> > richard.rootwirel...@gmail.com> wrote:
>
> > > This is not documented or discussed that I can find, so I post the
> > > question here.
>
> > > When the application has a PARTIAL_WAKE_LOCK, the CPU stays turned on,
> > > but what about the cellular antenna? Does the PhoneStateListener not
> > > receive any change in state from the antenna when the
> > > PARTIAL_WAKE_LOCK is acquired?   I have an application that needs to
> > > continuously read the signal strength while the user isn't using the
> > > phone.
>
> > > I suspect I need a FULL_WAKE_LOCK to do that.  Is that true?
>
> > > Thanks.
>
> > > RichardSchilling
> > > Mobile Operating Systems Engineer
>
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
>
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see and
> > answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Deployment best practice for trial / full version of an app

2009-10-05 Thread onoelle

Given the following scenario
a) I want to deploy two versions of an app: a free trial version with
somehow limited functionality and a full version
b) during trial period, users may enter data into my app (stored into
a database, but also some preferences) that should be available when
upgrading to the full version

are there any recommendations on how to deploy these two apps?

I can see two possibilities:
1) deploy the two apps with identical application name/package, so the
full version overwrites the trial version
positive: all data would be automatically available
negative: no way to distinguish the two versions, eg. if a new version
of the trial app becomes available, this might overwrite the full
version => I don't think this is a good idea...
2a) deploy the two apps with different application/package names,
write an import mechanism for the full version, and configure the
permissions for the data of the trial app in a way that the full
version (or all apps?) can access that data
2b) write an export to sd card function for the trial app and an
import function for the full app => I don't want the user to think
about exporting before upgrading

So it sounds as if I would have to stick with 2a, or do I miss some
other option to share/access the same data (given that data = sqlite
database + preferences)?

Any hint on further possibilities appreciated, 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] Emulator is extremely slow after upgrade to SDK 1.6

2009-10-05 Thread Paul Drummond
Hi all,
Has anyone else had problems upgrading to SDK 1.6?  When I did it, I ran my
app just as normal but all of a sudden everything takes forever to load!
 When the emulator eventually boots (after over 5 minutes -
no exaggeration!), all the standard apps display ANR messages and everything
runs dog slow!

I upgraded Eclipse to Galileo at the same time as upgrading to 1.6 so I
thought that might have introduced a problem but when I switched back to
Ganymede the emulator was still slow.  The only thing I haven't done is
un-install Galileo but I doubt that will solve anything.

Any suggestions would be much appreciated.

Thanks
Paul.

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

2009-10-05 Thread Roman ( T-Mobile USA)

If you cannot wait doing Voip on Android, play around with SipDroid.
The application does some basic support Voip support (SIP, RTP and
G711 codec).

Most of the functionality is right now implemented on Java level.

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

On Oct 5, 7:17 am, milan  wrote:
> Hi,
>
> Does anybody knows whether there are plans for Android to add a VOIP
> media stack into platform? By media stack I mean audio engine that
> handles: Acoustic Echo Cancellation/Suppression, noise filtering,
> handling audio sampling/playing (and possibly RTP streams as well) ?
> I know Windows CE and Symbian have such engines.
>
> Thanks
>    Milan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Integrating G729 codec in mjsip

2009-10-05 Thread Roman ( T-Mobile USA)

SipDroid has right now implemented the G711 on Java level. You can use
the current implementation as a guideline for your G729 codec
implementation (how to pass the raw audio to the convert API).

First you should answer the question whether you want to implement
your codec on Java or on native level. Converting raw audio to G711 is
pretty straight forward and not as "expensive" as converting your raw
audio to G729 format (find a native implementation at
http://www.readytechnology.co.uk/open/ipp-codecs-g729-g723.1/).

Be aware of that you can use g729 only for trial purposes. If you try
to sell an app using g729 you need a license!

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

On Oct 4, 11:37 pm, Mohammad Siddiqui  wrote:
> Hi All
> i am developing a VoIP client for android using the mjsip
> any one have the idea about integrating the G729 codec with mjsip
>
> thanks in advanced
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: OpenGL ES flickering problems - double buffered?

2009-10-05 Thread Tom Gibara
Warning, pure speculation follows:
Touching the screen generates events very rapidly, and using the trackball
probably does too. Anecdotally, I encountered the bug with increasing
frequency as the work done within the synchronized block lengthened (I think
- it was a while ago and I can't recall all the details).

So I'm willing to take a guess that the probability of triggering the bug
rises with both contention and frequency, meaning that even a very 'small'
synchronized block could trigger it, even though it's extremely unlikely
that it ever could. That's why I went for a sync-block-free implementation,
just to make sure.

Tom.


2009/10/5 Jeremy Slade 

>
> The issue you filed focuses on touch event handling, but I see
> flickering just as much with trackball events.  If it is a fundamental
> thread scheduling issue, I guess it wouldn't matter the type or even
> frequency of events being generated.
>
> On Oct 5, 2:01 pm, Tom Gibara  wrote:
> > I just read your post. Looks like I hit the same problem about 6 months
> ago.
> > I even managed to create a mostly-reproducible test case so that I could
> > file an issue:http://code.google.com/p/android/issues/detail?id=1956
> >
> > (I can only think that it's some sort of fairness issue with monitors)
> >
> > My solution was
> in
> > the same spirit, but actually uses a simple synchronization-free circular
> > event buffer that instead uses volatiles to guarantee correct execution.
> >
> > Tom.
> >
> > 2009/10/5 Robert Green 
> >
> >
> >
> > > I just thought of something.  You said your logic thread sleeps?  Are
> > > you using RENDERMODE_CONTINUOUSLY?
> >
> > > Here's a shot in the dark.  I feel like your renderer isn't clearing
> > > the color buffer and isn't drawing anything, and that maybe happens
> > > when there's a certain state of the logic thread somehow.  Drawing a
> > > frame without clearing the color buffer and without drawing anything
> > > will make for some wild flickering but the image will still be there,
> > > just flickery.  I noticed that when I was messing with skyboxes and
> > > had my clear command off.
> >
> > > By the way, I don't recommend handling input the way you are.  I
> > > switched all my games to use input pipelines and they have saved me a
> > > load of trouble.  I get super fast response and don't have to
> > > synchronize with a common thread mutex, which I have always had issues
> > > with it not giving up the lock to another thread.  I wrote an article
> > > just now that you can take a look at if you're interested in switching
> > > -
> http://www.rbgrn.net/content/342-using-input-pipelines-your-android-game
> >
> > > On Oct 5, 9:27 am, Jeremy Slade  wrote:
> > > > I'm definitely not getting anywhere close to that limit
> > > > (GL_MAX_ELEMENTS_VERTICES).
> >
> > > > I'm pretty close to a root cause for at least a large percentage of
> > > > the flickering events... It has something to do with my thread
> > > > synchronization, but it's not obvious to me how it causes the
> flicker.
> >
> > > > I have three threads:
> > > > * main / UI thread
> > > > * logic thread
> > > > * rendering thread (created by GLSurfaceView)
> >
> > > > The majority of the flickering happens when I do something to
> generate
> > > > UI events (touch the screen, move the trackball, etc).  I end up
> > > > passing a message to the logic thread, which may be sleeping:
> >
> > > > public void queueGameEvent(GameEvent ev) {
> > > > synchronized(mGameLoop) {
> > > > if ( first_event != null ) first_event.next_event = ev;
> > > > else first_event = ev;
> > > > ev.next_event = null;
> > > > //mGameLoop.notifyAll(); // wake sleeping threads
> > > > }
> > > > }
> >
> > > > When I have the notfyAll() call enabled, it flickers badly.  Without
> > > > it, I rarely see flickers (still some, though).  That method is
> called
> > > > from the UI thread, and should result in waking up the logic thread.
> > > > Any ideas on how / why that affects the rendering?
> >
> > > > Thanks,
> > > > Jeremy
> >
> > > > On Oct 4, 6:05 pm, Robert Green  wrote:
> >
> > > > > The G1 reports 65536 for that parameter.
> >
> > > > > On Oct 4, 7:06 am, RichardC 
> wrote:
> >
> > > > > > You could try
> >
> > > > > > glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &value);
> >
> > > > > > Have not tried this myself but found it in
> >
> > > > > >http://gpwiki.org/forums/viewtopic.php?t=8839
> >
> > > > > > On Oct 4, 7:36 am, Jeremy Slade 
> wrote:
> >
> > > > > > > I did wonder about the OpenGL command buffer limit -- any way
> to
> > > > > > > verify for sure that I am hitting it?
> >
> > > > > > > I would be surprised if that's the case, though -- it's not a
> real
> > > > > > > complex scene, maybe 3000-4000 textured triangles.  But I'll
> admit
> > > to
> > > > > > > being almost a complete novice where OpenGL is concerned...
> >
> > > > > > > The various m

[android-developers] Re: relocating webview cache using softlinks

2009-10-05 Thread Mark Murphy

> Now that I have implemented a new caching mechanism for ReaderScope that
> is independent of WebView, the added control looks like a big advantage.
>
> Thanks for the advice.

You're very welcome. Best of luck, um, scoping your readers, or whatever. ;-)

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



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



[android-developers] Re: OpenGL ES flickering problems - double buffered?

2009-10-05 Thread Robert Green

Jeremy,

I just gotta ask.  Is there any possibility that through an
optimization or any other way, there is a case where you're not
clearing and not drawing sometimes when a frame is drawn?  I'm just
imagining a piece of code that says, "Did anything change?  No?  Then
just return."  That would cause flicker.

On Oct 5, 3:17 pm, Jeremy Slade  wrote:
> I'm trying to convert from using RENDERMODE_CONTINUOUSLY to
> RENDERMODE_WHEN_DIRTY, to reduce overall system load -- the game view
> is static a fair % of the time.  It hasn't been working reliably,
> probably for the reasons you describe in that post.
>
> My input handling is essentially the same as what you describe as an
> input pipeline, except for the mutex object -- it makes sense to use a
> more specific mutex rather than the whole game loop.  I will give that
> a try -- I
>
> However, I don't think that helps much to explain the flickering.  But
> I'll reserve judgement until I have a chance to try it :)
>
> Jeremy
>
> On Oct 5, 1:10 pm, Robert Green  wrote:
>
> > I just thought of something.  You said your logic thread sleeps?  Are
> > you using RENDERMODE_CONTINUOUSLY?
>
> > Here's a shot in the dark.  I feel like your renderer isn't clearing
> > the color buffer and isn't drawing anything, and that maybe happens
> > when there's a certain state of the logic thread somehow.  Drawing a
> > frame without clearing the color buffer and without drawing anything
> > will make for some wild flickering but the image will still be there,
> > just flickery.  I noticed that when I was messing with skyboxes and
> > had my clear command off.
>
> > By the way, I don't recommend handling input the way you are.  I
> > switched all my games to use input pipelines and they have saved me a
> > load of trouble.  I get super fast response and don't have to
> > synchronize with a common thread mutex, which I have always had issues
> > with it not giving up the lock to another thread.  I wrote an article
> > just now that you can take a look at if you're interested in switching
> > -http://www.rbgrn.net/content/342-using-input-pipelines-your-android-game
>
> > On Oct 5, 9:27 am, Jeremy Slade  wrote:
>
> > > I'm definitely not getting anywhere close to that limit
> > > (GL_MAX_ELEMENTS_VERTICES).
>
> > > I'm pretty close to a root cause for at least a large percentage of
> > > the flickering events... It has something to do with my thread
> > > synchronization, but it's not obvious to me how it causes theflicker.
>
> > > I have three threads:
> > > * main / UI thread
> > > * logic thread
> > > * rendering thread (created by GLSurfaceView)
>
> > > The majority of the flickering happens when I do something to generate
> > > UI events (touch the screen, move the trackball, etc).  I end up
> > > passing a message to the logic thread, which may be sleeping:
>
> > >     public void queueGameEvent(GameEvent ev) {
> > >         synchronized(mGameLoop) {
> > >             if ( first_event != null ) first_event.next_event = ev;
> > >             else first_event = ev;
> > >             ev.next_event = null;
> > >             //mGameLoop.notifyAll(); // wake sleeping threads
> > >         }
> > >     }
>
> > > When I have the notfyAll() call enabled, it flickers badly.  Without
> > > it, I rarely see flickers (still some, though).  That method is called
> > > from the UI thread, and should result in waking up the logic thread.
> > > Any ideas on how / why that affects the rendering?
>
> > > Thanks,
> > > Jeremy
>
> > > On Oct 4, 6:05 pm, Robert Green  wrote:
>
> > > > The G1 reports 65536 for that parameter.
>
> > > > On Oct 4, 7:06 am, RichardC  wrote:
>
> > > > > You could try
>
> > > > > glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &value);
>
> > > > > Have not tried this myself but found it in
>
> > > > >http://gpwiki.org/forums/viewtopic.php?t=8839
>
> > > > > On Oct 4, 7:36 am, Jeremy Slade  wrote:
>
> > > > > > I did wonder about theOpenGLcommand buffer limit -- any way to
> > > > > > verify for sure that I am hitting it?
>
> > > > > > I would be surprised if that's the case, though -- it's not a real
> > > > > > complex scene, maybe 3000-4000 textured triangles.  But I'll admit 
> > > > > > to
> > > > > > being almost a complete novice whereOpenGLis concerned...
>
> > > > > > The various meshes are all done with glDrawElements().  95% of this 
> > > > > > is
> > > > > > in the cow mesh -- same mesh drawn w/ different transforms, and
> > > > > > different textures bound each time.  The mesh itself uses ~54k of
> > > > > > memory for vertices + normals + tex coords.  How big is theOpenGL
> > > > > > buffer?  seems like it's got to be significantly larger than that.
>
> > > > > > On Oct 3, 1:29 pm, RichardC  wrote:
>
> > > > > > > If I remember correctlyOpenGLinternally has a limit to the number 
> > > > > > > of
> > > > > > > items it can hold in it's display list.  When the list gets full 
> > > > > > > it's
> > > > > > > starts drawing rather than dropping your items.  To achie

[android-developers] Re: OpenGL ES flickering problems - double buffered?

2009-10-05 Thread Jeremy Slade

The issue you filed focuses on touch event handling, but I see
flickering just as much with trackball events.  If it is a fundamental
thread scheduling issue, I guess it wouldn't matter the type or even
frequency of events being generated.

On Oct 5, 2:01 pm, Tom Gibara  wrote:
> I just read your post. Looks like I hit the same problem about 6 months ago.
> I even managed to create a mostly-reproducible test case so that I could
> file an issue:http://code.google.com/p/android/issues/detail?id=1956
>
> (I can only think that it's some sort of fairness issue with monitors)
>
> My solution was in
> the same spirit, but actually uses a simple synchronization-free circular
> event buffer that instead uses volatiles to guarantee correct execution.
>
> Tom.
>
> 2009/10/5 Robert Green 
>
>
>
> > I just thought of something.  You said your logic thread sleeps?  Are
> > you using RENDERMODE_CONTINUOUSLY?
>
> > Here's a shot in the dark.  I feel like your renderer isn't clearing
> > the color buffer and isn't drawing anything, and that maybe happens
> > when there's a certain state of the logic thread somehow.  Drawing a
> > frame without clearing the color buffer and without drawing anything
> > will make for some wild flickering but the image will still be there,
> > just flickery.  I noticed that when I was messing with skyboxes and
> > had my clear command off.
>
> > By the way, I don't recommend handling input the way you are.  I
> > switched all my games to use input pipelines and they have saved me a
> > load of trouble.  I get super fast response and don't have to
> > synchronize with a common thread mutex, which I have always had issues
> > with it not giving up the lock to another thread.  I wrote an article
> > just now that you can take a look at if you're interested in switching
> > -http://www.rbgrn.net/content/342-using-input-pipelines-your-android-game
>
> > On Oct 5, 9:27 am, Jeremy Slade  wrote:
> > > I'm definitely not getting anywhere close to that limit
> > > (GL_MAX_ELEMENTS_VERTICES).
>
> > > I'm pretty close to a root cause for at least a large percentage of
> > > the flickering events... It has something to do with my thread
> > > synchronization, but it's not obvious to me how it causes the flicker.
>
> > > I have three threads:
> > > * main / UI thread
> > > * logic thread
> > > * rendering thread (created by GLSurfaceView)
>
> > > The majority of the flickering happens when I do something to generate
> > > UI events (touch the screen, move the trackball, etc).  I end up
> > > passing a message to the logic thread, which may be sleeping:
>
> > >     public void queueGameEvent(GameEvent ev) {
> > >         synchronized(mGameLoop) {
> > >             if ( first_event != null ) first_event.next_event = ev;
> > >             else first_event = ev;
> > >             ev.next_event = null;
> > >             //mGameLoop.notifyAll(); // wake sleeping threads
> > >         }
> > >     }
>
> > > When I have the notfyAll() call enabled, it flickers badly.  Without
> > > it, I rarely see flickers (still some, though).  That method is called
> > > from the UI thread, and should result in waking up the logic thread.
> > > Any ideas on how / why that affects the rendering?
>
> > > Thanks,
> > > Jeremy
>
> > > On Oct 4, 6:05 pm, Robert Green  wrote:
>
> > > > The G1 reports 65536 for that parameter.
>
> > > > On Oct 4, 7:06 am, RichardC  wrote:
>
> > > > > You could try
>
> > > > > glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &value);
>
> > > > > Have not tried this myself but found it in
>
> > > > >http://gpwiki.org/forums/viewtopic.php?t=8839
>
> > > > > On Oct 4, 7:36 am, Jeremy Slade  wrote:
>
> > > > > > I did wonder about the OpenGL command buffer limit -- any way to
> > > > > > verify for sure that I am hitting it?
>
> > > > > > I would be surprised if that's the case, though -- it's not a real
> > > > > > complex scene, maybe 3000-4000 textured triangles.  But I'll admit
> > to
> > > > > > being almost a complete novice where OpenGL is concerned...
>
> > > > > > The various meshes are all done with glDrawElements().  95% of this
> > is
> > > > > > in the cow mesh -- same mesh drawn w/ different transforms, and
> > > > > > different textures bound each time.  The mesh itself uses ~54k of
> > > > > > memory for vertices + normals + tex coords.  How big is the OpenGL
> > > > > > buffer?  seems like it's got to be significantly larger than that.
>
> > > > > > On Oct 3, 1:29 pm, RichardC 
> > wrote:
>
> > > > > > > If I remember correctly OpenGL internally has a limit to the
> > number of
> > > > > > > items it can hold in it's display list.  When the list gets full
> > it's
> > > > > > > starts drawing rather than dropping your items.  To achieve this
> > it
> > > > > > > flips the buffers and draws the remaining items on the live
> > screen.
>
> > > > > > > If I am remembering correcly this could explain what you are
> > seeing.
>
> > > > > > > --
> 

[android-developers] Re: OpenGL ES flickering problems - double buffered?

2009-10-05 Thread Jeremy Slade

I'm trying to convert from using RENDERMODE_CONTINUOUSLY to
RENDERMODE_WHEN_DIRTY, to reduce overall system load -- the game view
is static a fair % of the time.  It hasn't been working reliably,
probably for the reasons you describe in that post.

My input handling is essentially the same as what you describe as an
input pipeline, except for the mutex object -- it makes sense to use a
more specific mutex rather than the whole game loop.  I will give that
a try -- I

However, I don't think that helps much to explain the flickering.  But
I'll reserve judgement until I have a chance to try it :)


Jeremy


On Oct 5, 1:10 pm, Robert Green  wrote:
> I just thought of something.  You said your logic thread sleeps?  Are
> you using RENDERMODE_CONTINUOUSLY?
>
> Here's a shot in the dark.  I feel like your renderer isn't clearing
> the color buffer and isn't drawing anything, and that maybe happens
> when there's a certain state of the logic thread somehow.  Drawing a
> frame without clearing the color buffer and without drawing anything
> will make for some wild flickering but the image will still be there,
> just flickery.  I noticed that when I was messing with skyboxes and
> had my clear command off.
>
> By the way, I don't recommend handling input the way you are.  I
> switched all my games to use input pipelines and they have saved me a
> load of trouble.  I get super fast response and don't have to
> synchronize with a common thread mutex, which I have always had issues
> with it not giving up the lock to another thread.  I wrote an article
> just now that you can take a look at if you're interested in switching
> -http://www.rbgrn.net/content/342-using-input-pipelines-your-android-game
>
> On Oct 5, 9:27 am, Jeremy Slade  wrote:
>
> > I'm definitely not getting anywhere close to that limit
> > (GL_MAX_ELEMENTS_VERTICES).
>
> > I'm pretty close to a root cause for at least a large percentage of
> > the flickering events... It has something to do with my thread
> > synchronization, but it's not obvious to me how it causes theflicker.
>
> > I have three threads:
> > * main / UI thread
> > * logic thread
> > * rendering thread (created by GLSurfaceView)
>
> > The majority of the flickering happens when I do something to generate
> > UI events (touch the screen, move the trackball, etc).  I end up
> > passing a message to the logic thread, which may be sleeping:
>
> >     public void queueGameEvent(GameEvent ev) {
> >         synchronized(mGameLoop) {
> >             if ( first_event != null ) first_event.next_event = ev;
> >             else first_event = ev;
> >             ev.next_event = null;
> >             //mGameLoop.notifyAll(); // wake sleeping threads
> >         }
> >     }
>
> > When I have the notfyAll() call enabled, it flickers badly.  Without
> > it, I rarely see flickers (still some, though).  That method is called
> > from the UI thread, and should result in waking up the logic thread.
> > Any ideas on how / why that affects the rendering?
>
> > Thanks,
> > Jeremy
>
> > On Oct 4, 6:05 pm, Robert Green  wrote:
>
> > > The G1 reports 65536 for that parameter.
>
> > > On Oct 4, 7:06 am, RichardC  wrote:
>
> > > > You could try
>
> > > > glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &value);
>
> > > > Have not tried this myself but found it in
>
> > > >http://gpwiki.org/forums/viewtopic.php?t=8839
>
> > > > On Oct 4, 7:36 am, Jeremy Slade  wrote:
>
> > > > > I did wonder about theOpenGLcommand buffer limit -- any way to
> > > > > verify for sure that I am hitting it?
>
> > > > > I would be surprised if that's the case, though -- it's not a real
> > > > > complex scene, maybe 3000-4000 textured triangles.  But I'll admit to
> > > > > being almost a complete novice whereOpenGLis concerned...
>
> > > > > The various meshes are all done with glDrawElements().  95% of this is
> > > > > in the cow mesh -- same mesh drawn w/ different transforms, and
> > > > > different textures bound each time.  The mesh itself uses ~54k of
> > > > > memory for vertices + normals + tex coords.  How big is theOpenGL
> > > > > buffer?  seems like it's got to be significantly larger than that.
>
> > > > > On Oct 3, 1:29 pm, RichardC  wrote:
>
> > > > > > If I remember correctlyOpenGLinternally has a limit to the number of
> > > > > > items it can hold in it's display list.  When the list gets full 
> > > > > > it's
> > > > > > starts drawing rather than dropping your items.  To achieve this it
> > > > > > flips the buffers and draws the remaining items on the live screen.
>
> > > > > > If I am remembering correcly this could explain what you are seeing.
>
> > > > > > --
> > > > > > Ruchard
>
> > > > > > On Oct 3, 8:08 pm, Jeremy Slade  wrote:
>
> > > > > > > I'm trying to clean up some rendering issues for a 3D game --
> > > > > > > CowPotato (http://www.cyrket.com/package/
> > > > > > > com.froogloid.android.cowpotato).  I could use some help on one 
> > > > > > > issue.
>
> > > > > > > Basically I'm seeing some flickering, l

[android-developers] Audio Routing in 1.6

2009-10-05 Thread Doug

My application uses a MediaPlayer object to play MP3 files.
Up until v1.6 came out I was doing the following:

1. Create the player
2. Get (and save) the current Audio Routing for
"AudioManager.MODE_NORMAL" (i.e. "Media" playback) -- so I can restore
it later when I'm done
3. Prepare Stream
4. Set new Audio Routing for "AudioManager.MODE_NORMAL" BEFORE I start
playback (this is based on an application setting, which may/will be
different from the setting chosen for Music playback)
5. Start Playback
6. During playback the user may choose to use a different playback
device, so in that case I would change the routing and the audio would
behave as expected.
7. After playback is complete, restore the saved routing so other apps
aren't affected by me.

With 1.6 the 'getAudioRouting(x)' and 'setAudioRouting(x,y,z)' have
been deprecated in favor of a bunch of getter and setter methods for
each of the possible options.

Here is where my problems start.

a) Users who have had their phone update automatically to 1.6 can no
longer exert any control over the audio device... it is set to speaker
and nothing they can do can change that.
b) When it comes to the *new* methods that the release notes say to
call... well... a number of them seem to be missing
   i) is/setSpeakerPhoneOn - present
   ii) is/setBluetoothA2dpOn - present
   iii) is/setBluetoothScoOn - present
   iii) is/setWiredHeadsetOn - MISSING
   iv) is/setEarpieceOn (or handset, whatever) - MISSING, and not even
documented!
   v) There doesn't seem to be a way to specify just which kind of
audio I'm trying to adjust (unless the 'setMode' method is app vs
system specific).

Any thoughts on how I can get the functionality back to 1.1/1.5 - for
now it just seems broken.

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



[android-developers] Make different instances of a widget behave different based on their appWidgetId

2009-10-05 Thread Pablo

I am developing a simple widget which has a couple of buttons in its
layout.

Before the widget gets added, the configuration activity is displayed,
where the user can choose if the widget makes any sounds when the
buttons get pressed or not.

Thus, a user can put two instances of the widget, one where he chose
sound to be activated and another where he chose the opposite.
However, I can not seem to be able to reproduce the expected behavior
(that one reproduces sound and the other doesn't).

The buttons' behavior varies according to the flags specified to the
PendingIntent:

- FLAG_UPDATE_CURRENT seems to override the previous intent/setting
- no flags (0x00) seems to ignore any intent/setting after the first
instance of the widget is put.

What I want to do: I want to be able to configure different instances
of the same widget to behave in a different way, according to what the
user specified in the configuration activity. I am attempting to do
this with the help of the appWidgetId of each instance:

I have tried the following when assigning an action to the click of
the button:

int mAppWidgetId=appWidgetIds[i];
Intent intent1=new Intent();
intent1.setAction("com.spartancoders.intenttest.TEST");
Log.d("TEST ONUPDATE",""+mAppWidgetId);
intent1.putExtra("id", mAppWidgetId);
PendingIntent pi1 = PendingIntent.getBroadcast(context,
0,intent1,PendingIntent.FLAG_UPDATE_CURRENT);

And in the onReceive() method:

Bundle extras = arg1.getExtras();
if (arg1!=null){
Log.d("TEST ONRECEIVE",""+extras.getInt("id"));
}

This results in the first widget acting properly (The IDs printed in
logcat are as expected)
When adding a second widget, however, the first widget starts
reporting the second widget's appWidgetId in its onReceive(), when it
previously did no such thing.
(because of the FLAG_UPDATE_CURRENT, I guess)

How can one make different instances behave in a different way?
Is there a way to do this with the help of the appWidgetId?

I have elaborated a widget application for the purpose of debugging
this problem which tries to be minimal, while reproducing the (un)
desired behavior:

http://www.2shared.com/file/8243059/b6519584/IntentTesttar.html

Any help is appreciated, 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: OpenGL ES flickering problems - double buffered?

2009-10-05 Thread Tom Gibara
I just read your post. Looks like I hit the same problem about 6 months ago.
I even managed to create a mostly-reproducible test case so that I could
file an issue:
http://code.google.com/p/android/issues/detail?id=1956

(I can only think that it's some sort of fairness issue with monitors)

My solution was in
the same spirit, but actually uses a simple synchronization-free circular
event buffer that instead uses volatiles to guarantee correct execution.

Tom.

2009/10/5 Robert Green 

>
> I just thought of something.  You said your logic thread sleeps?  Are
> you using RENDERMODE_CONTINUOUSLY?
>
> Here's a shot in the dark.  I feel like your renderer isn't clearing
> the color buffer and isn't drawing anything, and that maybe happens
> when there's a certain state of the logic thread somehow.  Drawing a
> frame without clearing the color buffer and without drawing anything
> will make for some wild flickering but the image will still be there,
> just flickery.  I noticed that when I was messing with skyboxes and
> had my clear command off.
>
> By the way, I don't recommend handling input the way you are.  I
> switched all my games to use input pipelines and they have saved me a
> load of trouble.  I get super fast response and don't have to
> synchronize with a common thread mutex, which I have always had issues
> with it not giving up the lock to another thread.  I wrote an article
> just now that you can take a look at if you're interested in switching
> - http://www.rbgrn.net/content/342-using-input-pipelines-your-android-game
>
>
> On Oct 5, 9:27 am, Jeremy Slade  wrote:
> > I'm definitely not getting anywhere close to that limit
> > (GL_MAX_ELEMENTS_VERTICES).
> >
> > I'm pretty close to a root cause for at least a large percentage of
> > the flickering events... It has something to do with my thread
> > synchronization, but it's not obvious to me how it causes the flicker.
> >
> > I have three threads:
> > * main / UI thread
> > * logic thread
> > * rendering thread (created by GLSurfaceView)
> >
> > The majority of the flickering happens when I do something to generate
> > UI events (touch the screen, move the trackball, etc).  I end up
> > passing a message to the logic thread, which may be sleeping:
> >
> > public void queueGameEvent(GameEvent ev) {
> > synchronized(mGameLoop) {
> > if ( first_event != null ) first_event.next_event = ev;
> > else first_event = ev;
> > ev.next_event = null;
> > //mGameLoop.notifyAll(); // wake sleeping threads
> > }
> > }
> >
> > When I have the notfyAll() call enabled, it flickers badly.  Without
> > it, I rarely see flickers (still some, though).  That method is called
> > from the UI thread, and should result in waking up the logic thread.
> > Any ideas on how / why that affects the rendering?
> >
> > Thanks,
> > Jeremy
> >
> > On Oct 4, 6:05 pm, Robert Green  wrote:
> >
> > > The G1 reports 65536 for that parameter.
> >
> > > On Oct 4, 7:06 am, RichardC  wrote:
> >
> > > > You could try
> >
> > > > glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &value);
> >
> > > > Have not tried this myself but found it in
> >
> > > >http://gpwiki.org/forums/viewtopic.php?t=8839
> >
> > > > On Oct 4, 7:36 am, Jeremy Slade  wrote:
> >
> > > > > I did wonder about the OpenGL command buffer limit -- any way to
> > > > > verify for sure that I am hitting it?
> >
> > > > > I would be surprised if that's the case, though -- it's not a real
> > > > > complex scene, maybe 3000-4000 textured triangles.  But I'll admit
> to
> > > > > being almost a complete novice where OpenGL is concerned...
> >
> > > > > The various meshes are all done with glDrawElements().  95% of this
> is
> > > > > in the cow mesh -- same mesh drawn w/ different transforms, and
> > > > > different textures bound each time.  The mesh itself uses ~54k of
> > > > > memory for vertices + normals + tex coords.  How big is the OpenGL
> > > > > buffer?  seems like it's got to be significantly larger than that.
> >
> > > > > On Oct 3, 1:29 pm, RichardC 
> wrote:
> >
> > > > > > If I remember correctly OpenGL internally has a limit to the
> number of
> > > > > > items it can hold in it's display list.  When the list gets full
> it's
> > > > > > starts drawing rather than dropping your items.  To achieve this
> it
> > > > > > flips the buffers and draws the remaining items on the live
> screen.
> >
> > > > > > If I am remembering correcly this could explain what you are
> seeing.
> >
> > > > > > --
> > > > > > Ruchard
> >
> > > > > > On Oct 3, 8:08 pm, Jeremy Slade 
> wrote:
> >
> > > > > > > I'm trying to clean up some rendering issues for a 3D game --
> > > > > > > CowPotato (http://www.cyrket.com/package/
> > > > > > > com.froogloid.android.cowpotato).  I could use some help on one
> issue.
> >
> > > > > > > Basically I'm seeing some flickering, like the next frame is
> getting
> > > > > > > flushed b

[android-developers] Re: relocating webview cache using softlinks

2009-10-05 Thread Jayesh Salvi
>
>
> Why aren't you caching the data yourself, so you can control the location,
> size, and retention policies of the cache? Conversely, why are you
> electing to have those functions -- which are essential to the operation
> of your product -- be delegated to a component (WebView's cache) over
> which you have no real control?
>

Now that I have implemented a new caching mechanism for ReaderScope that is
independent of WebView, the added control looks like a big advantage.

Thanks for the advice.

Jayesh

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

2009-10-05 Thread Maps.Huge.Info (Maps API Guru)

To me, the right thing to do would be to stop the first phase of this
contest now, select the to 200 apps, figure out which ones bomb from
1.6 and give the developer a change to only change the bits that are
causing the problems. There would have to be some controls to prevent
upgrades and assurances to the rest of the developers that nothing
else was changed to improve their apps or allow everyone to update,
which would probably really annoy the heck out of anyone who figured
out they had a problem on September 2nd and didn't make it to the
finals.

On the other hand, if your apps are failing because you used
undocumented options in the SDK, then you only have yourself to
blame...

-John Coryat

"Radar Now!"

"What Zip Code?"

On Oct 5, 2:18 pm, bellapariah  wrote:
> Someone from Google please comment or at least give contact info! My
> issue has to do with one of Google's API changes for 1.6 so it isn't
> even a programming error on my part. I'm sure my ADC2 entry will get
> low scores from everyone that upgrades to 1.6 since they can no longer
> join rooms (calling issue with 1.6), and therefore cannot test the
> app. Google should at least issue a statement letting testers know
> that upgrading to 1.6 may cause some apps to stop working and to
> please skip these so that 1.5 testers can give them an accurate
> review.
>
> Has Google completely abandoned this contest? Why have they not been
> actively participating, answering developer questions, and building
> buzz and excitement around the contest? This contest is supposed to
> persuade programmers to develop for Android, not screw them over after
> months of hard work then ignore them when their is a problem. Maybe if
> their are enough developers affected we can get the attention of tech
> sites and get some publicity for the issue.
>
> Shelby
>
> On Oct 4, 11:31 pm, bellapariah  wrote:
>
> > I just got the 1.6 download and found out myADC2app is not working
> > anymore. Works fine on 1.5 but people with 1.6 can't log in. Guess
> > that explains the sudden drop in new accounts being created (We got
> > around 70 testers before numbers plummeted to 5 to 6 over the
> > weekend). :(  If Google planned to release 1.6 in the middle of a
> > contest, they should have informed developers and given them the tools
> > to test their app on this platform. We spent months on creating a high
> > quality app for this contest and now people can't even judge it! There
> > are probably hundreds of other developers that spent sleepless nights
> > working their butt off to finish before the deadline just to have
> > their chances decimated by google. All I can say is that I'm extremely
> > disappointed in the way Google has handled this entire contest and I
> > think it is extremely unfair and inconsiderate the way they are
> > treating developers that they are supposed to be attracting to the
> > Android platform.
>
> > Shelby
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Best way to drawing custom Bitmaps?

2009-10-05 Thread Moto

I'm very new to the concept of creating custom drawings.  I'm trying
to figure out how to draw somethings from scratch.  Like patters
shapes and at the end have a bitmap...

As of now I use:
Bitmap.createBitmap(int[] colors, int width, int height, Bitmap.Config
config)

Using some random numbers and loops I create some patterns by setting
a color to each pixel on my color array of size [width*height].

So I'm not sure if this is an efficient method for drawing a bitmap?
The goal is to create patters shapes and animate them frame by
frame... Would this approach be the fastest way?  Any links
recommended about this topic?

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



[android-developers] Re: updating UI from runnable

2009-10-05 Thread vorcigernix

Btw..for others on dark, there are two great tutorials about sthat
kind of application. One is from Mark http://commonsware.com/Android/excerpt.pdf
and one I found toady at http://www.softwarepassion.com/?p=189 .
Second one do mostly what I tried with my poor java in my code.

On Oct 4, 5:34 pm, vorcigernix  wrote:
> Thanks, now it is working :)
>
> On Oct 4, 2:27 pm, "Mark Murphy"  wrote:
>
> > > I am getting error at
>
> > > stext.setText(sdf.format(cal.getTime()).toString()+ " chyba");
>
> > > where it ends on null pointer exception. I tried to add:
>
> > > setContentView(R.layout.main);
>
> > > which required to add a listview named android:list. Now...it works
> > > same way as before, it ends on same null pointer exception :)
>
> > Your setContentView() call needs to precede your findViewById() call to
> > get at your R.id.statustext widget.
>
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com
> > Android App Developer Books:http://commonsware.com/books.html
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: AudioTrack sanity test

2009-10-05 Thread niko20

Hi BD,

I would go the NDK route for generating your sound, but for now you
will have to pass the data back to the java layer to play it, I dont
think the Audio APIs are the NDK yet.

Yes you have noticed you can't play too many at once with AudioTrack.
This is a phone CPU speed issue. You can get a little bit more by
setting a higher Thread priority.

-niko

On Oct 2, 8:41 pm, BD  wrote:
> Hi.
> I am trying to determine if I should go the ndk way to work on a music
> synth app, but first wanted to do a sanity check in the java layer by
> testing how many sine tones i could play concurrently, and so I tried
> this. And it's pretty low: I can only play about 4 or 5 tones before
> the obtainBuffer timeouts start increasing in number. Also, changing
> the media volume while the tones are playing disrupts the output.
> These are the basic settings for each of the tones:
> - fs = 11025
> - AudioFormat.CHANNEL_CONFIGURATION_MONO
> - AudioFormat.ENCODING_PCM_8BIT
> - AudioTrack.MODE_STREAM
> I would like to know how one can best avoid obtainbuffer timeout
> errors.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Sound engine performance

2009-10-05 Thread niko20

Honestly, the only way to get 100% accuracy is to mix the sounds
internally yourself. This is what Electrum Drum machine does. It then
feeds the sound to the AudioTrack class. However, due to the CPU
needed, it limits how many sounds you can mix at once of course.

-niko

On Oct 5, 1:32 pm, Robert Green  wrote:
> Set a sound trigger schedule in milliseconds.  There are many ways to
> model it.  Use whatever you're most comfortable with.  The key
> elements are "what sound to trigger" and "when to trigger it."
>
> I wouldn't use absolute time.  I'd make it relative to something so
> that you can pause and resume and you don't need to update everything
> in the queue.
>
> Then I'd run a thread that loops with only a 1ms sleep on it that
> checks the queue and triggers sounds at the exact MS that they specify
> to be triggered at.
>
> That outta get you fairly accurate playback.  I also like to add
> things that make it so that if the loop missed a trigger, it plays it
> immediately unless it missed it over 15ms ago or something like that.
> I think 10-15ms is where people will be able to hear if something is
> getting off-beat.
>
> On Oct 5, 3:48 am, Zuli  wrote:
>
> > Hi,
> > I am working on an app that uses the SoundPool class to play sounds.
> > Basically every n milliseconds I need to play up to 16 sounds and I
> > need this to be as steady as possible.
> > The best solution I found so far is to use a java.util.Timer and the
> > scheduleAtFixedRate method (setting also a
> > THREAD_PRIORITY_URGENT_AUDIO in the TimerTask run method), the result
> > is pretty good but it is still not perfect and sometimes the
> > executions get slightly delayed.
>
> > Is there some other way I should try to play sounds _exactly_ every n
> > milliseconds? Different threads, some kind of optimization, stuff like
> > this?
>
> > Thanks,
> > Zuli
>
> > ps: I am using .ogg files and there is not much graphic involved in
> > the computation.
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Update to 1.6 stops some ADC2 apps from working

2009-10-05 Thread bellapariah

Someone from Google please comment or at least give contact info! My
issue has to do with one of Google's API changes for 1.6 so it isn't
even a programming error on my part. I'm sure my ADC2 entry will get
low scores from everyone that upgrades to 1.6 since they can no longer
join rooms (calling issue with 1.6), and therefore cannot test the
app. Google should at least issue a statement letting testers know
that upgrading to 1.6 may cause some apps to stop working and to
please skip these so that 1.5 testers can give them an accurate
review.

Has Google completely abandoned this contest? Why have they not been
actively participating, answering developer questions, and building
buzz and excitement around the contest? This contest is supposed to
persuade programmers to develop for Android, not screw them over after
months of hard work then ignore them when their is a problem. Maybe if
their are enough developers affected we can get the attention of tech
sites and get some publicity for the issue.

Shelby


On Oct 4, 11:31 pm, bellapariah  wrote:
> I just got the 1.6 download and found out myADC2app is not working
> anymore. Works fine on 1.5 but people with 1.6 can't log in. Guess
> that explains the sudden drop in new accounts being created (We got
> around 70 testers before numbers plummeted to 5 to 6 over the
> weekend). :(  If Google planned to release 1.6 in the middle of a
> contest, they should have informed developers and given them the tools
> to test their app on this platform. We spent months on creating a high
> quality app for this contest and now people can't even judge it! There
> are probably hundreds of other developers that spent sleepless nights
> working their butt off to finish before the deadline just to have
> their chances decimated by google. All I can say is that I'm extremely
> disappointed in the way Google has handled this entire contest and I
> think it is extremely unfair and inconsiderate the way they are
> treating developers that they are supposed to be attracting to the
> Android platform.
>
> Shelby
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: OpenGL ES flickering problems - double buffered?

2009-10-05 Thread Robert Green

I just thought of something.  You said your logic thread sleeps?  Are
you using RENDERMODE_CONTINUOUSLY?

Here's a shot in the dark.  I feel like your renderer isn't clearing
the color buffer and isn't drawing anything, and that maybe happens
when there's a certain state of the logic thread somehow.  Drawing a
frame without clearing the color buffer and without drawing anything
will make for some wild flickering but the image will still be there,
just flickery.  I noticed that when I was messing with skyboxes and
had my clear command off.

By the way, I don't recommend handling input the way you are.  I
switched all my games to use input pipelines and they have saved me a
load of trouble.  I get super fast response and don't have to
synchronize with a common thread mutex, which I have always had issues
with it not giving up the lock to another thread.  I wrote an article
just now that you can take a look at if you're interested in switching
- http://www.rbgrn.net/content/342-using-input-pipelines-your-android-game


On Oct 5, 9:27 am, Jeremy Slade  wrote:
> I'm definitely not getting anywhere close to that limit
> (GL_MAX_ELEMENTS_VERTICES).
>
> I'm pretty close to a root cause for at least a large percentage of
> the flickering events... It has something to do with my thread
> synchronization, but it's not obvious to me how it causes the flicker.
>
> I have three threads:
> * main / UI thread
> * logic thread
> * rendering thread (created by GLSurfaceView)
>
> The majority of the flickering happens when I do something to generate
> UI events (touch the screen, move the trackball, etc).  I end up
> passing a message to the logic thread, which may be sleeping:
>
>     public void queueGameEvent(GameEvent ev) {
>         synchronized(mGameLoop) {
>             if ( first_event != null ) first_event.next_event = ev;
>             else first_event = ev;
>             ev.next_event = null;
>             //mGameLoop.notifyAll(); // wake sleeping threads
>         }
>     }
>
> When I have the notfyAll() call enabled, it flickers badly.  Without
> it, I rarely see flickers (still some, though).  That method is called
> from the UI thread, and should result in waking up the logic thread.
> Any ideas on how / why that affects the rendering?
>
> Thanks,
> Jeremy
>
> On Oct 4, 6:05 pm, Robert Green  wrote:
>
> > The G1 reports 65536 for that parameter.
>
> > On Oct 4, 7:06 am, RichardC  wrote:
>
> > > You could try
>
> > > glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &value);
>
> > > Have not tried this myself but found it in
>
> > >http://gpwiki.org/forums/viewtopic.php?t=8839
>
> > > On Oct 4, 7:36 am, Jeremy Slade  wrote:
>
> > > > I did wonder about the OpenGL command buffer limit -- any way to
> > > > verify for sure that I am hitting it?
>
> > > > I would be surprised if that's the case, though -- it's not a real
> > > > complex scene, maybe 3000-4000 textured triangles.  But I'll admit to
> > > > being almost a complete novice where OpenGL is concerned...
>
> > > > The various meshes are all done with glDrawElements().  95% of this is
> > > > in the cow mesh -- same mesh drawn w/ different transforms, and
> > > > different textures bound each time.  The mesh itself uses ~54k of
> > > > memory for vertices + normals + tex coords.  How big is the OpenGL
> > > > buffer?  seems like it's got to be significantly larger than that.
>
> > > > On Oct 3, 1:29 pm, RichardC  wrote:
>
> > > > > If I remember correctly OpenGL internally has a limit to the number of
> > > > > items it can hold in it's display list.  When the list gets full it's
> > > > > starts drawing rather than dropping your items.  To achieve this it
> > > > > flips the buffers and draws the remaining items on the live screen.
>
> > > > > If I am remembering correcly this could explain what you are seeing.
>
> > > > > --
> > > > > Ruchard
>
> > > > > On Oct 3, 8:08 pm, Jeremy Slade  wrote:
>
> > > > > > I'm trying to clean up some rendering issues for a 3D game --
> > > > > > CowPotato (http://www.cyrket.com/package/
> > > > > > com.froogloid.android.cowpotato).  I could use some help on one 
> > > > > > issue.
>
> > > > > > Basically I'm seeing some flickering, like the next frame is getting
> > > > > > flushed before everything is drawn.  It is definitely the last few
> > > > > > items in my display list that seem to flicker -- if I reorder the
> > > > > > list, it's always the last part of the list that flickers.
>
> > > > > > I understand that the GLSurfaceView automatically provides double-
> > > > > > buffering -- it certainly appears to be the case looking at the
> > > > > > source.  So any suggestions as to why I might be seeing flicker?  I
> > > > > > put counters into the drawing methods to make sure that all the
> > > > > > objects are called each frame, they just don't show up on screen all
> > > > > > the time.
>
> > > > > > Any insight would be appreciated.
>
> > > > > > Jeremy
>
>
--~--~-~--~~~---~--~~
You recei

[android-developers] Re: Should I use Local Service Binding ?

2009-10-05 Thread Dianne Hackborn
If it's for a periodic operation, please consider basing this on Alarm
Service, rather than leaving your app running all of the time consuming
resources.

On Sun, Oct 4, 2009 at 10:58 PM, Tim  wrote:

>
> Hello,
>
> I am very new beginner, and I am designing a small application as
> below.
>
> - After a user starts the application, he/she can click the start
> button to start a background task. (e.g. retrieving the news headlines
> periodically, then do something...)
>
> - Even after the user quits the application, the background task still
> running.
>
> - To stop the background task, the user needs to run the application
> again, and clicks the stop button to stop the background task.
>
> In the above scenario, what API should I use ? (Local Service
> Binding ? Remote Service Binding ? Handler ?)
>
> Please help me. Thank you very much.
>
> >
>


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

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

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



[android-developers] Re: how to set button's x y position in layout

2009-10-05 Thread James Yum
Hi,

You could use an AbsoluteLayout and specify android:layout_x and
android:layout_y in the children.
However, AbsoluteLayouts aren't commonly used. Are the buttons really
positioned in some arbitrary location? If they are just a few pixels away
from a corner or edge or some sort of anchor, there are better ways to do
that.

Cheers,
James

On Mon, Oct 5, 2009 at 7:13 AM, zeeshan  wrote:

>
> can anybody help ? waiting for the reply
>
> On Oct 5, 2:04 pm, zeeshan  wrote:
> > Hi Dear,
> >
> > i am trying to display a linear layout , say at setpadding
> > (10,10,0,0);
> > now i need to put some buttons at particular xy position in layout.
> >
> > Button button = new Button(_context);
> > button.setPadding(xposition, yposition, 0, 0);
> >
> > layout.addView(button);
> >
> > button position doesn't seem to work in that way.
> > can anybody suggest how can i set button position in 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] Re: Sound engine performance

2009-10-05 Thread Robert Green

Set a sound trigger schedule in milliseconds.  There are many ways to
model it.  Use whatever you're most comfortable with.  The key
elements are "what sound to trigger" and "when to trigger it."

I wouldn't use absolute time.  I'd make it relative to something so
that you can pause and resume and you don't need to update everything
in the queue.

Then I'd run a thread that loops with only a 1ms sleep on it that
checks the queue and triggers sounds at the exact MS that they specify
to be triggered at.

That outta get you fairly accurate playback.  I also like to add
things that make it so that if the loop missed a trigger, it plays it
immediately unless it missed it over 15ms ago or something like that.
I think 10-15ms is where people will be able to hear if something is
getting off-beat.

On Oct 5, 3:48 am, Zuli  wrote:
> Hi,
> I am working on an app that uses the SoundPool class to play sounds.
> Basically every n milliseconds I need to play up to 16 sounds and I
> need this to be as steady as possible.
> The best solution I found so far is to use a java.util.Timer and the
> scheduleAtFixedRate method (setting also a
> THREAD_PRIORITY_URGENT_AUDIO in the TimerTask run method), the result
> is pretty good but it is still not perfect and sometimes the
> executions get slightly delayed.
>
> Is there some other way I should try to play sounds _exactly_ every n
> milliseconds? Different threads, some kind of optimization, stuff like
> this?
>
> Thanks,
> Zuli
>
> ps: I am using .ogg files and there is not much graphic involved in
> the computation.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: User Defined Intend actions

2009-10-05 Thread RichardC

See notepad in the samples that came with the SDK
android-sdk-windows-1.6_r1\platforms\android-1.6\samples\NotePad

and also
http://developer.android.com/guide/topics/providers/content-providers.html

--
RichardC

On Oct 5, 8:24 am, Shobha  wrote:
> Hi All,
>
> Is it possible to pass user defined Intend actions?
>
> That is instead of using predefined Intend actions like "ACTION_MAIN"
> can I create my own action and use it in my code?
>
> If so how do I do that?
>
> I have been surfing for this detail for long but dint find anything
> useful.
> Can any of u help me regarding this
>
> Thanks,
> Shobha
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Running camera android Emulator

2009-10-05 Thread Mohith K M

@shobhit,Thanks for Your reply;

I have tried it with "HttpCamera" with help of webcam2000;
 But no successes ;
Actually am begginer in Android programming,
I tried  like u mentioned(thread run from Activity Method), from
"NyARToolkitAndroid" (http://en.sourceforge.jp/projects/nyartoolkit/
downloads/31187/NyARToolkitAndroid-1.0.1.20080522.zip/)

Bt,That too didnt worked out :(
Anyone having Sample Code,can u please post it here :(


Mohith K M







On Oct 3, 8:40 pm, shobhit kasliwal 
wrote:
> Hi Mohithif you are done with all your networking stuff then
> put the code in a method and run a thread from the activity and call that
> method.
> Keep in mind that you need to create a surface and get holder from that and
> holder.lockcanvas()
> give you the canvas and then use that canvas in the camera.capture(canvas)
> method show your camera in emulator.
> Let me know if you get this or not.
>
> On Sat, Oct 3, 2009 at 6:54 AM, Mohith K M  wrote:
>
>
>
>
>
>
>
> > Me to Struck at This Android Emulator-Camera stuff :(
>
> > can Somone please give more details
>
> > "CameraSource cs = new SocketCamera("192.168.0.100", 9889, 320, 240,
> > true);
> > if (!cs.open()) { /* deal with failure to obtain camera */ }
> > while(/*some condition*/) {
> >  cs.capture(canvas) //capture the frame onto the canvas
> > }
> > cs.close(); "
>
> > Where should we put these code?
>
> > On Sep 29, 9:02 am, shobhit kasliwal 
> > wrote:
> > > I tried these wrapper classes...but no luck...can you tell me how can I
> > do
> > > that..can you help me on this
>
> > > Thanks
> > > Shobhit
>
> > > On Mon, Sep 28, 2009 at 10:22 PM, Chi Kit Leung  > >wrote:
>
> > > >http://www.tomgibara.com/android/camera-source
>
> > > > Would this one be helpful?
>
> > > > On Tue, Sep 29, 2009 at 12:53 AM, Shobhit Kasliwal <
> > > > shobhit.kasli...@gmail.com> wrote:
>
> > > >> Hi
>
> > > >> Can anyone tell me how can I use  my computers webcam as camera in
> > > >> android emulator.
> > > >> Tutorial would be a great help for me.
>
> > > >> Thanks,
> > > >> Shobhit Kasliwal
>
> > > >> --
> > > >> Regards,
> > > >> Michael Leung
> > > >>http://www.itblogs.info
> > > >>http://www.michaelleung.info
>
> > > --
> > > Shobhit Kasliwal
> > > Application Developer Intern
> > > Liventus Designs
> > > 3400 Dundee Rd Northbrook IL 60062
> > > skasli...@liventus.com
> > > office: 847-291-1395 ext. 192
> > > Cell: (309) 826 4709
>
> > > Samuel Goldwyn<
> >http://www.brainyquote.com/quotes/authors/s/samuel_goldwyn.html>
> > > - "I'm willing to admit that I may not always be right, but I am never
> > > wrong."
>
> --
> Shobhit Kasliwal
> Application Developer Intern
> Liventus Designs
> 3400 Dundee Rd Northbrook IL 60062
> skasli...@liventus.com
> office: 847-291-1395 ext. 192
> Cell: (309) 826 4709
>
> Ted Turner   -
> "Sports is like a war without the killing."
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Making phone call using the Android SDK 1.6

2009-10-05 Thread Konrad Pietzka

Hi,

yes you can:


this code line makes a phone call to a given number:

startActivityForResult(new Intent(Intent.ACTION_CALL,
Uri.parse("tel:+0")), 1);

Do not forget to give permission to excute a phone call by adding following
to the AndroidManifest.xml:



Hope this helps
 

-Ursprüngliche Nachricht-
Von: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] Im Auftrag von AndroidBeginner
Gesendet: Montag, 5. Oktober 2009 13:40
An: Android Developers
Betreff: [android-developers] Making phone call using the Android SDK 1.6


Hi all,

I am a total newbie in Android and want to develop an application
which need to make phone call using the API. I googled around and find
that the open SDK didn't support making phonecalls. All the function
required to make phone call have been put inside
com.android.internal.telephony, which is an internal APIs.

I just wonder if there is any methods or alternatives API that I can
make use of.

Thanks and regards,

AndroidBeginner.




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



[android-developers] MOTODEV Studio vs. Google plugin

2009-10-05 Thread droidin.net

Is anybody have any advice, experience, suggestions? I'm pretty
comfortable with Google plugin - what would make me change to MOTODEV?
Needless to say - I will download and play with it but I'm also
interested in fellow developer's feedback.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 Do You Disable Hero's Auto-Dimming Feature

2009-10-05 Thread bklik

Thanks Dianne,

I'm using a wake lock to prevent it from sleeping and dimming after
the default 30 seconds, and I'm using the brightness API from Android
1.5 to adjust brightness.  It looks like the HTC Hero is experiencing
the problem you are talking about.

Thanks for getting back to be so quickly.

Brenton

On Oct 5, 12:39 pm, Dianne Hackborn  wrote:
> You -should- be able to through the normal API, setting the brightness of
> the screen for the window.  However, I know of at least one upcoming device
> where this won't work when auto-brightness is turned on, and Hero may have
> that same problem.  For the device I know of, we need to do some work in the
> platform to better integrate with the manufacturer's auto-dimming code, so
> hopefully this will only be a temporary problem.
>
> On Mon, Oct 5, 2009 at 6:54 AM, bklik  wrote:
>
> > I'm getting a lot of requests by users of my flashlight application,
> > that they want me to disable the HTC Hero's automatic dimming feature
> > that works off the light sensor.
>
> > How do you disable it through code?  Or, isn't there a way?
>
> > Brenton
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: package name vs. app_name

2009-10-05 Thread James Yum
Hi G.,
You need to change the package name.

Cheers,
James

On Mon, Oct 5, 2009 at 5:44 AM, ber  wrote:

>
> Hello, I wanna install the same app twice, with different app_name and
> resources. Is it possible to do that with keeping the same package
> name? If not (as it seems), what needs to be changed in order to not
> get an INSTALL_FAILED_ALREADY_EXISTS
>
> Thanks! G.
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Gestures and ListView (as seen in a keynote of Google I/O)

2009-10-05 Thread Marc Reichelt

Hi again,

if anyone has the same question like I had:
http://android-developers.blogspot.com/2009/10/gestures-on-android-16.html
answers it. Great thanks to Romain Guy!


Regards

Marc Reichelt   ||   http://www.marcreichelt.de/


On 1 Okt., 15:32, Marc Reichelt  wrote:
> Hi there!
>
> I have seen a small scene fromhttp://www.youtube.com/watch?v=S5aJAaGZIvk
> at timecode 1:23:30 - letters are recognized by being drawn on the
> screen. Does anybody know how this works, or where I can find an easy
> example?
>
> Great thanks in advance & regards
>
> Marc Reichelt   ||  http://www.marcreichelt.de/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Status bar notifications only for touch screens ?

2009-10-05 Thread Romain Guy

It's possible to access the notifications without a touch screen
though. Home > Menu > Notifications.

On Mon, Oct 5, 2009 at 10:08 AM, Dianne Hackborn  wrote:
> Android currently requires a touch screen.  If someone makes a phone without
> a touch screen, they can come up with whatever way they want to get at the
> notifications.  Either way, you can always get to them by going home and
> selecting notifications from the menu, though obviously this is less than
> convenient.
>
> On Mon, Oct 5, 2009 at 3:08 AM, Android Development 
> wrote:
>>
>> I was creating a status bar notification in my application. Once the
>> notification was received, i had to drag the upper part of the screen
>> to view it fully and then clicked on it.
>>
>> What if the phone does not have a touch screen ? How will the user
>> bring the status bar notification's content into the foreground
>> without dragging ?
>>
>> Best Regards
>>
>>
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>
> >
>



-- 
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] AdMobExample no visibility ad

2009-10-05 Thread erick nicolas

Hi
I don't understand why my app don't show test ad. It's only show text
view. Here is:

-layout

http://schemas.android.com/apk/res/android";
xmlns:app="http://schemas.android.com/apk/res/org.ifies.android";
android:layout_width="fill_parent"
android:layout_height="fill_parent">






 


-attars.xml













-app.java

package org.ifies.android;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TextView;
import com.admob.android.ads.AdManager;
import com.admob.android.ads.AdView;

public class AdmobExample extends Activity{
  private TextView example_message;
  private AdView example_adview;

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

example_adview = (AdView) findViewById(R.id.ad);
example_adview.setVisibility(AdView.VISIBLE);

example_message = (TextView) findViewById(R.id.example_message);
example_message.setVisibility(TextView.VISIBLE);

  }
}

-Manifest


http://schemas.android.com/apk/res/android";
  package="org.ifies.android"
  android:versionCode="1"
  android:versionName="1.0">














I'm developing under Kubuntu,Eclipse and Android SDK 1.5

What's wrong??

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



[android-developers] api key

2009-10-05 Thread android

I put the API key in the code and in XML but does not make me see the
maps which could be the problem??? thanks

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



[android-developers] Integrating G729 codec in mjsip

2009-10-05 Thread Mohammad Siddiqui

Hi All
i am developing a VoIP client for android using the mjsip
any one have the idea about integrating the G729 codec with mjsip

thanks in advanced



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



[android-developers] Ho to set TextView border from code?

2009-10-05 Thread Sloth

Hi group members,
I have a question about setting the border for TextView from code.
Is there actually a workaround to achieve this?
Thanks,
Sloth

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



[android-developers] I want to connect my emulator to server and transfer data from it

2009-10-05 Thread santhu

Hi All,

   I want an android application so that it can connect to
emulator and transfer that from it. please let me know how to proceed
in that. i have done through the socket but i am getting exception in
that.

please if u find any code or website let me know.

Thanks in advance

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



[android-developers] interfacce

2009-10-05 Thread android


I recall a prejudice interface that is in a class in a switch but how
do I nn I can 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: Samsung Galaxy isn´t workin g after update - whole system error!!!

2009-10-05 Thread Florian Echtler

> There always appers an error message that process com.android.phone
> has stopped unexpectedly.
> Normaly( when I bought this phone ) I was able to tap to Wait, but now
> there is no way to do it.
> Now I can only tap to close but then it cuttes all my conections.
> This wouldn´t be the problem if it appeared only one time, but
> THE ERROR MESSAGE APPEARS EVERY 5 SECONDS!!!
This isn't really the right forum for this kind of questions, but
there's a quick fix: see my post on Android Help ->
http://www.android-hilfe.de/o2-samsung-galaxy-i7500-forum/6627-wiederkehrender-fehler-nach-update.html#post73418

Florian

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