[android-developers] Re: Help!? Updating our applicatoin on the market deletes the saved SharedPreferences.

2009-03-11 Thread Stoyan Damov

Just vote for it (star it) and you'll get updates directly mailed to you.

On Wed, Mar 11, 2009 at 12:24 PM, Al Sutton  wrote:
>
> Anyone found a way of subscribing to an individual issue? I'm sure there
> are many people who'd like to follow the progress of this one.
>
> Al.
>
> Tyler Ernst wrote:
>> Here's the link to the defect
>>
>> http://code.google.com/p/android/issues/detail?id=2047
>>
>>
>> On Mar 10, 4:09 pm, Tyler Ernst  wrote:
>>
>>> DO NOT EVER CHANGED COPY PROTECTION FROM ON to OFF OR OFF to ON.
>>>
>>> We found the problem, it is not related to the defect listed above.
>>>
>>> It turns out when we posted the update copy protection was turned off,
>>> but for our initial release it was turned on.  Which caused all our
>>> shared preferences to get lost, we could no longer create private data
>>> files, and the game started randomly crashing.
>>>
>>> We had a pretty popular online game with rankings.  This problem
>>> caused everyone who updated to lose everything.  In the past few days
>>> we've lost over 30% of our active installs, and our rating and sales
>>> have gone down the crapper.
>>>
>>> Please fix this bug asap, or atleast disable the option to modify copy
>>> protection from the developers page.  Sorry for being rude, but I'm
>>> pretty pissed.
>>>
>>> Thanks,
>>>
>>> Tyler
>>>
>>> On Mar 9, 3:16 pm, Tyler Ernst  wrote:
>>>
>>>
 Thanks that defect sounds exactly like what we're experiencing.
 However we can't reproduce it from just installing from adb only when
 installing from the market place :(

 On Mar 9, 1:08 pm, focuser  wrote:

> Please check outhttp://code.google.com/p/android/issues/detail?id=2066
>
> On Mar 9, 12:36 pm, Tyler Ernst  wrote:
>
>> We have an online multiplayer game that saves some login information
>> in the SharedPreferences.   Our app is copy protected and everything
>> was going really well until this weekend when we released an update
>> for it.  It seems that at least some of the people are having their
>> SharedPreferences deleted when they updated too the new app.  As you
>> can imagine our users are furious because they're all loosing their
>> profiles, and our ranking is dropping fast.
>>
>> We've tried to reproduce this a hundreds ways but are unable.  We're
>> wondering if this could be related to installing a copy protected app
>> over a copy protected app?  Since that's the only situation we haven't
>> tested and can't test.  Has anyone had similar issues, or know a fix?
>>
>> Thanks,
>>
>> Tyler
>>
>> >
>>
>
>
> --
>
> * Written an Android App? - List it at http://andappstore.com/ *
>
> ==
> Funky Android Limited is registered in England & Wales with the
> company number  6741909. The registered head office is Kemp House,
> 152-160 City Road, London,  EC1V 2NX, UK.
>
> The views expressed in this email are those of the author and not
> necessarily those of Funky Android Limited, it's associates, or it's
> subsidiaries.
>
>
> >
>

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

2009-03-11 Thread Stoyan Damov

It's not an issue - restarting your activity when the configuration
changes is by design.
You can mark your activity in the manifest file as one which deals
with configuration changes (hiddenkeyboard, etc.) itself, handle the
configuration change yourself and it won't be restarted.

On Wed, Mar 11, 2009 at 12:13 PM, mobilek...@googlemail.com
 wrote:
>
> Hi,
>
> I've faced the following issue. Upon loading my app I have several
> threads consuming an http output stream to update some state. I've
> implemented the Handler technique and have my threads posting back
> when they're ready to do so. This usually takes 2-3 seconds. The issue
> comes if the keyboard is opened within this period since G1 restarts
> the onCreate(), and basically repeats the process. So when the first
> threads are ready to post back they're throwing NullPointerException.
> The only solution that comes to my mind is to detect when the device
> is about to force change of portrait to landscape and vice versa, and
> at this point to stop all threads previously created so my client
> won't throw the NullPointerException erros. Is this a well know issue
> with a well known solution? Hope I will get some advice as this
> problem is ruining my whole app.
>
> 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: Issue with Threads and onCreate()

2009-03-11 Thread Stoyan Damov

Yes, basically if you declare your activity's orientation to be
"sensor" there's nothing else to do (I think).

On Wed, Mar 11, 2009 at 1:39 PM, mobilekid  wrote:
>
> Thanks Stoyan,
>
> Is it a case of declaring the activity with android:configChanges in
> the AndroidManifest.xml, and then implementing what to reload in the
> onConfigurationChanged(Configuration) of that particular activity?
>
>
> On Mar 11, 11:23 am, Stoyan Damov  wrote:
>> It's not an issue - restarting your activity when the configuration
>> changes is by design.
>> You can mark your activity in the manifest file as one which deals
>> with configuration changes (hiddenkeyboard, etc.) itself, handle the
>> configuration change yourself and it won't be restarted.
>
> >
>

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

2009-03-11 Thread Stoyan Damov

keyboardHidden|orientation

On Wed, Mar 11, 2009 at 2:34 PM, mobilekid  wrote:
>
> For some reason that seems not to work in my case. I've declared the
> activity as android:configChanges="orientation" in the
> AndroidManifest.xml, which I assume will call onConfigurationChanged
> (Configuration). So for testing purposes I've simply implemented it as
> follows:
>
> @Override
> public void onConfigurationChanged (Configuration newConfig){
>        Log.i(this.toString(), "I've been called!");
>        super.onConfigurationChanged(newConfig);
> }
>
> However, it never gets called. Am I doing anything wrong here?!
> Thanks!
>
>
>
>
> On Mar 11, 11:44 am, Stoyan Damov  wrote:
>> Yes, basically if you declare your activity's orientation to be
>> "sensor" there's nothing else to do (I think).
>
> >
>

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

2009-03-11 Thread Stoyan Damov

unless he traps the back button in onKeyDown

On Wed, Mar 11, 2009 at 2:51 PM, Marco Nelissen  wrote:
>
> That will solve the problem when opening/closing the keyboard, but
> won't solve it when e.g. starting the app and then immediately hitting
> the back button to exit it.
>
>
> On Wed, Mar 11, 2009 at 5:37 AM, Stoyan Damov  wrote:
>>
>> keyboardHidden|orientation
>>
>> On Wed, Mar 11, 2009 at 2:34 PM, mobilekid  wrote:
>>>
>>> For some reason that seems not to work in my case. I've declared the
>>> activity as android:configChanges="orientation" in the
>>> AndroidManifest.xml, which I assume will call onConfigurationChanged
>>> (Configuration). So for testing purposes I've simply implemented it as
>>> follows:
>>>
>>> @Override
>>> public void onConfigurationChanged (Configuration newConfig){
>>>        Log.i(this.toString(), "I've been called!");
>>>        super.onConfigurationChanged(newConfig);
>>> }
>>>
>>> However, it never gets called. Am I doing anything wrong here?!
>>> Thanks!
>>>
>>>
>>>
>>>
>>> On Mar 11, 11:44 am, Stoyan Damov  wrote:
>>>> Yes, basically if you declare your activity's orientation to be
>>>> "sensor" there's nothing else to do (I think).
>>>
>>> >
>>>
>>
>> >
>>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 there a large efficiency difference between Canvas.drawBitmap or OpenGL?

2009-03-11 Thread Stoyan Damov

What is it that you are drawing, how are you drawing it, have you
profiled your code?

On Wed, Mar 11, 2009 at 5:31 PM, William  wrote:
>
> Greetings Developers,
>
> I am just putting this question out there.
>
> Is there a large efficiency difference between Canvas.drawBitmap or
> OpenGL.  I am drawing using Canvas.drawBitmap and running slowing FPS,
> would openGL speed that up a lot you think?
> >
>

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

2009-03-11 Thread Stoyan Damov

I have released my game on 19th of February, built against SDK 1.1 but
no minSdkVersion, and tested on my G1 w/ 1.1, i.e. it should be
working on 1.0 devices. So far I haven't got a report that it's not
working on any device, other than the intermittent "Force Close"
issues after an update.

Bottom line is, don't worry, install 1.1 and build against SDK 1.1 - I
haven't had any problems. Surely I haven't used any feature from 1.1,
not that there are many.

Do read http://developer.android.com/sdk/android-1.1.html to get more
confidence.

Cheers

On Wed, Mar 11, 2009 at 10:17 PM, Tim Bray  wrote:
>
> I was going to keep my SDK at 1.0 because for my own app I don't need
> any 1.1 stuff and I'd like it to work on as many devices as possible.
> If I upgrade my dev-phone to 1.1 just because I'd like a nicer phone,
> is there any appreciable risk that it will fail to detect problems
> that might occur on 1.0 devices?  -Tim
>
> >
>

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



[android-developers] Am I being banned from the list?

2009-03-11 Thread Stoyan Damov

Hi,

It's the 2nd post for which I'm getting:

---

The original message was received at ...

  The following addresses had permanent fatal errors 

 (552 5.2.2 minokr: mbox is over quota)

Final-Recipient: RFC822; min...@hanmail.net
Action: failed
Status: 552 5.2.2 minokr: mbox is over quota


-- Forwarded message ------
From: Stoyan Damov 
To: android-developers@googlegroups.com
Date: Wed, 11 Mar 2009 22:57:26 +0200
Subject: [android-developers] Re: Risk of upgrading to 1.1?

I have released my game on 19th of February, built against SDK 1.1 but
no minSdkVersion, and tested on my G1 w/ 1.1, i.e. it should be
working on 1.0 devices. So far I haven't got a report that it's not
working on any device, other than the intermittent "Force Close"
issues after an update.

Bottom line is, don't worry, install 1.1 and build against SDK 1.1 - I
haven't had any problems. Surely I haven't used any feature from 1.1,
not that there are many.

Do read http://developer.android.com/sdk/android-1.1.html to get more
confidence.

Cheers

-

So, am I being banned or what?

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

2009-03-11 Thread Stoyan Damov

Thank you for the prompt reply.

I don't know what could be the problem, I'm posting by sending my
posts to android-developers@googlegroups.com thru GMail.

Cheers

On Wed, Mar 11, 2009 at 11:38 PM, clark  wrote:
>
> Your message showed up under the thread you posted to "[android-
> developers] Re: Risk of upgrading to 1.1?", right above JBQ, so I do
> not think you are being banned.  You may want to look for other causes
> for this problem.
>
>
> ~clark
>
> On Mar 11, 2:16 pm, Stoyan Damov  wrote:
>> Hi,
>>
>> It's the 2nd post for which I'm getting:
>>
>> ---
>>
>> The original message was received at ...
>>
>>   The following addresses had permanent fatal errors 
>> 
>>  (552 5.2.2 minokr: mbox is over quota)
>>
>> Final-Recipient: RFC822; min...@hanmail.net
>> Action: failed
>> Status: 552 5.2.2 minokr: mbox is over quota
>>
>>
>>
>> -- Forwarded message --
>> From: Stoyan Damov 
>> To: android-developers@googlegroups.com
>> Date: Wed, 11 Mar 2009 22:57:26 +0200
>> Subject: [android-developers] Re: Risk of upgrading to 1.1?
>>
>> I have released my game on 19th of February, built against SDK 1.1 but
>> no minSdkVersion, and tested on my G1 w/ 1.1, i.e. it should be
>> working on 1.0 devices. So far I haven't got a report that it's not
>> working on any device, other than the intermittent "Force Close"
>> issues after an update.
>>
>> Bottom line is, don't worry, install 1.1 and build against SDK 1.1 - I
>> haven't had any problems. Surely I haven't used any feature from 1.1,
>> not that there are many.
>>
>> Do readhttp://developer.android.com/sdk/android-1.1.htmlto get more
>> confidence.
>>
>> Cheers
>>
>> -
>>
>> So, am I being banned or what?- Hide quoted text -
>>
>> - Show quoted text -
> >
>

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



[android-developers] Re: sound effect using SoundPool

2009-03-12 Thread Stoyan Damov

On Sun, Feb 15, 2009 at 12:00 AM, Sundog  wrote:
>
> I am using your class and setting it up as you indicate, but having
> the same difficulty I did last time I tried to use SoundPool; I have
> seven one-shot sounds that trigger from buttons and in the emulator it
> works every time, but on the phone itself, occasionally all 7 work but
> usually only a random few do or sometimes none at all. Any idea what
> might be going wrong?
>

This is a bug in the SoundPool API. I have 1 customer who reported
that sometimes my game just stops playing sounds.
It happens on my G1, luckily very rarely. As a workaround, in my
Options menu in the game, when the user turns off all sounds, and then
turns them on, I reload everything and the sounds come back.
I'm 100% sure it's a bug on the Android/SoundPool API side.

I know it doesn't help, but that's it.
I wish there was a way of figuring out that a sound doesn't play -- in
this case we could handle it and reload or whatever.
In the situations where the sounds go mute I don't see anything in the log.

Cheers

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



[android-developers] Re: new version of app - is the user notified?

2009-03-12 Thread Stoyan Damov

If he looks at your app browsing the Market he'll see it has an update.
I can't remember if he gets a notification as well, probably not.

On Thu, Mar 12, 2009 at 10:11 PM, daniel.benedykt
 wrote:
>
> Hi
>
> If I upload a new version of the application.
> Does the user knows that there is a new version of the app?
>
> Thanks
>
> Daniel
> >
>

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

2009-03-12 Thread Stoyan Damov

~70MB for apps, 1GB SD card.
I know the 70MB is hilarious, tough luck.
Maybe a next release, when Google implement file system encryption
will allow installing and running apps off the SD card, but that's not
likely to happen soon.

On Thu, Mar 12, 2009 at 9:53 PM, WebsiteMagazine
 wrote:
>
> How much storage space does a G1 phone come with?
> >
>

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

2009-03-13 Thread Stoyan Damov

E/AndroidRuntime( 1328): Caused by:
android.content.res.Resources$NotFoundException: File
res/drawable/title_bar_shadow.png9

^^^

These kinds of questions are more appropriate for the android-begginers list.

Cheers


On Fri, Mar 13, 2009 at 3:04 PM, Harishkumar V  wrote:
> Hi,
>
> I have android running on beagle.
>
> When i click Music player, i got the following error on screen,
>
> "The application Music (process com.android.music) has stopped unexpectedly.
> Please try again"
>
> in beagle, when i did logcat,
>
> I/ActivityManager(  815): Starting activity: Intent {
> action=android.intent.action.MAIN categories={android.intent.category}
> I/ActivityManager(  815): Start proc com.android.music for activity
> com.android.music/.VideoBrowserActivity: pid=1328 uid=1}
> I/jdwp    ( 1328): received file descriptor 10 from ADB
> W/ResourceType( 1328): Failure getting entry for 0x7f020019 (t=1 e=25) in
> package 0: 0xffb5
> D/AndroidRuntime( 1328): Shutting down VM
> W/dalvikvm( 1328): threadid=3: thread exiting with uncaught exception
> (group=0x4000fe68)
> E/AndroidRuntime( 1328): Uncaught handler: thread main exiting due to
> uncaught exception
> E/AndroidRuntime( 1328): java.lang.RuntimeException: Unable to start
> activity ComponentInfo{com.android.music/com.android.mr
> E/AndroidRuntime( 1328):    at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2156)
> E/AndroidRuntime( 1328):    at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2172)
> E/AndroidRuntime( 1328):    at
> android.app.ActivityThread.access$1800(ActivityThread.java:112)
> E/AndroidRuntime( 1328):    at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1586)
> E/AndroidRuntime( 1328):    at
> android.os.Handler.dispatchMessage(Handler.java:99)
> E/AndroidRuntime( 1328):    at android.os.Looper.loop(Looper.java:123)
> E/AndroidRuntime( 1328):    at
> android.app.ActivityThread.main(ActivityThread.java:3790)
> E/AndroidRuntime( 1328):    at
> java.lang.reflect.Method.invokeNative(Native Method)
> E/AndroidRuntime( 1328):    at
> java.lang.reflect.Method.invoke(Method.java:521)
> E/AndroidRuntime( 1328):    at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745)
> E/AndroidRuntime( 1328):    at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:503)
> E/AndroidRuntime( 1328):    at dalvik.system.NativeStart.main(Native
> Method)
> E/AndroidRuntime( 1328): Caused by: android.view.InflateException: Binary
> XML file line #18: Error inflating class java.lanr
> E/AndroidRuntime( 1328):    at
> android.view.LayoutInflater.createView(LayoutInflater.java:512)
> E/AndroidRuntime( 1328):    at
> com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.ja)
> E/AndroidRuntime( 1328):    at
> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
> E/AndroidRuntime( 1328):    at
> android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
> E/AndroidRuntime( 1328):    at
> android.view.LayoutInflater.parseInclude(LayoutInflater.java:676)
> E/AndroidRuntime( 1328):    at
> android.view.LayoutInflater.rInflate(LayoutInflater.java:613)
> E/AndroidRuntime( 1328):    at
> android.view.LayoutInflater.inflate(LayoutInflater.java:407)
> E/AndroidRuntime( 1328):    at
> android.view.LayoutInflater.inflate(LayoutInflater.java:320)
> E/AndroidRuntime( 1328):    at
> android.view.LayoutInflater.inflate(LayoutInflater.java:276)
> E/AndroidRuntime( 1328):    at
> com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:226)
> E/AndroidRuntime( 1328):    at
> android.app.Activity.setContentView(Activity.java:1614)
> E/AndroidRuntime( 1328):    at
> com.android.music.VideoBrowserActivity.init(VideoBrowserActivity.java:52)
> E/AndroidRuntime( 1328):    at
> com.android.music.VideoBrowserActivity.onCreate(VideoBrowserActivity.java:45)
> E/AndroidRuntime( 1328):    at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
> E/AndroidRuntime( 1328):    at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2119)
> E/AndroidRuntime( 1328):    ... 11 more
> E/AndroidRuntime( 1328): Caused by:
> java.lang.reflect.InvocationTargetException
> E/AndroidRuntime( 1328):    at
> android.widget.ImageView.(ImageView.java:102)
> E/AndroidRuntime( 1328):    at
> java.lang.reflect.Constructor.constructNative(Native Method)
> E/AndroidRuntime( 1328):    at
> java.lang.reflect.Constructor.newInstance(Constructor.java:451)
> E/AndroidRuntime( 1328):    at
> android.view.LayoutInflater.createView(LayoutInflater.java:499)
> E/AndroidRuntime( 1328):    ... 25 more
> E/AndroidRuntime( 1328): Caused by:
> android.content.res.Resources$NotFoundException: File
> res/drawable/title_bar_shadow.png9
> E/AndroidRuntime( 1328):    at
> android.content.res.Res

[android-developers] Re: Unified Database Populating Solution

2009-03-13 Thread Stoyan Damov

Do reply on the list, I'm sure other people are interested as well (I
am for example).

On Fri, Mar 13, 2009 at 1:15 AM, Mark Murphy  wrote:
>
> Justin Allen Jaynes wrote:
>> How in-depth do you go in your books, especially in demonstrating
>> best-practices of common tasks such as managing large amounts of data on
>> such a small platform?  Also, how are the two books related?  Does the
>> second book supersede the first, or are they companions?  I'd like to
>> buy both  but I'm on a tight budget.
>
> Thanks for the interest!
>
> I'll reply to you off-list shortly, so this doesn't turn into a
> commercial...
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
>
> >
>

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



[android-developers] Re: Testing Android Game on real device: please help

2009-03-13 Thread Stoyan Damov

Send it to me, I loved raptor :)

On Fri, Mar 13, 2009 at 3:40 PM, TjerkW  wrote:
>
> Hello all,
>
> I am making an android game, but i do not have the money to buy a
> developer phone.
> The game is not finished but i should it is testable.. and if i dont
> test it know i may
> have a big problem later... it is playable though.
>
> Is there somebody who has a real device and wants to test the game for
> me,
> just starting it up and playing it a little bit is good enough.
>
> It's a 2d airplane shoot gane, much like the old raptor game.
>
> If someone is interested please reply, i will sent you
> the (singed) APK and with some things i want to test (using both the
> buttons as well as touch screen for gameplay).
>
> Could anybody help me out?
>
> 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: manipulating markets popularity! - why should i develop app for android

2009-03-13 Thread Stoyan Damov

:O:O:O

On Sat, Mar 14, 2009 at 12:48 AM, strazzere  wrote:
>
> It appears google does monitor and can/will disable accounts.
>
> For example - mine has been disabled. Why? No idea but I've gotten it
> confirmed by google support.
>
> They said it was disabled due to "high volume and suspicious traffic"
> - with not email notification or anything. Just turned off - and no
> reply on how to get it turned back on.
>
> On Mar 7, 9:48 pm, Marco Nelissen  wrote:
>> On Sat, Mar 7, 2009 at 3:01 PM, Stoyan Damov  wrote:
>>
>> > On Sat, Mar 7, 2009 at 8:58 PM, strazzere  wrote:
>>
>> >> Your interaction with the market is also logged with your android id
>> >> -- which also seems to be linked to a gmail account you use on that
>> >> device.
>>
>> >> So I'm assuming this could be tracked - and if google wanted to, they
>> >> could see. Hmmm 150+ users with the same android id? All commenting
>> >> and install the same application?
>>
>> > That is, if Google cares. All I've seen is "oh, really? file a bug".
>>
>> And rightly so, because we can't keep track of issues brought up in a
>> mailing list.
>> If you see a bug, you're certainly welcome to bring it up in the
>> mailing list, so that others may learn from your experience, but
>> posting about it in this mailing list is no substitute for filing a
>> bug. We can't assign a posting to an engineer.
> >
>

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

2009-03-14 Thread Stoyan Damov

http://developer.android.com/reference/android/os/PowerManager.WakeLock.html

On Sat, Mar 14, 2009 at 8:23 PM, Jordan Frank  wrote:
>
> Hi,
>
> Although I haven't received confirmation from anyone at Google, I can
> confidently state that when the power to the display goes off, one can
> no longer obtain data from the accelerometers. I can easily think of a
> number of examples of where one would like to continue collecting
> accelerometer data even when the display is of.
>
> Supposing that I wanted to "fix" this, can anyone suggest where should
> I start looking? Would this be in the SDK, the kernel, or in some
> proprietary firmware that I can't touch?
>
> Thanks,
> Jordan Frank
>
> >
>

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

2009-03-15 Thread Stoyan Damov

Go to http://groups.google.com/group/android-developers/subscribe?hl=en
and edit your membership

On Sun, Mar 15, 2009 at 5:13 PM, TjerkW  wrote:
>
> Ok both your email adresses are noted... but the game still needs some
> work,
> so if i think it can be tested youll get an .apk in your inbox! :-)
>
> Btw: how do you subscribe to a thread in order to get automatic emails
> here at google-groups?
> I can only subscribe by easing search-words.. or by getting an email
> once a day ...
> I only want to subscribe to this thread... how do i do that?
>
>
>
> On 13 mrt, 15:53, Andrea Fanfani  wrote:
>> On Fri, Mar 13, 2009 at 06:40:52AM -0700,TjerkWwrote:
>>
>> > Hello all,
>>
>> > I am making an android game, but i do not have the money to buy a
>> > developer phone.
>> > The game is not finished but i should it is testable.. and if i dont
>> > test it know i may
>> > have a big problem later... it is playable though.
>>
>> > Is there somebody who has a real device and wants to test the game for
>> > me,
>> > just starting it up and playing it a little bit is good enough.
>>
>> > It's a 2d airplane shoot gane, much like the old raptor game.
>>
>> > If someone is interested please reply, i will sent you
>> > the (singed) APK and with some things i want to test (using both the
>> > buttons as well as touch screen for gameplay).
>>
>> > Could anybody help me out?
>>
>> hi, send me at andrea.fanfani(at)gmail.com
>>
>> I will try to take a look at the application.
>>
>> a.f.
> >
>

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



[android-developers] Re: Can not start app from Market but works fine from Launcher: com.android.vending crashing

2009-03-15 Thread Stoyan Damov

I just installed it and the bug is really in YOUR code -- the crash in
Market app is another story - someone from the Android engineers
should figure out why Market crashes when it can't launch an activity
lacking permissions.

03-16 00:58:01.960: WARN/ActivityManager(51): Permission Denial:
starting Intent { action=android.intent.action.MAIN flags=0x1000
comp={com.parakoos.basetoucherlite/com.parakoos.basetoucherlite.ViewFriends}
} from ProcessRecord{42fd97b8 6206:com.android.vending/1}
(pid=6206, uid=1) requires android.permission.READ_CONTACTS
03-16 00:58:01.970: DEBUG/AndroidRuntime(6206): Shutting down VM
03-16 00:58:01.970: WARN/dalvikvm(6206): threadid=3: thread exiting
with uncaught exception (group=0x4000fe68)
03-16 00:58:01.980: ERROR/AndroidRuntime(6206): Uncaught handler:
thread main exiting due to uncaught exception
03-16 00:58:02.000: ERROR/AndroidRuntime(6206):
java.lang.SecurityException: Permission Denial: starting Intent {
action=android.intent.action.MAIN flags=0x1000
comp={com.parakoos.basetoucherlite/com.parakoos.basetoucherlite.ViewFriends}
} from ProcessRecord{42fd97b8 6206:com.android.vending/1}
(pid=6206, uid=1) requires android.permission.READ_CONTACTS
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.os.Parcel.readException(Parcel.java:1066)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.os.Parcel.readException(Parcel.java:1054)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:998)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.app.Instrumentation.execStartActivity(Instrumentation.java:1436)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.app.Activity.startActivityForResult(Activity.java:2528)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.app.Activity.startActivity(Activity.java:2572)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
com.android.vending.controller.AssetInfoActivityController.handleLaunch(AssetInfoActivityController.java:510)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
com.android.vending.controller.AssetInfoActivityController.handleRequest(AssetInfoActivityController.java:136)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
com.android.vending.AssetInfoActivity.onClick(AssetInfoActivity.java:284)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.view.View.performClick(View.java:2110)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.view.View.onTouchEvent(View.java:3524)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.widget.TextView.onTouchEvent(TextView.java:4659)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.view.View.dispatchTouchEvent(View.java:3179)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1593)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1089)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.app.Activity.dispatchTouchEvent(Activity.java:1873)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1577)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1140)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.os.Handler.dispatchMessage(Handler.java:88)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.os.Looper.loop(Looper.java:123)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
android.app.ActivityThread.main(ActivityThread.java:3739)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
java.lang.reflect.Method.invokeNative(Native Method)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
java.lang.reflect.Method.invoke(Method.java:515)
03-16 00:58:02.000: ERROR/AndroidRuntime(6206): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
03-16 00:58:02.000: ERROR/And

[android-developers] Re: Can not start app from Market but works fine from Launcher: com.android.vending crashing

2009-03-15 Thread Stoyan Damov

np, 1 advice though - when showing dialogs, put 2 extra end-of-line
chars (\n), otherwise the last line gets clipped on the device (don't
know whether it happens on the emulator)
This *is* surely a bug w/ the AlertDialog.

On Mon, Mar 16, 2009 at 1:49 AM, Parakoos  wrote:
>
> PS. I have released v.1.0.2 which contains the bug fix.
>
> On Mar 15, 11:00 pm, Stoyan Damov  wrote:
>> I just installed it and the bug is really in YOUR code -- the crash in
>> Market app is another story - someone from the Android engineers
>> should figure out why Market crashes when it can't launch an activity
>> lacking permissions.
>>
>> 03-16 00:58:01.960: WARN/ActivityManager(51): Permission Denial:
>> starting Intent { action=android.intent.action.MAIN flags=0x1000
>> comp={com.parakoos.basetoucherlite/com.parakoos.basetoucherlite.ViewFriends}}
>>  from ProcessRecord{42fd97b8 6206:com.android.vending/1}
>>
>> (pid=6206, uid=1) requires android.permission.READ_CONTACTS
>> 03-16 00:58:01.970: DEBUG/AndroidRuntime(6206): Shutting down VM
>> 03-16 00:58:01.970: WARN/dalvikvm(6206): threadid=3: thread exiting
>> with uncaught exception (group=0x4000fe68)
>> 03-16 00:58:01.980: ERROR/AndroidRuntime(6206): Uncaught handler:
>> thread main exiting due to uncaught exception
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):
>> java.lang.SecurityException: Permission Denial: starting Intent {
>> action=android.intent.action.MAIN flags=0x1000
>> comp={com.parakoos.basetoucherlite/com.parakoos.basetoucherlite.ViewFriends}}
>>  from ProcessRecord{42fd97b8 6206:com.android.vending/1}
>>
>> (pid=6206, uid=1) requires android.permission.READ_CONTACTS
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> android.os.Parcel.readException(Parcel.java:1066)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> android.os.Parcel.readException(Parcel.java:1054)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:998)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> android.app.Instrumentation.execStartActivity(Instrumentation.java:1436)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> android.app.Activity.startActivityForResult(Activity.java:2528)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> android.app.Activity.startActivity(Activity.java:2572)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> com.android.vending.controller.AssetInfoActivityController.handleLaunch(AssetInfoActivityController.java:510)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> com.android.vending.controller.AssetInfoActivityController.handleRequest(AssetInfoActivityController.java:136)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> com.android.vending.AssetInfoActivity.onClick(AssetInfoActivity.java:284)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> android.view.View.performClick(View.java:2110)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> android.view.View.onTouchEvent(View.java:3524)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> android.widget.TextView.onTouchEvent(TextView.java:4659)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> android.view.View.dispatchTouchEvent(View.java:3179)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1593)
>> 03-16 00:58:02.000: ERROR/AndroidRuntime(6206):     at
>> com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1089)
>> 03-16 00:58:02.000: 

[android-developers] Re: deploying same application twice different content

2009-03-16 Thread Stoyan Damov

I'm very interested in getting a confirmation on this.
Romain, are you saying that my apk can contain classes in the package
X.Y.Z but in the manifest I can say the package is really A.B.C?

Thanks

On Mon, Mar 16, 2009 at 11:56 AM, Mariano Kamp  wrote:
>
> So, you're saying that the package name in the manifest is not related
> to the source package name. That would be cool and would make it much
> easier to provide a lite and full version of the same app.
>
> On Mar 10, 2009, at 11:40 PM, Romain Guy wrote:
>
>> All you need is change the package name in the AndroidManifest.
>
>
> >
>

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

2009-03-16 Thread Stoyan Damov

That's fine, I'll check whether this work and get back to list tonight.

On Mon, Mar 16, 2009 at 5:42 PM, Mariano Kamp  wrote:
> I suppose that you would at least have to specify the name of e.g.
> activities fully qualified then. Instead of .SomeActivity you would then
> need to specify x.y.z.SomeActivity.
>
> On Mon, Mar 16, 2009 at 12:47 PM, Stoyan Damov 
> wrote:
>>
>> I'm very interested in getting a confirmation on this.
>> Romain, are you saying that my apk can contain classes in the package
>> X.Y.Z but in the manifest I can say the package is really A.B.C?
>>
>> Thanks
>>
>> On Mon, Mar 16, 2009 at 11:56 AM, Mariano Kamp 
>> wrote:
>> >
>> > So, you're saying that the package name in the manifest is not related
>> > to the source package name. That would be cool and would make it much
>> > easier to provide a lite and full version of the same app.
>> >
>> > On Mar 10, 2009, at 11:40 PM, Romain Guy wrote:
>> >
>> >> All you need is change the package name in the AndroidManifest.
>> >
>> >
>> > >
>> >
>>
>>
>
>
> >
>

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



[android-developers] Re: Can I release app to market which relies on a 1.1 feature?

2009-03-16 Thread Stoyan Damov

I haven't checked that, but if you set minSDKversion in the manifest,
users with 1.0 probably won't be able to download/install your app and
hence experience crashes, so don't worry.
You can try setting the version in your manifest to a version higher
than 1.1 (e.g. 3) and see what happens on your 1.1 device.

On Mon, Mar 16, 2009 at 6:06 PM, admin.androidsl...@googlemail.com
 wrote:
>
> What percentage of users are going to have 1.1 upgrade?
>
> Don't want to be flooded by 1 star feedbacks!!!
> >
>

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



[android-developers] Att: group owners, please unsubscribe min...@hanmail.net

2009-03-16 Thread Stoyan Damov

I'm getting seriously pissed off.

Can the group owners of android-developers and android-discuss
unsubscribe this guy from the groups?

Thanks!


On Mon, Mar 16, 2009 at 6:25 PM, Mail Delivery Subsystem
 wrote:
> The original message was received at ...
>
>   The following addresses had permanent fatal errors 
> 
>  (552 5.2.2 minokr: mbox is over quota)
>
> Final-Recipient: RFC822; min...@hanmail.net
> Action: failed
> Status: 552 5.2.2 minokr: mbox is over quota
>
>
> ------ Forwarded message --
> From: Stoyan Damov 
> To: android-develop...@googlegroups.com
> Date: Mon, 16 Mar 2009 18:19:46 +0200
> Subject: [android-developers] Re: Can I release app to market which relies on 
> a 1.1 feature?
>
> I haven't checked that, but if you set minSDKversion in the manifest,
> users with 1.0 probably won't be able to download/install your app and
> hence experience crashes, so don't worry.
> You can try setting the version in your manifest to a version higher
> than 1.1 (e.g. 3) and see what happens on your 1.1 device.
>
> On Mon, Mar 16, 2009 at 6:06 PM, admin.androidsl...@googlemail.com
>  wrote:
>>
>> What percentage of users are going to have 1.1 upgrade?
>>
>> Don't want to be flooded by 1 star feedbacks!!!
>> >
>>
>
> >
>
>

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

2009-03-16 Thread Stoyan Damov

I think that's because most of the paying customers are grown ups (and
hence the more reserved language) and the free users are kids.
I've seen a few "I wish I had a credit card to buy this" comments from
the latter. I don't think there are any grown ups who don't own one.

Cheers

On Tue, Mar 17, 2009 at 12:35 AM, Inderjeet Singh  wrote:
>
> Somewhat surprisingly, I notice that users leave more vicious comments
> on free apps compared to the paid ones.
> Of course, there are a lot more ratings and comments on free apps to
> begin with.
>
> Inder
>
>
> On Mon, Mar 16, 2009 at 10:12 AM, Sundog  wrote:
>>
>> Join the unhappy club. From what I can see, and my own experiences,
>> there is NO reason at all to offer free ANYTHING on the market, as it
>> all just swirls down the drain and is useless for driving future
>> sales, no matter how many times it was downloaded. Live and learn...
>>
>> On Mar 16, 10:53 am, Keith Wiley  wrote:
>>> Thanks, I suspected as much.  :(
>> >
>>
>
> >
>

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



[android-developers] Re: jarsigner jar sign apk update

2009-03-17 Thread Stoyan Damov

Of course you should sign your updated app with the same keystore,
think about it - if this wasn't the case, I could make an app which
claims to be yours, sign it with my own key and push a bogus update.

On Tue, Mar 17, 2009 at 2:47 PM, Maxence Warzecha  wrote:
>
> Hi all,
>
> This is what I did :
>
> - I signed my apk.
> - I published my apk.
> - I updated my application.
> - I sign my new apk file succesfully (**with an other keystore**).
> - I upload my new apk.
> - When poeple what to install updated version, they receive message
> look like "apk file was not signed correctly". If they uninstall
> previous version, they are able to install new version (piouf...).
>
> I don't understand why.
>
> Can you tell me if need to keep my previous keystore *OR* with similar
> information? Or ...?
>
> Thank you!
> Max
> >
>

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

2009-03-17 Thread Stoyan Damov

I'll try to pull a magic now and guess what you're trying to do -- are
you trying to get FreeTTS to work in your app? :P

On Tue, Mar 17, 2009 at 6:01 PM, DaRolla  wrote:
>
> hello,
>
> I need to build a java.beans.PropertyChangeListener which is part of
> JDK (rt.jar) but not part of Dalvik.
>
> Trying to copy the sources to my Application I get this:
>
> Attempt to include a core VM class in something other than a core
> library.
> It is likely that you have attempted to include the core library from
> a desktop
> virtual machine into an application, which will most assuredly not
> work. If
> you really intend to build a core library -- which is only appropriate
> as
> part of creating a full virtual machine binary, as opposed to
> compiling an
> application -- then use the "--core-library" option to suppress this
> error
> message. If you go ahead and use "--core-library" but are in fact
> building
> an application, then please be aware that your build will still fail
> at some
> point; you will simply be denied the pleasure of reading this helpful
> error
> message.
>
> My solution:
> 1) build a core library with consisting out of
> java.beans.PropertyChangeListener
> 2) integrate that library (jar?) into my application.
>
> My question:
> - how can I build a core library using eclipse?
>
> greetings,
> darolla
> >
>

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

2009-03-18 Thread Stoyan Damov

FreeTTS is a text-to-speech engine. It's only dependency is *again*
java.beans.PropertyChangeListener.
I've tried compiling with --core-library using Eclipse but no matter
what I did I wasn't able to pass that parameter to the Android tools
(can't remember which one required it).
I managed to compile using the command-line tools but haven't tried
running the app because in the end I've given up because of the big
voice files required for FreeTTS.
Bottom line is, I can't really help you, but try compiling on the
command line OR try creating an IntelliJ IDEA project and modify it's
build script -- I can't guarantee it will work though.

Cheers

On Wed, Mar 18, 2009 at 9:51 AM, Marco Schmitz
 wrote:
>
> hi stoyan,
>
> I am working for a company that needs an android client for their web
> application. because the server is coded nicely, the first try is
> going to be a serialized server object on android. but the server uses
> jdk 1.6 and therefor some classes that android doesnt support like
> java.bean. because these beans are transient I just need an empty
> class inside android. but the problem is to compile it.
>
> any suggestions?
>
> by the way: what is freetts?
>
> greetings,
> darolla
>
> 2009/3/17 Stoyan Damov :
>>
>> I'll try to pull a magic now and guess what you're trying to do -- are
>> you trying to get FreeTTS to work in your app? :P
>>
>> On Tue, Mar 17, 2009 at 6:01 PM, DaRolla  
>> wrote:
>>>
>>> hello,
>>>
>>> I need to build a java.beans.PropertyChangeListener which is part of
>>> JDK (rt.jar) but not part of Dalvik.
>>>
>>> Trying to copy the sources to my Application I get this:
>>>
>>> Attempt to include a core VM class in something other than a core
>>> library.
>>> It is likely that you have attempted to include the core library from
>>> a desktop
>>> virtual machine into an application, which will most assuredly not
>>> work. If
>>> you really intend to build a core library -- which is only appropriate
>>> as
>>> part of creating a full virtual machine binary, as opposed to
>>> compiling an
>>> application -- then use the "--core-library" option to suppress this
>>> error
>>> message. If you go ahead and use "--core-library" but are in fact
>>> building
>>> an application, then please be aware that your build will still fail
>>> at some
>>> point; you will simply be denied the pleasure of reading this helpful
>>> error
>>> message.
>>>
>>> My solution:
>>> 1) build a core library with consisting out of
>>> java.beans.PropertyChangeListener
>>> 2) integrate that library (jar?) into my application.
>>>
>>> My question:
>>> - how can I build a core library using eclipse?
>>>
>>> greetings,
>>> darolla
>>> >
>>>
>>
>> >
>>
>
> >
>

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

2009-03-18 Thread Stoyan Damov

On Wed, Mar 18, 2009 at 4:36 AM, Dianne Hackborn  wrote:
> Fwiw, cupcake will add a new field to PACKAGE_ADDED to tell you if this was
> due to an update, and allow this broadcast to be received by the app to
> restart itself.
>

This cupcake thing very much reminds me of Duke Nukem Forever...

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

2009-03-18 Thread Stoyan Damov



mwuahah ;)

On Wed, Mar 18, 2009 at 3:12 PM, elvisw  wrote:
>
> Hi everyone,
>
> The document says:
> SystemClock.setCurrentTimeMillis()
> Sets the current wall time, in milliseconds. Requires the calling
> process to have appropriate permissions.
> ---
>
> What is the appropriate permission I should declare in  permission>???
> Thanks your help...
>
> Elvis.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: When another activity is called from main activity, The calling activity get destroyed?

2009-03-19 Thread Stoyan Damov

http://developer.android.com/guide/topics/fundamentals.html

On Thu, Mar 19, 2009 at 8:50 AM, jj  wrote:
>
> When another activity is started from main activity, The main activity
> get destroyed and created when returned back from second Activity
>               OR
>      main activity  remains in pause state till second activity finish
> (), onSart or onResume from when returned back from second activity?
>
> which one these case does happen in Android application?
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Polite discussion of lite/trial vs pro distribution

2009-03-19 Thread Stoyan Damov

I don't think anyone would flame you on this list.
You had a free app, you made some improvements which cost you this and
that hours of hard work, angry wife, etc :) and you want a reward
for that - how this can be wrong?

What I'd do is have the lite version display a dialog on 1st startup,
showing a 1-time notice explaining everything you've just said in a
way that users can understand, including instructions on how to
download and install the previous full-featured free version from your
web site (explaining to users that they have to enable apps from 2rd
party sites, menu paths to do that, etc.).

Don't forget to mention that it can't possibly be your fault that an
imbecile at Google decided that an app's description could fit in 325
chars, and express your confidence that the issue will be fixed by
Google in a timely manner, and asking users politely to file this is a
bug on the Market's forums :)

Cheers

On Thu, Mar 19, 2009 at 6:18 PM, Keith Wiley  wrote:
>
> First I will explain my situation.  Then, I would greatly appreciate
> constructive dialog on how other developers feel similar situations
> should be managed.
>
> I wrote a simple app in November.  I offered it for free on the Market
> for two reasons.  One, Google hadn't implemented paid apps yet, so I
> had no choice.  Two, by my own admission, v1.0 was too simple too
> garner payment.
>
> However, in the app's documentation, I requested donations toward
> future development.  Out of thousands of installs, I received nothing.
>
> This week I finished a considerably fancier version of the program.
> Given hundreds of hours of unpaid development, I decided to charge a
> few bucks for the new version.  I split the app into lite and pro
> versions.  The lite version has all the new fancy features enabled but
> is limited in how large a document can be created (spread sheet, I
> limited the number of rows/cols, admittedly unlimited in the earlier
> version).  The pro version went to Market as a new app, the lite
> version on top of the old app to retain the long feedback history.
>
> Since the Market provides no way to downgrade, I put the old unlimited
> version on my website and put directions in the new lite version in
> multiple places explaining how to revert to the old version.  Thus,
> any user dissatisfied with the rol/col limit could restore the EXACT
> functionality they had before upgrading to the lite version.
>
> Incidentally, the 325 character blurb allotted on the Market was
> insufficient to list the new features and the lite version's
> limitation and the caveat that the lite version could be reverted
> through my website.  I simply could not communicate these facts to
> users to help them decide whether to upgrade or what to expect after
> upgrading.
>
> The complaints about the new lite version have been diverse.  Most
> pertinent to this discussion are complaints that the lite version now
> limits the rows/cols where the previous version didn't.  I find such
> complaints unjustifiable since I explicitly permit reversion.  I
> literally don't see what they have to complain about.  Another irksome
> genre of complaints is that the program is still too simple to ask any
> money for at all.  I am infuriated.  It costs less than an ice cream
> cone.
>
> So, as discussion, how would other developers handle this situation:
> initial app is simple so offered for free, later version is complex so
> split into lite/pro.  You don't want to limit the lite version by not
> showing the new fancy features, so the limitation must be something
> else, a time limit, a forced delay splash screen, something.  I chose
> limited rows/cols on a spreadsheet app, but also permitted reversion
> to the old unlimited version.
>
> How would other developers implement an increase in complexity, charge
> for it, yet provide a lite version that doesn't anger users of a
> previously unlimited, but also much more simplistic app?
>
> Instead of flaming me where you think I made mistakes, please just
> open the floor for honest discussion.  I'm trying to figure out how to
> do this properly.  A lot of us are probably trying to figure out the
> same thing.
>
> Thanks.
>
> >
>

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



[android-developers] Re: How to get System Endianess

2009-03-19 Thread Stoyan Damov

well, assuming you code in C:

int n = 1;
char *p = (char*)&n;
int little_endian = *p == 1;

does that help?

On Thu, Mar 19, 2009 at 8:09 PM, Luca Belluccini
 wrote:
>
> Thanks, but I think it is the java virtual machine byte order.
> I am communicating to/from low level stuff (kernel driver).
>
> On 19 Mar, 15:45, fadden  wrote:
>> On Mar 19, 6:57 am, Luca Belluccini  wrote:
>>
>> > In Sun Java I can get System endianess using the System.getProperty
>> > ("sun.os.endian").
>> > How to get endianess of the system in Android?
>>
>> One possibility: java.nio.ByteOrder.nativeOrder().
> >
>

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

2009-03-23 Thread Stoyan Damov

On Mon, Mar 23, 2009 at 5:11 PM, David Turner  wrote:
> On Mon, Mar 23, 2009 at 2:59 PM, zl25drexel  wrote:
>>
>> Cupcake is coming, and as you know it will break a lot of apps in the
>> market, those that use reflection & private api. So where is the
>> Cupcake SDK/emulator for us to try our apps?
>
> It will be available publicly when it's ready.


David, can you, or any Android engineer give us like a ballpark
estimate (+/- 1 month is OK) when it will be ready, or it is in the
state, where you could say:

"The release date of this game [DNF] is "When it's done".  Anything
else, and we mean  anything else is someone's speculation.  There is
no date.  We don't know any date.  If you have a friend who claims
they have "inside info", or there's some game news site, or some
computer store at the mall who claims they know - they do not.  They
are making it up.  There is no date.  Period."

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: Cupcake coming in April? Where is the SDK?

2009-03-23 Thread Stoyan Damov

On Mon, Mar 23, 2009 at 5:32 PM, Romain Guy  wrote:
>
> There has been, and there is no, official ETA. Anything you hear/read
> is speculation.
>

Right. I knew I'd get this answer but at least it's better than the rumors.

Thanks Romain

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

2009-03-23 Thread Stoyan Damov

On Mon, Mar 23, 2009 at 6:04 PM, Jean-Baptiste Queru  wrote:
>
> Engineers can't talk about forward-looking scheduling aspects. That's
> not our job, and that's not something we're allowed to talk about.
>
> We can however talk about hard facts. There's been a source code drop
> recently, and David gave instructions on how to use that to compile
> your own SDK-like system.
>
> JBQ

JBQ,I understand you can't talk about that, but you know what - NO ONE
ELSE DOES.
If someone at Google *COULD* speak and *DID* speak about cupcake we
wouldn't be asking you, engineers, about it.

Cheers

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



[android-developers] Re: Way to tell when task goes to back of stack?

2009-03-23 Thread Stoyan Damov

See if "clearTaskOnLaunch" [1] is not what you're looking for.

[1] http://developer.android.com/guide/topics/fundamentals.html

Cheers

On Tue, Mar 24, 2009 at 12:57 AM, Ward Willats  wrote:
>
> Is there a way to tell when my task gets put on the back of the UI
> stack (user pressed "home" say?) I have some resources I'd like to
> free when not foregrounded.
>
> The lifecycle routines seem dicey to use to try and infer this.
>
> The "home" key does not seem to be passed to onKeyDown(), and
> moveTaskToBack() is never called by the system so I can hook it.
>
> I can poll the ActivityManager for running activities with my task
> id, but hard to find a good time to call this.
>
> Thanks
>
> -- Ward
>
> >
>

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

2009-03-23 Thread Stoyan Damov

On Tue, Mar 24, 2009 at 1:52 AM, Mark Murphy  wrote:
>
> zl25drexel wrote:
>> Hi, does anyone know how to construct a typeface object from a file?
>> Say i have a .ttf file on the SD card, how do i load it into my app?
>
> I do not believe you can.
>
> You can create a Typeface object from a suitable TTF that is packaged as
> an asset with your application, but there is no method on Typeface to
> create one from a file outside of there.
>

That's right. You can't. Now, the thing is, why isn't this supported,
and would it be supported? What if I'm developing a rich text editor,
and want to allow the user to download and use whatever fonts s/he
wants? What's the reason for AssetManager to be marked final? Is this
by design, perhaps a security thing, or it's something else?

Cheers

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



[android-developers] Re: Way to tell when task goes to back of stack?

2009-03-23 Thread Stoyan Damov

As a hack, you could do this (depends on how many activities you have,
whether they cover the entire screen, etc.):

Let's say you have activity A, which launches activity B.
Activity A is the one spawning the threads.
Now, apparently, you know when you're launching activity B, so you
could do something like this:

// in activity A, before launching activity B
mPausedBecauseLaunchedActivityB = true;

// in onPause in activity A
if (!mPausedBecauseLaunchedActivityB)
{
   // Activity A is being paused because another activity (surely a
different app) is on top of yours, e.g. Home
   // STOP the threads here
}

// in onResume in activity A
if (!mPausedBecauseLaunchedActivityB)
{
   // Activity A is being resumed after it's being paused because of
another activity (not one of yours)
   // RESTART the threads here
}

HTH,
Cheers

On Tue, Mar 24, 2009 at 2:01 AM, Ward Willats  wrote:
>
> Thanks for the response Stoyan. I like having the UI preserved so I
> don't want to toss everything down to the root. I just want to stop
> some worker threads when going into the background.
>
>
>>See if "clearTaskOnLaunch" [1] is not what you're looking for.
>>
>>[1] http://developer.android.com/guide/topics/fundamentals.html
>>
>>Cheers
>>
>>On Tue, Mar 24, 2009 at 12:57 AM, Ward Willats  wrote:
>>>
>>>  Is there a way to tell when my task gets put on the back of the UI
>>>  stack (user pressed "home" say?) I have some resources I'd like to
>>>  free when not foregrounded.
>>>
>>>  The lifecycle routines seem dicey to use to try and infer this.
>>>
>>>  The "home" key does not seem to be passed to onKeyDown(), and
>>>  moveTaskToBack() is never called by the system so I can hook it.
>>>
>>>  I can poll the ActivityManager for running activities with my task
>>>  id, but hard to find a good time to call this.
>>>
>>>  Thanks
>>>
>>>  -- Ward
>>>
>>>  >
>>>
>>
>>
>
> >
>

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

2009-03-23 Thread Stoyan Damov

On Tue, Mar 24, 2009 at 2:12 AM, Mark Murphy  wrote:
>
> Stoyan Damov wrote:
>> Now, the thing is, why isn't this supported,
>> and would it be supported?
>
> FWIW, most of Typeface's logic is implemented in C via JNI. We'd need to
> modify lower-level firmware stuff to expose the right behaviors for
> Typeface to surface.

Hmm, this doesn't sound right. Unless Typeface calls into
package-private methods of AssetManager (haven't checked), it should
be able to construct a Typeface instance from any InputStream.

>
> I've logged this as:
>
> http://code.google.com/p/android/issues/detail?id=2284

Mark, you're like a bee, how come you're not as lazy as some of us on
the list and keep filing bug reports. Can't you just rant like us?
This makes us look bad ;)

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



[android-developers] Re: Cupcake coming in April? Where is the SDK?

2009-03-24 Thread Stoyan Damov

OK, I don't understand French, but someone is lying and it's not us, developers.

Android engineers say there's no date for cupcake, 1.5 SDK, etc., yet
there is this video of what appears to NOT be an Android 1.1 phone,
AND Vodaphone claims it will start selling them this April.

WTF???


On Wed, Mar 25, 2009 at 1:08 AM, roland  wrote:
>
> Here is a video of HTC Magic (French version)
>
> http://www.mobinaute.com/265180-videonaute-htc-magic-android-google.html
>
> On 24 mar, 19:46, "Al Sutton"  wrote:
>> The problem is that 1.1 was the most recent and the concern is that as the
>> latest release has a "device then SDK" order this may be seen as an
>> acceptable way to do things in the future.
>>
>> As for announcements of phones with cupcake. Vodafone have been saying since
>> February that they'll ship the HTC Magic in April 
>> (http://www.vodafone.com/start/media_relations/news/group_press_releas...
>> /vodafone_and_htc_unveil.html ) and HTC show the Magic as having CupCake
>> features such as video recording 
>> (http://www.htc.com/www/product/magic/overview.html)
>>
>> Al.
>>
>> -Original Message-
>> From: android-developers@googlegroups.com
>>
>> [mailto:android-develop...@googlegroups.com] On Behalf Of Romain Guy
>> Sent: 24 March 2009 17:49
>> To: android-developers@googlegroups.com
>> Subject: [android-developers] Re: Cupcake coming in April? Where is the SDK?
>>
>> All the SDKs released before 1.0 were no accident you know.
>>
>> So far, only the 1.1 SDK was released after the firmware (and not long after
>> at that.) I don't understand the point of this discussion. We know that the
>> SDK should be released before the bits are placed on actual devices and you
>> know that as well. Since there's been no announcement of Cupcake
>> availability on actual handsets, why all this fuss?
>>
>> On Tue, Mar 24, 2009 at 10:05 AM, Al Sutton  wrote:
>> > Dave,
>>
>> > I understand the effort involved, but the choice for any SDK is
>> > really;
>>
>> > a) Release the SDK before the devices and let developers test and
>> > prepare their apps.
>>
>> > b) Allow users to start buying a device which may not properly run the
>> > applications available from Market.
>>
>> > This is a no-brainer and in order to not appear like a piece of
>> > half-thought out technology the answer has to be a.
>>
>> > Apple understand this. Microsoft understand this. Symbian understand this.
>> > RIM understand this. This is why they all have developer programmes
>> > which give previews of upcoming OS releases and features. To ignore
>> > this fact is like signing a death warrant on the general publics
>> perception of Android.
>>
>> > I know that you're going to make every effort to make sure it does
>> > happen, but from a users point of view being told "well we did try"
>> > just doesn't cut the mustard. Being told they may encounter problems
>> > using applications from Googles market running on a Google branded
>> > phone downloaded directly on the 'phone is just going to look really
>> > poor. After all who wouldn't be mad if they bought a Ford car which
>> > turned up with an Ford accessories catalogue, bought some stuff from
>> > the accessories catalogue, waited for it to arrive, tried to fit it,
>> > find out it doesn't work, 'phone up Ford, only to be told "Oh yeah, we
>> > left it in the catalogue, but the accessory manufacturer had no way of
>> > testing if it worked because we couldn't do that for them" (although
>> > given Google Support Desk the user will probably just get told "It's an
>> app problem, it's the developers fault").
>>
>> > This is one of the few occasions where I think a marketing persons
>> > view could be of use.
>>
>> > Al.
>>
>> > 
>> > From: android-developers@googlegroups.com
>> > [mailto:android-develop...@googlegroups.com] On Behalf Of David Turner
>> > Sent: 24 March 2009 16:01
>> > To: android-developers@googlegroups.com
>> > Subject: [android-developers] Re: Cupcake coming in April? Where is the
>> SDK?
>>
>> > Hmm.. Despite the fact that this is what we want, we cannot make a
>> > guarantee that the Cupcake SDK will be officially released strictly
>> > before the platform is available on retail phones.
>>
>> > Properly testing and packaging a SDK takes a lot of time, we may
>> > encounter blocker bugs that have nothing to do with the software on the
>> phone (e.g.
>> > emulator crashes on platform X, ADB doesn't see emulator/devices on
>> > platform Y, etc..). While we test the SDK frequently during
>> > development, doing the necessary job to ensure that it's not going to
>> > break on the machines of all people who download it from the official
>> > repository takes some time. And then, the web site needs to be
>> > updated, especially the documentation needs to reflect the new features /
>> fixes / etc...
>>
>> > But apart from that, I don't see a reason why this SDK would lag
>> > behind, and as I said, we want it to be released ASAP.
>>
>> > On

[android-developers] Re: Cupcake coming in April? Where is the SDK?

2009-03-24 Thread Stoyan Damov

On Wed, Mar 25, 2009 at 2:45 AM, Dianne Hackborn  wrote:
> On Tue, Mar 24, 2009 at 5:04 PM, Stoyan Damov 
> wrote:
>>
>> Android engineers say there's no date for cupcake, 1.5 SDK, etc., yet
>> there is this video of what appears to NOT be an Android 1.1 phone,
>> AND Vodaphone claims it will start selling them this April.
>
> You can download the current tree and run cupcake today, and have been able
> to for a month or two.  Just because it is running on some hardware doesn't
> mean it is finished.
>
> I checked in a couple cupcake bug fixes today, so I can assure you that it
> is not yet done.
>

Dianne, I understand that. But I'm *pretty* sure Vodafone won't
announce that the device will be shipped in April if it's not going to
be, so my bet is that
whatever-you-call-the-stable-version-of-Android-up-to-Vodafone-launch
is going to be finished, and stable before Vodafone starts selling the
devices. So, unless Vodafone engineers are fixing bugs like crazy, I
can't be possibly convinced there's no INTERNAL deadline date, which
Google Android engineers don't know about.

Cheers

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



[android-developers] TERRIBLE BUG: aapt crashes on Windows

2009-03-25 Thread Stoyan Damov

This is a showstopper, and I'm experiencing for the 2nd time.

Shouldn't be hard to find, if the apt tool developers have created a
.map file for the release build.
It seems like the dev has dereferenced a null pointer (see below).

I didn't do anything fancy. Just added a dozen lines of code and tried
to build. I don't remember the URL for bug reports, so here it is. If
Mark's not lazy, he could file the bug ;)

Environment: WinXP SP2, Eclipse 3.4.1, SDK 1.1

Stack trace -- useless to me, but that's what you get for not shipping
symbols (lack of Windows symbols is my bad but I reinstalled my
machine fairly recently and didn't need them).

>   aapt.exe!004363b2() 
[Frames below may be incorrect and/or missing, no symbols loaded for
aapt.exe]
ntdll.dll!7c9106eb()
aapt.exe!0040df1c() 
aapt.exe!0043a05c() 
aapt.exe!0040dd14() 
ntdll.dll!7c9106eb()
aapt.exe!0043a05c() 
...

Assembly around the crash:

0043638F  jae 004363B8
00436391  cmp word ptr [edx],7Ch
00436395  jmp 004363B6
00436397  add dword ptr [ebp-8Ch],2
0043639E  mov edx,dword ptr [ebp-88h]
004363A4  cmp dword ptr [ebp-8Ch],edx
004363AA  jae 004363B8
004363AC  mov ecx,dword ptr [ebp-8Ch]  // *ecx is 0 (see below)
004363B2  cmp word ptr [ecx],7Ch <--- breaks here,
crash is on mov above
004363B6  jne 00436397
004363B8  xor edx,edx
004363BA  mov edi,eax

Registers:

EAX = 00FC79DC EBX = 0053 ECX = 012FA000 EDX = 012FA008 ESI =
012F9F50 EDI = 00FC7A5C EIP = 004363B2 ESP = 0022F5F0 EBP = 0022F6A8
EFL = 0293

012FA000 = 

Memory around ECX:

0x012F9F50  6d 00 63 00 63 00 7c 00 6d 00 6e 00 63 00 7c 00 6c 00 6f
00 63 00 61 00 6c 00 65 00 7c 00 74 00 6f 00 75 00 63 00 68 00 73 00
63 00  m.c.c.|.m.n.c.|.l.o.c.a.l.e.|.t.o.u.c.h.s.c.
0x012F9F7C  72 00 65 00 65 00 6e 00 7c 00 6b 00 65 00 79 00 62 00 6f
00 61 00 72 00 64 00 7c 00 6b 00 65 00 79 00 62 00 6f 00 61 00 72 00
64 00  r.e.e.n.|.k.e.y.b.o.a.r.d.|.k.e.y.b.o.a.r.d.
0x012F9FA8  48 00 69 00 64 00 64 00 65 00 6e 00 7c 00 6e 00 61 00 76
00 69 00 67 00 61 00 74 00 69 00 6f 00 6e 00 7c 00 6f 00 72 00 69 00
65 00  H.i.d.d.e.n.|.n.a.v.i.g.a.t.i.o.n.|.o.r.i.e.
0x012F9FD4  6e 00 74 00 61 00 74 00 69 00 6f 00 6e 00 7c 00 66 00 6f
00 6e 00 74 00 53 00 63 00 61 00 6c 00 65 00 00 00 30 00 00 00 00 00
00 00  n.t.a.t.i.o.n.|.f.o.n.t.S.c.a.l.e...0...
0x012FA000  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00  
0x012FA02C  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00  
0x012FA058  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00  

*PLEASE*, fix this ASAP :(

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

2009-03-25 Thread Stoyan Damov

Found the URL for bug submissions, submitted here --
http://code.google.com/p/android/issues/detail?id=2301

On Thu, Mar 26, 2009 at 12:38 AM, Stoyan Damov  wrote:
> This is a showstopper, and I'm experiencing for the 2nd time.
>
> Shouldn't be hard to find, if the apt tool developers have created a
> .map file for the release build.
> It seems like the dev has dereferenced a null pointer (see below).
>
> I didn't do anything fancy. Just added a dozen lines of code and tried
> to build. I don't remember the URL for bug reports, so here it is. If
> Mark's not lazy, he could file the bug ;)
>
> Environment: WinXP SP2, Eclipse 3.4.1, SDK 1.1
>
> Stack trace -- useless to me, but that's what you get for not shipping
> symbols (lack of Windows symbols is my bad but I reinstalled my
> machine fairly recently and didn't need them).
>
>>       aapt.exe!004363b2()
>        [Frames below may be incorrect and/or missing, no symbols loaded for
> aapt.exe]
>        ntdll.dll!7c9106eb()
>        aapt.exe!0040df1c()
>        aapt.exe!0043a05c()
>        aapt.exe!0040dd14()
>        ntdll.dll!7c9106eb()
>        aapt.exe!0043a05c()
> ...
>
> Assembly around the crash:
>
> 0043638F  jae         004363B8
> 00436391  cmp         word ptr [edx],7Ch
> 00436395  jmp         004363B6
> 00436397  add         dword ptr [ebp-8Ch],2
> 0043639E  mov         edx,dword ptr [ebp-88h]
> 004363A4  cmp         dword ptr [ebp-8Ch],edx
> 004363AA  jae         004363B8
> 004363AC  mov         ecx,dword ptr [ebp-8Ch]  // *ecx is 0 (see below)
> 004363B2  cmp         word ptr [ecx],7Ch <--- breaks here,
> crash is on mov above
> 004363B6  jne         00436397
> 004363B8  xor         edx,edx
> 004363BA  mov         edi,eax
>
> Registers:
>
> EAX = 00FC79DC EBX = 0053 ECX = 012FA000 EDX = 012FA008 ESI =
> 012F9F50 EDI = 00FC7A5C EIP = 004363B2 ESP = 0022F5F0 EBP = 0022F6A8
> EFL = 0293
>
> 012FA000 = 
>
> Memory around ECX:
>
> 0x012F9F50  6d 00 63 00 63 00 7c 00 6d 00 6e 00 63 00 7c 00 6c 00 6f
> 00 63 00 61 00 6c 00 65 00 7c 00 74 00 6f 00 75 00 63 00 68 00 73 00
> 63 00  m.c.c.|.m.n.c.|.l.o.c.a.l.e.|.t.o.u.c.h.s.c.
> 0x012F9F7C  72 00 65 00 65 00 6e 00 7c 00 6b 00 65 00 79 00 62 00 6f
> 00 61 00 72 00 64 00 7c 00 6b 00 65 00 79 00 62 00 6f 00 61 00 72 00
> 64 00  r.e.e.n.|.k.e.y.b.o.a.r.d.|.k.e.y.b.o.a.r.d.
> 0x012F9FA8  48 00 69 00 64 00 64 00 65 00 6e 00 7c 00 6e 00 61 00 76
> 00 69 00 67 00 61 00 74 00 69 00 6f 00 6e 00 7c 00 6f 00 72 00 69 00
> 65 00  H.i.d.d.e.n.|.n.a.v.i.g.a.t.i.o.n.|.o.r.i.e.
> 0x012F9FD4  6e 00 74 00 61 00 74 00 69 00 6f 00 6e 00 7c 00 66 00 6f
> 00 6e 00 74 00 53 00 63 00 61 00 6c 00 65 00 00 00 30 00 00 00 00 00
> 00 00  n.t.a.t.i.o.n.|.f.o.n.t.S.c.a.l.e...0...
> 0x012FA000  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00  
> 0x012FA02C  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00  
> 0x012FA058  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00  
>
> *PLEASE*, fix this ASAP :(
>

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

2009-03-25 Thread Stoyan Damov

David,

I can't provide a way to reproduce the problem. This is not a problem,
it is a crash. It's not like I'm tapping this menu here, and that
button there and something crashes.
I can't possibly know how and what the aapt tool does. Like I said, I
added probably 50 lines of code tops, tried to build and the tool
crashed.
I did try to rollback the code (as I think it was), but it didn't
help. I deleted the bin folder again to no avail.

David, I just saw your next post. What syntax are you interested in?
I'm just building from Eclipse with the default SDK 1.1 installation,
I'm not passing any extra parameters to aapt.

I don't understand what's the big deal for the tool's developer to
just open the .map file of the release build (provided that he created
such file), find the function near the crash address and see what's
the problem.
I understand that if the appt tool implements a parser or something
which has been partly code-gen'ed by another tool, which has generated
functions with thousands of lines of code it will be a lot more
difficult, but if that's not the case, finding the bug should be a
matter of minutes.

In the mean time I'll rollback my code from version control and will
try re-adding and rebuilding until I see what causes the tool to
crash.

On Thu, Mar 26, 2009 at 1:02 AM, David Turner  wrote:
> It would be better if you could provide a way to reproduce the problem.
> try b.android.com to report the problem
>
> On Wed, Mar 25, 2009 at 11:38 PM, Stoyan Damov 
> wrote:
>>
>> This is a showstopper, and I'm experiencing for the 2nd time.
>>
>> Shouldn't be hard to find, if the apt tool developers have created a
>> .map file for the release build.
>> It seems like the dev has dereferenced a null pointer (see below).
>>
>> I didn't do anything fancy. Just added a dozen lines of code and tried
>> to build. I don't remember the URL for bug reports, so here it is. If
>> Mark's not lazy, he could file the bug ;)
>>
>> Environment: WinXP SP2, Eclipse 3.4.1, SDK 1.1
>>
>> Stack trace -- useless to me, but that's what you get for not shipping
>> symbols (lack of Windows symbols is my bad but I reinstalled my
>> machine fairly recently and didn't need them).
>>
>> >       aapt.exe!004363b2()
>>        [Frames below may be incorrect and/or missing, no symbols loaded
>> for
>> aapt.exe]
>>        ntdll.dll!7c9106eb()
>>        aapt.exe!0040df1c()
>>        aapt.exe!0043a05c()
>>        aapt.exe!0040dd14()
>>        ntdll.dll!7c9106eb()
>>        aapt.exe!0043a05c()
>> ...
>>
>> Assembly around the crash:
>>
>> 0043638F  jae         004363B8
>> 00436391  cmp         word ptr [edx],7Ch
>> 00436395  jmp         004363B6
>> 00436397  add         dword ptr [ebp-8Ch],2
>> 0043639E  mov         edx,dword ptr [ebp-88h]
>> 004363A4  cmp         dword ptr [ebp-8Ch],edx
>> 004363AA  jae         004363B8
>> 004363AC  mov         ecx,dword ptr [ebp-8Ch]  // *ecx is 0 (see below)
>> 004363B2  cmp         word ptr [ecx],7Ch <--- breaks here,
>> crash is on mov above
>> 004363B6  jne         00436397
>> 004363B8  xor         edx,edx
>> 004363BA  mov         edi,eax
>>
>> Registers:
>>
>> EAX = 00FC79DC EBX = 0053 ECX = 012FA000 EDX = 012FA008 ESI =
>> 012F9F50 EDI = 00FC7A5C EIP = 004363B2 ESP = 0022F5F0 EBP = 0022F6A8
>> EFL = 0293
>>
>> 012FA000 = 
>>
>> Memory around ECX:
>>
>> 0x012F9F50  6d 00 63 00 63 00 7c 00 6d 00 6e 00 63 00 7c 00 6c 00 6f
>> 00 63 00 61 00 6c 00 65 00 7c 00 74 00 6f 00 75 00 63 00 68 00 73 00
>> 63 00  m.c.c.|.m.n.c.|.l.o.c.a.l.e.|.t.o.u.c.h.s.c.
>> 0x012F9F7C  72 00 65 00 65 00 6e 00 7c 00 6b 00 65 00 79 00 62 00 6f
>> 00 61 00 72 00 64 00 7c 00 6b 00 65 00 79 00 62 00 6f 00 61 00 72 00
>> 64 00  r.e.e.n.|.k.e.y.b.o.a.r.d.|.k.e.y.b.o.a.r.d.
>> 0x012F9FA8  48 00 69 00 64 00 64 00 65 00 6e 00 7c 00 6e 00 61 00 76
>> 00 69 00 67 00 61 00 74 00 69 00 6f 00 6e 00 7c 00 6f 00 72 00 69 00
>> 65 00  H.i.d.d.e.n.|.n.a.v.i.g.a.t.i.o.n.|.o.r.i.e.
>> 0x012F9FD4  6e 00 74 00 61 00 74 00 69 00 6f 00 6e 00 7c 00 66 00 6f
>> 00 6e 00 74 00 53 00 63 00 61 00 6c 00 65 00 00 00 30 00 00 00 00 00
>> 00 00  n.t.a.t.i.o.n.|.f.o.n.t.S.c.a.l.e...0...
>> 0x012FA000  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> 00 00  
>> 0x012FA02C  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> 00 00 00 00 00 

[android-developers] Re: TERRIBLE BUG: aapt crashes on Windows

2009-03-25 Thread Stoyan Damov

On Thu, Mar 26, 2009 at 1:13 AM, Marco Nelissen  wrote:
>
> On Wed, Mar 25, 2009 at 3:38 PM, Stoyan Damov  wrote:
>>
>> This is a showstopper, and I'm experiencing for the 2nd time.
>>
>> Shouldn't be hard to find, if the apt tool developers have created a
>> .map file for the release build.
>> It seems like the dev has dereferenced a null pointer (see below).
>
> 012FA000 is not null :)

Yes, my bad, I thought the code was dereferencing *ecx, which it isn't :(
Anyway, the crash is consistently happening in the same place.
Also, my comment on finding the function where the crash occurred by
opening the release build's .map file still holds.

>
> Are you using any ninepatches with a large number of stretch regions,
> by any chance? If so, that bug has already been reported and is fixed
> in cupcake.

Nothing like that. I've just added a very simple class, and used it in another.

>
> >
>

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

2009-03-25 Thread Stoyan Damov

Actually it might be exactly deferencing a null pointer!

It's possible that I'm mistaken that if the debugger breaks on a line,
the error occurred on the line above.
In this case, the crash would be here:

004363AC  mov ecx,dword ptr [ebp-8Ch]
004363B2  cmp word ptr [ecx],7Ch < HERE, where it breaks

and word ptr [ecx] points exactly 0 (*012FA000 points 0)

So, now that the crash reason is clear, get the dev working on that!!! :)

Cheers

On Thu, Mar 26, 2009 at 1:18 AM, Stoyan Damov  wrote:
> On Thu, Mar 26, 2009 at 1:13 AM, Marco Nelissen  wrote:
>>
>> On Wed, Mar 25, 2009 at 3:38 PM, Stoyan Damov  wrote:
>>>
>>> This is a showstopper, and I'm experiencing for the 2nd time.
>>>
>>> Shouldn't be hard to find, if the apt tool developers have created a
>>> .map file for the release build.
>>> It seems like the dev has dereferenced a null pointer (see below).
>>
>> 012FA000 is not null :)
>
> Yes, my bad, I thought the code was dereferencing *ecx, which it isn't :(
> Anyway, the crash is consistently happening in the same place.
> Also, my comment on finding the function where the crash occurred by
> opening the release build's .map file still holds.
>
>>
>> Are you using any ninepatches with a large number of stretch regions,
>> by any chance? If so, that bug has already been reported and is fixed
>> in cupcake.
>
> Nothing like that. I've just added a very simple class, and used it in 
> another.
>
>>
>> >>
>>
>

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

2009-03-25 Thread Stoyan Damov

On Thu, Mar 26, 2009 at 1:37 AM, Mark Murphy  wrote:
>
> Stoyan Damov wrote:
>> I can't provide a way to reproduce the problem.
>
> 1. Create a fresh project.
>
> 2. Copy your entire res/ tree out of your current project into the fresh
> project.
>
> 3. Try building.

Will try. If this helps, I will be very much in debt to you.

>
> If the build crashes, then zip up the new project and attach it to the
> issue.

You're kidding right? I should attach the source code of my paid application?

> Or, try winnowing out some resources (e.g., ones you might not
> want to upload) and see if the problem persists -- if the problem goes
> away, it may be tied to the resources you removed.

I'm saying this for the last time tonight. I haven't added ANY
resources. I've created a class, and used it in another one. That's it
- wrote some code.

>
> If that doesn't crash, then the problem depends on other stuff (e.g.,
> your original project's manifest, other build settings you may have
> enabled) and may truly be difficult to reproduce without uploading your
> original app, which I suspect you may be less than inclined to do.

No, I haven't enabled anything and I stated that. Perhaps I should be
more clear - everything is vanilla installation - SDK 1.1 with Eclipse
3.4.1 with no tweaks whatsoever.
The last time I built the code successfully was an hour ago for crying
out loud. Then I wrote some code and aapt crashes. Is it clear now?

>
> But if you really want this "TERRIBLE BUG" fixed, you really should
> consider at least trying to give the developers steps to reproduce the
> crash.
>

I very much doubt it WILL get fixed. I can see clearly that no one
wants to fix it.

> -



The information I provided (consistent crash address and assembly
around it) should be sufficient to any skilled Windows C++ developer
to find the bug in 10 minutes, provided that the appt tool was built
with Microsoft Visual Studio, or another toolchain, which has the
equivalent of VS's .map files.

That is why, knowing that Android engineers are indeed skilled, I'm
left with the impression, that they do not want to fix the bug, most
probably because of the fact that I'm again the single guy reporting
the bug.

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



WORKED AROUND (was Re: [android-developers] Re: TERRIBLE BUG: aapt crashes on Windows)

2009-03-25 Thread Stoyan Damov

HOW HORRIBLE bug is this?!?!?!

I started experimenting what would happen if I comment out an
activity, and so I did - I commented out a RANDOM activity in
AndroidManifest.xml and WHAT THE ..., the build SUCCEEDED.

And I just sensed that this bug is SO RIDICULOUS that I should
probably remove the comment, but simply add a few blank lines to the
manifest file. And VOILA - my build succeeds.

WHAT THE !...@#$!!!


On Thu, Mar 26, 2009 at 1:59 AM, Stoyan Damov  wrote:
> On Thu, Mar 26, 2009 at 1:37 AM, Mark Murphy  wrote:
>>
>> Stoyan Damov wrote:
>>> I can't provide a way to reproduce the problem.
>>
>> 1. Create a fresh project.
>>
>> 2. Copy your entire res/ tree out of your current project into the fresh
>> project.
>>
>> 3. Try building.
>
> Will try. If this helps, I will be very much in debt to you.
>
>>
>> If the build crashes, then zip up the new project and attach it to the
>> issue.
>
> You're kidding right? I should attach the source code of my paid application?
>
>> Or, try winnowing out some resources (e.g., ones you might not
>> want to upload) and see if the problem persists -- if the problem goes
>> away, it may be tied to the resources you removed.
>
> I'm saying this for the last time tonight. I haven't added ANY
> resources. I've created a class, and used it in another one. That's it
> - wrote some code.
>
>>
>> If that doesn't crash, then the problem depends on other stuff (e.g.,
>> your original project's manifest, other build settings you may have
>> enabled) and may truly be difficult to reproduce without uploading your
>> original app, which I suspect you may be less than inclined to do.
>
> No, I haven't enabled anything and I stated that. Perhaps I should be
> more clear - everything is vanilla installation - SDK 1.1 with Eclipse
> 3.4.1 with no tweaks whatsoever.
> The last time I built the code successfully was an hour ago for crying
> out loud. Then I wrote some code and aapt crashes. Is it clear now?
>
>>
>> But if you really want this "TERRIBLE BUG" fixed, you really should
>> consider at least trying to give the developers steps to reproduce the
>> crash.
>>
>
> I very much doubt it WILL get fixed. I can see clearly that no one
> wants to fix it.
>
>> -
>
> 
>
> The information I provided (consistent crash address and assembly
> around it) should be sufficient to any skilled Windows C++ developer
> to find the bug in 10 minutes, provided that the appt tool was built
> with Microsoft Visual Studio, or another toolchain, which has the
> equivalent of VS's .map files.
>
> That is why, knowing that Android engineers are indeed skilled, I'm
> left with the impression, that they do not want to fix the bug, most
> probably because of the fact that I'm again the single guy reporting
> the bug.
>

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

2009-03-25 Thread Stoyan Damov

On Thu, Mar 26, 2009 at 2:09 AM, David Turner  wrote:
>
>
> On Thu, Mar 26, 2009 at 12:12 AM, Stoyan Damov 
> wrote:
>>
>> David,
>>
>> I can't provide a way to reproduce the problem. This is not a problem,
>> it is a crash. It's not like I'm tapping this menu here, and that
>> button there and something crashes.
>
> A crash is a problem. We need the input that aapt receives to be able to
> reproduce and analyze the crash, otherwise even having the symbols is not
> going to help tremendously.

David, give me a break. The tool should have been instrumented in the
1st place to catch these crashes (SetUnhandledExceptionFilter and
MiniDumpWriteDump ring a bell?).

> I understand that you can't send your whole project to the bug tracker, but
> can you repeat the crash with a simpler program that you could share ?
> If this is not possible, what kind of things did you add to reproduce the
> crash. Can you remove half of what you added and still reproduce the crash ?
> Can you find the exact culprit in your additions ? Does adding even more
> code, or changing a few things in it gets rid of the crash ?
> As said previously, if we can't reproduce this, chances of debugging it are
> pretty dim.

If you've seen the workaround post you've noticed that I did try to
change something.
Actually first I rolled back to what I had in SVN. It worked. I then
tried to figure out how to start adding the new stuff (I've written
more than those lines today, and haven't committed) incrementally. And
then I decided to first check what would happen if I simply remove the
new activity I've added today from the manifest file, -- the rest you
can see in the post.

However, make the difference -- this is not a bug report in the lines
of "aapt.exe crashed". I gave enough (for me at least) information how
to get from the crash address to the actual culprit code in aapt.

Cheers

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



[android-developers] Re: TERRIBLE BUG: aapt crashes on Windows

2009-03-25 Thread Stoyan Damov

Mark,

It would be nice, if you stopped playing Google's advocate for one day :)

If my game crashes, I'm the ONLY one to suffer the consequences.
If a tool, such as appt crashes, it could seize the development of
unlimited number of development companies (and affect even more
users).

Plus, I do handle all kinds of errors (both checked and unchecked
exceptins), if these are expected to happen. I don't handle
exceptions, such as OutOfMemoryException, or one denying me read
permissions to files my app has previously created.

Cheers

On Thu, Mar 26, 2009 at 2:21 AM, Mark Murphy  wrote:
>
> Stoyan Damov wrote:
>> David, give me a break. The tool should have been instrumented in the
>> 1st place to catch these crashes (SetUnhandledExceptionFilter and
>> MiniDumpWriteDump ring a bell?).
>
> To quote yourself:
>
> "Am I supposed to wrap ALL my code in exception handlers? What good if
> I do that?"
>
> (from http://tinyurl.com/ct3fcf)
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com
> Warescription: Three Android Books, Plus Updates, $35/Year
>
> >
>

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



[android-developers] Re: TERRIBLE BUG: aapt crashes on Windows

2009-03-25 Thread Stoyan Damov

Now that I can continue working, and being the single developer
experienced this particular crash, and realizing I was being very
harsh to Android engineers tonight, I *want* to help others.

I can reproduce the crash ALL I want. I just remove a single empty
line in AndroidManifest.xml and the crash occurs. Add the line and the
crash is gone.

Is appt open source, where can I get the source code, and how do I
build it on Windows, so I can debug and fix the bug?

Cheers

On Thu, Mar 26, 2009 at 2:17 AM, Stoyan Damov  wrote:
> On Thu, Mar 26, 2009 at 2:09 AM, David Turner  wrote:
>>
>>
>> On Thu, Mar 26, 2009 at 12:12 AM, Stoyan Damov 
>> wrote:
>>>
>>> David,
>>>
>>> I can't provide a way to reproduce the problem. This is not a problem,
>>> it is a crash. It's not like I'm tapping this menu here, and that
>>> button there and something crashes.
>>
>> A crash is a problem. We need the input that aapt receives to be able to
>> reproduce and analyze the crash, otherwise even having the symbols is not
>> going to help tremendously.
>
> David, give me a break. The tool should have been instrumented in the
> 1st place to catch these crashes (SetUnhandledExceptionFilter and
> MiniDumpWriteDump ring a bell?).
>
>> I understand that you can't send your whole project to the bug tracker, but
>> can you repeat the crash with a simpler program that you could share ?
>> If this is not possible, what kind of things did you add to reproduce the
>> crash. Can you remove half of what you added and still reproduce the crash ?
>> Can you find the exact culprit in your additions ? Does adding even more
>> code, or changing a few things in it gets rid of the crash ?
>> As said previously, if we can't reproduce this, chances of debugging it are
>> pretty dim.
>
> If you've seen the workaround post you've noticed that I did try to
> change something.
> Actually first I rolled back to what I had in SVN. It worked. I then
> tried to figure out how to start adding the new stuff (I've written
> more than those lines today, and haven't committed) incrementally. And
> then I decided to first check what would happen if I simply remove the
> new activity I've added today from the manifest file, -- the rest you
> can see in the post.
>
> However, make the difference -- this is not a bug report in the lines
> of "aapt.exe crashed". I gave enough (for me at least) information how
> to get from the crash address to the actual culprit code in aapt.
>
> Cheers
>

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



[android-developers] Re: TERRIBLE BUG: aapt crashes on Windows

2009-03-25 Thread Stoyan Damov

On Thu, Mar 26, 2009 at 2:36 AM, David Turner  wrote:
> On Thu, Mar 26, 2009 at 1:17 AM, Stoyan Damov 



> As I said previously, we need the input passed to aapt, or at a minimum some
> information about the things that contributed to the crash (e.g. your
> manifest file,
> for example).

I don't have a problem sharing my manifest file, but here's the
current difference between a manifests with which the app builds, and
one it doesn't - a SINGLE empty line.
For example, if my manifest contains these lines:





it will build.



> there is not enough detail in your work-around post to infer *anything*
> about the origin of the crash. For example, can you share two versions of
> your manifest files (one that doesn't crash, and the other that does,
> preferrably with as few changes as possible between them)?
> Do you understand that I'm trying to help fix the problem for you and other
> people that might encounter it in the future?

I'm not sure. A crash address, contrary to your opinion about it is
quite a bit of information. It is almost a direct pointer to the
crashing function.

> Ranting with CAPITAL LETTERS without trying to provide a minimum amount of
> information is   a disservice to other developers and the people trying to
> help you.

Sorry for the CAPS LOCK rants, but you can imagine how annoyed I was.

>
>>
>> However, make the difference -- this is not a bug report in the lines
>> of "aapt.exe crashed". I gave enough (for me at least) information how
>> to get from the crash address to the actual culprit code in aapt.
>
> a crash address is not enough information.

In some cases perhaps, in many cases, especially if the code is
written with many small functions, as opposed to a few big ones, it's
quite enough.

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

2009-03-25 Thread Stoyan Damov

On Thu, Mar 26, 2009 at 2:39 AM, Mark Murphy  wrote:
>
> Stoyan Damov wrote:
>> It would be nice, if you stopped playing Google's advocate for one day :)
>
> You mean like this:
>
> http://www.networkworld.com/community/node/40044
> http://www.networkworld.com/community/node/39099
> http://www.networkworld.com/community/node/38830
>
> and many others?

Heh, touche :)

>
> Trust me, "I calls 'em as I sees 'em".
>
> I just don't tend to bash Google/OHA on these lists too much, because
> that will be more likely to be seen as personal attacks on the core
> Android team, and they aren't the source of my ire.

Agreed. What if they are? ;)

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

2009-03-25 Thread Stoyan Damov

On Thu, Mar 26, 2009 at 2:43 AM, Dianne Hackborn  wrote:
> On Wed, Mar 25, 2009 at 4:59 PM, Stoyan Damov 
> wrote:
>>
>> The information I provided (consistent crash address and assembly
>> around it) should be sufficient to any skilled Windows C++ developer
>> to find the bug in 10 minutes, provided that the appt tool was built
>> with Microsoft Visual Studio, or another toolchain, which has the
>> equivalent of VS's .map files.
>
> I am the primary developer of the tool, and the computer I do my development
> on is a Mac.  I don't have a Windows machine, and have no idea how to build
> that tool for windows.

OK, I understand. Who builds the tool for the Windows SDK then? What
tools are used to build it?
So, is the tool open source, where's the source, and if you could ask
who builds the tool for Windows, what tools are used to build it and
how is it built?

>
> If you give me a test case then I can run it on my machine and debug it.
> Very likely the place it crashes is not going to tell a whole lot about the
> problem (I have enough experience debugging aapt to have been through this),
> so being able to reproduce the problem will help me spend a lot less time on
> fixing it -- I can turn on debugging logs to identify what is going on, etc.

A single empty line between 2 activities in the AndroidManifest.xml
make the difference.

>
> That said, you are acting like you expect someone to drop what they are
> doing today to spend all of their time on this bug.  I'm sorry, but it isn't
> going to happen -- a bug fix for this would be in the next SDK, which means
> probably cupcake, so you won't have an SDK with a fix for it until then.

Whoa, so if I couldn't workaround the problem I should seize
development? Now that's great!

> Also we are still focused on development on the device-side parts of Cupcake
> (since those need to be ready first for schedules, to be burned on devices
> as they are manufactured), so fixes on tools in general will be held up
> until we are ready to work on that part.

And here we go again with the cupcake thing (a bit off-topic).
Schedules were non-existent yesterday, today you're chasing deadlines?
Other than that I understand fixing tools is with lesser priority, but
at least we need the source code and build instructions so we can fix
them and continue our work!

>
> Finally, if this is really such a critical issue that you can't do anything
> else until it is addressed, you -do- have the power to build aapt yourself
> and debug it.  You aren't reliant on Google to do things for you.  That's
> the give and take we have here: Google is giving away a bunch of stuff to
> the OHA for Android so lots of people can use it for free, but because we
> are not being paid for any of this work it is hard to have people who can
> drop everything for a problem that a particular developer is having.

OK, this answers my previous questions. aapt is open source, and it's
somewhere. Now I only need to figure out how to build it.

> I -do- want to have this fixed.  I won't be able to do it today or probably
> even tomorrow.  It is also much easier to fix with a test case; without a
> test case, I can anticipate spending a lot more time on it (just figuring
> out how to get a windows build) so it will naturally be lower on my list of
> priorties than other things that I can spend less time on for a bigger
> benefit.

Understood.

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

2009-03-25 Thread Stoyan Damov

On Thu, Mar 26, 2009 at 2:42 AM, David Turner  wrote:
>
>> I can reproduce the crash ALL I want. I just remove a single empty
>> line in AndroidManifest.xml and the crash occurs. Add the line and the
>> crash is gone.
>
> can you attach these two files to the bug report?

Attached

> Please follow the instructions here: http://source.android.com/download
> The aapt sources are located in platform/frameworks/base/tools/aapt
>

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: TERRIBLE BUG: aapt crashes on Windows

2009-03-25 Thread Stoyan Damov

On Thu, Mar 26, 2009 at 2:50 AM, Dianne Hackborn  wrote:
> On Wed, Mar 25, 2009 at 5:44 PM, Stoyan Damov 
>
> Can you please just provide a complete example that doesn't work?  We have
> lots of manifest files with spaces in them.  This isn't enough to help
> reproduce the problem.

I have attached the 2 manifest files to the issue.

>> >> However, make the difference -- this is not a bug report in the lines
>> >> of "aapt.exe crashed". I gave enough (for me at least) information how
>> >> to get from the crash address to the actual culprit code in aapt.
>> > a crash address is not enough information.
>> In some cases perhaps, in many cases, especially if the code is
>> written with many small functions, as opposed to a few big ones, it's
>> quite enough.
>
> It really doesn't make sense to be treating this as a SUPER SERIOUS MUST BE
> FIXED bug, and push off requests for help.  Doesn't it make sense that it
> would be easier to debug if someone can look at the input files aapt is
> getting to know what it is trying to do?  If it isn't important enough for
> you to spend some of your time helping diagnose the problem, why should
> anyone else believe that it is actually that important?

This is a "super super serious must be fixed asfp" bug because perhaps
tomorrow a CR/LF won't help!
Of course it makes sense that a sample input to the parser would help,
and I did provided one.

I still insist that a crash address is extremely helpful and in many
cases all you need to know to find a bug, but now that you said you
primarily develop on mac, I'm not sure whether gcc's map files are as
useful as VC's ones (although I suspect they are).

> Anyway, I have other work I need to do today, so I'll be looking forward to
> the bug being updated with a repro case.  (Or would love to have a patch for
> aapt submitted that fixes it!)

So did I :(

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

2009-03-26 Thread Stoyan Damov

On Wed, Mar 25, 2009 at 11:02 PM, Romain Guy  wrote:
>
> The trick is simple: avoid any allocation that might trigger a GC.
>

It's not that simple at all.
In fact, it is *impossible* on Android, or any other mobile OS which
allows background processes.

I've already said this once -- even though your game can be tuned to
the max, nothing prevents *other* apps from triggering GC.
That is, in my game, I *never*, *ever* do any allocation after startup.
However, other background processes do trigger GC, and voila - my game
stutters for a bit when GC kicks in.

Compare to iPhone, which disallows background processing and the
foreground app is never interrupted.

Cheers

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



[android-developers] Re: Anything on Android that can do smooth scrolling?

2009-03-26 Thread Stoyan Damov

I've also proposed a solution to this - adding a permission for apps
to request that they run alone, uninterrupted by other processes.

That is, the app can request a permission, demanding that the app can
only be interrupted by an external event, such as phone call, all
other services and background processes (other than the ones the OS
can't go without) are paused when app is running.

I know it's quite tricky to implement this, because, for example, when
an SMS is received it needs to be stored in the database, and this
will require some memory, which will need to be discarded, when the
SMS is written to the database, and this will trigger GC. However,
when such a message is received, and the OS knows that an app with the
special permission runs in the foreground, it could delay the GC
either until:

- the app itself allocates memory (no matter if it might not be
actually GC'ed until the app finishes) OR
- the systems goes pretty low on memory

At least, non-stock services (i.e. services, developed by 3rd parties)
can be suspended during the lifetime of an application requesting the
special permission.

Cheers


On Thu, Mar 26, 2009 at 11:51 AM, Stoyan Damov  wrote:
> On Wed, Mar 25, 2009 at 11:02 PM, Romain Guy  wrote:
>>
>> The trick is simple: avoid any allocation that might trigger a GC.
>>
>
> It's not that simple at all.
> In fact, it is *impossible* on Android, or any other mobile OS which
> allows background processes.
>
> I've already said this once -- even though your game can be tuned to
> the max, nothing prevents *other* apps from triggering GC.
> That is, in my game, I *never*, *ever* do any allocation after startup.
> However, other background processes do trigger GC, and voila - my game
> stutters for a bit when GC kicks in.
>
> Compare to iPhone, which disallows background processing and the
> foreground app is never interrupted.
>
> Cheers
>

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



[android-developers] Re: HttpGet.addHeader

2009-03-26 Thread Stoyan Damov

What happens if you do this instead:

method.getParams().setParameter("http.useragent", this.user_agent_id);

?

On Thu, Mar 26, 2009 at 2:54 PM, zeeshan  wrote:
>
> Hi Experts,
>
> i am trying to add header on HttpGet but it raise this exception
> "InvocationTargetException"
>
> here is my code:
>
> DefaultHttpClient client = new DefaultHttpClient();
>            HttpGet method = null;
>            HttpResponse resp = null;
>
>
> String url = "http://www.x.com/a.xml";;
>
>        method.addHeader("Connection","Keep-Alive");
>        /*method.addHeader("accept-language",this.accept_language);
>        method.addHeader("user-agent-id",this.user_agent_id);*/
>
>        method = new HttpGet( new URI(url) );
>
>
> i also used setHeader but same error
>
> please help me out
> >
>

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

2009-03-26 Thread Stoyan Damov

On Thu, Mar 26, 2009 at 1:47 PM, admin.androidsl...@googlemail.com
 wrote:
>
> Thanks for the responses guys.
>
> My question was more like how come its smooth in the picture viewer
> app despite running multi processes? Its the only 2d app I've found
> that does this correctly, but its reassuring to know it DOES work.
>

Please, read carefully:

Running multiple processes is not a problem. If, however, a process
triggers GC you'll see stuttering in the picture viewer as well, and
*any* application, no matter how great was it implemented.
Let me explain what I'm talking about:

There's a myFaves service on the G1.
Apparently it tries to send an MMS once, or once in a while to T-Mobile.
Because my G1 is unlocked and running on a different network, the MMS
transmission fails.
However, myFaves won't give up and will try sending the MMS.

When I got my unlocked G1 December last year, it had the 1.0 firmware.
Perhaps the myFaves service was running very very rarely because I've
never seen my game stutter, even though many background processes were
in fact running.
That is, perhaps I was testing the game on the device when myFaves was
not trying to send the MMS.

When the OTA updated the firmware to 1.1, the myFaves service started
to attempt to send an MMS to T-Mobile more often.
This triggers GC for exactly 110 objects and N bytes of memory, and my
game stutters *every* time the myFaves service is attempting to send
an MMS (apparently, it will *always* try sending the god damn MMS
because I'm not on T-Mobile's network).

So, my point is not that background processes per se are the problem,
but these who actually perform any work which might trigger GC.

Cheers

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



[android-developers] Re: need some collection help

2009-03-26 Thread Stoyan Damov

I don't understand what are you really asking? Whether arrays are
faster than collection classes? Yes, they are faster, but you have to
manage their contents (insertions, deletions, etc.) yourself.

On Thu, Mar 26, 2009 at 3:31 PM, Josh Dobbs  wrote:
> Here's what my code looks like...
>
>
> private
>
> Collection _cars;
>
> Car myCar=
>
> new Car(1,1,false,5, "blue");
>
> Car myCar2= new Car(1,1,false,5, "red");
>
> _cars.add(myCar);
> _cars.add(myCar2);
>
>
> On Thu, Mar 26, 2009 at 6:18 AM, Josh Dobbs  wrote:
>>
>> >You mean like the ones in the java.util
>> Yes, specifically java.util.collection
>> >What's a VO?
>> A VO is basically a class that only contains properties(Value Objects).
>>
>>
>> On Thu, Mar 26, 2009 at 4:53 AM, Mark Murphy 
>> wrote:
>>>
>>> Josh wrote:
>>> > I want to store objects into an array or collection(whichever is best
>>> > suited to this in dalvik).
>>>
>>> You mean like the ones in the java.util package?
>>>
>>> > the objects are basically just VO's all of
>>> > the same class that i want to keep track of.
>>>
>>> What's a VO?
>>>
>>> --
>>> Mark Murphy (a Commons Guy)
>>> http://commonsware.com
>>> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
>>>
>>>
>
>
>
>
> >
>

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



[android-developers] Re: Anything on Android that can do smooth scrolling?

2009-03-26 Thread Stoyan Damov

On Thu, Mar 26, 2009 at 4:14 PM, Jean-Baptiste Queru  wrote:
>
> There are some problems with that approach:
>
> -it's an arms race. You've already identified the need for certain
> apps to continue running even when there's an "exclusive" app running,
> which'd have to be protected by a permission. Either that permission
> is system-only and we move further away from the goal of having all
> applications equal, and it's accessible to all applications and it's
> only a matter of time before all applications have it, which makes the
> entire exercise pointless (put yourselves in the shoes of the
> developer of an app with background components - from their point of
> view, their app is obviously the most important app, and they don't
> want anyone to be able to tell them that their app isn't allowed to
> run).

Screw the developer. I'll put myself in the shoes of the user. I have
launched myself a game. I want it to run at full speed.
I could care less that a background service, polling RSS feeds have
just found out that someone posted a new blog entry.
I'm sure you now understand there's no issue with background apps and
which is more important.

>
> -the granularity that you really want is not that of an application -
> preventing other applications from running will prevent their services
> and providers from running even if they are necessary to run the front
> application.


Now, I realize that this permission should not be that simple - it
should allow the apps to specify which components are OK to run
(system components will always run, of course).
For example, the RSS reader application will want to run itself, and
this or that service it depends on. I don't see how this would be a
problem. The permission should simply allow one or more components to
be listed as dependencies.

>
> -even if you could do that, it would only be a partial solution at
> best, as system_server itself will probably still do a few
> allocations, and binder transactions eventually cause GCs as well.

Processes, which absolutely need to run (performing or not GCs) is OK
to run. Think about it - the experience will in *any* case be greater,
than it is now.

> FWIW, this would be an excellent discussion for the android-framework
> group, where we discuss how changes in the android platform impact
> SDK-level application development.

I agree, but since this originated from a android-developers post I
thought it's OK to discuss here.
Will move the discussion there this weekend, when I have the time to
think about this feature a bit more.

Cheers

>
> JBQ
>
> On Thu, Mar 26, 2009 at 6:58 AM, Streets Of Boston
>  wrote:
>>
>> Add my vote for this option/feature: A permission for an app to become
>> the only app running (except maybe the phone-app and incoming SMS,
>> etc).
>>
>> On Mar 26, 7:26 am, Stoyan Damov  wrote:
>>> I've also proposed a solution to this - adding a permission for apps
>>> to request that they run alone, uninterrupted by other processes.
>>>
>>> That is, the app can request a permission, demanding that the app can
>>> only be interrupted by an external event, such as phone call, all
>>> other services and background processes (other than the ones the OS
>>> can't go without) are paused when app is running.
>>>
>>> I know it's quite tricky to implement this, because, for example, when
>>> an SMS is received it needs to be stored in the database, and this
>>> will require some memory, which will need to be discarded, when the
>>> SMS is written to the database, and this will trigger GC. However,
>>> when such a message is received, and the OS knows that an app with the
>>> special permission runs in the foreground, it could delay the GC
>>> either until:
>>>
>>> - the app itself allocates memory (no matter if it might not be
>>> actually GC'ed until the app finishes) OR
>>> - the systems goes pretty low on memory
>>>
>>> At least, non-stock services (i.e. services, developed by 3rd parties)
>>> can be suspended during the lifetime of an application requesting the
>>> special permission.
>>>
>>> Cheers
>>>
>>>
>>>
>>> On Thu, Mar 26, 2009 at 11:51 AM, Stoyan Damov  
>>> wrote:
>>> > On Wed, Mar 25, 2009 at 11:02 PM, Romain Guy  wrote:
>>>
>>> >> The trick is simple: avoid any allocation that might trigger a GC.
>>>
>>> > It's not that simple at all.
>>> > In fact, it is *impossible* on Android, or any other mobile OS which
>>> > allows back

[android-developers] Re: HttpGet.addHeader

2009-03-26 Thread Stoyan Damov

ResponseHandler responseHandler = new BasicResponseHandler();
String body = httpClient.execute(method, responseHandler);

2009/3/26 Lutz Schönemann :
> If you use the DefaultHttpClient to connect to your server you don't need to
> reconnect. You'll receive a HttpResponse. You should validate the status
> code if the request was successful. after that just retrieve the HttpEntity.
> This class provides a getContent() method which returns a InputStream:
>
> --- snip ---
>
> HttpResponse response = null;
> InputStream in = null;
>
> try {
> client.execute(method);
> } catch(Exception e) {
>        // handle exception
> }
>
> if(response.getStatusLine().getStatusCode() == 200) {
>        HttpEntity entity = response.getEntity();
>        if(entity != null) {
>                try {
>                        in = entity.getContent();
>                } catch(IOException e) {
>                        // handle exception
>                }
>        }
> }
>
> if(in != null) {
>        // use in to read body of http response
> }
>
> --- snip ---
>
> Maybe there is a better way to get the body from the response but I don't
> know it...
>
> Lutz
>
> Am 26.03.2009 um 15:43 schrieb zeeshan:
>
>>
>> thanks for the reply, it is solved actually
>>
>> i was adding header before it get initialised
>>
>> it should be like this
>> method = new HttpGet( new URI(url) );
>>  method.addHeader("Connection","Keep-Alive");
>>
>> i suppose to get an xml on this request , how can i make input stream?
>>
>> do i need to connect it again like below
>>
>> HttpURLConnection httpConnection = (HttpURLConnection)
>> url.openConnection();
>>
>> InputStream in = httpConnection.getInputStream();
>>
>> On Mar 26, 1:15 pm, Stoyan Damov  wrote:
>>>
>>> What happens if you do this instead:
>>>
>>> method.getParams().setParameter("http.useragent", this.user_agent_id);
>>>
>>> ?
>>>
>>> On Thu, Mar 26, 2009 at 2:54 PM, zeeshan  wrote:
>>>
>>>> Hi Experts,
>>>
>>>> i am trying to add header on HttpGet but it raise this exception
>>>> "InvocationTargetException"
>>>
>>>> here is my code:
>>>
>>>> DefaultHttpClient client = new DefaultHttpClient();
>>>>           HttpGet method = null;
>>>>           HttpResponse resp = null;
>>>
>>>> String url = "http://www.x.com/a.xml";;
>>>
>>>>       method.addHeader("Connection","Keep-Alive");
>>>>       /*method.addHeader("accept-language",this.accept_language);
>>>>       method.addHeader("user-agent-id",this.user_agent_id);*/
>>>
>>>>       method = new HttpGet( new URI(url) );
>>>
>>>> i also used setHeader but same error
>>>
>>>> please help me out
>>
>> >>
>>
>
>

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

2009-03-26 Thread Stoyan Damov

On Thu, Mar 26, 2009 at 5:24 PM, Jean-Baptiste Queru  wrote:
>
> On Thu, Mar 26, 2009 at 7:25 AM, Stoyan Damov  wrote:
>>
>> Screw the developer. I'll put myself in the shoes of the user. I have
>> launched myself a game. I want it to run at full speed.
>> I could care less that a background service, polling RSS feeds have
>> just found out that someone posted a new blog entry.
>> I'm sure you now understand there's no issue with background apps and
>> which is more important.
>
> You've just put yourself deeper in a position where you see your
> application as the most important one. Well, in the shoes of the user,
> you now have an application (your game) that hurts the entire system.
> When your app is running, the user doesn't receive their email any
> more, they don't get updates from twitter, latitude doesn't work...
> and there will probably be lots of other cases.

You have clearly misunderstood what I said.

I said I'll put myself in the shoes of the user.

By "I have launched myself a game." I meant, that I am the user, and
want to launch a game, and so I do.
That is, I am the user, I want to launch a game, and I don't give a
... what other apps are running in the background.
I don't want to see what others are twitting, I don't care what
e-mails I might have received, and I don't give a  about nothing.
I am in the loo for 10 minutes, and I'm launching a game, I want to
play the game, and I don't care about anything.
It's my 10 private minutes in the loo, and I could care less of
*anything* else. I don't care how much the system is hurt, I want ot
play for crying out loud, and I want to play at full speed with the
best quality possible. Do you now understand what I said?


> If we go down that path, 6 months from now we'll have requests for a
> permission that allows background apps to say "I don't want apps to
> run in the foreground that prevent background apps from running", and
> their request will be just as reasonable as yours: their app doesn't
> coexist with yours, so they want to prevent yours from running (just
> like you want to prevent theirs from running).

You are only strengthening my opinion that you have completely
misunderstood what I said.
It is all for the benefit of the USER, THE USER, not the developer,
not the OS, not Google.
If the user wants these services to run, he won't be playing the game,
and hey, you could do an *even better* job *denying* the application
this restriction, and running it as usual. Or give the user the
ability to turn on and off this permission to any application at any
time while the app is not running!!!

Are you thinking that the iPhone is a failure because it doesn't allow
background processing?

>
>> Now, I realize that this permission should not be that simple - it
>> should allow the apps to specify which components are OK to run
>> (system components will always run, of course).
>> For example, the RSS reader application will want to run itself, and
>> this or that service it depends on. I don't see how this would be a
>> problem. The permission should simply allow one or more components to
>> be listed as dependencies.
>
> It's not as simple as it seems, as you're putting a requirement on
> background applications to identify which components they
> (transitively) rely on in order to work properly. Imagine that your
> app relies on component A, but that (as an implementation detail)
> component A relies on component B: now you need component A to
> identify that it needs component B, so that component B can also be
> made immune to the "kill-by-game" behavior.

Actually I don't need to specify anything. I just proposed that. I now
realize you can do it automatically.
The second an app marked with the special permission binds to a
service or accesses a content provider, it is more than obvious that
the service, is indeed needed by the application and should be allowed
to run.

>
> I think that we've gone way too far from the original problem. The
> original problem as I see it isn't about GCs in other apps, it's about
> behaviors that cause "remote" GCs in your game. I think it'd be much
> simpler if your game could say "I don't want remote asynchronous GCs",
> and it would probably even be more effective.

I absolutely agree. This is another, different, but unarguably BETTER
solution to the problem. Do it!!! :)

> It might turn out to
> also be more acceptable design-wise, and easier to implement in the
> framework. Better still, since it's a same-process behavior, there's
> not even a need to put permissions around it, since from the point o

[android-developers] Re: Anything on Android that can do smooth scrolling?

2009-03-26 Thread Stoyan Damov

On Thu, Mar 26, 2009 at 5:40 PM, Stoyan Damov  wrote:
> On Thu, Mar 26, 2009 at 5:24 PM, Jean-Baptiste Queru  wrote:
>> I think that we've gone way too far from the original problem. The
>> original problem as I see it isn't about GCs in other apps, it's about
>> behaviors that cause "remote" GCs in your game. I think it'd be much
>> simpler if your game could say "I don't want remote asynchronous GCs",
>> and it would probably even be more effective.

JBQ, btw, how is it possible for other apps to trigger GC in my
process? Is Android so aggressive about launching as few processes as
possible, that it won't run my app in a new process, even if the # of
running proceses is low?

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: Anything on Android that can do smooth scrolling?

2009-03-26 Thread Stoyan Damov

On Thu, Mar 26, 2009 at 6:14 PM, Al Sutton  wrote:
>
> Got to say I'd prefer a good user experience to developer orientated
> features any day.
>

Indeed. That's all I ask for! I hope it's not much. This is the *only*
way Android will beat other phones.
What good, if it could run a web server on the device, if one of the
most selling types of applications (games, but this is NOT limited to
games - video playback is important as well!) cannot offer great user
experience?

You (Google!, not you, Android engineers) need to listen to us! We're
on YOUR side, we're not the enemy. The enemy is MacOS, Symbian,
Windows Mobile, etc.
Help us help you!

Cheers

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



[android-developers] Re: Anything on Android that can do smooth scrolling?

2009-03-26 Thread Stoyan Damov

On Thu, Mar 26, 2009 at 6:23 PM, Jean-Baptiste Queru  wrote:
>
> The problem with your reasoning is that it's far from obvious that
> your hypothetical user will clearly understand that launching your
> game will prevent their other apps from running (there's plenty of
> evidence that users don't understand the consequences of their actions
> as well as developers do). Of course, you'd like them to only care
> about your game, but you can't assume that this will be the case for
> everyone (and the situation gets worse if your game is really good and
> they spend a long time playing it).

Not true. Just as the user understands if an application needs to read
his contacts, and would deny it, if it's a flashlight application,
he'll understand the permission, if explained in the user's language.
Users, well, I hope most of them, are not imbeciles. They might not
understand a lot of stuff, but you can explain them some things in an
easy-to-understand language, and they'll grasp it.

>
> Please file a feature request for the no-GC feature so that we don't
> forget about it.

Sure, will do.

>
>>how is it possible for other apps to trigger GC in my process?
>
> The system asks every relevant process to GC at different points in
> time, especially when it's running low on memory. That's not its only
> tool - it can also flush caches or kill processes when that's
> appropriate.

Got it.

>
>>Is Android so aggressive about launching as few processes as
>>possible, that it won't run my app in a new process, even if the # of
>>running proceses is low?
>
> As a developer, you have control over the way the components in your
> apps get spread into processes. If I remember correctly, you can split
> an app over multiple processes, and you can have components from
> different apps running in the same process. Even without caring about
> that level of control, you can still be sure that your apps'
> components won't run in the same process as app components from other
> developers, since that'd break the entire security model.
>
> Android currently does keep processes around when it has enough memory
> for it - there's a cost/benefit tradeoff, since an empty process takes
> space, but having it around saves a lot of time if it can be re-used
> to re-launch an application in it.

Thanks for the clarification.

Cheers

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



[android-developers] Re: Anything on Android that can do smooth scrolling?

2009-03-26 Thread Stoyan Damov

On Thu, Mar 26, 2009 at 6:47 PM, Romain Guy  wrote:
>
>> I've already said this once -- even though your game can be tuned to
>> the max, nothing prevents *other* apps from triggering GC.
>> That is, in my game, I *never*, *ever* do any allocation after startup.
>> However, other background processes do trigger GC, and voila - my game
>> stutters for a bit when GC kicks in.
>
> Other apps CANNOT cause GC in your process. Background processes can
> interrupt your game but it has nothing to do with GC.
> --

You might want to synchronize what you're saying with JBQ.

"The
original problem as I see it isn't about GCs in other apps, it's about
behaviors that cause "remote" GCs in your game. I think it'd be much
simpler if your game could say "I don't want remote asynchronous GCs",
and it would probably even be more effective."

So, ok, I *admit* other apps can't cause DIRECTLY a GC in my app, but
it doesn't matter to me because other apps can cause the system to
lack memory and perform GC and it would ask my app's process to do GC,
which is how I understand JBQ's explanation of "remote GC".

So back to my point. I don't care what causes GC in *my* process. If
it's not me I DON'T want my process to be bothered at all.

Cheers

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



[android-developers] Re: Anything on Android that can do smooth scrolling?

2009-03-26 Thread Stoyan Damov

On Thu, Mar 26, 2009 at 8:26 PM, Dianne Hackborn  wrote:
> On Thu, Mar 26, 2009 at 10:19 AM, Stoyan Damov 
> wrote:
>>
>> So, ok, I *admit* other apps can't cause DIRECTLY a GC in my app, but
>> it doesn't matter to me because other apps can cause the system to
>> lack memory and perform GC and it would ask my app's process to do GC,
>> which is how I understand JBQ's explanation of "remote GC".
>>
>> So back to my point. I don't care what causes GC in *my* process. If
>> it's not me I DON'T want my process to be bothered at all.
>
> There is no way at all for other processes to cause your process to GC.
> What other processes -can- do is run some work -- any kind of work -- on a
> thread running at the same or higher priority as yours, causing you to have
> to share the CPU with them.  GCs are irrelevant to the problem here.  (But
> they -are- relevant to writing your own code so that you don't cause GCs to
> happen in your own process.)

Dianne, I haven't taken any time to dig in Android, so I don't know
what and how works.
All I know is that when *ANOTHER* process kicks GC, it affects MY
process, and my game stutters at this EXACT moment.
My game, like I said many times, *only* allocates memory on startup,
and then uses object pools.
I know that, when for example, the myFaves service is not trying to
send the damn MMS my games works PERFECTLY smoothly.
When it stutters, I see that GC has kicked in in process with PID "X",
and that X is not my game's process' PID.

I hope you get it know.

>
> Currently our approach for scheduling is that apps doing background work on
> a thread should lower that thread's priority -- the standard applications on
> Android do this.  This has holes however, and allows people to mistakenly do
> background work at a higher priority, so we should more strongly enforce the
> scheduling of processes that are not running the foreground UI.
>

No, what you should do, and I mean Google behind Android, not you in
particular, is create an user experience SIMILAR to that on the
iPhone.
You can have the best of BOTH worlds and provide background processing
(i.e. as it works right now) AND on top of that implement "single
tasking" *experience*.
The implementation details are IRRELEVANT to all of us, users, and developers.
If you don't do it, I can bet my ass that Android, as a mobile device
OS, and especially as a smartphone OS will not last as long as people
"predicted".

Cheers

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



[android-developers] Re: Anything on Android that can do smooth scrolling?

2009-03-26 Thread Stoyan Damov

I could understand if you were saying that you can't provide
multi-tasking experience on a single-tasking OS, such as Windows 3.1,
which required cooperative multitasking.
But I find it hard to understand what are the practical and technical
reasons behind your resistance to provide a single-tasking experience
on a multi-tasking OS.

Cheers

On Thu, Mar 26, 2009 at 9:50 PM, Stoyan Damov  wrote:
> On Thu, Mar 26, 2009 at 8:26 PM, Dianne Hackborn  wrote:
>> On Thu, Mar 26, 2009 at 10:19 AM, Stoyan Damov 
>> wrote:
>>>
>>> So, ok, I *admit* other apps can't cause DIRECTLY a GC in my app, but
>>> it doesn't matter to me because other apps can cause the system to
>>> lack memory and perform GC and it would ask my app's process to do GC,
>>> which is how I understand JBQ's explanation of "remote GC".
>>>
>>> So back to my point. I don't care what causes GC in *my* process. If
>>> it's not me I DON'T want my process to be bothered at all.
>>
>> There is no way at all for other processes to cause your process to GC.
>> What other processes -can- do is run some work -- any kind of work -- on a
>> thread running at the same or higher priority as yours, causing you to have
>> to share the CPU with them.  GCs are irrelevant to the problem here.  (But
>> they -are- relevant to writing your own code so that you don't cause GCs to
>> happen in your own process.)
>
> Dianne, I haven't taken any time to dig in Android, so I don't know
> what and how works.
> All I know is that when *ANOTHER* process kicks GC, it affects MY
> process, and my game stutters at this EXACT moment.
> My game, like I said many times, *only* allocates memory on startup,
> and then uses object pools.
> I know that, when for example, the myFaves service is not trying to
> send the damn MMS my games works PERFECTLY smoothly.
> When it stutters, I see that GC has kicked in in process with PID "X",
> and that X is not my game's process' PID.
>
> I hope you get it know.
>
>>
>> Currently our approach for scheduling is that apps doing background work on
>> a thread should lower that thread's priority -- the standard applications on
>> Android do this.  This has holes however, and allows people to mistakenly do
>> background work at a higher priority, so we should more strongly enforce the
>> scheduling of processes that are not running the foreground UI.
>>
>
> No, what you should do, and I mean Google behind Android, not you in
> particular, is create an user experience SIMILAR to that on the
> iPhone.
> You can have the best of BOTH worlds and provide background processing
> (i.e. as it works right now) AND on top of that implement "single
> tasking" *experience*.
> The implementation details are IRRELEVANT to all of us, users, and developers.
> If you don't do it, I can bet my ass that Android, as a mobile device
> OS, and especially as a smartphone OS will not last as long as people
> "predicted".
>
> Cheers
>

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



[android-developers] Re: Anything on Android that can do smooth scrolling?

2009-03-26 Thread Stoyan Damov

On Thu, Mar 26, 2009 at 10:51 PM, Sundog  wrote:
>
> I see her point, it isn't scalable. What do you do when two apps both
> want this, and you want both apps?
>
> No, I agree, this needs addressing but not this way.
>

Michael, it's not about what *apps* want. It's what the *user* wants.
I am the user, and I want to launch an application, so I run it and It's on top.
If it wants the "run alone" privilege, and I'm OK with it (or want it
to be this way) what's the problem?

I forgot whether it was JBQ who first mentioned that the very problem
originates from the fact that a process might get paused to perform a
GC, should the system want it to.
I don't insist on a special permission to run alone.

I'm OK with a solution, which allows an app to not participate in
global GC, either via an API call, or via a setting in the manifest
file.
I guess an API would be even better, so a process can decided to not
participate in global GC only when it wants to, e.g. when the original
poster of this thread launches an activity, requiring smooth
scrolling, or playing a video.

I can also imagine, that this is not a very hard thing to implement.

Cheers

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



[android-developers] Re: Anything on Android that can do smooth scrolling?

2009-03-26 Thread Stoyan Damov

On Thu, Mar 26, 2009 at 11:53 PM, Romain Guy  wrote:
>
> Once again it has NOTHING to do with GC, it's just another app using
> the CPU. It could be for any reason, not just GC.
>
> I hope you get it now.
>

Aaaah, @#$ me. I GET it now!

Thanks Romain, and thanks again for patiently explaining this several times!

So, we're back then to square 1 - how do we make Android *appear* that
it runs an application exclusively.
That is, what's the best way to ensure great user experience for
demanding apps, such as games, without pausing all other processes.

Any ideas besides the permission thing, anyone?

Cheers

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



[android-developers] Re: Optimizing very big switch?

2009-03-26 Thread Stoyan Damov

One way to get rid of the switch is to turn it into an array of
Runnable instances.
Then, instead of doing:

switch (value)
{
case 0: doSomething(); break;
...
}

you'll have:

runnables[value].run();

Of course, this requires that you create a runnable instance for each
block of code, currently executed in your switch statement, and cache
it in a member variable.

If your values are not sequential, you could do it with a HashMap.

HTH,
Stoyan

On Fri, Mar 27, 2009 at 12:06 AM, HotHeart  wrote:
>
> I have switch with 255 cases in my project - DroidGear...
> How i could optimize it?
>
> Sorry for my english
> >
>

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

2009-03-26 Thread Stoyan Damov

On Fri, Mar 27, 2009 at 12:12 AM, Romain Guy  wrote:
>
> Have multiple cores :)
>
> On Thu, Mar 26, 2009 at 3:10 PM, Stoyan Damov  wrote:

>> That is, what's the best way to ensure great user experience for
>> demanding apps, such as games, without pausing all other processes.
>>
>> Any ideas besides the permission thing, anyone?
>>

Heh :) Nah, this does not answer my question.
My question was how to make it *appear* that these apps get more
attention from the CPU than the usual (on the current hardware I'll
add).
There is a solution, I'm pretty sure. I just don't know what is the best one.

Cheers

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



[android-developers] Re: Anything on Android that can do smooth scrolling?

2009-03-26 Thread Stoyan Damov

Speaking of (ahem) C++ (SunDog raised the subject implicitly!), what's
the off-the-record deadline of .so support?

Thanks!

On Fri, Mar 27, 2009 at 12:16 AM, Sundog  wrote:
>
> LOL!
>
> Why didn't we think of that!
>
> And to be absolutely clear, I shouldn't be blaming Java, this
> situation would happen with any multitasking OS. The GC's DO have the
> effect of making things unpredictable, though.
>
> On Mar 26, 4:12 pm, Romain Guy  wrote:
>> Have multiple cores :)
>>
>>
>>
>>
>>
>> On Thu, Mar 26, 2009 at 3:10 PM, Stoyan Damov  wrote:
>>
>> > On Thu, Mar 26, 2009 at 11:53 PM, Romain Guy  wrote:
>>
>> >> Once again it has NOTHING to do with GC, it's just another app using
>> >> the CPU. It could be for any reason, not just GC.
>>
>> >> I hope you get it now.
>>
>> > Aaaah, @#$ me. I GET it now!
>>
>> > Thanks Romain, and thanks again for patiently explaining this several 
>> > times!
>>
>> > So, we're back then to square 1 - how do we make Android *appear* that
>> > it runs an application exclusively.
>> > That is, what's the best way to ensure great user experience for
>> > demanding apps, such as games, without pausing all other processes.
>>
>> > Any ideas besides the permission thing, anyone?
>>
>> > Cheers
>>
>> --
>> 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- Hide quoted text -
>>
>> - Show quoted text -
> >
>

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



[android-developers] Re: Anything on Android that can do smooth scrolling?

2009-03-26 Thread Stoyan Damov

On Fri, Mar 27, 2009 at 12:19 AM, Streets Of Boston
 wrote:
>
> Yep, *exclusively* would not be a good idea. The user still would want
> phone-calls to come in and other such tasks.

Phone calls per se are not a problem. AFAIK calls are handled on the
2nd core, dedicated entirely to this purpose.
What would run on "our" CPU though is the dialer activity, and then
the call log one.
Like I said, I don't mind the PAUSE. It's OK for any game to be paused
because of an incoming phone call.
What's NOT ok is for some other process to steal CPU cycles, and
especially to peak the CPU (like when a GC kicks in).

> But wouldn't causing Android to be a bit (a lot) more aggresive in
> cleaning up not-so-important processes be something that is possible?
>
> Another (outlandish?) possibility:
> A phone-setting that's something similar like 'Airplane Mode' (the
> mode disabling all the phone's radio-activity). Let's call it 'Game
> Mode'. It'll give the user a better game-console experience, but a
> lousier (or non-existent) phone experience.

No, this is bad. What's better is in this Game mode, to allow the
phone's radio activity, so it can detect a call and log it in the
missed calls log.
However, the trick is how to do it without allocating memory, which
will then need to be GCed.

>
> Android engineers:
> We heard from you what's *not* possible.
> But what could be possible? I'd be interested in hearing about this
> from you all, even if the ideas seam outlandish. :-)

Me too!

>
> On Mar 26, 6:05 pm, Sundog  wrote:
>> On Mar 26, 3:52 pm, Streets Of Boston  wrote:
>>
>> > I should have added that this would apply to the phone's *foreground*
>> > application only
>>
>> I knew I shouldn't have compared it to a race situation... bad
>> analogy!
>>
>> Here's a better example: Imagine you're running Linux and the program
>> you're interested in is running slow. Why not just go set your nice
>> level to get all the processor time?
>>
>> Anyone who's a Linux or Unix administrator type at all just got
>> it.  ;)
>>
>> > Or at least something that allows the foreground app to get a very
>> > high priority and resource allowance from the operating system to
>> > minimize the influence of non-essential (background) applications.
>>
>> Exactly. But running our foreground app EXCLUSIVELY is just out of the
>> question, for reasons which should be clear by now.
> >
>

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



[android-developers] Re: Optimizing very big switch?

2009-03-26 Thread Stoyan Damov

Right, I forgot to tell you that by adding an array of Runnables
you're adding a layer of indirection, which is the opposite of what
you actually asked, even though it's leads to a whole lot more
maintainable code.

What do you mean by "optimization"? Do you want to speed up the switch
statement? I don't think you can.

On Fri, Mar 27, 2009 at 12:38 AM, Michael MacDonald
 wrote:
>
> Switch statements generally compile to very efficient code.  You might
> change it to something table driven, with an array of options, and it
> might be easier to maintain that way; but for speed of execution a
> switch statement will work very well.
>
> HotHeart wrote:
>> I have switch with 255 cases in my project - DroidGear...
>> How i could optimize it?
>>
>> Sorry for my english
>> >
>
>
> >
>

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

2009-03-26 Thread Stoyan Damov

Yes, you can think of this feature like the switch in Windows
performance options dialog, processor scheduling:

Adjust for best performance of:

(o) Programs
( ) Background services

In Android it would map to:

(o) Foreground apps
( ) All apps

or something like that (with foreground apps being default).

Good to know Google is on to this!

Cheers

On Fri, Mar 27, 2009 at 1:15 AM, Dianne Hackborn  wrote:
> On Thu, Mar 26, 2009 at 3:10 PM, Stoyan Damov 
> wrote:
>>
>> So, we're back then to square 1 - how do we make Android *appear* that
>> it runs an application exclusively.
>
> This is already something that we are investigating, though it isn't yet
> scheduled for a release as I said:
>
> "Currently our approach for scheduling is that apps doing background work on
> a thread should lower that thread's priority -- the standard applications on
> Android do this.  This has holes however, and allows people to mistakenly do
> background work at a higher priority, so we should more strongly enforce the
> scheduling of processes that are not running the foreground UI."
>
> We are looking at more strongly enforcing that background applications can
> not take too many cycles from the foreground.
>
> Fwiw, Windows does something like this with its process scheduling
> categories.  We'll probably do something similar.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them.
>
>
> >
>

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

2009-03-27 Thread Stoyan Damov

On Fri, Mar 27, 2009 at 12:06 PM, Al Sutton  wrote:
>
> I guess it comes down to the choice of do we want high performance games on
> Android or not.
>
> At the moment it seems clear that due to the ability of background tasks to
> continue running it is next to impossible to provide predictable performance
> for resource demanding games on all users devices and thus games can not
> make the most out of the hardware without risking 1* ratings and being
> called laggy by those running a number of background apps.
>
> Maybe this is where Android is trying to be different. Maybe games are not
> best suited to an Android based platform because of this. I guess time and
> users will be the judge of whether this is the right way to go.
>
> Personally I don't think it is, but hey, I'm only one voice.
>
> Al.
>

+1 voice

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

2009-03-27 Thread Stoyan Damov
;>>
>>> On Fri, Mar 27, 2009 at 2:33 AM, Al Sutton  wrote:
>>>>
>>>> Ahh so that's how the PSP, DS, and iPhone do it Hold up, that
>>>> doesn't sound right... :).
>>>>
>>>> Al.
>>>>
>>>> -Original Message-
>>>> From: android-developers@googlegroups.com
>>>> [mailto:android-develop...@googlegroups.com] On Behalf Of Romain Guy
>>>> Sent: 26 March 2009 22:12
>>>> To: android-developers@googlegroups.com
>>>> Subject: [android-developers] Re: Anything on Android that can do
>>>> smooth scrolling?
>>>>
>>>>
>>>> Have multiple cores :)
>>>>
>>>> On Thu, Mar 26, 2009 at 3:10 PM, Stoyan Damov
>>>> 
>>>> wrote:
>>>>>
>>>>> On Thu, Mar 26, 2009 at 11:53 PM, Romain Guy 
>>> wrote:
>>>>>>
>>>>>> Once again it has NOTHING to do with GC, it's just another app
>>>>>> using the CPU. It could be for any reason, not just GC.
>>>>>>
>>>>>> I hope you get it now.
>>>>>>
>>>>>
>>>>> Aaaah, @#$ me. I GET it now!
>>>>>
>>>>> Thanks Romain, and thanks again for patiently explaining this
>>>>> several
>>>> times!
>>>>>
>>>>> So, we're back then to square 1 - how do we make Android *appear*
>>>>> that it runs an application exclusively.
>>>>> That is, what's the best way to ensure great user experience for
>>>>> demanding apps, such as games, without pausing all other processes.
>>>>>
>>>>> Any ideas besides the permission thing, anyone?
>>>>>
>>>>> Cheers
>>>>>
>>>>> >
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> 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
>>>>
>>>>
>>>>
>>>>
>>>> >
>>>>
>>>
>>>
>>>
>>> --
>>> 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
>>>
>>>
>>>
>>>
>>> >
>>>
>>
>>
>>
>> --
>> 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
>>
>>
>>
>>
>> >
>>
>
>
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
>
> >
>

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



[android-developers] Re: Anything on Android that can do smooth scrolling?

2009-03-27 Thread Stoyan Damov

On Fri, Mar 27, 2009 at 4:23 PM, Sundog  wrote:
>
> I call "hack" again. Imagine what the Android haters would say
> IMMEDIATELY! "Your phone has to have a special mode to handle a simple
> display smoothly? BWAHAHAHA" etc. etc.
>
> On Mar 27, 7:43 am, Pd  wrote:
>> I was thinking on the same lines.  Maybe have a "Gaming Mode" where the
>> user knowingly chooses to turn the device into a games machine for
>> better performance.
>>

It's better than everybody (as opposed to only the haters) would say
"Your phone can't handle a simple display smoothly? Mwuahahahahaahah"
and even worse, if every *owner* of the phone decides that and never
ever buys himself and Android phone.

Cheers

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



[android-developers] Re: How to return non-table-oriented data from a content provider

2009-03-27 Thread Stoyan Damov

Possible Approach 5, similar to 3 - a phony table with 3 columns:

1. Name/Key/Whatever
2. Type ("enumeration")
3. Data (string)

The client would only need to convert the data from string to the
appropriate type.

Cheers

On Fri, Mar 27, 2009 at 11:21 AM, Jesse McGrew  wrote:
>
> I'm writing a content provider that returns data about game sessions.
> This data comes from an SQLite table. However, the client that
> consumes it will also want summary data: total wins, current/best
> winning streak, and so on. I'm not sure which approach to use.
>
> * Possible Approach 1: Do nothing, let the client calculate what it
> needs.
>
> The client could step through the whole table and calculate statistics
> itself. However, it's inefficient to send the entire database over the
> content provider link if the client only wants the summaries; this may
> also be prone to bugs because each client has to reimplement the
> summary calculations.
>
> * Possible Approach 2: Separate content URIs for summary data.
>
> The client could ask for a URI like content://myapp/summary/totalwins
> and get back a text/plain stream containing the number of wins. This
> seems like a big hassle to implement on both ends, though. Or it could
> ask for a URI like content://myapp/summary and get back an XML stream
> containing all the summary data, but this isn't much simpler.
>
> * Possible Approach 3: A phony table.
>
> The client could ask for a URI like content://myapp/summary and get
> back a cursor over a single row, with each summary value having its
> own column. This would not be an SQLite cursor but a custom in-memory
> cursor. It seems a little unnatural to use a table metaphor when
> there's always exactly one row, though.
>
> * Possible Approach 4: The extras bundle.
>
> Cursor has a getExtras() method that returns a bundle. The client
> could make a request for the main URI, content://myapp/sessions, and
> then just look at the extras bundle instead of reading any rows.
> However, there's no setExtras() method, so I'm stuck with whatever
> bundle object SQLite puts in there - and if it's Bundle.EMPTY, I'm out
> of luck.
>
> What do you recommend?
>
> Jesse
> >
>

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

2009-03-27 Thread Stoyan Damov

With 5 you can have unlimited # of columns. With 3, well, you can't.

On Fri, Mar 27, 2009 at 10:35 PM, Jesse McGrew  wrote:
>
> On Mar 27, 7:43 am, Stoyan Damov  wrote:
>> Possible Approach 5, similar to 3 - a phony table with 3 columns:
>>
>> 1. Name/Key/Whatever
>> 2. Type ("enumeration")
>> 3. Data (string)
>>
>> The client would only need to convert the data from string to the
>> appropriate type.
>
> Hmm. I'm not sure what the benefit of this is over #3. This basically
> turns the result set on end, requiring extra complexity in the client
> (looping over rows) without simplifying the server implementation.
>
> It does get rid of the "single row" objection, I suppose. Come to
> think of it, if that's my only objection to #3, maybe the answer is
> clear...
>
> Jesse
> >
>

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

2009-03-27 Thread Stoyan Damov

I don't know, I was speaking strictly theoretically.

On Fri, Mar 27, 2009 at 10:51 PM, Jesse McGrew  wrote:
>
> Is there a limit to the number of columns a content provider can
> return? I see SQLite has a default limit of 2000 columns per table,
> which is more than enough, but my phony summary table wouldn't be
> backed by SQLite.
>
> Jesse
>
> On Mar 27, 1:40 pm, Stoyan Damov  wrote:
>> With 5 you can have unlimited # of columns. With 3, well, you can't.
>>
>> On Fri, Mar 27, 2009 at 10:35 PM, Jesse McGrew  wrote:
>>
>> > On Mar 27, 7:43 am, Stoyan Damov  wrote:
>> >> Possible Approach 5, similar to 3 - a phony table with 3 columns:
>>
>> >> 1. Name/Key/Whatever
>> >> 2. Type ("enumeration")
>> >> 3. Data (string)
>>
>> >> The client would only need to convert the data from string to the
>> >> appropriate type.
>>
>> > Hmm. I'm not sure what the benefit of this is over #3. This basically
>> > turns the result set on end, requiring extra complexity in the client
>> > (looping over rows) without simplifying the server implementation.
>>
>> > It does get rid of the "single row" objection, I suppose. Come to
>> > think of it, if that's my only objection to #3, maybe the answer is
>> > clear...
>>
>> > Jesse
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: who can tell me how to achieve this function?! thx!!!!

2009-03-28 Thread Stoyan Damov

android.provider.Settings.System.getString(context.getContentResolver(),
android.provider.Settings.System.ANDROID_ID);

2009/3/28 wanzi ! :
>
> strazzere,thanks for your reply,but could you tell me what is the
> android id?
> IMEI code or another one?
>
> we can read it without warning information:"READ PHONE STATE"?
>
> if it is,could you tell me how to get that id?  thanks very much!!
>
> On 3月28日, 上午12时06分, strazzere  wrote:
>> papi games read you android id - then they simple link the name and
>> android_id on the site :)
>>
>> On Mar 26, 9:59 pm, "wanzi !"  wrote:
>>
>>
>>
>> > droozen, thanks your reply!
>>
>> > But in fact,this application didn't read the number or IMEI code of my
>> > phone ,because the waring information of this application doesn't
>> > include "READ PHONE STATE".
>>
>> > Who can tell me how to get it?
>>
>> > On 3月24日, 上午2时38分, droozen  wrote:
>>
>> > > They're probably saving your name on their webserver somewhere, and
>> > > perhaps using your phone number to identify the phone and display that
>> > > name.
>>
>> > > On Mar 22, 9:06 pm, "wanzi !"  wrote:
>>
>> > > > Is anybody download the PaPi games from market and played it?
>>
>> > > > I found when I played one of this series of PaPi game and I input my
>> > > > name,then all series PaPi games can read this name.
>>
>> > > > At beginning, I consider maybe the application saved some data which
>> > > > can be shared by other PaPi games, but when I "Factory data reset" and
>> > > > format the SD card, then I download these games and play them again,
>> > > > it's so crazy that these games can read my name which I inputed before
>> > > > all the same!!
>>
>> > > > next, I consider maybe the application read the only code of the phone
>> > > > (IMEI) to identify the phone,but I check the install information about
>> > > > all the PaPi games, I can't found any information about "READ PHONE
>> > > > STATE",so I think these applications didn't read the IMEI code.
>>
>> > > > who can tell me how to achieve this function?! thx!- 隐藏被引用文字 -
>>
>> > > - 显示引用的文字 -- 隐藏被引用文字 -
>>
>> - 显示引用的文字 -
> >
>

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

2009-03-30 Thread Stoyan Damov

I will try to code a demo which does side scrolling tonight, but I
don't know opengl, so I won't use it.

My phone is getting worse every day (I haven't used it as phone as a
matter of fact for a while) but in case it does manage to show smooth
scrolling, in the 5 seconds idle period, when it's not attempting to
send an MMS to the GOD DAMN myFaves service (and thus trigger GC),
I'll post the code.

Cheers

On Mon, Mar 30, 2009 at 11:36 AM, admin.androidsl...@googlemail.com
 wrote:
>
> Many of you will have read or contributed to the very long thread I
> started a week ago on '[android-developers] Re: Anything on Android
> that can do smooth scrolling?'
>
> That was a very useful discussion between devs and engineers on
> whether additional performance could be made available to fast-moving
> games by lowering priority or disabling other background threads.
>
> However, I wanted to create a separate thread to discuss what can be
> done TODAY in existing games to solve this problem.
>
> Why is it a problem? Because there is not a single game in Android
> Market that features smooth scrolling backgrounds. Games may not be
> the only app needed, but they certainly need to be visually impressive
> for the platform to survive.
>
> Why do I think there is a solution today? Because all components using
> GridView and ListView in most cases feature very smooth scrolling - if
> you don't believe me, go to the thumbnail scrolling view in the native
> picture viewer.
>
> So what I am saying is there is some magic in the GridView / ListView
> code which allows for smooth scrolling which games on Android platform
> desperately need. Despite going through the source code extensively I
> cannot discover what is needed to apply this to a game engine.
>
> Please could someone with a good low-level knowledge of the GridView
> and ListView API's please please please provide a very simple demo of
> how this smooth scrolling could be applied to scrolling an oversized
> image either horizontally or vertically.
>
> Otherwise developers are all going to try and most likely fail to
> figure this out themselves. Believe me I have spent many hours on this
> looking at Android source code, surfaceviews, onDraw, dispatchDraw,
> memory allocation, and nothing so far has given me anything close to
> smooth scrolling.
>
> And I also know game developers are competing with each other and want
> to guard their tricks of the trade. But ultimately, we are ALL
> competing with rival mobile platforms and unless this issue can be
> resolved, all android game developers will lose out.
>
> And the whole platform loses because there will be no quality games.
> Why shouldn't our games look like this after all :
> http://www.youtube.com/watch?v=Y4795KVt_kw
>
> >
>

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

2009-03-30 Thread Stoyan Damov

On Tue, Mar 31, 2009 at 4:29 AM, dm1973  wrote:
>
> I think you should learn OpenGl (even for 2D games). I haven't tried
> it on Android yet but I image you can get much better results by doing
> your animation using it than by doing drawing using the android APIs.
> Off the top of my head, I don't know the hardware specs of the G1 but
> if it is anything like the iphones accellerator, it has plenty of
> power to make good looking smooth 2D games.
>
> On Mar 30, 12:30 pm, Stoyan Damov  wrote:
>> I will try to code a demo which does side scrolling tonight, but I
>> don't know opengl, so I won't use it.
>>

It's on my TODO list ;)

Btw, don't hold your breath on the scrolling demo, I won't be able to
code it tonight because my baby daughter is growing a tooth (those of
you with kids know what I'm talking about ;)

Cheers

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



[android-developers] Re: Android game developers desperately need optimised game engine example code ...

2009-03-31 Thread Stoyan Damov

He's probably talking about not doing allocations in his game. He
can't stop GC from being triggered in other processes, and thus
stuttering his game.

On Tue, Mar 31, 2009 at 10:35 AM, Agus  wrote:
> To Quartz: How do you prevent triggering of the GC?
>
>
> On Mon, Mar 30, 2009 at 7:33 PM, Quartz  wrote:
>>
>> I did an android game using just the SurfaceView and it performs
>> fairly decent (it averages 50-to-60 fps). It was a simple game I put
>> together to benchmark the VM. It is certainly not the best rated game
>> out there--actually it is one of the worst come to think of it-- :),
>> but it does have smooth vertical scrolling. If I had done it in OpenGL
>> it would easily scroll vertical or horizontal. Either way the game is
>> called "Spout" and it is free if you want to check it. It has
>> particles, collisions and scrolling; and if you code wisely with the
>> GC in mind, you can even manage to keep the GC from triggering (that
>> took a bit of experimenting and profiling but I eventually calmed the
>> GC way down).
>>
>> There is a article somewhere in the newsgroup mentioning the hardware
>> specs on the graphics side. I think it mentioned that a low-end mobile
>> ATI GPU is embedded in the Qualcomm chipset. I ran several of the
>> OpenGL demos are they run very smooth indeed.
>>
>> On Mar 30, 3:45 pm, "admin.androidsl...@googlemail.com"
>>  wrote:
>> > Thanks Stoyan - I look forward to trying out your code. Very much
>> > appreciated.
>> >
>> > On Mar 30, 8:30 pm, Stoyan Damov  wrote:
>> >
>> > > I will try to code a demo which does side scrolling tonight, but I
>> > > don't know opengl, so I won't use it.
>> >
>> > > My phone is getting worse every day (I haven't used it as phone as a
>> > > matter of fact for a while) but in case it does manage to show smooth
>> > > scrolling, in the 5 seconds idle period, when it's not attempting to
>> > > send an MMS to the GOD DAMN myFaves service (and thus trigger GC),
>> > > I'll post the code.
>> >
>> > > Cheers
>> >
>> > > On Mon, Mar 30, 2009 at 11:36 AM, admin.androidsl...@googlemail.com
>> >
>> > >  wrote:
>> >
>> > > > Many of you will have read or contributed to the very long thread I
>> > > > started a week ago on '[android-developers] Re: Anything on Android
>> > > > that can do smooth scrolling?'
>> >
>> > > > That was a very useful discussion between devs and engineers on
>> > > > whether additional performance could be made available to
>> > > > fast-moving
>> > > > games by lowering priority or disabling other background threads.
>> >
>> > > > However, I wanted to create a separate thread to discuss what can be
>> > > > done TODAY in existing games to solve this problem.
>> >
>> > > > Why is it a problem? Because there is not a single game in Android
>> > > > Market that features smooth scrolling backgrounds. Games may not be
>> > > > the only app needed, but they certainly need to be visually
>> > > > impressive
>> > > > for the platform to survive.
>> >
>> > > > Why do I think there is a solution today? Because all components
>> > > > using
>> > > > GridView and ListView in most cases feature very smooth scrolling -
>> > > > if
>> > > > you don't believe me, go to the thumbnail scrolling view in the
>> > > > native
>> > > > picture viewer.
>> >
>> > > > So what I am saying is there is some magic in the GridView /
>> > > > ListView
>> > > > code which allows for smooth scrolling which games on Android
>> > > > platform
>> > > > desperately need. Despite going through the source code extensively
>> > > > I
>> > > > cannot discover what is needed to apply this to a game engine.
>> >
>> > > > Please could someone with a good low-level knowledge of the GridView
>> > > > and ListView API's please please please provide a very simple demo
>> > > > of
>> > > > how this smooth scrolling could be applied to scrolling an oversized
>> > > > image either horizontally or vertically.
>> >
>> > > > Otherwise developers are all going to try and most likely fail to
>

[android-developers] Re: Android Physics Engine

2009-03-31 Thread Stoyan Damov

Right. The single biggest issue is GC. I guess if vectors and all
other objects, which are frequently created, get pulled out of an
object pool, and reused (that's quite tricky though, because of the
explicit "returnToPool" call) all engines will shine. In several
places, temporary/scratch objects can be used for results, e.g.:

Vector2f v = someComputation(...) can be rewritten as

Vector2f v = someComputation(mScratchVector, ...);

but there are still places, where objects need to allocated, and an
object pool (preferably an intrusive one, which requires classes to
have prev/next links/nodes) would be the only way.

Cheers

On Tue, Mar 31, 2009 at 5:28 PM, shaun  wrote:
>
> I am the author of simpull.
>
> Sorry guys for the demo being out of whack for Simpull to the Core.
> The version of PulpCore that I integrated simpull with did not support
> Chrome, but you should be able to see it in IE, FF Safari.  It is nice
> to take a look at that demo to get a feel for what the engine is
> capable of, but the performance does not translate over to the fixed
> point branch/version of simpull when running on Android.
>
> I ran tests on both the emulator and the actual device and there was a
> significant increase in performance because of the fixed point
> implementation, but I got very frustrated that it still did not
> support the amount of objects in a scene that I considered good for a
> physics-based game.  It seemed to handle ~10 objects moving and
> colliding OK.  It has been a while since I was playing with it, so I
> do not really remember the exact number of objects or the frame rate.
> I mostly remember being upset with it.
>
> I am leaving the physics ideas for games out of the picture when
> thinking Android for now.  Someone would have to write a ground up
> engine with all the performance and memory concerns of Android in
> mind, which was not the case with Simpull.I created it for
> applets, then thought to port over to fixed-point for Android.  It
> works well with small scenes, but certainly not the staple engine to
> use in my opinion.
>
> Also, Phys2D will not run worth a damn on Android.  I tried it and I
> even went through some heavy performance tuning.  Garbage collection
> is the major issue even after all I did.  I seriously doubt JBox2D
> will run well either.  I'll stick to what I said earlier, a ground-up
> solution by someone smarter than me is probably required.
>
> On Mar 31, 9:49 am, "admin.androidsl...@googlemail.com"
>  wrote:
>> Not tried but if you can provide us with some example source code or
>> put something on the market, I'm sure we could take a look.
>>
>> G1 performance is significantly faster than emulator, but there are
>> limitations.
>>
>> Particularly with garbage collection and memory allocation on code
>> that gets run continuously in loops, so I don't know how optimised
>> these physics engines are for this purpose.
>>
>> Would be interesting to find out though.
>>
>> On Mar 31, 12:52 pm, mscwd01  wrote:
>>
>> > Oh I forgot to re-ask...
>>
>> > "Has anyone tested Phys2D or JBox2D on an actual device to see if they
>> > run better than on the emulator?
>>
>> > I have a feeling the performance will better on a G1 than the emulator
>> > for some reason!
>>
>> > On Mar 31, 12:51 pm, mscwd01  wrote:
>>
>> > > I did take a look at Simpull, however the demo application failed to
>> > > run as it relied on some library which wasn't supplied or referenced
>> > > to - I just got annoyed after spending two days failing to get Phys2D
>> > > and JBox2D to work in Android and didn't bother trying to work out the
>> > > problems!
>>
>> > > I might give it another look though...
>>
>> > > On Mar 30, 10:41 pm, Streets Of Boston 
>> > > wrote:
>>
>> > > > I wonder how well this one works on Android:
>>
>> > > >  http://code.google.com/p/simpull/
>>
>> > > > -- Anton Spaans
>>
>> > > > On Mar 30, 4:58 pm, Anton  wrote:
>>
>> > > > >     I have a simple 2D physics engine written and running.  It uses
>> > > > > the now famous Jacobson physics tricks (Verlet integration and hard
>> > > > > constraints).  I can manage 40 balls on the screen, with fill n^2
>> > > > > interaction between balls.  I am working on spatial data structure
>> > > > > optimizations now to improve the computational complexity of the
>> > > > > collision detection code.  I run the constraint update loop five 
>> > > > > times
>> > > > > per frame and get 30 frames per second.  Once the engine is up and
>> > > > > running there are no memory allocations done in my program.  And once
>> > > > > the system settles down from the app launch there are very few GC
>> > > > > events from other programs.  Though they do still happen.  Viewing
>> > > > > LogCat I see a GC every 10 or 20 seconds because of some background
>> > > > > application.  But between those events I get a consistent frame rate.
>> > > > > I am using OpenGL for my rendering.
>>
>> > > > >     -Anton
>>
>> > > > > On Mar 30, 1:14 pm, mscwd01  w

[android-developers] [android-discuss] Unused java hardware acceleration on the G1 (was Re: Android game developers desperately need optimised game engine example code ...)

2009-03-31 Thread Stoyan Damov

(moving out of android-developers, but posted for the last time so
those who are interested can join the conversation on android-discuss)

Romain, can you confirm that the G1's Qualcomm MSM7201 CPU does not
support java hardware acceleration?

I'm reading here[1]:

"528 MHz ARM11 Jazelle™[2] Java® hardware acceleration"

And from what I've read on the net, MSM7201A-a is the dual-core CPU
powering the G1.
So, can you confirm that Android could be WAY WAY faster, if Android
could use the Java, instead of the Dalvik VM, and that this didn't
happen because of Sun???

Thanks

[1] http://www.qctconnect.com/products/msm_7201.html
[2] http://www.arm.com/products/multimedia/java/jazelle.html


On Tue, Mar 31, 2009 at 10:07 PM, Romain Guy  wrote:
>
> Hi,
>
> You are mistaking two different things. Some Java ME phones have a
> dedicated chip used to interpret the Java bytecode. OpenGL
> acceleration is another thing entirely. The G1 has a dedicated GPU
> that can be used to accelerate OpenGL. Any Android OpenGL application
> benefits from that hardware acceleration. However, the Dalvik bytecode
> is not hardware accelerated by a dedicated chip, but simply
> interpreted with the CPU.
>
> On Tue, Mar 31, 2009 at 12:00 PM, Tseng  wrote:
>>
>> From what i know, most of the Java/J2ME phones use the chipsets
>> acceleration functions (some mobilephone CPUs are optimized for java
>> accerlration in 2d/3d games). But since Android is not based on Java/
>> J2ME, it doesn't support this acceleration (even though the CPU used
>> in the G1 supports Java Open GL acceleration). From what i've read,
>> the reason for this is that android use it's own virtual machine to
>> executing the bytecode.
>>
>> However, i'm not really sure if it's true, maybe one of the Android
>> Engineers can confirm or deny it. With this in mind OpenGL could bring
>> some more performance but it doesn't have to (unlike on onther Java
>> phones)
>>
>> On Mar 31, 3:29 am, dm1973  wrote:
>>> I think you should learn OpenGl (even for 2D games). I haven't tried
>>> it on Android yet but I image you can get much better results by doing
>>> your animation using it than by doing drawing using the android APIs.
>>> Off the top of my head, I don't know the hardware specs of the G1 but
>>> if it is anything like the iphones accellerator, it has plenty of
>>> power to make good looking smooth 2D games.
>>>
>>> On Mar 30, 12:30 pm, Stoyan Damov  wrote:
>>>
>>>
>>>
>>> > I will try to code a demo which does side scrolling tonight, but I
>>> > don't know opengl, so I won't use it.
>>>
>>> > My phone is getting worse every day (I haven't used it as phone as a
>>> > matter of fact for a while) but in case it does manage to show smooth
>>> > scrolling, in the 5 seconds idle period, when it's not attempting to
>>> > send an MMS to the GOD DAMN myFaves service (and thus trigger GC),
>>> > I'll post the code.
>>>
>>> > Cheers
>>>
>>> > On Mon, Mar 30, 2009 at 11:36 AM, admin.androidsl...@googlemail.com
>>>
>>> >  wrote:
>>>
>>> > > Many of you will have read or contributed to the very long thread I
>>> > > started a week ago on '[android-developers] Re: Anything on Android
>>> > > that can do smooth scrolling?'
>>>
>>> > > That was a very useful discussion between devs and engineers on
>>> > > whether additional performance could be made available to fast-moving
>>> > > games by lowering priority or disabling other background threads.
>>>
>>> > > However, I wanted to create a separate thread to discuss what can be
>>> > > done TODAY in existing games to solve this problem.
>>>
>>> > > Why is it a problem? Because there is not a single game in Android
>>> > > Market that features smooth scrolling backgrounds. Games may not be
>>> > > the only app needed, but they certainly need to be visually impressive
>>> > > for the platform to survive.
>>>
>>> > > Why do I think there is a solution today? Because all components using
>>> > > GridView and ListView in most cases feature very smooth scrolling - if
>>> > > you don't believe me, go to the thumbnail scrolling view in the native
>>> > > picture viewer.
>>>
>>> > > So what I am saying is there is some magic in the GridView / ListView
>

[android-developers] Re: [android-discuss] Unused java hardware acceleration on the G1 (was Re: Android game developers desperately need optimised game engine example code ...)

2009-03-31 Thread Stoyan Damov

Aha, maybe I wasn't clear enough. I very well understand that Android
runs Dalvik, and not Java bytecode, and from what I read on the net,
this was done to avoid some licensing issues/arguments with Sun.

Here I'll put my question as bluntly as possible:

If Google were not forced by Sun because of WHATEVER to NOT run java
bytecode on the Android, would it be WAY WAY faster for games, apps,
and the Android stack on top of Linux, which is also a Dalvik
bytecode, because of the java hardware acceleration?

If the answer is yes, I then expect to hear what was that Google
couldn't agree on with Sun (although I don't expect to hear that from
Google Android engineers, but like I've said many times, Google is
f...@#ing DEAF, and you, Android engineers, are the only people who
actually listen to us)?

I'm also interested to understand whether Google is planning to team
with hardware manufacturers (such as Qualcomm) and help them build
Dalvik hardware acceleration into future devices, so that Android
becomes faster and better?

Thanks!

On Tue, Mar 31, 2009 at 10:33 PM, Romain Guy  wrote:
>
> It doesn't matter whether there's a chip with Java hardware
> acceleration in the G1 because Android does not use Java bytecode, but
> Dalvik bytecode.
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
>
> >
>

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



[android-developers] Re: [android-discuss] Unused java hardware acceleration on the G1 (was Re: Android game developers desperately need optimised game engine example code ...)

2009-03-31 Thread Stoyan Damov

On Tue, Mar 31, 2009 at 11:36 PM, thesquib  wrote:
>
> Stoyan - the optimisation from the Jazelle is apparently not that good
> anyway, partially because a software JVM performs all sorts of
> optimisations on the fly.
>

I wasn't comparing JVMs, I was comparing Dalvik's NON-optimizing VM to
a hardware accelerated JVM.

Cheers

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



[android-developers] Re: [android-discuss] Unused java hardware acceleration on the G1 (was Re: Android game developers desperately need optimised game engine example code ...)

2009-03-31 Thread Stoyan Damov

Dianne,

I can't see why are you taking this personally.
FWIW, you, Android engineers, are the only people we're getting *any*
answers to all our non-development questions.

Is it so hard to accept the fact that people can think that Google,
the company, is for example bad or deaf, but at the same time think
that some or many of its employees are great and responsive?
For me, Google is deaf. You, Romain, JBQ, David, etc. (I don't want to
miss someone, but will inevitably do so) are not.

Now, that love is all around, do you have something to say about the
original subject? ;)

Cheers

On Wed, Apr 1, 2009 at 12:05 AM, Dianne Hackborn  wrote:
> On Tue, Mar 31, 2009 at 12:42 PM, Stoyan Damov 
> wrote:
>>
>> If the answer is yes, I then expect to hear what was that Google
>> couldn't agree on with Sun (although I don't expect to hear that from
>> Google Android engineers, but like I've said many times, Google is
>> f...@#ing DEAF, and you, Android engineers, are the only people who
>> actually listen to us)?
>
> Congratulations, at this point I have stopped listening to you too.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them.
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 1 G1 can see Paid Apps in the Android Market and Another Not? ***

2009-04-01 Thread Stoyan Damov

On Wed, Apr 1, 2009 at 7:32 AM, Dan Morrill  wrote:
> This is not true.  Devices that are identified as root-enabled, whether an
> ADP1 or a rooted retail G1, cannot access copy-protected apps. They can
> still access both paid and free apps that are not copy-protected, however.
>
> - Dan
>

This is news to me. Was the feature of detecting whether the device is
running as root initially in the Market application, or this is a
recent change?

Thanks

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



[android-developers] Re: Android Physics Engine

2009-04-01 Thread Stoyan Damov

I'm quite interested as well.

On Wed, Apr 1, 2009 at 3:04 PM, mscwd01  wrote:
>
> Thanks for the demo Anton,
>
> It certainly runs much smoother than the Phys2D and JBox2D engines I
> have tried and you have more objects being simulated - so you must
> have done something right ;)
>
> I would expect it to run 2-3 times faster on an actual device too from
> what I have read.
>
> Once you have finished off the improvements do you have any plans to
> release it?
>
> Thanks
>
> On Apr 1, 7:44 am, Anton  wrote:
>>     OK, for anyone interested in my simple physics demo, check out:
>>
>>    http://www.antonstoys.com/android/BallPit.apk
>>
>>     It's pretty basic, but it shows that you can do some amount of
>> physics on the G-phone at a reasonable rate.  And as always, there are
>> many improvements to be made.  :)
>>
>>     -Anton
>>
>> On Mar 31, 2:12 pm, Anton  wrote:
>>
>> >     I'll definitely post the app tonight for you guys to check out (at
>> > work now).  I am an embedded systems programmer by trade.  But I do
>> > physics toys for fun and am just getting into Java/Android
>> > optimizations.  I will point out that optimizing for Java and
>> > optimizing for Android are very different.  As people have pointed out
>> > before, the key things to be careful with on Android are memory
>> > allocation and floating point math.  I've removed both of these from
>> > my physics loop.  I also found that function call overhead was quite
>> > large and had to manually inline all of my fixed point math code.  I
>> > think that with the correct spatial data structures I can get a couple
>> > hundred objects interacting.  I have a 2D rigid body physics engine
>> > that is currently all C++ (no exceptions or templates or RTTI or
>> > multiple inheritance) that I may port over as well.
>>
>> >     However, having said all of that, I think it may be the case that
>> > we will just have to wait until a native SDK is available to really
>> > write a top notch physics engine.  It's sort of the perfect example of
>> > a piece of code that doesn't need anything more than libc and JNI
>> > bindings.  And since you only call it a couple times per frame the JNI
>> > overhead would be well amortized.
>>
>> >     Anton
>>
>> > On Mar 31, 9:17 am, mscwd01  wrote:
>>
>> > > Thanks for your feedback Shaun, I too unfortunately think a bespoke
>> > > engine will need to be written for Android, which is a real pity as
>> > > the iPhone has several physics engines which can easily handle
>> > > hundreds of objects.
>>
>> > > Having said that Anton (2nd reply) has said he has an engine running,
>> > > it would be nice to see a demo of this if that'd be possible?
>>
>> > > Clark, i'd definately host any .apk's on my own site, I wouldn't put
>> > > it on the marketplace if it wasn't a "finished" app - do people
>> > > actually do that?!
>>
>> > > I think i'll stay away from developing games with physics for the time
>> > > being and concentrate on something else, I cant see it being feasible
>> > > to include it any time soon which is a real pity.
>>
>> > > On Mar 31, 3:28 pm, shaun  wrote:
>>
>> > > > I am the author of simpull.
>>
>> > > > Sorry guys for the demo being out of whack for Simpull to the Core.
>> > > > The version of PulpCore that I integrated simpull with did not support
>> > > > Chrome, but you should be able to see it in IE, FF Safari.  It is nice
>> > > > to take a look at that demo to get a feel for what the engine is
>> > > > capable of, but the performance does not translate over to the fixed
>> > > > point branch/version of simpull when running on Android.
>>
>> > > > I ran tests on both the emulator and the actual device and there was a
>> > > > significant increase in performance because of the fixed point
>> > > > implementation, but I got very frustrated that it still did not
>> > > > support the amount of objects in a scene that I considered good for a
>> > > > physics-based game.  It seemed to handle ~10 objects moving and
>> > > > colliding OK.  It has been a while since I was playing with it, so I
>> > > > do not really remember the exact number of objects or the frame rate.
>> > > > I mostly remember being upset with it.
>>
>> > > > I am leaving the physics ideas for games out of the picture when
>> > > > thinking Android for now.  Someone would have to write a ground up
>> > > > engine with all the performance and memory concerns of Android in
>> > > > mind, which was not the case with Simpull.I created it for
>> > > > applets, then thought to port over to fixed-point for Android.  It
>> > > > works well with small scenes, but certainly not the staple engine to
>> > > > use in my opinion.
>>
>> > > > Also, Phys2D will not run worth a damn on Android.  I tried it and I
>> > > > even went through some heavy performance tuning.  Garbage collection
>> > > > is the major issue even after all I did.  I seriously doubt JBox2D
>> > > > will run well either.  I'll stick to what I said earlier, a ground-up
>> 

[android-developers] Re: *** Why 1 G1 can see Paid Apps in the Android Market and Another Not? ***

2009-04-01 Thread Stoyan Damov

Aha, so until rooted phones can't see copy-protected apps I don't see
any reasons to protect my app. If just 1 user can download and share
it with the world it is meaningless to waste twice the space on the
user's phone for nothing.

On Wed, Apr 1, 2009 at 5:15 PM, clark  wrote:
>
> Root-enabled G1s are still able to see copy-protected apps.  I think
> it is just the ADP phones that the market detects, because my rooted
> G1 is able to see copy-protected apps, and download them.  I have
> verified this by looking in the app-private folder on the phone and
> seeing that the app that I purhcased was there.
>
>
> ~clark
>
> On Mar 31, 9:32 pm, Dan Morrill  wrote:
>> This is not true.  Devices that are identified as root-enabled, whether an
>> ADP1 or a rooted retail G1, cannot access copy-protected apps. They can
>> still access both paid and free apps that are not copy-protected, however.
>>
>> - Dan
>>
>> On Tue, Mar 31, 2009 at 2:09 PM, Michael MacDonald <
>>
>> googlec...@antlersoft.com> wrote:
>> >  Developer phones can't see paid apps in the market.  This is because the
>> > root access available on the developer
>> > phones breaks the Market copy-protection model.
>>
>> > The Market copy-protection model ignores that there are many consumer
>> > phones that have been rooted...
>>
>> > Eric Schott wrote:
>>
>> > I have a developers phone running: 1.1 specifically
>> > holiday_devphone_userdebug 1.1  Kernel version is: 2.6.25-01845-
>> > g85d4f0d android-bu...@apa27 #27
>>
>> > and I can not see any paid apps.  I still see lots of chatter about
>> > some who can see paid apps and some who can not.  What the magic
>> > button to make this work?  :)
>>
>> > On Mar 10, 11:14 am, Brodsky  
>> >  wrote:
>>
>> >  I've got the same problem.  If Ican'tseepaidappsoff this dev
>> > phone, how do I get my money back for it?  No one ever told me it'd be
>> > crippled...
>>
>> > On Feb 20, 4:19 pm, Michael Martin  
>> >  wrote:
>>
>> >  *** Can anyone at Google explain why some G1s can seepaidappswhile
>> > otherscan’t? 
>>
>> >  I don’t believe this is a matter of an OTA updates but rather
>> > datacenter propagation thus it would depend on which Android Market
>> > datacenter the G1 is pinging.
>>
>> >  In my case I have 2 G1s (side by side) and 1 canseethepaidapps
>> > while the other doesn’t….could only assume they are both pinging the
>> > same DC.
>>
>> >  (I have already tried the reboot theory to no avail)
>>
>> >  Any formal explanation for this???
>>
>> >  Thank You,
>> > Michael Martinhttp://www.googleandblog.com/
>>
>>
> >
>

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



[android-developers] Re: Some of the strange JAVA syntax - android specifics?

2009-04-02 Thread Stoyan Damov

Perhaps he was thinking of C#'s lock keyword ;)

On Thu, Apr 2, 2009 at 8:17 PM, Marco Nelissen  wrote:
>
> On Thu, Apr 2, 2009 at 10:13 AM, Odessa Silverberg
>  wrote:
>>
>>> synchronized:
>>> I'd suggest your starting reading about Java Synchronization.
>>> 'synchronized' blocks prevent multiple threads from executing the same
>>> block of code at the same time. They are used to synchronize access to
>>> methods and instance-variables and avoid race-conditions. Careless use
>>> of 'synchronized' block, however, could cause dead-locks.
>> In other word, similar to the lock key word in C/C++
>
> There is no lock keyword in C/C++
>
> >
>

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



[android-developers] TabActivity + TabContentFactory + inflated layouts... problem

2009-04-02 Thread Stoyan Damov

Hi guys,

First, I'm really sorry for the wtf subject but I couldn't find a way
to describe the problem in 1 sentence, so here it is...

I have an activity which extends TabActivity and implements TabContentFactory.
For simplicity's sake I'll limit the problem to 1 tab.

In onCreate() I do this:

TabHost host = getTabHost();
LayoutInflater inflater = LayoutInflater.from(this);
mSomeLayout = (LinearLayout)inflater.inflate(R.layout.some_layout, null);

In createTabContent:

if (tag.equals("the_tab_tag")) return mSomeLayout;

So far, so great. I get the tab, the layout is displayed.


I also have a button in the layout, so I do:

mButton = (Button)mSomeLayout.findViewById(R.id.button);

And then I subscribe to it's click event:

mButton.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
System.out.println("WTF");
}
});

Now, here's the problem. I click the button and nothing happens.
I can for example execute the following code from elsewhere:

mButton.setEnabled(false);

and the button will get disabled, but when I tap it (in its *enabled*
state) - nothing happens.

Can someone help me? Am I doing something wrong?

If I'm not, could it be that I have another tab, where the another
inflated copy of the same layout is displayed?
However, in this layout's button's OnClickListener nothing happens as well.

I'm really stuck, so thanks for any suggestions!

Cheers

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



[android-developers] Re: Paying $50 for someone to design an application...

2009-04-02 Thread Stoyan Damov

I haven't tried it, but "Toggle Screen Timeout" is a free application,
which you can find in Market in the category "Tools" which claims to
do exactly what you need.

On Thu, Apr 2, 2009 at 7:22 AM, Matthew110607
 wrote:
>
> I am not much of a programmer...my last programming class was FORTRAN.
> But I love this phone with the exception of one problem:  I hate the
> autolock feature of the phone.
>
> http://androidforums.com/application-requests/4517-paying-50-app.html
>
> I can provide references via eBay or the Corvette Forums as to my
> credibility that I will pay immediately upon usage of an application
> that does this very simple action:
>
> Simply turn off the default autolock feature.  As it stands now the
> phone locks once the screen times out.  This battery is not good
> enough on the G1 to leave the backlight on at all times nor should it
> be necessary.  Yes I realize you only need to hit the menu button
> twice but that gets annoying when texting back and forth.
>
> I have tried Autolock and Lock 2.0 and neither fulfills this
> requirement.
>
> I look forward to hearing from you.  You can contact me at
> matthew.a.jo...@us.army.mil or on the forums that I provided above.
>
> I am not the only person with this problem.  It should have been an
> option from the get-go to turn off or leave on.
>
> >
>

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