[android-developers] Re: Is it possible to replace or extend the dialer application ?

2009-01-12 Thread A T
You'll notice that a different intent is fired when the calls ends. filter
for it and make it default as well. (use the log of course).

On Mon, Jan 12, 2009 at 2:12 PM, shimo...@gmail.com wrote:

>
> Hi,
>
> Did that, and it seems to work, but -
>
> Whenever the device is in the built-in dialer application, the intent
> is
> not fired when I press the CALL button, so I basically lose control
> over
> the button after every call (since the device auto-launches the built-
> in
> dialer after any call ends).
>
> Anything I can do against this ?
>
> While on this subject - I added the code to be notified on calls
> ending,
> wanting to have the device launch MY application instead of the built-
> in dialer
> when calls end. I was able to launch 3rd party apps when calls end,
> but not
> launch my own app. Any tips ?
>
> TIA
>
>
> On Jan 12, 2:43 pm, "Aryeh Tasher"  wrote:
> > add the CALL_BUTTON intent filter with category DEFAULT
> >
> > On Mon, Jan 12, 2009 at 7:11 AM, shimo...@gmail.com  >wrote:
> >
> >
> >
> > > Hi,
> >
> > > What ?!
> >
> > > I was told at these forums it can not be done for the PHONE button...
> >
> > > How ?
> > > Is it the same code as for the camera button ?
> > > What permissions are needed ?
> >
> > > If I can do this it would be a GREAT feature for my app !
> >
> > > On Jan 12, 4:40 am, "Dianne Hackborn"  wrote:
> > > > I believe you can already do that.
> >
> > > > On Sun, Jan 11, 2009 at 1:23 AM, shimo...@gmail.com <
> shimo...@gmail.com
> > > >wrote:
> >
> > > > > Hi,
> >
> > > > > How about an option to assign pressing the PHONE button to launch
> my
> > > > > app ?
> > > > > (when there are no pending incoming calls)
> >
> > > > > TIA
> >
> > > > > On Jan 10, 2:35 am, "Dianne Hackborn"  wrote:
> > > > > > It would be nice to have a way to replace the incoming call
> screen or
> > > > > other
> > > > > > parts of the incoming call handling, but it is pretty non-trivial
> to
> > > do.
> > > > >  I
> > > > > > am not aware of any current work going on to do this.  You can
> have a
> > > > > look
> > > > > > at the source and see what is involved.
> >
> > > > > > On Fri, Jan 9, 2009 at 3:39 PM, Brad Fuller <
> > > bradallenful...@gmail.com
> > > > > >wrote:
> >
> > > > > > > Thanks Dianne,
> >
> > > > > > > Then perhaps there are ways to implement "partial" events for
> > > incoming
> > > > > > > calls. When an incoming call is detected, I imagine that there
> are
> > > > > > > several separate events. For example: get the number of the
> > > incoming
> > > > > > > call; see if it's in the contact list; display the onscreen
> graphic
> > > of
> > > > > > > an incoming with the phone number and the contact name, call
> the
> > > > > > > ringtone manager: etc. Then, when the phone is off-hook,
> display
> > > "Call
> > > > > > > in progess" text.. etc.
> >
> > > > > > > I assume that these are separate classes. So, could one display
> > > their
> > > > > > > own "incoming call" graphic? Or replace the RingTone manager
> (not
> > > the
> > > > > > > ringtone, like ExtendedRings does), etc?  Or are they not
> separate
> > > > > > > classes or all private?
> >
> > > > > > > Does that make sense?
> >
> > > > > > > On Fri, Jan 9, 2009 at 2:56 PM, Dianne Hackborn <
> > > hack...@android.com>
> > > > > > > wrote:
> > > > > > > > Currently you can intercept outgoing calls and replace that
> with
> > > your
> > > > > own
> > > > > > > > behavior, but we don't yet have a way to intercept incoming
> > > calls.
> >
> > > > > > > > The issue of built-in apps using internal APIs is kind-of a
> > > > > red-herring.
> > > > > > > > Yes, in the case of the phone UI, there are a bunch of APIs
> that
> > > you
> > > > > need
> > > > > > > to
> > > > > > > > be able to implement something like your own in-call
> screen...
> > > > >  however
> > > > > > > the
> > > > > > > > fact that they are internal is not really the issue: we could
> > > expose
> > > > > > > them,
> > > > > > > > but it still wouldn't work because the current implementation
> of
> > > them
> > > > > > > > requires that you actually be running in the same process as
> the
> > > > > > > telephony
> > > > > > > > subsystem, so they just can't be used by other apps.  For the
> > > most
> > > > > part,
> > > > > > > we
> > > > > > > > make APIs private because they are not yet something we can
> > > maintain
> > > > > in
> > > > > > > the
> > > > > > > > future platform are even able to be used successfully by
> > > > > applications.
> > > > > > >  Not
> > > > > > > > out of some malicious goal to make sure nobody else can make
> > > their
> > > > > own
> > > > > > > > whatever UI.
> >
> > > > > > > > Outside of the phone system, for the most part the platform
> > > > > applications
> > > > > > > use
> > > > > > > > private APIs because we didn't have time to clean all of the
> apps
> > > up
> > > > > as
> > > > > > > we
> > > > > > > > were evolving the official SDK into something that we could
> > > support
> > > > > in
> > > > > > > 

[android-developers] Re: GREF count increases with multi threading

2009-01-12 Thread A T
It showed the GREF count going all over the place. It would increase as the
activity paused and resumed. It would go from 99 to 201 to 301 alll the way
up to 801 or higher sometimes. The more I paused it (just by going to a
different app) and returned (using the back button) the higher it went. I
can't figure it out for the life of me. If i continued to do it, my app
would crash.

Also, sometimes the GREF count would come back down, seemingly randomly, in
between pauses and resumes... but it would inevitably increase way too much.
Here's a trace (sorry for the length):

.
.
.
D/dalvikvm(  198): GREF has increased to 201
W/KeyCharacterMap(   93): No keyboard for id 0
W/KeyCharacterMap(   93): Using default keymap:
/system/usr/keychars/qwerty.kcm.bin
D/dalvikvm(   93): GREF has increased to 301
D/dalvikvm(   93): GC freed 1636 objects / 77552 bytes in 112ms
D/dalvikvm(   50): GREF has increased to 301
D/dalvikvm(  198): GC freed 2565 objects / 136904 bytes in 166ms
D/dalvikvm(   93): GREF has increased to 401
D/dalvikvm(   50): GC freed 5157 objects / 299552 bytes in 219ms
D/dalvikvm(  198): GREF has increased to 301
D/dalvikvm(   93): GREF has increased to 501
D/dalvikvm(   93): GC freed 1231 objects / 57712 bytes in 134ms
I/ActivityManager(   50): Starting activity: Intent {
action=android.intent.action.DIAL
comp={com.android.contacts/com.android.contacts.DialtactsActivity} }
W/ActivityManager(   50): Activity is launching as a new task, so cancelling
activity result.
D/dalvikvm(   93): GREF has decreased to 399
D/dalvikvm(   93): GC freed  objects / 104288 bytes in 127ms
D/dalvikvm(   93): GREF has decreased to 299
I/ActivityManager(   50): Displayed activity
com.android.contacts/.DialtactsActivity: 2009 ms
W/KeyCharacterMap(   93): No keyboard for id 0
W/KeyCharacterMap(   93): Using default keymap:
/system/usr/keychars/qwerty.kcm.bin
D/dalvikvm(   93): GREF has increased to 401
D/dalvikvm(   93): GC freed 994 objects / 31992 bytes in 109ms
D/dalvikvm(  198): GC freed 1692 objects / 116888 bytes in 117ms
D/dalvikvm(   93): GREF has increased to 501
D/dalvikvm(   50): GC freed 3214 objects / 149176 bytes in 152ms
D/dalvikvm(   93): GC freed 703 objects / 28328 bytes in 114ms
D/dalvikvm(   93): GREF has increased to 601
D/dalvikvm(  198): GREF has increased to 401
D/dalvikvm(   50): GREF has increased to 401
I/ActivityManager(   50): Starting activity: Intent {
action=android.intent.action.DIAL
comp={com.android.contacts/com.android.contacts.DialtactsActivity} }
W/ActivityManager(   50): Activity is launching as a new task, so cancelling
activity result.
D/dalvikvm(  198): GC freed 9794 objects / 506928 bytes in 168ms
D/dalvikvm(   93): GREF has decreased to 499
D/dalvikvm(   50): GREF has decreased to 299
D/dalvikvm(   93): GC freed 3207 objects / 149160 bytes in 107ms
D/dalvikvm(  198): GREF has decreased to 299
I/ActivityManager(   50): Displayed activity
com.android.contacts/.DialtactsActivity: 3236 m
D/dalvikvm(   93): GREF has decreased to 399
W/KeyCharacterMap(   93): No keyboard for id 0
W/KeyCharacterMap(   93): Using default keymap:
/system/usr/keychars/qwerty.kcm.bin
D/dalvikvm(   93): GREF has increased to 501
D/dalvikvm(   93): GC freed 1852 objects / 74648 bytes in 127ms
D/dalvikvm(   50): GC freed 2191 objects / 86456 bytes in 172ms
D/dalvikvm(  198): GREF has increased to 401
D/dalvikvm(  198): GC freed 2173 objects / 108880 bytes in 254ms
D/dalvikvm(   93): GREF has increased to 601
D/dalvikvm(   93): GC freed 523 objects / 16696 bytes in 118ms
D/dalvikvm(   50): GREF has increased to 401
D/dalvikvm(   93): GREF has increased to 701
D/dalvikvm(  198): GREF has increased to 501
D/dalvikvm(   93): GREF has increased to 801
D/dalvikvm(   93): GC freed 667 objects / 23816 bytes in 114ms
D/dalvikvm(   50): GC freed 1291 objects / 53032 bytes in 198ms
D/dalvikvm(   93): GREF has increased to 901
D/dalvikvm(   50): GREF has increased to 501
.
.
.

As you can see, 901 is not good. I don't know what could be causing a leak.
I'm keeping track of every variable as far as I know. This is so confusing.


On Mon, Jan 12, 2009 at 7:57 PM, fadden  wrote:

>
> On Jan 12, 12:43 pm, somecs  wrote:
> > This issue inevitably ends up crashing my program if I cause the
> > update process to run more than 3 or 4 times in a row (which is
> > definitely a possibility with normal use by the unsuspecting user), so
> > it is unacceptable. Of course, it's unacceptable no matter what, but
> > in any case, I am desperate to fix this. Can anyone help?
>
> What does "logcat" show?  There should be a GREF summary message in
> the output.
>
> The cap should be at 2000 now, so overflowing is likely a leak.
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@google

[android-developers] Re: Is it possible to replace or extend the dialer application ?

2009-01-13 Thread A T
That I'm not sure about. It should have asked you again, especially after
re-installing. I know this because I've made an app that replaces the
default call log as well, and every time i re-install (debug or release), I
have to re-select my default.

A similar issue I did know about, though, is if you would have selected the
original Dialer app as your default, you would have run into the same
problem as you are now. I've been wondering how to fix this. If anybody has
a solution, please help. Thank you.

On Tue, Jan 13, 2009 at 9:07 AM, shimo...@gmail.com wrote:

>
> Hi,
>
> One more issue - everything was working fine on my ADP1 device.
> I selected my app (TAKEphONE) to be the default handler for
> this, so every time I pressed the CALL button my app launched by
> default.
>
> Then I wanted to check something, so I went to the system settings,
> to the "Applications" section, selected my app, and tapped the "clear
> defaults"
> button.
>
> BUT - now when I press the CALL button - I no longer see the dialog
> asking me which app to launch (mine or the Dialer).
> Tried removing my app and re-installing - it did not help, either.
>
> How can I restore things to the way they were ?
>
> TIA
>
> On Jan 12, 9:17 pm, "A T"  wrote:
> > You'll notice that a different intent is fired when the calls ends.
> filter
> > for it and make it default as well. (use the log of course).
> >
> > On Mon, Jan 12, 2009 at 2:12 PM, shimo...@gmail.com  >wrote:
>  >
> >
> >
> > > Hi,
> >
> > > Did that, and it seems to work, but -
> >
> > > Whenever the device is in the built-in dialer application, the intent
> > > is
> > > not fired when I press the CALL button, so I basically lose control
> > > over
> > > the button after every call (since the device auto-launches the built-
> > > in
> > > dialer after any call ends).
> >
> > > Anything I can do against this ?
> >
> > > While on this subject - I added the code to be notified on calls
> > > ending,
> > > wanting to have the device launch MY application instead of the built-
> > > in dialer
> > > when calls end. I was able to launch 3rd party apps when calls end,
> > > but not
> > > launch my own app. Any tips ?
> >
> > > TIA
> >
> > > On Jan 12, 2:43 pm, "Aryeh Tasher"  wrote:
> > > > add the CALL_BUTTON intent filter with category DEFAULT
> >
> > > > On Mon, Jan 12, 2009 at 7:11 AM, shimo...@gmail.com <
> shimo...@gmail.com
> > > >wrote:
> >
> > > > > Hi,
> >
> > > > > What ?!
> >
> > > > > I was told at these forums it can not be done for the PHONE
> button...
> >
> > > > > How ?
> > > > > Is it the same code as for the camera button ?
> > > > > What permissions are needed ?
> >
> > > > > If I can do this it would be a GREAT feature for my app !
> >
> > > > > On Jan 12, 4:40 am, "Dianne Hackborn"  wrote:
> > > > > > I believe you can already do that.
> >
> > > > > > On Sun, Jan 11, 2009 at 1:23 AM, shimo...@gmail.com <
> > > shimo...@gmail.com
> > > > > >wrote:
> >
> > > > > > > Hi,
> >
> > > > > > > How about an option to assign pressing the PHONE button to
> launch
> > > my
> > > > > > > app ?
> > > > > > > (when there are no pending incoming calls)
> >
> > > > > > > TIA
> >
> > > > > > > On Jan 10, 2:35 am, "Dianne Hackborn" 
> wrote:
> > > > > > > > It would be nice to have a way to replace the incoming call
> > > screen or
> > > > > > > other
> > > > > > > > parts of the incoming call handling, but it is pretty
> non-trivial
> > > to
> > > > > do.
> > > > > > >  I
> > > > > > > > am not aware of any current work going on to do this.  You
> can
> > > have a
> > > > > > > look
> > > > > > > > at the source and see what is involved.
> >
> > > > > > > > On Fri, Jan 9, 2009 at 3:39 PM, Brad Fuller <
> > > > > bradallenful...@gmail.com
> > > > > > > >wrote:
> >
> > > > > > > > > Thanks Dianne,
> >
> > > > > > >

[android-developers] Re: What's slow on Android?

2009-01-13 Thread A T
As a side note to answer your question (if anyone cares), call log is slow
when scrolling because every time it binds a new list item it checks if its
associated data needs to be updated Not a problem unless you're
scrolling super fast, which you do if you have a giant log like *some*
people :)



On Mon, Jan 12, 2009 at 5:59 PM, Stoyan Damov wrote:

>
> On Tue, Jan 13, 2009 at 12:38 AM, Tomei Ningen 
> wrote:
> >
> > Thanks Stoyan,
> >
> > For 1, faster GC, is this related to stuttering in animation due to GC.
> Is it possible to avoid them by calling System.gc() directly (such as when
> you change between different game levels).
>
> Actually it's not. In my hopefully-ready-and-about-to-release game I
> preallocate object pools for *absolutely everything* and don't
> allocate (directly) *any* objects (except when changing levels, where
> I do call System.gc), so no stuttering whatsoever and quite steady
> (and very close to 60 fps) frame rate (drawing is *extremely*
> expensive on Android, so I draw as less as possible; btw, drawing
> images is *very* fast).
>
> However, if you get for example the call log (this has been reported
> by someone else, but can't remember the guy's name), if you have a
> hundred+ calls and try to scroll it, the stuttering is quite annoying.
> I don't know the exact reason for that (other than I know that GC
> kicks in 3.5 secs or so) but probably many
> not-optimized-as-much-as-possible apps will benefit faster GC.
>
> >
> > For 2, are you writing intensive computation in your app? Do you want to
> have just a few loops run faster? If so, will it be OK if you were able to
> load native code into your app (but otherwise there's no JIT).
> >
> >
>
> JIT will allow game writers (or developers of any intensively drawing
> apps) to really focus on their games, and not the gory details of how
> many instructions this or that costs, especially for extremely simple
> things like calling getters/setters.
>
> >
> >
> > - Original Message 
> > From: "stoyan.da...@gmail.com" 
> > To: android-developers@googlegroups.com
> > Sent: Monday, January 12, 2009 2:28:50 PM
> > Subject: [android-developers] Re: What's slow on Android?
> >
> >
> > I'd iike to see:
> >
> > 1. Faster GC
> > 2. JIT - if you could jit an entire app the first time it's started
> > (or better yet - installed)
> > 3. Implement/fix SoundPool
> >
> > On 1/13/09, Tomei Ningen  wrote:
> >>
> >> Hello Android developers,
> >>
> >> We are building an Android-based device, and would like to know what we
> >> should try to improve in terms of performance. If you can have just 3
> things
> >> be much faster, what will they be?
> >>
> >>  please be specific (instead of "graphics is too slow", something
> like
> >> "drawing red poker dots on translucent canvas is slow")
> >>
> >>  and why are they important (a real-world use case would be good).
> >>
> >> 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: Notifications from a service, forced Intent.FLAG_ACTIVITY_NEW_TASK problem

2009-01-13 Thread A T
try the singleTask launch mode in the activity tag of your manifest.

On Tue, Jan 13, 2009 at 12:48 PM, Torgny  wrote:

>
> Is there any way that you can send extra data with the pending intent
> to the activity?
>
> On Jan 12, 3:59 am, Gothy  wrote:
> > Same problem with my app, but mine is not a main activity to do your
> > hack proposed.
> > The main problem is that when this happens passed parameters from
> > notification intent are ignored and activity starts with initial
> > parameters, like it was opened again during usual navigation...
> > Those intents are making me angry again and again :E
> >
> > On Jan 12, 3:33 am, Torgny  wrote:
> >
> > > I am trying to create a notification in a service to notify the user
> > > that the application's data has updated in the background. I want the
> > > application to resume when they click the notification. When I click
> > > the notification I get this message in DDMS:
> >
> > > 01-11 16:16:10.574: WARN/ActivityManager(56): startActivity called
> > > from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for:
> > > Intent { comp={com.example/com.example.view.ExampleActivity} }
> >
> > > This forces the activity to start even if it is already paused or
> > > stopped, so it never resumes, it just creates a new instance of it,
> > > overlapping everything, including service connections. If the
> > > application is already running, another copy of it starts on top of
> > > it. How do I make Android just resume the activity?
> >
> > > Thankful for any help!
> >
> > > Warm Regards,
> > > Torgny
> >
>

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

2009-01-14 Thread A T
The Java matcher tries to match the entire string, unlike other regex
engines. Try this:

if (!Pattern.matches("[a-z]+", DrawingName.getText().toString())) {
//do nothing for now
   DrawingName.setText("WRONG");
}


Notice the "!" before the expression.


On Wed, Jan 14, 2009 at 2:28 AM, Josh  wrote:

>
> i have the following code in place to ensure that the user only enters
> the letters a through z into the EditText control.
>
> if (Pattern.matches("[^a-z].*", DrawingName.getText().toString())) {
> //do nothing for now
>DrawingName.setText("WRONG");
> }
>
> The problem is it only checks the first character. How can I make it
> check the entire length of the string?  }
> >
>

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



[android-developers] Activity callback anomaly

2009-01-14 Thread A T
Hi,
I'm noticing a strange pattern in my acitivty when I open another activity
from within mine (I have a button that goes to the contacts view, for
instance). Instead of my onPause method being called once, I'm seeing this
pattern: onPause, onResume, onPause, in very quick succession. I can't
figure out why this happens, and it's causing a problem with the
multithreading that I'm trying to do.. but that's a separate issue. My main
concern is why onPause isn't being called just once, like it is when I press
the Home button from within my app.

Anyone have any ideas? I have a feeling it might have something to do with
the intent I'm using the start the contacts view. All I have right now is
the VIEW action with the contacts URI.  Am I missing a flag or something?

Thanks

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



[android-developers] Re: Regular Expression Help

2009-01-14 Thread A T
Can you give us a sample input and output that is failing? I'd like to see
the exact regex and test string(s) you are using.



On Wed, Jan 14, 2009 at 10:20 AM, Josh Dobbs  wrote:

> That doesnt work either. what i want to do is check the entire length of
> the string to ensure that only a-z are in the string and that there are no
> special characters.
>
>
> On Wed, Jan 14, 2009 at 7:15 AM, Faber Fedor  wrote:
>
>>
>>
>>  On Wed, Jan 14, 2009 at 10:00 AM, Dan Dumont  wrote:
>>
>>> It is checking the entire length of the string...   your pattern is not
>>> doing what you want.
>>>
>>> I suggest you read up on regular expressions.   Your regexp says:
>>> Match 1 character a-z, followed by any character zero or more times.
>>
>>
>> No it doesn't.  It says match 1 character which is anyhing OTHER than a-z
>> followed by zero or more of any other character.
>>
>> What the OP presumably wants is something like
>>
>> ^[a-z]+
>>
>> which reads as "match the start of line, followed by one or more of the
>> characters 'a' through 'z'"
>>
>>
>>>
>>>
>>>
>>> On Wed, Jan 14, 2009 at 2:28 AM, Josh  wrote:
>>>

 i have the following code in place to ensure that the user only enters
 the letters a through z into the EditText control.

 if (Pattern.matches("[^a-z].*", DrawingName.getText().toString())) {
 //do nothing for now
DrawingName.setText("WRONG");
 }

 The problem is it only checks the first character. How can I make it
 check the entire length of the string?
  }


>>>
>>>
>>>
>>
>>
>> --
>>
>> Faber Fedor
>> Cloud Computing New Jersey
>> http://cloudcomputingnj.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: How to catch global events?

2009-01-14 Thread A T
My guess is that being able to do that *might* pose some security
problems

On Wed, Jan 14, 2009 at 2:56 PM, tzi...@gmail.com  wrote:

>
> Was it designed like that intentionally?
> Can you suggest any workarounds or alternatives to implement my
> project?
>
> Thanks,
> Ziv.
>
> On Jan 14, 6:27 pm, Romain Guy  wrote:
> > That's simple: you can't :)
> >
> > On Wed, Jan 14, 2009 at 1:13 AM, tzi...@gmail.com 
> wrote:
> >
> > > Hi all,
> >
> > > I want to write an application that monitors each and every keystroke
> > > or move event that the user does on his phone.
> > > How can i catch global events such as key strokes or motion events?
> > > The point is catching them globally and not from within my application
> > > -because my application will run in the background.
> >
> > > Thanks,
> > > Ziv.
> >
> > --
> > 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] Query about Content Provider queries...

2009-01-15 Thread A T
I have one quick question and one maybe not-as-quick question:

1. Will we be able to employ more robust SQL(ite) queries on content
providers with future releases? For instance: joins, distinct, count,
max, etc?

2. Why isn't this possible now? I understand the concept of DB table
abstraction and the reasoning behind it, but why not still provide
some roundabout way of doing these operations (without storing the
content in a local SQLite table, of course)?



Thanks AT

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



[android-developers] Re: Query about Content Provider queries...

2009-01-15 Thread A T
Thanks for your response. I really don't mean to push the issue, I'm just
afraid that you misunderstood my question. In terms of existing providers,
if I need to do, say, a DISTINCT query, I would have to either load the
table into my own provider/SQLite DB and do it there by executing an
arbitrary SQLite query, or use a content provider query and operate on the
cursor manually. Both approaches are not as efficient as allowing us to
directly do the distinct query to the provider itself. I just have a hard
time understanding why there aren't overloaded query methods that allow for
certain arguments, as there are with the SQLite packages (e.g. having a
boolean for DISTINCT).

UNLESS you're saying that we can actually extend the functionality for
existing providers and implement the query ourselves? If that's the case,
that would be great, but I don't see how to do that from looking at the API
spec...

Thanks again,
AT

On Thu, Jan 15, 2009 at 1:00 PM, Dianne Hackborn wrote:

> No, that would expose the implementation behind the content provider more
> than we want.  For your own content provider you can fairly easily define
> your own URI schemes that allow arbitrary joins or such across tables or
> other things, but we don't plan on this becoming a general facility that all
> content providers must allow.
>
>
> On Thu, Jan 15, 2009 at 7:07 AM, A T  wrote:
>
>> I have one quick question and one maybe not-as-quick question:
>>
>> 1. Will we be able to employ more robust SQL(ite) queries on content
>> providers with future releases? For instance: joins, distinct, count,
>> max, etc?
>>
>> 2. Why isn't this possible now? I understand the concept of DB table
>> abstraction and the reasoning behind it, but why not still provide
>> some roundabout way of doing these operations (without storing the
>> content in a local SQLite table, of course)?
>>
>>
>>
>> Thanks AT
>>
>>
>>
>
>
> --
> 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: Query about Content Provider queries...

2009-01-15 Thread A T
Ok, I did not realize that. I had made the assumption that they were all
DB-based.

My real goal here was to just figure out the best (i.e. quickest) way to do
some operations that are not possible with the given content provider
methods, but at the same time avoid localizing them and then re-uploading
the to their native data stores. The reason I don't want to localize them is
that I am trying to provide a replacement service for an existing service on
the phone, so it must operate on the native content provider, otherwise it
is not nearly as useful. It needs to be fast, which it currently isn't if a
lot of data is present, which is common with this particular content. I need
to access and update the content relatively often (at least as often as the
app is started), so faster is better. If it was a rare occurrence, it
wouldn't be a terrible problem if it was a little slow.

Anyway, I guess I will have to figure out some other way, then. If anyone
has any suggestions, I welcome them :)

Thank you, Mark, for your explanation.
AT
On Thu, Jan 15, 2009 at 3:57 PM, Mark Murphy wrote:

>
> > In terms of existing providers,
> > if I need to do, say, a DISTINCT query, I would have to either load the
> > table into my own provider/SQLite DB and do it there by executing an
> > arbitrary SQLite query, or use a content provider query and operate on
> the
> > cursor manually.
>
> Generally speaking, the former is impossible, since you won't have access
> to the database (e.g., security), if there even is a database, which is
> far from a given.
>
> > Both approaches are not as efficient as allowing us to
> > directly do the distinct query to the provider itself.
>
> Content providers do not need to use SQLite as a data store. They could
> use flat files, Web services, third-party object databases, SD card
> directory trees, random number generators, etc.
>
> There is a subset of content providers that will use SQLite as a data
> store. What Ms. Hackborn is suggesting is that those content providers
> could offer distinct, etc. via their own exported Uri pattern. What you
> seem to be proposing is to force developers to implement all the SQL
> options for data stores that aren't SQL, which may not be a popular
> answer.
>
> > I just have a hard
> > time understanding why there aren't overloaded query methods that allow
> > for
> > certain arguments, as there are with the SQLite packages (e.g. having a
> > boolean for DISTINCT).
>
> Again, content providers do not need to use SQLite as a data store.
>
> --
> 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: Query about Content Provider queries...

2009-01-15 Thread A T
You are right about that :)
Yeah, so, in other words, it doesn't sound like a problem I'm going to be
able to solve here and now, for the project I'm working on.

Ok, no worries. I'm sure I'll figure something out. Thanks again for your
help!



On Thu, Jan 15, 2009 at 4:18 PM, Mark Murphy wrote:

>
> > Ok, I did not realize that. I had made the assumption that they were all
> > DB-based.
>
> Some will be, but I'm under the impression that ContentProvider was
> specifically designed not to force it. For example, some people are using
> ContentProvider to serve static Web content to a WebView, which IMHO
> doesn't fit a database pattern terribly well.
>
> > Anyway, I guess I will have to figure out some other way, then. If anyone
> > has any suggestions, I welcome them :)
>
> I'm sorry if I sounded too harsh in my previous response.
>
> Given time and effort, you could:
>
> -- Design a way for ContentProviders to support OPTIONAL additional
> interfaces that provide some of the hooks you seek
>
> -- Modify the built-in ContentProviders to support those interfaces
>
> -- Submit both as patches to Android and hope they are approved
>
> However, the keys are "time", "effort", "OPTIONAL", and "approved", none
> of which might line up with your near-term objectives...
>
> --
> 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: UI Freezing Issue

2009-01-16 Thread A T
Waiting for the threads to join in this case sort of defeats the purpose of
having the threads... but, yea, the LinkedBlockingQueue sounds like the
solution you need. Just wanted to second that...

On Fri, Jan 16, 2009 at 12:01 PM, Bobbie  wrote:

>
> > Your code snippet is useful, but since it is a part of a larger project,
> > some of my comments may be completely wrong. So, your patience is
> requested.
> >
> > 1. Do I understand your flow correctly -- you are sending an HTTP POST
> > after *every keystroke*? After all, onKeyUp() will get called after
> > every key event handled by this View. That is absolutely going to be
> slow.
> >
> > 2. Similarly, it would appear you are forking athreadafter every
> > keystroke, which seems aggressive. How about a singlebackgroundthread,
> > using a LinkedBlockingQueue or something for communications? When an
> > event occurs in the UIthreadthat thebackgroundthreadshould process,
> > the UIthreadposts an event on the queue. Thebackgroundthreadblocks
> > on the queue and handles events as they arise.
> >
> > 3. Even if you feel that having onebackgroundthreadper keystroke is
> > valid, I am not sure you want to join with thebackgroundthread. That
> > ties up the UIthreaduntil thebackgroundthreadis done, which is not
> > what you want.
>
> Here are my replies, next to the number I am answering for your post:
>
> 1) Yes, after every keystroke, I can change that if need be to update
> on a timer instead (would that be a better way to do it?)
>
> 2) I'm still new to Android, sorry.  Can you post an example of how I
> should implement this?  Never used LinkedBlockingQueue, but it sounds
> like it would resolve my issue of sending the http post requests in
> order, yes?
>
> 3) My intent wasn't to create a thread for each key, I just needed to
> make sure the keystrokes were posted in order, so I thought this was
> the best way to do it.
>  >
>

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



[android-developers] Re: access rows in ListActivity

2009-01-21 Thread A T
Do it in the bindView method and redraw the list view when the heavy task is
done. To make sure you're disabling and enabling the correct row, just make
sure the data that is bound through the adapter has a unique id associated
with it (or some other way of identifying any particular row uniquely) so
you can check for that id when the view is bound.



On Wed, Jan 21, 2009 at 3:36 AM, FENIX  wrote:

>
> Hello guys! I really need your help here..
>
> I want to include one button inside each row in a ListActivity. When
> pressing one of these buttons it will be disabled and will perform a
> heavy task in the background (in a different thread to avoid screen
> blocking). After the action is completed the button will be enabled
> again and the row updated with some results obtained from that "heavy
> operation".
>
> Im filling my List with a custom SimpleCursorAdapter, its getView
> method calls super.getView and in the view (row) returned I access its
> button through findViewById and set my clicklistener (to disable it,
> and launch the heavy task in the background). Once this heavy task is
> finished I need a reference to this row view to find the button and re-
> enable it.
>
> SimpleCursorAdapter´s super.getView() reuses row views shown on screen
> to avoid creating many different rows instances, so when my "heavy
> task" is finished the row view reference i need to reenable its button
> may have been reused in a different row, so in the end I am modifying
> a button in a different row!
>
> I have tried different solutions, for example giving different ID to
> each row view (useless because it gets overwritten when the row view
> is reused...) Obviously creating a different row instance for each row
> whether its shown on screen or not isnt the best solution.
>
> I really have no clue on how to solve this .. 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] Change intent-filter category from within the app?

2009-01-21 Thread A T
Is it possible to change the category of an application's intent filter from
within that application? What I want to do is change my app from being the
default app for a certain intent if a certain condition is met from within
my app which causes it to go out of focus and pause. Then, when it resumes,
I would change it back to default. I have a feeling this is not possible,
and I couldn't find any way to do it in the docs, but I just wanted to check
here before giving up.

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: Query about Content Provider queries...

2009-01-22 Thread A T
So, I'm working on an app that is accessing an existing content provider
which holds a significant amount of data. I will be querying and updating
this content provider frequently, and it has proven to cause noticeable
delays due to the constraints that are required for these queries. I am
wondering if it would be quicker to load the data into a local SQLite DB and
use that to query/update, then commit the data less frequently (like when
the app finishes). I'm hoping that since I can create custom tables and use
raw SQL queries, the responses will be faster, and I can do the updating to
the actual content provider in the background, when the user won't notice.

Yeah, I could just try it rather than asking, but I also want to know if
this is good practice for Android. Or maybe I'm thinking the wrong way and
this is actually what you're supposed to do in a case like this?

...Also, I'm lazy and I didn't want to do all the work only to find out it's
just as slow :P What can I say?

Thanks




On Thu, Jan 15, 2009 at 6:31 PM, A T  wrote:

> You are right about that :)
> Yeah, so, in other words, it doesn't sound like a problem I'm going to be
> able to solve here and now, for the project I'm working on.
>
> Ok, no worries. I'm sure I'll figure something out. Thanks again for your
> help!
>
>
>
>
> On Thu, Jan 15, 2009 at 4:18 PM, Mark Murphy wrote:
>
>>
>> > Ok, I did not realize that. I had made the assumption that they were all
>> > DB-based.
>>
>> Some will be, but I'm under the impression that ContentProvider was
>> specifically designed not to force it. For example, some people are using
>> ContentProvider to serve static Web content to a WebView, which IMHO
>> doesn't fit a database pattern terribly well.
>>
>> > Anyway, I guess I will have to figure out some other way, then. If
>> anyone
>> > has any suggestions, I welcome them :)
>>
>> I'm sorry if I sounded too harsh in my previous response.
>>
>> Given time and effort, you could:
>>
>> -- Design a way for ContentProviders to support OPTIONAL additional
>> interfaces that provide some of the hooks you seek
>>
>> -- Modify the built-in ContentProviders to support those interfaces
>>
>> -- Submit both as patches to Android and hope they are approved
>>
>> However, the keys are "time", "effort", "OPTIONAL", and "approved", none
>> of which might line up with your near-term objectives...
>>
>> --
>>  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: Query about Content Provider queries...

2009-01-22 Thread A T
Oh, that's not the problem. That will only have to be done once -- the first
time the app is run on a device. The rest of the queries and updates will be
to and from my own database. The updates to the content provider will be
done in the background, and it's ok if the data isn't up to date immediately
upon creation/resuming. The user shouldn't have enough time to see incorrect
data and quit the app before he sees it get updated, but it's ok if the
incorrect data is seen for a brief period.

The thing is, that's what is happening now, but since the queries themselves
take a long time, the user doesn't even get to see the incorrect data right
away!  There is an annoying lag in the program when it is created/resumed,
and THEN it gets updated after another brief lag. If I can get rid of the
initial lag, long updates done in the background are no problem.

I think I have my answer, though. From what you said and with the queries
I'm using, I think it will be faster. Thanks a lot for your reply!

AT

On Thu, Jan 22, 2009 at 12:36 PM, Dianne Hackborn wrote:

> It would be hard to say, it depends very much on what exactly you are
> doing.  In general direct queries on a database are quite fast, but it would
> be hard to say how fast it will be to retrieve all data from an existing
> provider and write it into your own database.
>
>
> On Thu, Jan 22, 2009 at 8:52 AM, A T  wrote:
>
>> So, I'm working on an app that is accessing an existing content provider
>> which holds a significant amount of data. I will be querying and updating
>> this content provider frequently, and it has proven to cause noticeable
>> delays due to the constraints that are required for these queries. I am
>> wondering if it would be quicker to load the data into a local SQLite DB and
>> use that to query/update, then commit the data less frequently (like when
>> the app finishes). I'm hoping that since I can create custom tables and use
>> raw SQL queries, the responses will be faster, and I can do the updating to
>> the actual content provider in the background, when the user won't notice.
>>
>> Yeah, I could just try it rather than asking, but I also want to know if
>> this is good practice for Android. Or maybe I'm thinking the wrong way and
>> this is actually what you're supposed to do in a case like this?
>>
>> ...Also, I'm lazy and I didn't want to do all the work only to find out
>> it's just as slow :P What can I say?
>>
>> Thanks
>>
>>
>>
>>
>> On Thu, Jan 15, 2009 at 6:31 PM, A T  wrote:
>>
>>> You are right about that :)
>>> Yeah, so, in other words, it doesn't sound like a problem I'm going to be
>>> able to solve here and now, for the project I'm working on.
>>>
>>> Ok, no worries. I'm sure I'll figure something out. Thanks again for your
>>> help!
>>>
>>>
>>>
>>>
>>> On Thu, Jan 15, 2009 at 4:18 PM, Mark Murphy wrote:
>>>
>>>>
>>>> > Ok, I did not realize that. I had made the assumption that they were
>>>> all
>>>> > DB-based.
>>>>
>>>> Some will be, but I'm under the impression that ContentProvider was
>>>> specifically designed not to force it. For example, some people are
>>>> using
>>>> ContentProvider to serve static Web content to a WebView, which IMHO
>>>> doesn't fit a database pattern terribly well.
>>>>
>>>> > Anyway, I guess I will have to figure out some other way, then. If
>>>> anyone
>>>> > has any suggestions, I welcome them :)
>>>>
>>>> I'm sorry if I sounded too harsh in my previous response.
>>>>
>>>> Given time and effort, you could:
>>>>
>>>> -- Design a way for ContentProviders to support OPTIONAL additional
>>>> interfaces that provide some of the hooks you seek
>>>>
>>>> -- Modify the built-in ContentProviders to support those interfaces
>>>>
>>>> -- Submit both as patches to Android and hope they are approved
>>>>
>>>> However, the keys are "time", "effort", "OPTIONAL", and "approved", none
>>>> of which might line up with your near-term objectives...
>>>>
>>>> --
>>>>  Mark Murphy (a Commons Guy)
>>>> http://commonsware.com
>>>> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
>>>>
>>>>
>>>>
>>>>
>>>>
>>
>>
>>
>
>
> --
> 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] Preferences not saved *sometimes*

2009-01-22 Thread A T
I'm having this problem with one of my apps where some people are reporting
that their preferences are not being saved when they close and resume the
app. The preferences theyre talking about happen to be actual Preferences
(i.e. the built-in preferences manager for an activity). They say they're
not doing anything special, just exiting the app and going back to it. Does
anyone know why the prefs wouldn't be saved for only this select few people?
I'm at a complete loss.
Thank you

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



[android-developers] Re: Preferences not saved *sometimes*

2009-01-23 Thread A T
I'll give that a try. Will that really change anything, though? The
variables shouldn't change, especialy if the app is in focus. And right now
I save them onResume and onPause.



On Thu, Jan 22, 2009 at 5:54 PM, Sundog  wrote:

>
> Trying to post this again... Can you save your preferences when they
> change, instead of upon exit?
>
> On Jan 22, 2:04 pm, A T  wrote:
>  > I'm having this problem with one of my apps where some people are
> reporting
> > that their preferences are not being saved when they close and resume the
> > app. The preferences theyre talking about happen to be actual Preferences
> > (i.e. the built-in preferences manager for an activity). They say they're
> > not doing anything special, just exiting the app and going back to it.
> Does
> > anyone know why the prefs wouldn't be saved for only this select few
> people?
> > I'm at a complete loss.
> > Thank you
>
>  >
>

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



[android-developers] Re: Preferences not saved *sometimes*

2009-01-23 Thread A T
Hmm. I'm going to feel stupid if this is the problem: I'm reinstantiating
the preferences object and its editor every time I load them and save/commit
them (i.e. within the onResume and onPause methods). Is that not a good idea
(aside from efficiency.. I mean in terms of the prefs being persistent)?

On Fri, Jan 23, 2009 at 8:59 AM, android_soft  wrote:

>
> Well ,not sure if this will help, since there's no code snippetbut
> here goes
>
> 1. You can hold on to the SharedPreferences.Editor object...
> 2. edit as much as you want
> 3. In OnPause(), go ahead and commit the editor ...
>
> Though I prefer saving the edits as they change...
>
> On Jan 23, 5:13 pm, A T  wrote:
> > I'll give that a try. Will that really change anything, though? The
> > variables shouldn't change, especialy if the app is in focus. And right
> now
> > I save them onResume and onPause.
> >
>  > On Thu, Jan 22, 2009 at 5:54 PM, Sundog  wrote:
> >
> > > Trying to post this again... Can you save your preferences when they
> > > change, instead of upon exit?
> >
> > > On Jan 22, 2:04 pm, A T  wrote:
> > >  > I'm having this problem with one of my apps where some people are
> > > reporting
> > > > that their preferences are not being saved when they close and resume
> the
> > > > app. The preferences theyre talking about happen to be actual
> Preferences
> > > > (i.e. the built-in preferences manager for an activity). They say
> they're
> > > > not doing anything special, just exiting the app and going back to
> it.
> > > Does
> > > > anyone know why the prefs wouldn't be saved for only this select few
> > > people?
> > > > I'm at a complete loss.
> > > > Thank you
> >
>

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



[android-developers] Re: Preferences not saved *sometimes*

2009-01-23 Thread A T
Then again it doesn't make sense that the prefs remain persistent on my
phone and presumably a lot of other people's phones, otherwise I would be
getting more reports of this bug...



On Fri, Jan 23, 2009 at 11:17 AM, A T  wrote:

> Hmm. I'm going to feel stupid if this is the problem: I'm reinstantiating
> the preferences object and its editor every time I load them and save/commit
> them (i.e. within the onResume and onPause methods). Is that not a good idea
> (aside from efficiency.. I mean in terms of the prefs being persistent)?
>
>
> On Fri, Jan 23, 2009 at 8:59 AM, android_soft wrote:
>
>>
>> Well ,not sure if this will help, since there's no code snippetbut
>> here goes
>>
>> 1. You can hold on to the SharedPreferences.Editor object...
>> 2. edit as much as you want
>> 3. In OnPause(), go ahead and commit the editor ...
>>
>> Though I prefer saving the edits as they change...
>>
>> On Jan 23, 5:13 pm, A T  wrote:
>> > I'll give that a try. Will that really change anything, though? The
>> > variables shouldn't change, especialy if the app is in focus. And right
>> now
>> > I save them onResume and onPause.
>> >
>>  > On Thu, Jan 22, 2009 at 5:54 PM, Sundog  wrote:
>> >
>> > > Trying to post this again... Can you save your preferences when they
>> > > change, instead of upon exit?
>> >
>> > > On Jan 22, 2:04 pm, A T  wrote:
>> > >  > I'm having this problem with one of my apps where some people are
>> > > reporting
>> > > > that their preferences are not being saved when they close and
>> resume the
>> > > > app. The preferences theyre talking about happen to be actual
>> Preferences
>> > > > (i.e. the built-in preferences manager for an activity). They say
>> they're
>> > > > not doing anything special, just exiting the app and going back to
>> it.
>> > > Does
>> > > > anyone know why the prefs wouldn't be saved for only this select few
>> > > people?
>> > > > I'm at a complete loss.
>> > > > Thank you
>> >>
>>
>

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



[android-developers] Re: RecentCallsListActivity: adding a contextual menu extra entry

2009-01-23 Thread A T
I believe this exact question was asked recently and it was said that this
is not possible...

I agree it would be nice, though.

On Fri, Jan 23, 2009 at 7:55 AM, elDoudou wrote:

>
> Sorry to insist, but we thought that a very benefit of Android is to
> re-use other Activities via Intents. Any one has a hint, on how to add
> extra menu entry to the built-in "Contacts" Android application? Thank
> you for your understanding.
>
> Cheers, Édouard
>  >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Updated app not showing up in Market's "by date" sorting?

2009-01-26 Thread A T
Yeah, I did that by accident once. Unpublished it, uploaded the update, and
it was on top again. All other updates before and after that stayed at the
same spot.

I hope this will be fixed now...

On Mon, Jan 26, 2009 at 5:40 AM, arnouf  wrote:

>
> Unpublish current app, and post your new app...perhaps it's the "bad"
> solution to be on the top always..
>
> On Jan 26, 11:25 am, android_soft  wrote:
> > may be you can post a small portion of your manifest where the version
> > info goes, so others know what you got.(especially people who are not
> > the market yet but who can help if they notice anything amiss)
> >
>

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



[android-developers] How to remove app from the Market

2009-02-16 Thread A T
Is there a way to remove my application from the Market? I tried
"Unpublishing" it but after a few hours it just gets re-published... Is
there a way to permanently delete?
Thanks,

AT

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