Re: [android-developers] Re: Correct way to kill the application

2010-07-30 Thread Dianne Hackborn
You don't need task killers.  Some people like them, and who I am I to argue
with what people like? ;)

On Fri, Jul 30, 2010 at 8:00 PM, Mystique  wrote:

> One question, not sure whether it is related.
> Since Android manage task and application automatically and terminate
> if necessary why do we need application like Advance Task Killer?
> Isn't it redundant? I understand why Android was design this way, to
> help speed up application and extra memory if not needed is just waste
> so I rather have my app ready in the background and let Android decide
> whether to close it.
>
> Back to qns, why do we need ATK??? I have it install but I do not use
> it anymore and doesn't seems to make a different.
>
> On Jul 31, 6:38 am, Eric F  wrote:
> > Yeah this is exactly what I thought too. Just because non-technical
> > people download task killers from the market doesn't mean that task
> > killers are necessary. In my opinion it is way more likely that the
> > explanation is that people are just very bad at shifting their way of
> > thinking from paradigm to paradigm.
> >
> > And it also made me think of the windows tuner programs. I've noticed
> > a trend in the way people think these days. I call it the do-nothing
> > dilemma. We are incapable of doing nothing these days. What I mean is,
> > when we look at a problem we instantly act for the "solution". Because
> > we are so advanced these days that we are just used to things being
> > already solved somewhere by someone, somehow. I am only 30, but I
> > suspect that people living in the 1920s had more of a grin and bear it
> > mentality ("man up") when it came to problems and hardship.
> >
> > Now, whether it's a kid hurting him/herself on a swing and people
> > needing to "Do Something", banning swingsets from all playgrounds. Or
> > a cellphone chugging along while syncing contacts, people don't think
> > "huh, my cell phone is not as quick as I want it. Oh well I'll just
> > deal, it's still a great phone and I'm sure in the future we'll have
> > faster phones that don't slow down". They think "Wow, surely there
> > must be someone to blame for this and someone with the fix. Oh here
> > this task killer allows me to solve my problem". Soon they are
> > probably having more problems than they started, but they don't care
> > because now everytime they get disgruntled they can "do something"
> > about it. And nobody wants to admit that they are administrating
> > themselves placebos, so feeling like it *is* a valid solution is self
> > reinforcing.
> >
> > That was a bit long winded. But I agree with Kostya, I don' think
> > people downloading task killers from the marketplace show a deficiency
> > in the OS. Only a deficiency in the way people adapt to new things.
> >
> > Obviously the pre-bundled apps that can't be uninstalled are a huge
> > problem. task killers not really being a good solution there, the real
> > solution is root -> uninstall. Hopefully Google will be able to nudge
> > companies in the right direction. I doubt we'll ever be in a crapware
> > free world, but perhaps they can be convinced to make crapware
> > uninstallable.
> >
> > -E
> >
> > On Jul 30, 1:33 pm, Kostya Vasilyev  wrote:
> >
> > > Technical details aside, I think it's just human nature.
> >
> > > Some percentage of users just have a strong desire to have something
> > > "magical" that *supposedly* makes their device (Android phone or
> desktop
> > > OS) work much better.
> >
> > > Remember - there used to be all kinds of memory optimizers for Windows?
> > > Also registry cleaners, various "tweak" and "tune-up" utilities, etc.
> > > etc. etc. No-one is saying that Windows (or any other OS :) is perfect,
> > > but these apps promise much more than they actually do, and sometimes
> > > cause harm.
> >
> > > There is also a whole subculture of users who root and flash their
> > > phones - I am convinced most do it because it addresses some
> > > psychological need, more than anything else.
> >
> > > So personally, I am quite happy to see that Google is starting to limit
> > > what task killers can do. I believe interfering with the platform's
> core
> > > functionality is definitely a bad thing.
> >
> > > I have enough bugs in my code to have to deal with someone else's.
> >
> > > -- Kostya
> >
> > > 31.07.2010 0:08, Indicator Veritatis пишет:
> >
> > > > A good article. A little harsh on the OP, but even so, a good
> article.
> >
> > > > After all: given that that IS the design of Android, that
> Applications
> > > > should not quit, but leave termination up to the OS, the article
> makes
> > > > its case well, even elegantly.
> >
> > > > But I cannot help but notice: after Android did all that hard work of
> > > > designing the whole system to work that way, what does the market say
> > > > about it? The presence of so many "Task Managers" for Android seems
> to
> > > > imply that the Market does NOT agree with this paradigm.
> >
> > > > Nor would that conclusion really surpris

Re: [android-developers] About InputMethodService.switchInputMethod

2010-07-30 Thread Dianne Hackborn
Is the other input method actually enabled by the user?

Also you aren't clear where you are using this, but the API only works from
within the current input method.  It does not work for applications.

On Fri, Jul 30, 2010 at 11:15 PM, a...@tw  wrote:

> Anyone ever use this API: switchInputMethod?
>
> I want to switch my IME from in my code.When I call this API,
> sometimes the IME switched sometimes not.
> When the requested IME not launched or display in the screen, the
> original IME still remain in the screen, but cannot commit text into
> the box.
>
> Or another alternative way to do same thing ?
>
> From the comment in InputMethodService.java
>/**
> * Force switch to a new input method, as identified by id var>.  This
> * input method will be destroyed, and the requested one started
> on the
> * current input field.
> *
> * @param id Unique identifier of the new input method ot start.
> */
> public void switchInputMethod(String id) { 
>
> Does it mean we lost the connection between editor and IME?
>
> Is there any procedure or prerequisite needed?
>
> I found it also reported as issue#8725.
> http://code.google.com/p/android/issues/detail?id=8725
>
> 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
>



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

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

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

[android-developers] Re: User thread to update UI but still come after, can anyone look at this code and help me?

2010-07-30 Thread Mystique
What is this error in logcat?
It says "can't create handler inside thread that has not called
looper.prepare()"
...

On Jul 31, 1:59 pm, Mystique  wrote:
> Nice, the dialog appear but DoSometing() crash for some reason.
> At least the logic work, let me check on the DoSomething(). It was ok
> w/o running as thread.
>
> Many thanks.
>
> On Jul 31, 1:17 pm, paulb  wrote:
>
>
>
> > Actually, I meant to write runInUIThread instead of closeLoadingDialog
> > in the handler.post statement
>
> > On Sat, Jul 31, 2010 at 3:16 PM, paulb  wrote:
> > > Hello Mystique,
>
> > > When this code starts the thread, it then goes straight back to
> > > execute DoSomeTask() while the thread is running, and so most of the
> > > time the dialog will be shown after DoSomeTask.
>
> > > Maybe you meant to do something like this:
>
> > >   ProgressDialog dialog;
>
> > >  final Runnable runInUIThread = new Runnable()  {
> > >       public void run() {
> > >           dialog.dismiss();
> > >       }
> > >  }
>
> > > �...@override
> > >  public void onClick(View v) {
> > >          // TODO Auto-generated method stub
>
> > >          dialog = new ProgressDialog(CloseVault.this);
> > >          dialog.setMessage("Please wait...");
> > >          dialog.show();
>
> > >          Thread myTask = new Thread() {
> > >                       �...@override
> > >                        public void run() {
> > >                            DoSomeTask();
> > >                            handler.post(closeLoadingDialog);
> > >                        }
> > >                };
> > >          myTask.start();
> > >  }
>
> > > You are right, though, ASyncTask is a nicer way of doing it.
>
> > > On Sat, Jul 31, 2010 at 2:52 PM, Mystique  wrote:
> > >> Hi,
> > >> I'm trying to learn AsyncTask and Thread but Thread first...
> > >> I am trying to display a Dialog before "DoSomeTask()" but seems like
> > >> the Dialog always come after DoSomeTask().
> > >> Did I do something wrong here?
>
> > >> Thanks.
>
> > >> --- code---
>
> > >>   @Override
> > >>   public void onClick(View v) {
> > >>           // TODO Auto-generated method stub
>
> > >>           mainProcessing();
> > >>           DoSomeTask();
> > >>   }
>
> > >>   private void mainProcessing() {
> > >>           Thread thread = new Thread(null, doBackgroundThreadProcessing,
> > >> "Background");
> > >>           thread.start();
> > >>   }
>
> > >>   private Runnable doBackgroundThreadProcessing = new Runnable() {
> > >>           public void run() {
> > >>                   backgroundThreadProcessing();
>
> > >>           }
> > >>   };
>
> > >>   private void backgroundThreadProcessing() {
> > >>           handler.post(doUpdateGUI);
> > >>   }
>
> > >>   private Runnable doUpdateGUI = new Runnable() {
> > >>           public void run() {
> > >>                   updateGUI();
> > >>           }
> > >>   };
>
> > >>   private void updateGUI() {
> > >>           final ProgressDialog dialog = new 
> > >> ProgressDialog(CloseVault.this);
> > >>           dialog.setMessage("Please wait...");
> > >>           dialog.show();
> > >>   }
>
> > >> --
> > >> You received this message because you are subscribed to the Google
> > >> Groups "Android Developers" group.
> > >> To post to this group, send email to android-developers@googlegroups.com
> > >> To unsubscribe from this group, send email to
> > >> android-developers+unsubscr...@googlegroups.com
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/android-developers?hl=en

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


[android-developers] About InputMethodService.switchInputMethod

2010-07-30 Thread a...@tw
Anyone ever use this API: switchInputMethod?

I want to switch my IME from in my code.When I call this API,
sometimes the IME switched sometimes not.
When the requested IME not launched or display in the screen, the
original IME still remain in the screen, but cannot commit text into
the box.

Or another alternative way to do same thing ?

>From the comment in InputMethodService.java
/**
 * Force switch to a new input method, as identified by id.  This
 * input method will be destroyed, and the requested one started
on the
 * current input field.
 *
 * @param id Unique identifier of the new input method ot start.
 */
public void switchInputMethod(String id) { 

Does it mean we lost the connection between editor and IME?

Is there any procedure or prerequisite needed?

I found it also reported as issue#8725.
http://code.google.com/p/android/issues/detail?id=8725

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


Re: [android-developers] Re: AlertDialog changes sequence of events

2010-07-30 Thread Frank Weiss
I strongly recommend you try to find some sample code at
developer.android.com that does something similar and follow that
example.

In other UI frameworks, there's a convenience function, such as
MsgBox() that accomplishes "blocking" the UI thread. I don't know
exactly how it's done, but I suspect it uses co-routines.
Unfortunately, I don't know how to do co-routines in Java, if that's
even possible.

I suggest two solutions: 1) completion methods, 2) state machine.

First is like this: start with this code sequence:

code section A // work done up to needing user input
block for user input
if (OK) {
code section B // work done for positive user input
}

refactor that (requires moving local variables to fields) to

methodA() {
code section A
}
methodB() {
code section B
}
methodA();
block for user input
if (OK) {
methodB();
}

then refactor that to: call methodB in the positive callback method of
the alert dialog instead of after the dialog.show().

The state machine approach is more general, and handles more complex
situations and is easier to modify than a rat's nest of completion
methods..

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


[android-developers] Re: User thread to update UI but still come after, can anyone look at this code and help me?

2010-07-30 Thread Mystique
Nice, the dialog appear but DoSometing() crash for some reason.
At least the logic work, let me check on the DoSomething(). It was ok
w/o running as thread.

Many thanks.

On Jul 31, 1:17 pm, paulb  wrote:
> Actually, I meant to write runInUIThread instead of closeLoadingDialog
> in the handler.post statement
>
>
>
> On Sat, Jul 31, 2010 at 3:16 PM, paulb  wrote:
> > Hello Mystique,
>
> > When this code starts the thread, it then goes straight back to
> > execute DoSomeTask() while the thread is running, and so most of the
> > time the dialog will be shown after DoSomeTask.
>
> > Maybe you meant to do something like this:
>
> >   ProgressDialog dialog;
>
> >  final Runnable runInUIThread = new Runnable()  {
> >       public void run() {
> >           dialog.dismiss();
> >       }
> >  }
>
> > �...@override
> >  public void onClick(View v) {
> >          // TODO Auto-generated method stub
>
> >          dialog = new ProgressDialog(CloseVault.this);
> >          dialog.setMessage("Please wait...");
> >          dialog.show();
>
> >          Thread myTask = new Thread() {
> >                       �...@override
> >                        public void run() {
> >                            DoSomeTask();
> >                            handler.post(closeLoadingDialog);
> >                        }
> >                };
> >          myTask.start();
> >  }
>
> > You are right, though, ASyncTask is a nicer way of doing it.
>
> > On Sat, Jul 31, 2010 at 2:52 PM, Mystique  wrote:
> >> Hi,
> >> I'm trying to learn AsyncTask and Thread but Thread first...
> >> I am trying to display a Dialog before "DoSomeTask()" but seems like
> >> the Dialog always come after DoSomeTask().
> >> Did I do something wrong here?
>
> >> Thanks.
>
> >> --- code---
>
> >>   @Override
> >>   public void onClick(View v) {
> >>           // TODO Auto-generated method stub
>
> >>           mainProcessing();
> >>           DoSomeTask();
> >>   }
>
> >>   private void mainProcessing() {
> >>           Thread thread = new Thread(null, doBackgroundThreadProcessing,
> >> "Background");
> >>           thread.start();
> >>   }
>
> >>   private Runnable doBackgroundThreadProcessing = new Runnable() {
> >>           public void run() {
> >>                   backgroundThreadProcessing();
>
> >>           }
> >>   };
>
> >>   private void backgroundThreadProcessing() {
> >>           handler.post(doUpdateGUI);
> >>   }
>
> >>   private Runnable doUpdateGUI = new Runnable() {
> >>           public void run() {
> >>                   updateGUI();
> >>           }
> >>   };
>
> >>   private void updateGUI() {
> >>           final ProgressDialog dialog = new 
> >> ProgressDialog(CloseVault.this);
> >>           dialog.setMessage("Please wait...");
> >>           dialog.show();
> >>   }
>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group.
> >> To post to this group, send email to android-developers@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> android-developers+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >>http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Need help in compile android source under ubuntu 10.04

2010-07-30 Thread hap 497
Hi,

I have following android web site and install the necessary libraries
for building android under ubuntu.

But i am getting the following linker error.  Can you please tell me
how can I resolve that?

host SharedLib: libneo_cs (out/host/linux-x86/obj/lib/libneo_cs.so)
host C: libneo_cgi <= external/clearsilver/cgi/cgiwrap.c
host C: libneo_cgi <= external/clearsilver/cgi/cgi.c
host C: libneo_cgi <= external/clearsilver/cgi/html.c
host C: libneo_cgi <= external/clearsilver/cgi/date.c
host C: libneo_cgi <= external/clearsilver/cgi/rfc2388.c
host SharedLib: libneo_cgi (out/host/linux-x86/obj/lib/libneo_cgi.so)
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../libz.so when searching for
-lz
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../libz.a when searching for
-lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status

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


Re: [android-developers] User thread to update UI but still come after, can anyone look at this code and help me?

2010-07-30 Thread paulb
Actually, I meant to write runInUIThread instead of closeLoadingDialog
in the handler.post statement

On Sat, Jul 31, 2010 at 3:16 PM, paulb  wrote:
> Hello Mystique,
>
> When this code starts the thread, it then goes straight back to
> execute DoSomeTask() while the thread is running, and so most of the
> time the dialog will be shown after DoSomeTask.
>
> Maybe you meant to do something like this:
>
>   ProgressDialog dialog;
>
>  final Runnable runInUIThread = new Runnable()  {
>       public void run() {
>           dialog.dismiss();
>       }
>  }
>
> �...@override
>  public void onClick(View v) {
>          // TODO Auto-generated method stub
>
>          dialog = new ProgressDialog(CloseVault.this);
>          dialog.setMessage("Please wait...");
>          dialog.show();
>
>          Thread myTask = new Thread() {
>                       �...@override
>                        public void run() {
>                            DoSomeTask();
>                            handler.post(closeLoadingDialog);
>                        }
>                };
>          myTask.start();
>  }
>
>
> You are right, though, ASyncTask is a nicer way of doing it.
>
> On Sat, Jul 31, 2010 at 2:52 PM, Mystique  wrote:
>> Hi,
>> I'm trying to learn AsyncTask and Thread but Thread first...
>> I am trying to display a Dialog before "DoSomeTask()" but seems like
>> the Dialog always come after DoSomeTask().
>> Did I do something wrong here?
>>
>> Thanks.
>>
>> --- code---
>>
>>   @Override
>>   public void onClick(View v) {
>>           // TODO Auto-generated method stub
>>
>>           mainProcessing();
>>           DoSomeTask();
>>   }
>>
>>   private void mainProcessing() {
>>           Thread thread = new Thread(null, doBackgroundThreadProcessing,
>> "Background");
>>           thread.start();
>>   }
>>
>>   private Runnable doBackgroundThreadProcessing = new Runnable() {
>>           public void run() {
>>                   backgroundThreadProcessing();
>>
>>           }
>>   };
>>
>>   private void backgroundThreadProcessing() {
>>           handler.post(doUpdateGUI);
>>   }
>>
>>   private Runnable doUpdateGUI = new Runnable() {
>>           public void run() {
>>                   updateGUI();
>>           }
>>   };
>>
>>   private void updateGUI() {
>>           final ProgressDialog dialog = new ProgressDialog(CloseVault.this);
>>           dialog.setMessage("Please wait...");
>>           dialog.show();
>>   }
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>

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


Re: [android-developers] User thread to update UI but still come after, can anyone look at this code and help me?

2010-07-30 Thread paulb
Hello Mystique,

When this code starts the thread, it then goes straight back to
execute DoSomeTask() while the thread is running, and so most of the
time the dialog will be shown after DoSomeTask.

Maybe you meant to do something like this:

   ProgressDialog dialog;

  final Runnable runInUIThread = new Runnable()  {
   public void run() {
   dialog.dismiss();
   }
  }

  @Override
  public void onClick(View v) {
  // TODO Auto-generated method stub

  dialog = new ProgressDialog(CloseVault.this);
  dialog.setMessage("Please wait...");
  dialog.show();

  Thread myTask = new Thread() {
@Override
public void run() {
DoSomeTask();
handler.post(closeLoadingDialog);
}
};
  myTask.start();
  }


You are right, though, ASyncTask is a nicer way of doing it.

On Sat, Jul 31, 2010 at 2:52 PM, Mystique  wrote:
> Hi,
> I'm trying to learn AsyncTask and Thread but Thread first...
> I am trying to display a Dialog before "DoSomeTask()" but seems like
> the Dialog always come after DoSomeTask().
> Did I do something wrong here?
>
> Thanks.
>
> --- code---
>
>   @Override
>   public void onClick(View v) {
>           // TODO Auto-generated method stub
>
>           mainProcessing();
>           DoSomeTask();
>   }
>
>   private void mainProcessing() {
>           Thread thread = new Thread(null, doBackgroundThreadProcessing,
> "Background");
>           thread.start();
>   }
>
>   private Runnable doBackgroundThreadProcessing = new Runnable() {
>           public void run() {
>                   backgroundThreadProcessing();
>
>           }
>   };
>
>   private void backgroundThreadProcessing() {
>           handler.post(doUpdateGUI);
>   }
>
>   private Runnable doUpdateGUI = new Runnable() {
>           public void run() {
>                   updateGUI();
>           }
>   };
>
>   private void updateGUI() {
>           final ProgressDialog dialog = new ProgressDialog(CloseVault.this);
>           dialog.setMessage("Please wait...");
>           dialog.show();
>   }
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: Inner ListView not respecting layout gravity or width

2010-07-30 Thread William Ferguson
Sorry Mark, not sure what you mean.

I was using a nested ListView because for each instanve of the outer
list item there will be one or more instances of the inner.
In the example I am using the outer is Contact, and the inner is
RawContact.

When you say "stitch them together at the adapter level", do you mean
implement my own CursorAdapter that amalgamates 2 or more cursors?
How in my CursorAdapter implementation might I represent one or more
rows of the inner query other than using a ListVIew?

Eg from example given above.

Contact-1, Contact1-Name
   RawContact-1-a
   RawContact-1-b
Contact-2, Contact1-Name
   RawContact-2-z


On Jul 31, 10:46 am, Mark Murphy  wrote:
> On Fri, Jul 30, 2010 at 8:36 PM, William Ferguson
>
>  wrote:
> > I have a ListView that contains several elements, one of which is
> > another ListView.
>
> I'll be stunned if that works. Why nest ListViews? If your issue is
> that you have multiple sources of data, stitch them together at the
> adapter level.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 2.9 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] User thread to update UI but still come after, can anyone look at this code and help me?

2010-07-30 Thread Mystique
Hi,
I'm trying to learn AsyncTask and Thread but Thread first...
I am trying to display a Dialog before "DoSomeTask()" but seems like
the Dialog always come after DoSomeTask().
Did I do something wrong here?

Thanks.

--- code---

   @Override
   public void onClick(View v) {
   // TODO Auto-generated method stub

   mainProcessing();
   DoSomeTask();
   }

   private void mainProcessing() {
   Thread thread = new Thread(null, doBackgroundThreadProcessing,
"Background");
   thread.start();
   }

   private Runnable doBackgroundThreadProcessing = new Runnable() {
   public void run() {
   backgroundThreadProcessing();

   }
   };

   private void backgroundThreadProcessing() {
   handler.post(doUpdateGUI);
   }

   private Runnable doUpdateGUI = new Runnable() {
   public void run() {
   updateGUI();
   }
   };

   private void updateGUI() {
   final ProgressDialog dialog = new ProgressDialog(CloseVault.this);
   dialog.setMessage("Please wait...");
   dialog.show();
   }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Anyone have reports of their app not drawing correctly on a Droid X?

2010-07-30 Thread Maps.Huge.Info (Maps API Guru)
I had several reports of my main app malfunctioning on the Droid X, it
was supposed to be a problem with panning. I managed to get my hands
on a unit to test the issue and it turned out to be nothing. From my
tests, the Droid X responds exactly like the Droid, same screen size
(pixel dimensions anyway) too.

It could be that the user is the one malfunctioning, it was in my
case. If your app tests out on the Droid, you are probably good to go.

-John Coryat

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


[android-developers] Anyone have reports of their app not drawing correctly on a Droid X?

2010-07-30 Thread dm1973
I have tested on the simulator motorola provides and on various
hardware (Droid, Nexus One, G1,wildfire) but can't reproduce anything.
Wondering if anyone else has had any issues.

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

2010-07-30 Thread Warren
I've got a partial solution to this.  If you use
http://market.android.com/search?q=pname:com.my.package  the url
works, but it does not automatically open with the market since other
applications, like the browser are also registered to handle http://
intents. Instead, the user has to know to choose the market.


On Jul 30, 10:01 pm, Warren  wrote:
> No answers to his question? I also tried doing this with no success on
> a Droid. I tried  "market://details?id=com.my.package"  and  " href='market://details?id=com.my.package'>link"
>
> Links with http://  need no special markup, they just work. For
> instance, includinghttp://www.google.comin a text message results in
> the url being shaded blue. And when you click thelinkit opens the
> browser as expected.
>
> On Jul 7, 2:44 am, Nishant  wrote:
>
>
>
> > Hi,
>
> > I have tried via  but it is not working.
>
> > I have also checked in T-mobile G1 but it does not show melink.
>
> > How to set androidmarketlinkinsms?
>
> > Regards,
> > Nishant Shah

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


Re: [android-developers] Re: Using barcode scanner as input method?

2010-07-30 Thread for android
Don't you guys think that BarCode reading should be part of a the SDK
itself,instead of everyone creating their own kind of
implementations???Thoughts?

On Mon, Jun 28, 2010 at 10:13 AM, Brad Gies  wrote:

> What's the problem you are having?
>
> The Zxing barcode scanner returns the barcode to your app... and you only
> need to put where you want it.
>
>
>
>
> On 27/06/2010 9:39 PM, brucko wrote:
>
>>
>> On Jun 17, 12:44 am, PinkSharK  wrote:
>>
>>
>>> +1, I am also interested in it. I have installed two of the first free
>>> applications from the Android Market listed when looking for
>>> "barcode":BarcodeScanner from ZXing Team and pic2shop by Vision
>>> Smarts. Unfortunately, both do not allow this simple feature: scan
>>> abarcodeusing the camera to put the string of digits at the cursor
>>> position. Do not tell me I have to develop an application from scratch
>>> to get this...
>>> PinkSharK
>>>
>>>
>> I am an now actually working on a developing a couple of small apps to
>> achieve exactly this.
>>
>> What type of scenarios are you looking to use this functionality?
>>
>> Do you need to scan barcodes as a one off or many at once?
>>
>>
>>
>
> --
> Sincerely,
>
> Brad Gies
> ---
> Bistro Bot - Bistro Blurb
> http://www.bgies.com
> http://www.bistroblurb.com
> http://www.ihottonight.com
> ---
>
> Never doubt that a small group of thoughtful, committed people can
> change the world. Indeed. It is the only thing that ever has - Margaret
> Mead
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: Android market link in SMS

2010-07-30 Thread Warren
No answers to his question? I also tried doing this with no success on
a Droid. I tried  "market://details?id=com.my.package"  and  "link"

Links with http://  need no special markup, they just work. For
instance, including http://www.google.com in a text message results in
the url being shaded blue. And when you click the link it opens the
browser as expected.



On Jul 7, 2:44 am, Nishant  wrote:
> Hi,
>
> I have tried via  but it is not working.
>
> I have also checked in T-mobile G1 but it does not show melink.
>
> How to set androidmarketlinkinsms?
>
> Regards,
> Nishant Shah

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

2010-07-30 Thread Mystique
One question, not sure whether it is related.
Since Android manage task and application automatically and terminate
if necessary why do we need application like Advance Task Killer?
Isn't it redundant? I understand why Android was design this way, to
help speed up application and extra memory if not needed is just waste
so I rather have my app ready in the background and let Android decide
whether to close it.

Back to qns, why do we need ATK??? I have it install but I do not use
it anymore and doesn't seems to make a different.

On Jul 31, 6:38 am, Eric F  wrote:
> Yeah this is exactly what I thought too. Just because non-technical
> people download task killers from the market doesn't mean that task
> killers are necessary. In my opinion it is way more likely that the
> explanation is that people are just very bad at shifting their way of
> thinking from paradigm to paradigm.
>
> And it also made me think of the windows tuner programs. I've noticed
> a trend in the way people think these days. I call it the do-nothing
> dilemma. We are incapable of doing nothing these days. What I mean is,
> when we look at a problem we instantly act for the "solution". Because
> we are so advanced these days that we are just used to things being
> already solved somewhere by someone, somehow. I am only 30, but I
> suspect that people living in the 1920s had more of a grin and bear it
> mentality ("man up") when it came to problems and hardship.
>
> Now, whether it's a kid hurting him/herself on a swing and people
> needing to "Do Something", banning swingsets from all playgrounds. Or
> a cellphone chugging along while syncing contacts, people don't think
> "huh, my cell phone is not as quick as I want it. Oh well I'll just
> deal, it's still a great phone and I'm sure in the future we'll have
> faster phones that don't slow down". They think "Wow, surely there
> must be someone to blame for this and someone with the fix. Oh here
> this task killer allows me to solve my problem". Soon they are
> probably having more problems than they started, but they don't care
> because now everytime they get disgruntled they can "do something"
> about it. And nobody wants to admit that they are administrating
> themselves placebos, so feeling like it *is* a valid solution is self
> reinforcing.
>
> That was a bit long winded. But I agree with Kostya, I don' think
> people downloading task killers from the marketplace show a deficiency
> in the OS. Only a deficiency in the way people adapt to new things.
>
> Obviously the pre-bundled apps that can't be uninstalled are a huge
> problem. task killers not really being a good solution there, the real
> solution is root -> uninstall. Hopefully Google will be able to nudge
> companies in the right direction. I doubt we'll ever be in a crapware
> free world, but perhaps they can be convinced to make crapware
> uninstallable.
>
> -E
>
> On Jul 30, 1:33 pm, Kostya Vasilyev  wrote:
>
> > Technical details aside, I think it's just human nature.
>
> > Some percentage of users just have a strong desire to have something
> > "magical" that *supposedly* makes their device (Android phone or desktop
> > OS) work much better.
>
> > Remember - there used to be all kinds of memory optimizers for Windows?
> > Also registry cleaners, various "tweak" and "tune-up" utilities, etc.
> > etc. etc. No-one is saying that Windows (or any other OS :) is perfect,
> > but these apps promise much more than they actually do, and sometimes
> > cause harm.
>
> > There is also a whole subculture of users who root and flash their
> > phones - I am convinced most do it because it addresses some
> > psychological need, more than anything else.
>
> > So personally, I am quite happy to see that Google is starting to limit
> > what task killers can do. I believe interfering with the platform's core
> > functionality is definitely a bad thing.
>
> > I have enough bugs in my code to have to deal with someone else's.
>
> > -- Kostya
>
> > 31.07.2010 0:08, Indicator Veritatis пишет:
>
> > > A good article. A little harsh on the OP, but even so, a good article.
>
> > > After all: given that that IS the design of Android, that Applications
> > > should not quit, but leave termination up to the OS, the article makes
> > > its case well, even elegantly.
>
> > > But I cannot help but notice: after Android did all that hard work of
> > > designing the whole system to work that way, what does the market say
> > > about it? The presence of so many "Task Managers" for Android seems to
> > > imply that the Market does NOT agree with this paradigm.
>
> > > Nor would that conclusion really surprise me, since it is a basic
> > > expectation, almost an instinct, even predating computers: if it
> > > doesn't work, you want to hit Reset, or power-cycle the device, and
> > > you expect that it will be in a known good state (note the terminology
> > > reminiscent of s certain OS with its "last known good"). Exiting an
> > > application is the softwa

[android-developers] Re: Why can't I put a ProgressDialog in onClick() other than onCreate();

2010-07-30 Thread Mystique
Thanks TrekKing, I'm also doing more reading to do it correctly.
I think it is because the UI don't got refresh immediately unless I
use threads or AsyncTask.
I will try doing AsyncTask method and feedback if I need help.

On Jul 30, 10:43 pm, TreKing  wrote:
> On Fri, Jul 30, 2010 at 6:54 AM, Mystique  wrote:
> > How to make it work?
>
> Do it correctly.
>
> Unless you post more information, like what code you're using in onClick
> (like onClick of what?), and why it's "not OK", you're not going to get any
> better help than that.
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: My Eclipse 3.5 always lag and have to force close - why?

2010-07-30 Thread Mystique
I see. I thought I'm the only one...
Yes, I look at the log and so many memory leak error...

On Jul 30, 8:55 pm, Kaj Bjurman  wrote:
> It has unfortunately been like that for ages (if you are modifying
> e.g. layout files). It doesn't happen if you only write code.
>
> It looks like the Android plugin is leaking resources, and fast.
>
> On 30 Juli, 13:22, Mystique  wrote:
>
> > Hi,
>
> > I'm on Win7 32-bit with 4GB RAM. Why my Eclipse always become so slow
> > until it take so long to response to my mouse or keyboard. I have to
> > force terminate it, restart and use it for like 20min and repeat the
> > same thing again...
>
> > Anyone facing this or have experience dealing with it?
>
> > Regards.

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


[android-developers] Re: AlertDialog changes sequence of events

2010-07-30 Thread john brown
> AlertDialog is not "modal" - the call to show() returns immediately, leaving
> the dialog on the screen and button callbacks active.

Does this mean that:
1) It is not possible for the AlertDialog to be made "modal" .
2) My implementation of the AlertDialog is not modal. Solve problem
with AlertDialog.IsModal = true; (or something like that)
3) or maybe:
   boolean buttonPushedFlag = false;
   AlertDialog.show();
   ..
  do while buttonPushedFlag = false {
   }

How do I accomplish what I need, a yes/no confirmation?

Thanks, John Brown

On Jul 30, 3:44 pm, Kostya Vasilyev  wrote:
> AlertDialog is not "modal" - the call to show() returns immediately, leaving
> the dialog on the screen and button callbacks active.
>
> This is the reason for the sequence change you're seeing.
>
> --
> Kostya Vasilyev --http://kmansoft.wordpress.com
>
> 31.07.2010 1:37 пользователь "TreKing"  написал:
>
> On Fri, Jul 30, 2010 at 4:31 PM, john brown 
> wrote:
>
> > What can I do ...
>
> Print "after" in response to clicking the dialog buttons.
>
> --- 
> --
> TreKing  - Chicago
> transit tracking app for Android-powered devices
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers"...

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


Re: [android-developers] How to identify which client called into a Remote/AIDL service?

2010-07-30 Thread Dianne Hackborn
Oh yeah and actually this is the one most people use:
http://developer.android.com/reference/android/content/Context.html#enforceCallingPermission(java.lang.String,
java.lang.String)

On Fri, Jul 30, 2010 at 7:07 PM, Dianne Hackborn wrote:

> Binder.getCallingUid() returns the uid of the calling who initiated the
> current incoming call.
>
> However more typically you'll use one of the flavors of these to just do a
> permission check on the incoming call:
> http://developer.android.com/reference/android/content/Context.html#checkCallingPermission(java.lang.String)
>
> That function calls Binder.getCallingUid() for you and then does the
> permission check with the system.
>
> On Mon, Jul 26, 2010 at 11:13 AM, Jin Chiu  wrote:
>
>> In the implementation of my remote service's published API, is there a
>> way to identify which client called a given method? For example, is
>> there a way to obtain a unique ID or address of the caller? I already
>> cache an AIDL callback reference to the client, but not sure how I can
>> use this for identification.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>


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

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

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

Re: [android-developers] How to identify which client called into a Remote/AIDL service?

2010-07-30 Thread Dianne Hackborn
Binder.getCallingUid() returns the uid of the calling who initiated the
current incoming call.

However more typically you'll use one of the flavors of these to just do a
permission check on the incoming call:
http://developer.android.com/reference/android/content/Context.html#checkCallingPermission(java.lang.String)

That function calls Binder.getCallingUid() for you and then does the
permission check with the system.

On Mon, Jul 26, 2010 at 11:13 AM, Jin Chiu  wrote:

> In the implementation of my remote service's published API, is there a
> way to identify which client called a given method? For example, is
> there a way to obtain a unique ID or address of the caller? I already
> cache an AIDL callback reference to the client, but not sure how I can
> use this for identification.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

Re: [android-developers] Re: LVL security, are you sure that is secure, I'm a doubt in...?

2010-07-30 Thread Dianne Hackborn
On Fri, Jul 30, 2010 at 5:59 PM, Eric F  wrote:

> an unprotected app. There's no stopping that. The point is with LVL
> that normal people (probably 95%+) of the market don't have a rooted
> phone.


Actually it doesn't matter whether they have a rooted phone.  This is one of
the big reasons for moving to this over forward locking -- forward locking
requires trusting the device and its operating system to protect the app.
 With the new licensing model, the app does not need to have any trust in
the device it is running on or the market client app.  This gets rid of all
of the issues that forward locking has with apps not showing up on devices
that were not whitelisted/trusted.

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

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

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

[android-developers] Re: LVL security, are you sure that is secure, I'm a doubt in...?

2010-07-30 Thread Eric F
Most people aren't going to share their google account with someone
else just so they can get a $3 app for free. Who is realistically
going to give out access to:

A) Their email
C) Their credit card or payment method for Android market.

You lend your account to someone for a $3 app and suddenly they are
buying stuff as you. The bottom line is that piracy can never be
stopped. People can open up the .apk and fiddle the .dex files and get
an unprotected app. There's no stopping that. The point is with LVL
that normal people (probably 95%+) of the market don't have a rooted
phone. They have a stock Market app. It used to be that one hacker
with a rooted phone could distribute .apk files that install perfectly
on all non-rooted phones without difficulty. Now every .apk file will
have to be cracked first, for every update.

There is no true security, there is only added difficulty for pirates.
You must weigh the benefits of users getting annoyed that the app they
bought stopped working after they had to get their faulty phone
replaced several times from their carrier vs. some users all managing
to share the same google account on their phones. I feel that waging
war on your actual nice customers even just a little bit is way worse
than letting pirates do what they probably would find a way to do
anyways.

-E

On Jul 30, 3:13 pm, sblantipodi  wrote:
> Hi all,
> I'm implementing LVL...
>
> I noticed that google recommends to not use devicelimiter,
> but what are the meaning of licensing if you not use devicelimiter?
>
> Probably I missunderstood something but without device limiter piracy
> is easyer than before...
> Suppose that I bought XXX software using an ACME account created for
> this purpose, than I share username and password of this account to
> let others pirating the XX software.
>
> What is that I missunderstood ?
> It can't be so easy...

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


Re: [android-developers] Inner ListView not respecting layout gravity or width

2010-07-30 Thread Mark Murphy
On Fri, Jul 30, 2010 at 8:36 PM, William Ferguson
 wrote:
> I have a ListView that contains several elements, one of which is
> another ListView.

I'll be stunned if that works. Why nest ListViews? If your issue is
that you have multiple sources of data, stitch them together at the
adapter level.

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

_Android Programming Tutorials_ Version 2.9 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] Inner ListView not respecting layout gravity or width

2010-07-30 Thread William Ferguson
I have a ListView that contains several elements, one of which is
another ListView.
All elements of the outer ListView except for the inner ListView
respect their layout params.

The inner ListView respects margin left/right, but toally ignores
layout_gravity and layout_width.
Ie consumes the entire row sans the margins and is left justified.

I'd really like to have the inner ListView of the right hand side of
th screen.
I suspect its something obvious I am doing, but after several hours I
can't see it.
Any one got any ideas?

Here is the lauout for the inner ListView



Here is the config for the

http://schemas.android.com/apk/res/
android"
android:id="@+id/test_raw_contact_entry"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
>







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


[android-developers] Contract Opportunity::::: iPhone Quality Assurance Tester | Kirkland, WA

2010-07-30 Thread Navneet Chalana
Partners,



Hope you are doing great,



I am currently looking for iPhone Quality Assurance Tester for an
esteemed direct client in WA and I wanted to contact you to see, if
you have someone available and comfortable with below mentioned role,
if so, please send me a copy of resume and the best way for me to
contact.



If you know someone who is looking for new opportunities and
comfortable with this opportunity, feel free to pass my details to
them. Thanks in advance and hope to hear from you soon.



Title:iPhone Quality Assurance Tester

Location:  Kirkland, WA

Rate:Market C2C All Inclusive

Duration:  6-12 Months+

Your responsibilities will include but are not limited to the
following:
• Own individual features and/or areas of the product
• Work closely with project managers and developers to generate
comprehensive test plans and cases
• Write and execute manual and automated testing
• Write detailed test pass and bug reports
• Work with feature teams to drive resolutions

Requirements
• 3+ years of professional test/QA experience in actual shipping
products with at least one year with Mobile products
• Knowledge of all aspects of Testing end-user products: Functional,
Performance, Security, Globalization, Stress, Usability, etc
• Deep Coding knowledge in one or more of the following languages: C/C+
+, C#, Java, J2ME, Objective C
• Experience in writing GUI automation
• Ability to work independently against a set of monthly milestone
tasks
• Proven experience driving quality of complex features with lots of
dependencies and integration points.
• Experience developing or testing against the iPhone platform

Navneet Chalana

Account Manager

IDC Technologies Inc

': 408-868-4428 * navn...@idctechnologies.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] Urgent Position For ::: Blackberry Mobile Developer | Kirkland, WA

2010-07-30 Thread Navneet Chalana
Partners,



Hope you are doing great,



I am currently looking for Blackberry Mobile Developer for an esteemed
direct client in WA and I wanted to contact you to see, if you have
someone available and comfortable with below mentioned role, if so,
please send me a copy of resume and the best way for me to contact.



If you know someone who is looking for new opportunities and
comfortable with this opportunity, feel free to pass my details to
them. Thanks in advance and hope to hear from you soon.



Title:Blackberry Mobile Developer

Location:  Kirkland, WA

Rate:Market C2C All Inclusive

Duration:  6-12 Months+



As a Mobile Developer you will work closely with our Engineering
teams, clients and other stakeholders to stabilize Blackberry Mobile
applications for distribution to market places worldwide. As the
Mobile Developer, you will be expected to assign and manage work items
with extended team, architect solutions, code features, and own the
technical implementation.

Required Skills and Qualifications
• 5+ years of software development experience
• Experience in building transaction based Blackberry applications
(credit card, account management, etc).
• Excellent J2ME coding & debugging skills
• Working experience with Blackberry APIs
• Exceptional communication and teamwork skills
• Ability to interact with teams in different geographic locations
• BS in Computer Science or related technical discipline
• Prior experience publishing applications to App World a bonus





Navneet Chalana

Account Manager

IDC Technologies Inc

': 408-868-4428 * navn...@idctechnologies.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 get handle to ImageView in a ListItem

2010-07-30 Thread Hari
Hi Greg,
I gave a thought to that approach as well. I want the image selection
dialog to come up only when the user clicks on the image view.

With onItemClick handler, the dialog pops up when user clicks any
section of the list item. How do i make sure that the dialog pops up
only when the user clickes on the Image.

Regards
Hari

On Jul 30, 7:26 pm, greg  wrote:
> I also use the EfficientAdapter BaseAdapter in my ListView.  Is it not
> possible for you to use the onItemClick handler, which provides the
> list index (i.e., position), to implement your image change?  (That's
> what I do.)
>
> On Jul 30, 6:45 pm, Hari  wrote:
>
> > Hi Mark,
> > Thanks for the Reply.
>
> > I might have not stated my question properly.
>
> > I have implemented another functionality for onListItemClick().
>
> > Each list item has aImageViewand i want the user to be able to
> > change this image by selecting from phone's gallery or by taking a
> > snap. So i have an onClicklistener() for the image view. How can i
> > know whichListItemwas clicked? I also would like to update the
> > database for thisListItemto save the image byte[] in blob column.
> > For this reason i have to know the item that was clicked.
>
> > Regards
> > Hari
>
> > On Jul 29, 8:31 pm, Mark Murphy  wrote:
>
> > > The View passed into onListItemClick() is the row. Call findViewById()
> > > on that View to retrieve yourImageView.
>
> > > On Thu, Jul 29, 2010 at 8:29 PM, Hari  wrote:
> > > > Hi,
> > > > I have implemented a "EfficientAdapter". Each list item is a
> > > > LinearLayout of a combination of image and text views.  This
> > > > EfficientAdapter is attached to a Array. Code snippet is
> > > > below:
>
> > > > [code]
> > > > public class ExampleList extends ListActivity {
> > > >  private class EfficientAdapter extends BaseAdapter {
> > > >    .
> > > >      public View getView(int position, View convertView, ViewGroup
> > > > parent) {
> > > >           ..
> > > >           //Make the ICON Clickable
> > > >          holder.icon.setOnClickListener(mCorkyListener);
> > > >      }
>
> > > >      class ViewHolder {
> > > >            ..
> > > >            TextView dateRange;
> > > >            ImageViewicon;
> > > >            .
> > > >        }
> > > >  }
>
> > > >  public void onCreate(Bundle savedInstanceState) {.}
>
> > > >  protected void onListItemClick(ListView l, View v, int position,
> > > > long id) {.}
>
> > > >  public OnClickListener mCorkyListener = new OnClickListener() {
> > > >        public void onClick(View v) {
> > > >                // do something when the button is clicked
> > > >                Log.i("Item ID", v.getId()+"");
> > > >                captureImage();
> > > >    }};
>
> > > >   .
> > > >  }
> > > > [/code]
>
> > > > The captureImage() method brings up the option for user to select an
> > > > image from Gallery or click a snap.
>
> > > > My Problem:
> > > > "I DO NOT KNOW" how togetahandleto the image in the list item that
> > > > was clicked. I will have refresh the image view with what ever image
> > > > was selected by the user.
>
> > > > Any leads or pointers in resolving this issue is greatly appreciated
>
> > > > Thanks
> > > > Hari
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > Mark Murphy (a Commons 
> > > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> > > _Android Programming Tutorials_ Version 2.9 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: Text blinking effect TextView

2010-07-30 Thread Zsolt Vasvari
I can't give you code as I don't have any.  I simply suggested how I
would approach the problem.   Modify the existing code to, instead of
flipping to views, it hides and shows one.  You will have to do the
coding work, sorry.

On Jul 30, 4:28 pm, Huynh Ngoc Vu Nguyen  wrote:
> Hi,
>
> Thanks for your answer!
> But I don't know using ViewFlipper to make blink effect for Text in the
> TextView.
> Can you give me the demo code?
>
> Thanks!
> Best,
> Nguyen,
>
> 2010/7/30 Zsolt Vasvari 
>
>
>
>
>
> > Probably not easily.  If I were to do something like this, I'd start
> > with the source code to ViewFlipper and modify it.
>
> > On Jul 30, 12:21 am, Huynh Ngoc Vu Nguyen 
> > wrote:
> > > Hi all,
>
> > > Please let me know! How to make text blinking effect in TextView?
> > > I am using Android SDK 2.2.
>
> > > Thanks,
> > > Best regards,
>
> > > Nguyen,
>
> > > --
> > > Huynh Ngoc Vu Nguyen
> > > Add: Duy Xuyên - Quang Nam
> > > E-mail: vunguye...@gmail.com
> > > Phone: 0935102789
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Huynh Ngoc Vu Nguyen
> Add: Duy Xuyên - Quang Nam
> E-mail: vunguye...@gmail.com
> Phone: 0935102789

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

2010-07-30 Thread beacon
Hello Frank,

This is what I am doing on the client side

SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("token",WebPage.token);
SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
androidHttpTransport.setXmlVersionTag("");
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapObject result = (SoapObject) envelope.bodyIn;
String strResult = result.toString();

I am getting all the fields that I am supposed to get, but I am not
getting it in the XML format.That's my problem.

On Jul 30, 7:05 pm, Frank Weiss  wrote:
> I don't recognize what data format that is, but I would guess that
> your code has an error or is not sending the right HTTP headers. What
> client side code are you using?

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


[android-developers] Re: How to get handle to ImageView in a ListItem

2010-07-30 Thread greg
I also use the EfficientAdapter BaseAdapter in my ListView.  Is it not
possible for you to use the onItemClick handler, which provides the
list index (i.e., position), to implement your image change?  (That's
what I do.)


On Jul 30, 6:45 pm, Hari  wrote:
> Hi Mark,
> Thanks for the Reply.
>
> I might have not stated my question properly.
>
> I have implemented another functionality for onListItemClick().
>
> Each list item has a ImageView and i want the user to be able to
> change this image by selecting from phone's gallery or by taking a
> snap. So i have an onClicklistener() for the image view. How can i
> know which ListItem was clicked? I also would like to update the
> database for this ListItem to save the image byte[] in blob column.
> For this reason i have to know the item that was clicked.
>
> Regards
> Hari
>
> On Jul 29, 8:31 pm, Mark Murphy  wrote:
>
> > The View passed into onListItemClick() is the row. Call findViewById()
> > on that View to retrieve yourImageView.
>
> > On Thu, Jul 29, 2010 at 8:29 PM, Hari  wrote:
> > > Hi,
> > > I have implemented a "EfficientAdapter". Each list item is a
> > > LinearLayout of a combination of image and text views.  This
> > > EfficientAdapter is attached to a Array. Code snippet is
> > > below:
>
> > > [code]
> > > public class ExampleList extends ListActivity {
> > >  private class EfficientAdapter extends BaseAdapter {
> > >    .
> > >      public View getView(int position, View convertView, ViewGroup
> > > parent) {
> > >           ..
> > >           //Make the ICON Clickable
> > >          holder.icon.setOnClickListener(mCorkyListener);
> > >      }
>
> > >      class ViewHolder {
> > >            ..
> > >            TextView dateRange;
> > >            ImageViewicon;
> > >            .
> > >        }
> > >  }
>
> > >  public void onCreate(Bundle savedInstanceState) {.}
>
> > >  protected void onListItemClick(ListView l, View v, int position,
> > > long id) {.}
>
> > >  public OnClickListener mCorkyListener = new OnClickListener() {
> > >        public void onClick(View v) {
> > >                // do something when the button is clicked
> > >                Log.i("Item ID", v.getId()+"");
> > >                captureImage();
> > >    }};
>
> > >   .
> > >  }
> > > [/code]
>
> > > The captureImage() method brings up the option for user to select an
> > > image from Gallery or click a snap.
>
> > > My Problem:
> > > "I DO NOT KNOW" how togetahandleto the image in the list item that
> > > was clicked. I will have refresh the image view with what ever image
> > > was selected by the user.
>
> > > Any leads or pointers in resolving this issue is greatly appreciated
>
> > > Thanks
> > > Hari
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> > _Android Programming Tutorials_ Version 2.9 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: adding audio to a game - triggerClip for SFX

2010-07-30 Thread kk
Dave,

Thank you for your quick response. SoundPool is indeed the right way
to go
and I've got my SFX playing...pretty straight forward interface.

A small problem I'm having is that during playback I get a lot of:

W/AudioFlinger(   31): write blocked for 50 msecs

Also, although my (relative short) SFX are playing, the background
music fails with:

E/AudioCache(   31): Heap size overflow! req size: 1050624, max size:
1048576

This same audio track worked fine with JetPlayer. Any idea why
SoundPool thinks it's too big?

cheers,
k.

On 30 July, 17:27, Dave Sparks  wrote:
> triggerClip() was designed to play synchronized sound effects for
> musical games like JetBoy.
>
> If you just want to play random sound effects, I would use SoundPool
> instead.
>
> On Jul 30, 5:53 am, kk  wrote:
>
>
>
> > Hi all,
>
> > I'm using JetPlayer in order to add some audio to a game I'm
> > developing.
> > Using the examples in JetBoy I have managed to create a .jet file
> > using JetCreator and play an audio track.
> > So far so good. However, I'm having some trouble playing sound effects
> > for my game.
>
> > I have a set of very small .mid files, each containing a shooting
> > sound for a different weapon.
> > However, when I try to add the .mid file in JetCreator I get
> >    "The segment starting and ending times are illogical"
> > I'm guessing this is because the clip is too short and starting/ending
> > M/B/T are both 1/1/0 ?
>
> > The idea was to add these SFXs and then use triggerClip to play them.
> > My question is, background music aside (I can make that work) what's
> > the best way to add SFX in a game
> > so that you can trigger them at any point programmaticaly? (i.e. have
> > something like playShootingSFX1(),
> > playShootingSFX2(), etc. that will go and play the SFX immediately).
>
> > thx in advance,
> > k.

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


Re: [android-developers] Re: Retrieving XML Document from web service

2010-07-30 Thread Frank Weiss
I don't recognize what data format that is, but I would guess that
your code has an error or is not sending the right HTTP headers. What
client side code are you using?

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


[android-developers] Re: Do any Andriod 2.+ phones record phone calls?

2010-07-30 Thread William Ferguson
I don't thnk its so much blocked/crippled. I think we are waiting for
device drivers that enable it, from either the device manufacturers or
some hearty souls.

In particular see http://code.google.com/p/android/issues/detail?id=4075#c22

As well as :
  http://code.google.com/p/android/issues/detail?id=2117

Add your star, the more the merrier.


On Jul 31, 7:45 am, moneytoo  wrote:
> Unfortunately no, still blocked/crippled.
>
> On Jul 30, 11:03 pm, justSteve  wrote:
>
> > I just like checking in every couple months to see if any movement on
> > this fundamental functionality has occurred.
>
> > Still interested in learning why this functionality is being blocked.
>
> > 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: How to get handle to ImageView in a ListItem

2010-07-30 Thread Hari
Hi Mark,
Thanks for the Reply.

I might have not stated my question properly.

I have implemented another functionality for onListItemClick().

Each list item has a ImageView and i want the user to be able to
change this image by selecting from phone's gallery or by taking a
snap. So i have an onClicklistener() for the image view. How can i
know which ListItem was clicked? I also would like to update the
database for this ListItem to save the image byte[] in blob column.
For this reason i have to know the item that was clicked.

Regards
Hari

On Jul 29, 8:31 pm, Mark Murphy  wrote:
> The View passed into onListItemClick() is the row. Call findViewById()
> on that View to retrieve yourImageView.
>
>
>
> On Thu, Jul 29, 2010 at 8:29 PM, Hari  wrote:
> > Hi,
> > I have implemented a "EfficientAdapter". Each list item is a
> > LinearLayout of a combination of image and text views.  This
> > EfficientAdapter is attached to a Array. Code snippet is
> > below:
>
> > [code]
> > public class ExampleList extends ListActivity {
> >  private class EfficientAdapter extends BaseAdapter {
> >    .
> >      public View getView(int position, View convertView, ViewGroup
> > parent) {
> >           ..
> >           //Make the ICON Clickable
> >          holder.icon.setOnClickListener(mCorkyListener);
> >      }
>
> >      class ViewHolder {
> >            ..
> >            TextView dateRange;
> >            ImageViewicon;
> >            .
> >        }
> >  }
>
> >  public void onCreate(Bundle savedInstanceState) {.}
>
> >  protected void onListItemClick(ListView l, View v, int position,
> > long id) {.}
>
> >  public OnClickListener mCorkyListener = new OnClickListener() {
> >        public void onClick(View v) {
> >                // do something when the button is clicked
> >                Log.i("Item ID", v.getId()+"");
> >                captureImage();
> >    }};
>
> >   .
> >  }
> > [/code]
>
> > The captureImage() method brings up the option for user to select an
> > image from Gallery or click a snap.
>
> > My Problem:
> > "I DO NOT KNOW" how togetahandleto the image in the list item that
> > was clicked. I will have refresh the image view with what ever image
> > was selected by the user.
>
> > Any leads or pointers in resolving this issue is greatly appreciated
>
> > Thanks
> > Hari
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 2.9 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: Retrieving XML Document from web service

2010-07-30 Thread beacon
Thanks for your reply. But it is not similar to JSON. My sample data
looks something like this

anyType{ProductName=anyType{Text=Nadolol; Code=anyType{Value=11755;
CodingSystem=FDB_routed; }; Code=anyType{Value=20.55472;
CodingSystem=Google; }; Code=anyType{Value=7870; CodingSystem=FDB; };
Code=anyType{Value=19.9453; CodingSystem=Google; }; }; }

And I have confirmed with the web service and they have assured that
they send back the data in XML format. But I am not able to get it in
XML format.


On Jul 30, 6:39 pm, Carlos Silva  wrote:
> On Fri, Jul 30, 2010 at 23:35, beacon  wrote:
> > Hi ,
>
> >  I am trying to retrieve a XML document from web service. I am passing
> > a soap object with a token implementing the OAuth concept and
> > retrieving the data. But the data does not turn out to be in XML
> > format. It contains a curly braces in the place of start tag and
> > semicolons when it ends. Is there any way to retrieve the document in
> > XML format as such?
>
> > Thank you
>
> > Beacon
>
> From the description, it looks like JSON. Check it 
> herehttp://en.wikipedia.org/wiki/JSON

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


Re: [android-developers] Retrieving XML Document from web service

2010-07-30 Thread Carlos Silva
On Fri, Jul 30, 2010 at 23:35, beacon  wrote:

> Hi ,
>
>  I am trying to retrieve a XML document from web service. I am passing
> a soap object with a token implementing the OAuth concept and
> retrieving the data. But the data does not turn out to be in XML
> format. It contains a curly braces in the place of start tag and
> semicolons when it ends. Is there any way to retrieve the document in
> XML format as such?
>
> Thank you
>
> Beacon


>From the description, it looks like JSON. Check it here
http://en.wikipedia.org/wiki/JSON

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

[android-developers] Multiple calls to SimpleCursorAdapater#bindView

2010-07-30 Thread William Ferguson
Hi all, I have a ListView populated using a SimpleCursorAdapter that
has a ViewBinder, and I'm finding that when the ListView is displayed,
ViewBinder#setViewValue is called 3 times for each row of the cursor.

Once during onMeasure:
at au.com.xandar.contactsmanager.DisplayContactsActivity
$1.setViewValue(DisplayContactsActivity.java:56)
...
at android.view.View.measure(View.java:8171)
at android.view.ViewRoot.performTraversals(ViewRoot.java:801)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
626)
at dalvik.system.NativeStart.main(Native Method)

Once during onLayout:
at au.com.xandar.contactsmanager.DisplayContactsActivity
$1.setViewValue(DisplayContactsActivity.java:56)
...
at android.view.View.layout(View.java:7035)
at android.view.ViewRoot.performTraversals(ViewRoot.java:1045)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
626)
at dalvik.system.NativeStart.main(Native Method)

And the third time from onMeasure again.

Firstly, is this expected behaviour?

If it is, then what's the best way of performing potentially expensive
work in ViewBinder#setViewValue?
For example, retrieving the results of another cursor whcih is used to
construct the bound view.

Or am I approaching this from entirely the wrong view point?

William

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

2010-07-30 Thread Eric F
Yeah this is exactly what I thought too. Just because non-technical
people download task killers from the market doesn't mean that task
killers are necessary. In my opinion it is way more likely that the
explanation is that people are just very bad at shifting their way of
thinking from paradigm to paradigm.

And it also made me think of the windows tuner programs. I've noticed
a trend in the way people think these days. I call it the do-nothing
dilemma. We are incapable of doing nothing these days. What I mean is,
when we look at a problem we instantly act for the "solution". Because
we are so advanced these days that we are just used to things being
already solved somewhere by someone, somehow. I am only 30, but I
suspect that people living in the 1920s had more of a grin and bear it
mentality ("man up") when it came to problems and hardship.

Now, whether it's a kid hurting him/herself on a swing and people
needing to "Do Something", banning swingsets from all playgrounds. Or
a cellphone chugging along while syncing contacts, people don't think
"huh, my cell phone is not as quick as I want it. Oh well I'll just
deal, it's still a great phone and I'm sure in the future we'll have
faster phones that don't slow down". They think "Wow, surely there
must be someone to blame for this and someone with the fix. Oh here
this task killer allows me to solve my problem". Soon they are
probably having more problems than they started, but they don't care
because now everytime they get disgruntled they can "do something"
about it. And nobody wants to admit that they are administrating
themselves placebos, so feeling like it *is* a valid solution is self
reinforcing.

That was a bit long winded. But I agree with Kostya, I don' think
people downloading task killers from the marketplace show a deficiency
in the OS. Only a deficiency in the way people adapt to new things.

Obviously the pre-bundled apps that can't be uninstalled are a huge
problem. task killers not really being a good solution there, the real
solution is root -> uninstall. Hopefully Google will be able to nudge
companies in the right direction. I doubt we'll ever be in a crapware
free world, but perhaps they can be convinced to make crapware
uninstallable.

-E

On Jul 30, 1:33 pm, Kostya Vasilyev  wrote:
> Technical details aside, I think it's just human nature.
>
> Some percentage of users just have a strong desire to have something
> "magical" that *supposedly* makes their device (Android phone or desktop
> OS) work much better.
>
> Remember - there used to be all kinds of memory optimizers for Windows?
> Also registry cleaners, various "tweak" and "tune-up" utilities, etc.
> etc. etc. No-one is saying that Windows (or any other OS :) is perfect,
> but these apps promise much more than they actually do, and sometimes
> cause harm.
>
> There is also a whole subculture of users who root and flash their
> phones - I am convinced most do it because it addresses some
> psychological need, more than anything else.
>
> So personally, I am quite happy to see that Google is starting to limit
> what task killers can do. I believe interfering with the platform's core
> functionality is definitely a bad thing.
>
> I have enough bugs in my code to have to deal with someone else's.
>
> -- Kostya
>
> 31.07.2010 0:08, Indicator Veritatis пишет:
>
>
>
>
>
> > A good article. A little harsh on the OP, but even so, a good article.
>
> > After all: given that that IS the design of Android, that Applications
> > should not quit, but leave termination up to the OS, the article makes
> > its case well, even elegantly.
>
> > But I cannot help but notice: after Android did all that hard work of
> > designing the whole system to work that way, what does the market say
> > about it? The presence of so many "Task Managers" for Android seems to
> > imply that the Market does NOT agree with this paradigm.
>
> > Nor would that conclusion really surprise me, since it is a basic
> > expectation, almost an instinct, even predating computers: if it
> > doesn't work, you want to hit Reset, or power-cycle the device, and
> > you expect that it will be in a known good state (note the terminology
> > reminiscent of s certain OS with its "last known good"). Exiting an
> > application is the software-analog of shutting the power off: you
> > expect that the next time you enter, you get a clean slate.
>
> > True, WebOS doesn't work that way either, and Android's way is a new
> > trend. But I don't see the market approving this in WebOS either --
> > even if it does like it better than Palm's previous OS, Palm OS. For
> > Palm OS was ugly.
>
> > Besides: despite all the claims otherwise ("just let the system do
> > it"), I _have_ come across circumstances when I really do want to just
> > exit everything to get the phone to behave again. Surely I am not
> > alone, which is why people download the Task Managers for Android.
>
> > On Jul 30, 10:39 am, Mark Murphy  wrote:
>
> >> On Fri, Jul 30, 201

[android-developers] Retrieving XML Document from web service

2010-07-30 Thread beacon
Hi ,

 I am trying to retrieve a XML document from web service. I am passing
a soap object with a token implementing the OAuth concept and
retrieving the data. But the data does not turn out to be in XML
format. It contains a curly braces in the place of start tag and
semicolons when it ends. Is there any way to retrieve the document in
XML format as such?

Thank you

Beacon

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

2010-07-30 Thread Paul Turchenko
Behind the curtain, android uses permissions to asign you user groups
he belongs to (linux user and linux groups). So basically you are
asking if you can add user assigned to your application to certain
groups. Guess that's not possible as your process (meaning your user)
just doesn't have permissions for that. So you end up having no
permissions to set a permission :)

On Jul 30, 4:09 pm, RamaMohan  wrote:
> HI all,
> I want to add    via programatically .I want to
> telephone number of the device.For that i need to access the phone
> state.But i need to add that permission only with Java code at
> runtime.
> Is it Possible to do so. (or)
> Can you suggest any alternative way to read the telephone number .?

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


[android-developers] LVL security, are you sure that is secure, I'm a doubt in...?

2010-07-30 Thread sblantipodi
Hi all,
I'm implementing LVL...

I noticed that google recommends to not use devicelimiter,
but what are the meaning of licensing if you not use devicelimiter?

Probably I missunderstood something but without device limiter piracy
is easyer than before...
Suppose that I bought XXX software using an ACME account created for
this purpose, than I share username and password of this account to
let others pirating the XX software.

What is that I missunderstood ?
It can't be so easy...

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


[android-developers] Static variables cleared in JUnit tests! (???)

2010-07-30 Thread Streets Of Boston
Hello,

I have this test-code:
=
package somepackage;

import android.test.ActivityInstrumentationTestCase2;
import android.util.Log;

import com.kronos.mobile.android.Constants;
import com.kronos.mobile.android.ExceptionsSummaryActivity;
import com.kronos.mobile.android.test.utils.KronosSolo;

public class ExceptionsSummaryActivityTest extends
ActivityInstrumentationTestCase2 {
private static String USER = "tturner";

public ExceptionsSummaryActivityTest() {
super("somepackage", ExceptionsSummaryActivity.class);
}

@Override
protected void setUp() throws Exception {
super.setUp();

Log.v(Constants.LOGTAG, "Setup for "+getName()+" "+USER);
}

@Override
protected void tearDown() throws Exception {
super.tearDown();
}

public void test010ResetData() throws Exception {
Log.v(Constants.LOGTAG, "Testcase for "+getName()+" "+USER);
}

public void test020LoadDataFromHome() throws Exception {
Log.v(Constants.LOGTAG, "Testcase for "+getName()+" "+USER);
}

public void test030UIElements() {
Log.v(Constants.LOGTAG, "Testcase for "+getName()+" "+USER);
}
}
===
The JUnit is a separate Unit Test application (apk), running another
APK (the one under test).

When I run the above test-code (all the code is shown, nothing has
been left out), the value of USER changes magically from "tturner" to
'null'. In test010ResetData and the setup of this test, the value of
USER is "tturner". In the other test-method (and their setup() calls),
the value of USER is null.
Ouput:
  Setup for test010ResetData tturner
  Testcase for test010ResetData tturner
  Setup for test020LoadDataFromHome null
  Testcase for test020LoadDataFromHome null
  Setup for test030UIElements null
  Testcase for test030UIElements null


When i change this line to (adding 'final)'
 private static final String USER = "tturner";
the value of USER remains "tturner" for all test-methods!
Output:
  Setup for test010ResetData tturner
  Testcase for test010ResetData tturner
  Setup for test020LoadDataFromHome tturner
  Testcase for test020LoadDataFromHome tturner
  Setup for test030UIElements tturner
  Testcase for test030UIElements tturner



When i then change that line to (changing String to Object, still
using 'final'):
 private static final String USER = "tturner";
the value of USER is again 'null' in test020 and test030!!
Ouput:
  Setup for test010ResetData tturner
  Testcase for test010ResetData tturner
  Setup for test020LoadDataFromHome null
  Testcase for test020LoadDataFromHome null
  Setup for test030UIElements null
  Testcase for test030UIElements null


My question is:
Why and how are static variables (e.g. USER) of JUnit test-cases set
to null?
Is this correct behavior.

I tried in on a G1 running 1.6 and on a Nexus1 running 2.2. They both
have the same behavior.

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


[android-developers] Re: Do any Andriod 2.+ phones record phone calls?

2010-07-30 Thread moneytoo
Unfortunately no, still blocked/crippled.

On Jul 30, 11:03 pm, justSteve  wrote:
> I just like checking in every couple months to see if any movement on
> this fundamental functionality has occurred.
>
> Still interested in learning why this functionality is being blocked.
>
> 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


Re: [android-developers] AlertDialog changes sequence of events

2010-07-30 Thread Kostya Vasilyev
AlertDialog is not "modal" - the call to show() returns immediately, leaving
the dialog on the screen and button callbacks active.

This is the reason for the sequence change you're seeing.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com

31.07.2010 1:37 пользователь "TreKing"  написал:

On Fri, Jul 30, 2010 at 4:31 PM, john brown 
wrote:
>
> What can I do ...
Print "after" in response to clicking the dialog buttons.

-
TreKing  - Chicago
transit tracking app for Android-powered devices



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

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

2010-07-30 Thread j
Thanks for the reply.  I agree the API doc is very ambiguous.

On Jul 30, 12:39 am, William Ferguson 
wrote:
> You appear to be using a combination of Android 1.5 and Android 2.0
> mechanisms.
> Ie passing Android 2.0 constants to an Android 1.5 mechanism.
>
> Android 1.5
>
> >         Uri uri = Phone.CONTENT_URI;
> > Phone.CONTACT_ID,
> > Phone.DISPLAY_NAME,
> > Phone.NUMBER,
> > Phone.TYPE, Phone.LABEL,
>
> Android 2.0
>
> > ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME,
>
> But I could be wrong. The ContactsContract provider is pretty unclear
> IMHO.
> I think you'll gain some mileage 
> from:http://stackoverflow.com/questions/1721279/how-to-read-contacts-on-an...
>
> On Jul 30, 7:47 am, j  wrote:
>
>
>
>
>
> > While iterating through my contacts database, the firstName
> > (GIVEN_NAME) always returns an integer (0, 1, 2, ... 7) while the
> > lastName (FAMILY_NAME) always returns null.  I am running on HTC
> > Incredible.  What am I doing wrong?
>
> >         Uri uri = Phone.CONTENT_URI;
> >         String[] projection = new String[] {
> > Phone.CONTACT_ID,
> > Phone.DISPLAY_NAME,
> > Phone.NUMBER,
> > Phone.TYPE, Phone.LABEL,
> > ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME,
> > ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME
>
> > };
>
> >         Cursor managedCursor = mContext.getContentResolver()
> >               .query(uri, projection, null, null, null);
> >         if(managedCursor == null) {
> >             Log.w(LOG_TAG, "managedCursor null");
> >             return null;
> >         }
>
> >         while(managedCursor.moveToNext()) {
>
> >                 long contactId = managedCursor.getLong(
>
> > managedCursor.getColumnIndex(Phone.CONTACT_ID));
> >                 String name = managedCursor.getString(
>
> > managedCursor.getColumnIndex(Phone.DISPLAY_NAME));
>
> >                 String firstName = managedCursor.getString(
>
> > managedCursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME));//
> > getFirstNameFromId(contactId);
> >                 Log.d(LOG_TAG, "firstName: "+ firstName);
> >                 String lastName = managedCursor.getString(
>
> > managedCursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME));//
> > getLastNameFromId(contactId);
> >                 Log.d(LOG_TAG, "lastName: "+ lastName);
>
> > }

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


Re: [android-developers] AlertDialog changes sequence of events

2010-07-30 Thread TreKing
On Fri, Jul 30, 2010 at 4:31 PM, john brown wrote:

> What can I do to make the code with the yes/no confirmation run in the
> sequence I am expecting, i.e. like the first LogCat output?
>

Print "after" in response to clicking the dialog buttons.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Re: Compiling and obfuscating by command line...

2010-07-30 Thread Miguel Morales
Make sure you have the included files such as:


Which should have:
sdk.dir=/path/to/sdk_root


Which should have:
sdk-location=/path/to/sdk_root

and


Which should have:
target=android-3 ##or whatever


On Fri, Jul 30, 2010 at 12:00 PM, sblantipodi
 wrote:
> done, same problem... :(
>
> On Jul 30, 7:46 pm, Mark Murphy  wrote:
>> If this is a normal Android project, run android update project -p
>> ..., where ... is the path to your project, and it will create or
>> repair your local.properties file.
>>
>> On Fri, Jul 30, 2010 at 1:31 PM, sblantipodi
>>
>>  wrote:
>> > I have listed it in the main.xml, the problem seems that ant doesn't
>> > find the SDK...
>> > if you found my error on google
>> > "taskdef class com.android.ant.SetupTask cannot be found"
>> > you will find dozens of people with my same problem,
>> > but I can't find a solution yet...
>>
>> --
>> Mark Murphy (a Commons 
>> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>>
>> _Android Programming Tutorials_ Version 2.9 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



-- 
http://developingthedream.blogspot.com/,
http://diastrofunk.com,
http://www.youtube.com/user/revoltingx, ~Isaiah 55:8-9

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


[android-developers] AlertDialog changes sequence of events

2010-07-30 Thread john brown
Hello,

The following code runs as I expect it to.: (cntr is an int with the
whole class as it's scope)

System.out.println("before saveReading, cntr = " +
Integer.toString(cntr));
saveReading(Integer.parseInt(etRead.getText().toString()));
System.out.println("after saveReading, cntr = " +
Integer.toString(cntr));

public void saveReading(int reading){
System.out.println("In saveReading before ++, cntr = " +
Integer.toString(cntr));
++cntr;
System.out.println("In saveReading, after ++, cntr = " +
Integer.toString(cntr));
}

after the code runs, LogCat shows the following System.out:

System.out  before saveReading, cntr = 0
System.out  In saveReading before ++, cntr = 0
System.out  In saveReading, after ++, cntr = 1
System.out  after saveReading, cntr = 1

This (above) is the sequence of System.out events that I am expecting.

//

If I change the code to include a AlertDialog Yes/No for confirmation
of the ++cntr, the code looks like this:

System.out.println("before saveReading, cntr = " +
Integer.toString(cntr));
saveReading(Integer.parseInt(etRead.getText().toString()));
System.out.println("after saveReading, cntr = " +
Integer.toString(cntr));

public void saveReading(int reading){
System.out.println("In saveReading before ++, cntr = " +
Integer.toString(cntr));
AlertDialog.Builder bldr = new AlertDialog.Builder(this);
bldr.setTitle("Confirmation Required") ;
bldr.setMessage("Save this reading?");
bldr.setPositiveButton(R.string.YesButton, new
DialogInterface.OnClickListener(){
//@Override
public void onClick(DialogInterface dialog, int which) {
///code for YES (increment cntr)
++cntr;
}
});

bldr.setNegativeButton(R.string.NoButton , new
DialogInterface.OnClickListener(){
//@Override
public void onClick(DialogInterface dialog, int which) {
// code for NO (do nothing, cntr remains the same)
System.out.println("no!!!");
}
});

bldr.show();
System.out.println("In saveReading, after ++, cntr = " +
Integer.toString(cntr));
}

When I run the code, the AlertDialog Yes/No routine looks like I want
it to look but the following LogCat output shows that the sequence of
events is not what I was expecting. It looks like all the code in the
code block containing the call for saveReading, including saveReading,
runs and then the code in saveReading runs.

after the code runs, LogCat shows the following System.out:

System.out  before saveReading, cntr = 0
System.out  after saveReading, cntr = 0
System.out  In saveReading before ++, cntr = 0
System.out  In saveReading, after ++, cntr = 1

What can I do to make the code with the yes/no confirmation run in the
sequence I am expecting, i.e. like the first LogCat output?

Thank you very much for your help. John Brown

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


Re: [android-developers] Re: Froyo -- How to detect that my application has been killed?

2010-07-30 Thread Dianne Hackborn
It isn't being called because the app is NOT being restarted.

As I said, the ONLY thing app killers can do now is the same thing that the
OOM killer does when it needs memory, and this NEVER involved a broadcast.

You have lost nothing here from previous versions of the platform.

On Fri, Jul 30, 2010 at 1:27 PM, tomei.ninge...@gmail.com <
tomei.ninge...@gmail.com> wrote:

> Hi Dianne,
>
> Our main problem is that Intent.ACTION_PACKAGE_RESTARTED is no longer
> called in Froyo.
>
> (Sorry I digressed to Service ... I thought that I can implement
> something similar to Intent.ACTION_PACKAGE_RESTARTED by running a
> service from my app. If the app is killed, the Service can detect that
> the app is killed -- by checking the length of its callback list --
> and then take appropriate clean up actions.)
>
> Anyway, we used to listen to Intent.ACTION_PACKAGE_RESTARTED to do
> clean ups. But on Froyo, when an app is killed using
> killBackgroundProcesses, we don't get any notification.
>
> This is a pretty big incompatible change (as I mentioned above, you
> see left-over icons in the status bar from killed apps).
>
> Is this an intentional change in Froyo?
>
> Thanks
>
> On Jul 30, 12:38 pm, Dianne Hackborn  wrote:
> > Oh wait I take that back...  what has changed is that task killers no
> longer
> > go through the full force stop path -- *ALL* they can do is kill
> processes,
> > and further only processes that are good or moderate candidates for the
> out
> > of memory killer (pure background processes up to services running in the
> > background).
> >
> > So to look at API demos -- if I use that and "Remote Service Controller"
> to
> > start the remote service, then use a task killer to kill API demos, what
> > I'll see in the log is that the two processes are simply killed, just
> like
> > the OOM killer would do:
> >
> > I/Process (  101): Sending signal. PID: 668 SIG: 9
> > I/Process (  101): Sending signal. PID: 641 SIG: 9
> > W/ActivityManager(  101): Scheduling restart of crashed service
> > com.example.android.apis/.app.RemoteService in 5000ms
> > I/WindowManager(  101): WIN DEATH: Window{44ea7520
> > com.example.android.apis/com.example.android.apis.ApiDemos paused=false}
> > I/WindowManager(  101): WIN DEATH: Window{44d500f8
> > com.example.android.apis/com.example.android.apis.ApiDemos paused=false}
> > I/WindowManager(  101): WIN DEATH: Window{44d994d0
> > com.example.android.apis/com.example.android.apis.ApiDemos paused=false}
> > I/WindowManager(  101): WIN DEATH: Window{44eae490
> >
> com.example.android.apis/com.example.android.apis.app.RemoteService$Controller
> > paused=false}
> > D/dalvikvm(  291): GC_EXPLICIT freed 484 objects / 24352 bytes in 61ms
> >
> > And then a little later I correctly see that the remote service is
> > restarted, just as happens if the process is killed by the OOM killer:
> >
> > I/ActivityManager(  101): Start proc com.example.android.apis:remote for
> > service com.example.android.apis/.app.RemoteService: pid=695 uid=10062
> > gids={3003, 1015, 1006}
> >
> > Compare that with the output of an actual force stop which the task
> killers
> > can no longer do:
> >
> > I/ActivityManager(  101): Force stopping package com.example.android.apis
> > uid=10062
> > I/Process (  101): Sending signal. PID: 695 SIG: 9
> > I/Process (  101): Sending signal. PID: 712 SIG: 9
> > W/ActivityManager(  101): Scheduling restart of crashed service
> > com.example.android.apis/.app.RemoteService in 5000ms
> > I/ActivityManager(  101):   Force finishing activity
> HistoryRecord{44f23740
> > com.example.android.apis/.app.RemoteService$Controller}
> > I/ActivityManager(  101):   Force finishing activity
> HistoryRecord{44d43428
> > com.example.android.apis/.ApiDemos}
> > I/ActivityManager(  101):   Force finishing activity
> HistoryRecord{44d91560
> > com.example.android.apis/.ApiDemos}
> > I/ActivityManager(  101):   Force finishing activity
> HistoryRecord{44d2e2c8
> > com.example.android.apis/.ApiDemos}
> > I/ActivityManager(  101):   Force stopping service ServiceRecord{44eacb00
> > com.example.android.apis/.app.RemoteService}
> >
> > For the behavior you are seeing, are you using the bind server instead of
> > the start service UI?  If you do that then yes your service will not be
> > restarted -- because the process that is bound to it is in the
> background,
> > so free to be killed, and once it gets killed the binding goes away and
> the
> > service does not need to run any more.
> >
> > But this exact behavior is expected to happen when the device is low on
> > memory, so it is something apps need to deal with correctly anyway.
> >
> > On Fri, Jul 30, 2010 at 12:20 PM, Dianne Hackborn  >wrote:
> >
> >
> >
> > > Um yeah the check for process priority does let it kill service
> processes
> > > (not visible or foreground service processes though).  Whoops.  I'll
> fix
> > > that.
> >
> > > That said, the service *does* restart like it always did, and I have
> > > confirmed it does.  Th

RE: [android-developers] Picking up radio stations?

2010-07-30 Thread Tommy
Ah okKind of a bummer 

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Mark Murphy
Sent: Friday, July 30, 2010 2:46 PM
To: android-developers@googlegroups.com
Subject: Re: [android-developers] Picking up radio stations?

On Fri, Jul 30, 2010 at 2:17 PM, Tommy  wrote:
> Is there a way to let my app tune into a certain radio station(FM/AM?)
> Or is this something not yet possible with android?

A handful of Android devices may have built-in radio tuners. I suspect
none have built-in radio tuners and also have activities with a
documented means for other applications to launch a radio station. I'm
not saying it's a bad idea, but I'm just skeptical that anyone has
done it.

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

_Android Programming Tutorials_ Version 2.9 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

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


[android-developers] Do any Andriod 2.+ phones record phone calls?

2010-07-30 Thread justSteve
I just like checking in every couple months to see if any movement on
this fundamental functionality has occurred.

Still interested in learning why this functionality is being blocked.

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: Help Needed Getting JSON to Jersey Web Service and Consuming it

2010-07-30 Thread JimBadger
Thanks very much Mr Gies, I'll digest this later and expand upon my
requirements if still required.

Cheers.

On 30 July, 17:25, Brad Gies  wrote:
> To give you good advice, we probably need to know what your server end
> is expecting, and what kind of security you need.
>
> It could be as simple as what's below (NOTE there is extra stuff you
> don't need in here, but it should at least give you what you need) :
>
> List nvps;
>
>          try
>          {
>              InputStream is = null;
>
>              DefaultHttpClient httpclient = new DefaultHttpClient();
>              HttpPost httpPost = new HttpPost(urlString);
>
>              String searchParams = getSearchParams();  // just my
> function to get what I want to pass
>
>               searchParams = URLEncoder.encode(searchParams, HTTP.UTF_8);
>
>               nvps.add(new BasicNameValuePair("category", searchParams));
>
>              httpPost.setHeader("User-Agent", "iHotTonight Android
> App");  // I set this so my server logs files are easier to read.
>              httpPost.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));
>              HttpResponse response = httpclient.execute(httpPost);
>
>              HttpEntity entity = response.getEntity();
>
>              if (entity != null)
>              {
>                  try
>                  {
>                      is = entity.getContent();
>
>                      String line;
>                      StringBuilder builder = new StringBuilder();
>                      BufferedReader reader = new BufferedReader(new
> InputStreamReader(is), 8192);
>                      while ((line = reader.readLine()) != null)
>                      {
>                          builder.append(line);
>                      }
>                      String retStr = builder.toString();
>                      // Now get any messages coming back.
>                      if (BistroSharedStatic.DEBUGGING_APP)  // I set
> this if I want to log my results.
>                          Log.d("GetResults", retStr);
>
>                      if (handler != null)   // if I passed a Handler to
> the create then send the result to the Handler.
>                          sharedFunctions.SendMessage(handler,
> HandlerReturnMessage, param1, param2, retStr);
>
>                  }
>                  finally
>                  {
>                      entity.consumeContent();
>                      is = null;
>                  }
>              }
>
>          }
>          catch (MalformedURLException e)
>          {
>              // TODO Auto-generated catch block
>              e.printStackTrace();
>              if (handler != null)
>                  sharedFunctions.SendMessage(handler, 0, 0, 0,
> e.getMessage());  // if I passed in a Handler then send the exception to
> the handler.
>          }
>          catch (IOException e)
>          {
>              // TODO Auto-generated catch block
>              e.printStackTrace();
>              if (handler != null)
>                  sharedFunctions.SendMessage(handler, 0, 0, 0,
> e.getMessage());
>          }
>          catch (Exception e)
>          {
>              e.printStackTrace();
>              if (handler != null)
>                  sharedFunctions.SendMessage(handler, 0, 0, 0,
> e.getMessage());
>          }
>
> AND in PHP on the server end:
>
> $username=$_POST['from'];
> $password=$_POST['theirpassword];"
> $json_string=$_POST['searchwords'];
>
> // do the usual stripslashes and mysql_real_escape_string stuff here.
>
> // now, process the JSON string
> $json = json_decode($json_string);
>
> BUT... depending on the security etc... it can be a lot more
> complicated. Hopefully, this is enough to get you started. :)
>
> On 30/07/2010 7:33 AM, JimBadger wrote:
>
>
>
>
>
> > Hi,
>
> > I've just recently started out with Android development, and have
> > progressed to the point where I have written a very basic Hello World
> > Jersey RESTful web service, and successfully called it from within my
> > Android App.
>
> > What I want to do now though, is send a new user record (just name and
> > password for now) to a web service in JSON format.
>
> > I can create my JSON in the Android app just fine, but I don't know
> > how to get it into the HTTP Request in such a way that the
> > corresponding web service that @Consumes JSON can get at it.
>
> > So, this is how far I've got:
>
> > 1) Create Android App User object...(Tick: done that)
> > 2) Turn that into JSON...(Tick: done that)
> > 3) Put it on the HTTP request.(Stuck here! Help!)
> > 4) Call the web service...(Tick: done that)
> > 5) Web service retrieve JSON from request...(Stuck here! Help!)
> > 6) Parse the JSON into server side User object and deal with as I see
> > fit...(Don't worry people, I'll be fine with this bit, thanks!)
> > 7) Profit! ;)
>
> > Guys and Girls, I really appreciate any help given, you dear, dear
> > kind souls!
>
> > Cheers,
> > James
>
> --
> Sincerely,
>
> Brad Gies
> 

[android-developers] How to populate a ViewStub using different ImageButtons?

2010-07-30 Thread Victoria Busse
Hi there,

I am trying to populate a ViewStub with a new view depending on which
ImageButton is clicked, but as I just discovered ViewStubs I am not exactly
sure how this would work...

e.g. can I provide the ViewStub with different inflatedIds and within the
onClick event of a Button inflate the ViewStub by calling a specific
inflatedId???

If someone could give me hand, that would be really great.

Thank you very much in advance :o)

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

Re: [android-developers] Re: Correct way to kill the application

2010-07-30 Thread Greg Donald
On Fri, Jul 30, 2010 at 3:33 PM, Kostya Vasilyev  wrote:
> Google is starting to limit what
> task killers can do. I believe interfering with the platform's core
> functionality is definitely a bad thing.

Google should worry more about the crap-ware vendors are putting on my phone.

Allowing vendors to interfere with my battery life is definitely a bad thing.

My EVO basically lives on a charger.  I carry a spare battery around
for when I am physically separated from a way to charge my phone for
more than 6 hours.  :(

Leave the task killers alone.  Kill the crap-ware that makes the task
killers necessary.


-- 
Greg Donald
destiney.com | gregdonald.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: APIDemos Is sample SaveRestoreState incomplete?

2010-07-30 Thread Anil
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/SaveRestoreState.html

On Jul 30, 3:00 pm, Anil  wrote:
> It does not override onSaveInstanceState() and does not seem to work.
> (on both 2.1, 2.2).
> Perhaps I am missing something?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 identify which client called into a Remote/AIDL service?

2010-07-30 Thread mah
I don't know if there's a more proper way to do what you need, but it
makes sense that there should be.

In the worst case though, you can solve this through your own
protocol... you can require clients call an initialization to receive
some random value you provide (and store, to associate with them), and
all of your other entry points can require that this value be among
the parameters.

On Jul 26, 2:13 pm, Jin Chiu  wrote:
> In the implementation of my remote service's published API, is there a
> way to identify which client called a given method? For example, is
> there a way to obtain a unique ID or address of the caller? I already
> cache an AIDL callback reference to the client, but not sure how I can
> use this for identification.

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


Re: [android-developers] Re: Correct way to kill the application

2010-07-30 Thread Kostya Vasilyev

Technical details aside, I think it's just human nature.

Some percentage of users just have a strong desire to have something 
"magical" that *supposedly* makes their device (Android phone or desktop 
OS) work much better.


Remember - there used to be all kinds of memory optimizers for Windows? 
Also registry cleaners, various "tweak" and "tune-up" utilities, etc. 
etc. etc. No-one is saying that Windows (or any other OS :) is perfect, 
but these apps promise much more than they actually do, and sometimes 
cause harm.


There is also a whole subculture of users who root and flash their 
phones - I am convinced most do it because it addresses some 
psychological need, more than anything else.


So personally, I am quite happy to see that Google is starting to limit 
what task killers can do. I believe interfering with the platform's core 
functionality is definitely a bad thing.


I have enough bugs in my code to have to deal with someone else's.

-- Kostya

31.07.2010 0:08, Indicator Veritatis пишет:

A good article. A little harsh on the OP, but even so, a good article.

After all: given that that IS the design of Android, that Applications
should not quit, but leave termination up to the OS, the article makes
its case well, even elegantly.

But I cannot help but notice: after Android did all that hard work of
designing the whole system to work that way, what does the market say
about it? The presence of so many "Task Managers" for Android seems to
imply that the Market does NOT agree with this paradigm.

Nor would that conclusion really surprise me, since it is a basic
expectation, almost an instinct, even predating computers: if it
doesn't work, you want to hit Reset, or power-cycle the device, and
you expect that it will be in a known good state (note the terminology
reminiscent of s certain OS with its "last known good"). Exiting an
application is the software-analog of shutting the power off: you
expect that the next time you enter, you get a clean slate.

True, WebOS doesn't work that way either, and Android's way is a new
trend. But I don't see the market approving this in WebOS either --
even if it does like it better than Palm's previous OS, Palm OS. For
Palm OS was ugly.

Besides: despite all the claims otherwise ("just let the system do
it"), I _have_ come across circumstances when I really do want to just
exit everything to get the phone to behave again. Surely I am not
alone, which is why people download the Task Managers for Android.


On Jul 30, 10:39 am, Mark Murphy  wrote:
   

On Fri, Jul 30, 2010 at 9:13 AM, RamaMohan  wrote:
 

HI all,
I s there any way to kill the entire application at once.Not using
with finish() or system.exit() ..all these two will kill the
activity ,but not the appication.
Is there any way to kill the entire application from any
activity .
   

http://stackoverflow.com/questions/2033914/quitting-an-application-is...

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

_Android Programming Tutorials_ Version 2.9 Available!
 
   



--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: Froyo -- How to detect that my application has been killed?

2010-07-30 Thread tomei.ninge...@gmail.com
Hi Dianne,

Our main problem is that Intent.ACTION_PACKAGE_RESTARTED is no longer
called in Froyo.

(Sorry I digressed to Service ... I thought that I can implement
something similar to Intent.ACTION_PACKAGE_RESTARTED by running a
service from my app. If the app is killed, the Service can detect that
the app is killed -- by checking the length of its callback list --
and then take appropriate clean up actions.)

Anyway, we used to listen to Intent.ACTION_PACKAGE_RESTARTED to do
clean ups. But on Froyo, when an app is killed using
killBackgroundProcesses, we don't get any notification.

This is a pretty big incompatible change (as I mentioned above, you
see left-over icons in the status bar from killed apps).

Is this an intentional change in Froyo?

Thanks

On Jul 30, 12:38 pm, Dianne Hackborn  wrote:
> Oh wait I take that back...  what has changed is that task killers no longer
> go through the full force stop path -- *ALL* they can do is kill processes,
> and further only processes that are good or moderate candidates for the out
> of memory killer (pure background processes up to services running in the
> background).
>
> So to look at API demos -- if I use that and "Remote Service Controller" to
> start the remote service, then use a task killer to kill API demos, what
> I'll see in the log is that the two processes are simply killed, just like
> the OOM killer would do:
>
> I/Process (  101): Sending signal. PID: 668 SIG: 9
> I/Process (  101): Sending signal. PID: 641 SIG: 9
> W/ActivityManager(  101): Scheduling restart of crashed service
> com.example.android.apis/.app.RemoteService in 5000ms
> I/WindowManager(  101): WIN DEATH: Window{44ea7520
> com.example.android.apis/com.example.android.apis.ApiDemos paused=false}
> I/WindowManager(  101): WIN DEATH: Window{44d500f8
> com.example.android.apis/com.example.android.apis.ApiDemos paused=false}
> I/WindowManager(  101): WIN DEATH: Window{44d994d0
> com.example.android.apis/com.example.android.apis.ApiDemos paused=false}
> I/WindowManager(  101): WIN DEATH: Window{44eae490
> com.example.android.apis/com.example.android.apis.app.RemoteService$Controller
> paused=false}
> D/dalvikvm(  291): GC_EXPLICIT freed 484 objects / 24352 bytes in 61ms
>
> And then a little later I correctly see that the remote service is
> restarted, just as happens if the process is killed by the OOM killer:
>
> I/ActivityManager(  101): Start proc com.example.android.apis:remote for
> service com.example.android.apis/.app.RemoteService: pid=695 uid=10062
> gids={3003, 1015, 1006}
>
> Compare that with the output of an actual force stop which the task killers
> can no longer do:
>
> I/ActivityManager(  101): Force stopping package com.example.android.apis
> uid=10062
> I/Process (  101): Sending signal. PID: 695 SIG: 9
> I/Process (  101): Sending signal. PID: 712 SIG: 9
> W/ActivityManager(  101): Scheduling restart of crashed service
> com.example.android.apis/.app.RemoteService in 5000ms
> I/ActivityManager(  101):   Force finishing activity HistoryRecord{44f23740
> com.example.android.apis/.app.RemoteService$Controller}
> I/ActivityManager(  101):   Force finishing activity HistoryRecord{44d43428
> com.example.android.apis/.ApiDemos}
> I/ActivityManager(  101):   Force finishing activity HistoryRecord{44d91560
> com.example.android.apis/.ApiDemos}
> I/ActivityManager(  101):   Force finishing activity HistoryRecord{44d2e2c8
> com.example.android.apis/.ApiDemos}
> I/ActivityManager(  101):   Force stopping service ServiceRecord{44eacb00
> com.example.android.apis/.app.RemoteService}
>
> For the behavior you are seeing, are you using the bind server instead of
> the start service UI?  If you do that then yes your service will not be
> restarted -- because the process that is bound to it is in the background,
> so free to be killed, and once it gets killed the binding goes away and the
> service does not need to run any more.
>
> But this exact behavior is expected to happen when the device is low on
> memory, so it is something apps need to deal with correctly anyway.
>
> On Fri, Jul 30, 2010 at 12:20 PM, Dianne Hackborn wrote:
>
>
>
> > Um yeah the check for process priority does let it kill service processes
> > (not visible or foreground service processes though).  Whoops.  I'll fix
> > that.
>
> > That said, the service *does* restart like it always did, and I have
> > confirmed it does.  That code path hasn't changed at all.  So basically the
> > behavior is still like it was pre-2.2, except there are still some processes
> > that can unintentionally be killed.
>
> > On Fri, Jul 30, 2010 at 10:15 AM, tomei.ninge...@gmail.com <
> > tomei.ninge...@gmail.com> wrote:
>
> >> Dianne, here's the reproduction step on Froyo:
>
> >> [1] Run on Froyo - start ApiDemos, start the RemoveService sample. You
> >> will now see two processes
> >>    com.example.android.apis
> >>    com.example.android.apis:remote
>
> >> [2] You will notice that "Sample Remote Service" appears on status
> 

[android-developers] Re: Binder is leaked by binding to a service

2010-07-30 Thread brucko
This appears to be a bug

http://code.google.com/p/android/issues/detail?id=6426

watch out. If your LocalBinder is a non-static inner class, then you
will leak your Service as well as non-static inner classes have a
reference to the outer class.

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

2010-07-30 Thread Indicator Veritatis
A good article. A little harsh on the OP, but even so, a good article.

After all: given that that IS the design of Android, that Applications
should not quit, but leave termination up to the OS, the article makes
its case well, even elegantly.

But I cannot help but notice: after Android did all that hard work of
designing the whole system to work that way, what does the market say
about it? The presence of so many "Task Managers" for Android seems to
imply that the Market does NOT agree with this paradigm.

Nor would that conclusion really surprise me, since it is a basic
expectation, almost an instinct, even predating computers: if it
doesn't work, you want to hit Reset, or power-cycle the device, and
you expect that it will be in a known good state (note the terminology
reminiscent of s certain OS with its "last known good"). Exiting an
application is the software-analog of shutting the power off: you
expect that the next time you enter, you get a clean slate.

True, WebOS doesn't work that way either, and Android's way is a new
trend. But I don't see the market approving this in WebOS either --
even if it does like it better than Palm's previous OS, Palm OS. For
Palm OS was ugly.

Besides: despite all the claims otherwise ("just let the system do
it"), I _have_ come across circumstances when I really do want to just
exit everything to get the phone to behave again. Surely I am not
alone, which is why people download the Task Managers for Android.


On Jul 30, 10:39 am, Mark Murphy  wrote:
> On Fri, Jul 30, 2010 at 9:13 AM, RamaMohan  wrote:
> > HI all,
> > I s there any way to kill the entire application at once.Not using
> > with finish() or system.exit() ..all these two will kill the
> > activity ,but not the appication.
> > Is there any way to kill the entire application from any
> > activity .
>
> http://stackoverflow.com/questions/2033914/quitting-an-application-is...
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 2.9 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: Multiple Sliding Drawers

2010-07-30 Thread brucko
Disclaimer - I have no idea about what I am talking about. I have not
tried this.

Could you use one sliding drawer with three views on the handle - but
change the drawer contents based on what part of the handle was
touched to drag up. To make it a better user experience, you might
make the handle section become the whole handle when it is touched?

Good luck.

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


Re: [android-developers] Extending multiple classes

2010-07-30 Thread Priyank Maiya
Hi,
I am facing some when running the code. I am using the
getApplicationContext() to save the instance.
Kindly have a look at my code and let me know where I am going wrong.

VVMService is the class whose instance is created and got from the
onServiceConnected() callback

public class VVMServiceBind extends Activity
 {
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
bindService(new Intent(VVMServiceBind.this, VVMService.class),
mConnection, Context.BIND_AUTO_CREATE);
VVMService appState = ((VVMService)getApplicationContext());
   }


public void onServiceConnected(ComponentName className, IBinder
service)
 {
Log.i(TAG, "In onServiceConnected");
 mService = ((VVMService.VVMBinder)service).getService();
 appState = mService;

}
}


VVMClientApplication is the class where I need to access the VVMService
class instance.

public void serviceConnectionSuccess()
{
private VVMService mService;

mService = (VVMService)getApplicationContext();

  }

dont I have to extend Application in any class ?

Thanks,
Priyank

On Fri, Jul 30, 2010 at 12:45 PM, Shane Isbell wrote:

> Just invoke Activity.getApplication() within your Activity.onCreate method,
> casting the Application to your specific class type. Then your can set
> whatever you need on your application instance and it will be accessible
> within other Activities through the same Activity.getApplication() method.
>
>
> http://developer.android.com/reference/android/app/Activity.html#getApplication
>
>
>
> On Fri, Jul 30, 2010 at 10:29 AM, Priyank  wrote:
>
>> Hi,
>> I had a basic question.
>> Can my class extend 2 or more classes at a time. What is the syntax.
>> I want to extend Activity as well as Application. Wont this create
>> problems in the manifest file?
>> Activity because, I need to do a couple of things during the
>> onCreate() [binding a service]and Application, because I am creating
>> objects of another class [service class]which needs to be accessible
>> throughout my application.
>>
>>
>> Thanks,
>> Priyank
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
>
> --
> Shane Isbell (Founder of ZappMarket)
> http://apps.facebook.com/zappmarket/
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] APIDemos Is sample SaveRestoreState incomplete?

2010-07-30 Thread Anil
It does not override onSaveInstanceState() and does not seem to work.
(on both 2.1, 2.2).
Perhaps I am missing something?

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

2010-07-30 Thread jsera
Alright, invalidate seems to just call onDraw, which is exactly what
the docs say it does, so my approach is to call setMeasuredDimension
in the method called by the Runnable posted by the tick, (It seems
like onMeasure only gets called if the dimensions are changed by
setMeasuredDimension, so if you only set the dimensions in onMeasure,
nothing happens.) then call getParent().requestLayout(). (This means
setMeasuredDimension gets called twice.)

I want my View to overlap other views at certain times, so I'm
guessing that I'll have to mess around with the View's LayoutParams,
and adjust the margins as well.

On Jul 30, 11:56 am, Romain Guy  wrote:
> Something like that :) The way we usually do it is post a delayed
> invalidate instead of using a Timer. We'll have a better solution in a
> future release of Android though.
>
>
>
> On Fri, Jul 30, 2010 at 11:52 AM, jsera  wrote:
> > Thanks for the quick reply!
>
> > So then would the best approach be to call invalidate, and change the
> > size of the View using setMeasuredDimension on every tick of a Timer
> > object?
>
> > On Jul 30, 11:39 am, Romain Guy  wrote:
> >> Subclassing Animation won't help you unfortunately. It would be best
> >> for you to implement the animation yourself.
>
> >> On Fri, Jul 30, 2010 at 11:18 AM, jsera  wrote:
> >> > Hi, I'd like to subclass Animation in order to get an animation that
> >> > changes the clipRect of the canvas passed to a particular custom view
> >> > instead of messing with the matrix of that canvas.
>
> >> > The reason for this, is that I want to animate a partially obscured
> >> > bitmap up to display it fully.
>
> >> > So, say I have a bitmap 100x100 px, and at the start of the animation,
> >> > I want to start out displaying the top 100x50px of it, so the clipRect
> >> > will be of the size 100x50.
>
> >> > I want to move the clipRect 50px up, and add 50 px to it's size, but
> >> > it looks like both the scale and translate animations just change the
> >> > matrix, so I wind up displaying the same 100x50px area, but stretched
> >> > to fit in in whatever space.
>
> >> > Anyway, what's the best way of accomplishing this?
>
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups "Android Developers" group.
> >> > To post to this group, send email to android-developers@googlegroups.com
> >> > To unsubscribe from this group, send email to
> >> > android-developers+unsubscr...@googlegroups.com
> >> > For more options, visit this group at
> >> >http://groups.google.com/group/android-developers?hl=en
>
> >> --
> >> 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
>
> --
> 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


Re: [android-developers] Re: Froyo -- How to detect that my application has been killed?

2010-07-30 Thread Dianne Hackborn
Oh wait I take that back...  what has changed is that task killers no longer
go through the full force stop path -- *ALL* they can do is kill processes,
and further only processes that are good or moderate candidates for the out
of memory killer (pure background processes up to services running in the
background).

So to look at API demos -- if I use that and "Remote Service Controller" to
start the remote service, then use a task killer to kill API demos, what
I'll see in the log is that the two processes are simply killed, just like
the OOM killer would do:

I/Process (  101): Sending signal. PID: 668 SIG: 9
I/Process (  101): Sending signal. PID: 641 SIG: 9
W/ActivityManager(  101): Scheduling restart of crashed service
com.example.android.apis/.app.RemoteService in 5000ms
I/WindowManager(  101): WIN DEATH: Window{44ea7520
com.example.android.apis/com.example.android.apis.ApiDemos paused=false}
I/WindowManager(  101): WIN DEATH: Window{44d500f8
com.example.android.apis/com.example.android.apis.ApiDemos paused=false}
I/WindowManager(  101): WIN DEATH: Window{44d994d0
com.example.android.apis/com.example.android.apis.ApiDemos paused=false}
I/WindowManager(  101): WIN DEATH: Window{44eae490
com.example.android.apis/com.example.android.apis.app.RemoteService$Controller
paused=false}
D/dalvikvm(  291): GC_EXPLICIT freed 484 objects / 24352 bytes in 61ms

And then a little later I correctly see that the remote service is
restarted, just as happens if the process is killed by the OOM killer:

I/ActivityManager(  101): Start proc com.example.android.apis:remote for
service com.example.android.apis/.app.RemoteService: pid=695 uid=10062
gids={3003, 1015, 1006}

Compare that with the output of an actual force stop which the task killers
can no longer do:

I/ActivityManager(  101): Force stopping package com.example.android.apis
uid=10062
I/Process (  101): Sending signal. PID: 695 SIG: 9
I/Process (  101): Sending signal. PID: 712 SIG: 9
W/ActivityManager(  101): Scheduling restart of crashed service
com.example.android.apis/.app.RemoteService in 5000ms
I/ActivityManager(  101):   Force finishing activity HistoryRecord{44f23740
com.example.android.apis/.app.RemoteService$Controller}
I/ActivityManager(  101):   Force finishing activity HistoryRecord{44d43428
com.example.android.apis/.ApiDemos}
I/ActivityManager(  101):   Force finishing activity HistoryRecord{44d91560
com.example.android.apis/.ApiDemos}
I/ActivityManager(  101):   Force finishing activity HistoryRecord{44d2e2c8
com.example.android.apis/.ApiDemos}
I/ActivityManager(  101):   Force stopping service ServiceRecord{44eacb00
com.example.android.apis/.app.RemoteService}


For the behavior you are seeing, are you using the bind server instead of
the start service UI?  If you do that then yes your service will not be
restarted -- because the process that is bound to it is in the background,
so free to be killed, and once it gets killed the binding goes away and the
service does not need to run any more.

But this exact behavior is expected to happen when the device is low on
memory, so it is something apps need to deal with correctly anyway.


On Fri, Jul 30, 2010 at 12:20 PM, Dianne Hackborn wrote:

> Um yeah the check for process priority does let it kill service processes
> (not visible or foreground service processes though).  Whoops.  I'll fix
> that.
>
> That said, the service *does* restart like it always did, and I have
> confirmed it does.  That code path hasn't changed at all.  So basically the
> behavior is still like it was pre-2.2, except there are still some processes
> that can unintentionally be killed.
>
>
> On Fri, Jul 30, 2010 at 10:15 AM, tomei.ninge...@gmail.com <
> tomei.ninge...@gmail.com> wrote:
>
>> Dianne, here's the reproduction step on Froyo:
>>
>> [1] Run on Froyo - start ApiDemos, start the RemoveService sample. You
>> will now see two processes
>>com.example.android.apis
>>com.example.android.apis:remote
>>
>> [2] You will notice that "Sample Remote Service" appears on status
>> bar.
>>
>> [3] write an app with KILL_BACKGROUND_PROCESSES permission. Call
>>
>>
>> ActivityManager.killBackgroundProcesses("com.example.android.apis");
>>
>> [4] Both processes created at step [1] are killed.
>>
>> [5] RemoveService is never restarted, even though you see something
>> like
>>
>> W/ActivityManager( 2426): Scheduling restart of crashed service
>> com.example.android.apis/.app.RemoteService in 2ms
>>
>> [6] "Sample Remote Service" message still stays on status bar. This is
>> because StatusBarService expects a ACTION_PACKAGE_RESTARTED broadcast,
>> but
>> this braodcast is never delivered.
>>
>> What's the best way to handle this -- we need to clean up some
>> resources if
>> the app process is killed.
>>
>> Thanks!
>>
>> On Jul 29, 8:15 pm, Dianne Hackborn  wrote:
>> > Applications can't kill services with this.  They can only kill
>> background
>> > processes, which the OOM killer is free to kill at any time anyway.
>> >
>

Re: [android-developers] Re: Android Market Licensing: Now Available!

2010-07-30 Thread Dianne Hackborn
On Fri, Jul 30, 2010 at 12:08 PM, Shane Isbell wrote:

> Does this mean that apps installed on SD card are not going to be able to
> store private data (Context.MODE_PRIVATE) on device?
>

No that is a totally different thing.  All installed apps have a private
data directory, non-forward-locked, forward-locked, on-sd, or whatever else.

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

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

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

Re: [android-developers] Re: Froyo -- How to detect that my application has been killed?

2010-07-30 Thread Dianne Hackborn
Um yeah the check for process priority does let it kill service processes
(not visible or foreground service processes though).  Whoops.  I'll fix
that.

That said, the service *does* restart like it always did, and I have
confirmed it does.  That code path hasn't changed at all.  So basically the
behavior is still like it was pre-2.2, except there are still some processes
that can unintentionally be killed.

On Fri, Jul 30, 2010 at 10:15 AM, tomei.ninge...@gmail.com <
tomei.ninge...@gmail.com> wrote:

> Dianne, here's the reproduction step on Froyo:
>
> [1] Run on Froyo - start ApiDemos, start the RemoveService sample. You
> will now see two processes
>com.example.android.apis
>com.example.android.apis:remote
>
> [2] You will notice that "Sample Remote Service" appears on status
> bar.
>
> [3] write an app with KILL_BACKGROUND_PROCESSES permission. Call
>
>
> ActivityManager.killBackgroundProcesses("com.example.android.apis");
>
> [4] Both processes created at step [1] are killed.
>
> [5] RemoveService is never restarted, even though you see something
> like
>
> W/ActivityManager( 2426): Scheduling restart of crashed service
> com.example.android.apis/.app.RemoteService in 2ms
>
> [6] "Sample Remote Service" message still stays on status bar. This is
> because StatusBarService expects a ACTION_PACKAGE_RESTARTED broadcast,
> but
> this braodcast is never delivered.
>
> What's the best way to handle this -- we need to clean up some
> resources if
> the app process is killed.
>
> Thanks!
>
> On Jul 29, 8:15 pm, Dianne Hackborn  wrote:
> > Applications can't kill services with this.  They can only kill
> background
> > processes, which the OOM killer is free to kill at any time anyway.
> >
> > On Thu, Jul 29, 2010 at 6:37 PM, tomei.ninge...@gmail.com <
> >
> >
> >
> >
> >
> >
> >
> > tomei.ninge...@gmail.com> wrote:
> > > On Froyo, we found that some new "Task Manager" apps are now using the
> > > ActivityManager.killBackgroundProcesses() to kill apps. When this
> > > happens, Intent.ACTION_PACKAGE_RESTARTED is no longer fired.
> >
> > > How can I find out that my application has been killed?
> >
> > > I tried to start a service, and I do see this message printed in
> > > logcat:
> >
> > > W/ActivityManager( 2426): Scheduling restart of crashed service
> > > com.example.android.apis/.app.RemoteService in 2ms
> >
> > > However, the service is never restarted as advertised, if the app is
> > > killed using the killBackgroundProcesses API.
> >
> > > (If I go into adb shell and kill the service process, the service will
> > > indeed be restarted ...)
> >
> > > This looks like a bug anyway, because the notification created by the
> > > app is no longer removed like in eclair (the StatusBarService, and a
> > > bunch of other system services, depend on the
> > > Intent.ACTION_PACKAGE_RESTARTED broadcast).
> >
> > > 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
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see
> and
> > answer them.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

Re: [android-developers] Re: Android Market Licensing: Now Available!

2010-07-30 Thread Mark Murphy
On Fri, Jul 30, 2010 at 3:08 PM, Shane Isbell  wrote:
> Does this mean that apps installed on SD card are not going to be able to
> store private data (Context.MODE_PRIVATE) on device?

AFAIK, the app's local files (e.g., getFilesDir()) is still in the
on-board flash, not on the SD card, even if the app is installed to
the SD card.

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

_Android Programming Tutorials_ Version 2.9 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] Webview not fit to screen

2010-07-30 Thread Ken
Hi,

When I load a URL in my webview, the page always appears with full
size and I am unable to zoom out (I did call
setBuiltInZoomControls(true)). The webview is wrapped in a
LinearLayout with fill_parent for both dimensions.

Is there a simple way to fit the content of the webview automatically
to the screen? Thanks!

Ken

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


Re: [android-developers] Re: Android Market Licensing: Now Available!

2010-07-30 Thread Shane Isbell
On Fri, Jul 30, 2010 at 12:01 PM, Dianne Hackborn wrote:

> On Wed, Jul 28, 2010 at 9:24 AM, Joseph Earl wrote:
>
>> Any chance you guys are working a solution for large applications that
>> will work across Android 1.5-2.1?
>>
>
> No those platforms are already exist; it would make no sense to modify them
> to support new features.
>
>
>> Currently the only secure way of doing it is by targeting Froyo only
>> (using 8 as minSdkVersion) - however it will be at least a year, more
>> likely 3, before this an acceptable solution to present to my clients
>> as they obviously want to target as large a market share as possible.
>>
>
> You don't need to use minSdkVersion; you should use targetSdkVersion to say
> you are Froyo compatible, and devices on 2.2 and up can install it on the SD
> card.  This doesn't make you incompatible with older platforms.  (In fact
> you don't need to do that -- you can set min/target SDK to whatever you
> want, and just need to compile against the 2.2 SDK so you can use the new
> manifest attribute.)
>
>
>> 3) There is no security on the data stored on the SD card unless the
>> files are manually obfuscated or encrypted.
>>
>
> Putting an app on SD card with 2.2 doesn't prevent others from reading it.
>  In fact, as the announcement about the licensing server says, we are moving
> completely away from forward-locking (read-protecting) apps.
>
> If apps feel the need to protect their data, they can encrypt it
> themselves.
>

Does this mean that apps installed on SD card are not going to be able to
store private data (Context.MODE_PRIVATE) on device?

-- 
Shane Isbell (Founder of ZappMarket)
http://apps.facebook.com/zappmarket/

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

Re: [android-developers] Re: Sync Adapter and api level 3 & 4?

2010-07-30 Thread Dianne Hackborn
If nothing tries to run them, they will never be instantiated and should be
fine.

On Fri, Jul 30, 2010 at 11:32 AM, Mark Wyszomierski wrote:

> Hi Dianne,
>
> Thanks, I should have posted this fragment as well, what about these
> references:
>
>android:name=".authenticator.AuthenticationService"
>android:name="android.accounts.AccountAuthenticator" />
>android:name="android.content.SyncAdapter" />
>
> these are service definitions, will the references to
> android.accounts.* also just be ignored?
>
> Thanks again, sample extract below:
>
>
>
> from the sample:
>
>android:icon="@drawable/icon"
>android:label="@string/label">
>
>android:name=".authenticator.AuthenticationService"
>android:exported="true">
>
>
> android:name="android.accounts.AccountAuthenticator" />
>
>android:name="android.accounts.AccountAuthenticator"
>android:resource="@xml/authenticator" />
>
>android:name=".syncadapter.SyncService"
>android:exported="true">
>
>android:name="android.content.SyncAdapter" />
>
>android:name="android.content.SyncAdapter"
>android:resource="@xml/syncadapter" />
>android:name="android.provider.CONTACTS_STRUCTURE"
>android:resource="@xml/contacts" />
>
>
>
>
> On Jul 30, 11:26 am, Dianne Hackborn  wrote:
> > Yes permissions on older platforms will be ignored.  Since older
> platforms
> > don't know about sync adapters, they just won't do anything with them.
> >
> > Do be sure of course to test your code on an older platform to be sure
> all
> > is well, though.
> >
> > On Fri, Jul 30, 2010 at 11:17 AM, Mark Wyszomierski  >wrote:
> >
> >
> >
> >
> >
> > > Hi,
> >
> > > I'm looking at the sample sync adapter here:
> >
> > >http://developer.android.com/resources/samples/SampleSyncAdapter/inde.
> ..
> >
> > > I'd like to still support sdk level 3 and 4 devices. Will including
> > > the following lines in my app's manifest be problematic?:
> >
> > >   > >android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
> > >   > >android:name="android.permission.READ_SYNC_STATS" />
> >
> > > are these specific to sdk level 5?
> >
> > > Ideally, we could include these for level 3 and 4 users, and they just
> > > won't be shown the contact sync option at all. Is this how it's meant
> > > to work?
> >
> > > Thanks
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com cr...@googlegroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see
> and
> > answer them.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

Re: [android-developers] Adding headers to listview for cursor with grouped results

2010-07-30 Thread Connick
I'm with you on that ...re: header part of hierarchy, that's the direction
I'm going but I was worried about position mapping ...you're suggestion to
include the header view with a row item would solve that problem!
Gracias, will give that a shot.

Cheers
S

On Fri, Jul 30, 2010 at 2:53 PM, Kostya Vasilyev  wrote:

>  It does on my phone - Samsung Galaxy S with Android 2.1update1. This is
> the built-in Android email client, set up with an IMAP account.
>
> I just had an idea.
>
> It should be much easier to implement the header as part of data item view
> hierarchy. This way the number of items in the list view is exactly the same
> as the number of items in the cursor, and you can avoid extra code dealing
> with counting data items and mapping their positions.
>
> You'd have two kinds of list item views - one with the header, one without.
> Deciding which one to use is pretty simple - in the adapter's getView,
> compare the item's data with the previous item's. If they differ, you need
> to use the version with the header.
>
> -- Kostya
>
>

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

Re: [android-developers] Re: Android Market Licensing: Now Available!

2010-07-30 Thread Dianne Hackborn
On Wed, Jul 28, 2010 at 9:24 AM, Joseph Earl wrote:

> Any chance you guys are working a solution for large applications that
> will work across Android 1.5-2.1?
>

No those platforms are already exist; it would make no sense to modify them
to support new features.


> Currently the only secure way of doing it is by targeting Froyo only
> (using 8 as minSdkVersion) - however it will be at least a year, more
> likely 3, before this an acceptable solution to present to my clients
> as they obviously want to target as large a market share as possible.
>

You don't need to use minSdkVersion; you should use targetSdkVersion to say
you are Froyo compatible, and devices on 2.2 and up can install it on the SD
card.  This doesn't make you incompatible with older platforms.  (In fact
you don't need to do that -- you can set min/target SDK to whatever you
want, and just need to compile against the 2.2 SDK so you can use the new
manifest attribute.)


> 3) There is no security on the data stored on the SD card unless the
> files are manually obfuscated or encrypted.
>

Putting an app on SD card with 2.2 doesn't prevent others from reading it.
 In fact, as the announcement about the licensing server says, we are moving
completely away from forward-locking (read-protecting) apps.

If apps feel the need to protect their data, they can encrypt it themselves.

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

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

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

[android-developers] Re: Compiling and obfuscating by command line...

2010-07-30 Thread sblantipodi
done, same problem... :(

On Jul 30, 7:46 pm, Mark Murphy  wrote:
> If this is a normal Android project, run android update project -p
> ..., where ... is the path to your project, and it will create or
> repair your local.properties file.
>
> On Fri, Jul 30, 2010 at 1:31 PM, sblantipodi
>
>  wrote:
> > I have listed it in the main.xml, the problem seems that ant doesn't
> > find the SDK...
> > if you found my error on google
> > "taskdef class com.android.ant.SetupTask cannot be found"
> > you will find dozens of people with my same problem,
> > but I can't find a solution yet...
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 2.9 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: Can't get LVL working.

2010-07-30 Thread sblantipodi
Now I've got another problem now...
I'm using the Default Policy implementation,
the first time I setted my developer console to licensed,
this makes my software authenitcate well on the emulator, after this,
I setted the developer console to not licensed, removed the software
from emulator and reinstalled it.
Now when I start software it tell me that the software is licensed
also if I setted the developer console to not licensed...

Any Idea?

Thanks.

On Jul 30, 7:40 pm, Xav  wrote:
> The "Google APIs" add-on for 2.2 (in revision 2) supports testing LVL-
> enabled app.
>
> See instructions 
> athttp://developer.android.com/guide/publishing/licensing.html#acct-signin
>
> On Jul 30, 10:30 am, sblantipodi  wrote:
>
> > Really thanks but so there is no way to test LVL using emulator?
> > I don't want to test the "Buy Button" that redirect from the app to
> > the market,
> > I want to test the doCheck() method that tell me if the app is
> > licensed or not.
>
> > This should work ok on the emulator. Am I wrong?
> > Thanks.
>
> > On Jul 30, 7:22 pm, jeffro  wrote:
>
> > > I don't believe the Android Market is included on the emulator and the
> > > licensing service is included with the Market app.  I have it working
> > > successfully, but I did all my development and testing with a real
> > > phone (N1 Froyo).
>
> > > Jeff
>
> > > Visit Trackaroo.com!
> > > Trackmaster - Motorsports Lap Timer
> > > Dynomaster - Performance Dyno
>
> > > On Jul 30, 10:08 am, sblantipodi  wrote:
>
> > > > Hi all,
> > > > I'm trying to get LVL working.
>
> > > > I followed the offical guidelines, I copyed the LVL source into my
> > > > project and added the correct
> > > > manifest attribute.
>
> > > > I also copyed from LVL sample folder the mainactivity.java into my
> > > > project,
> > > > changed the public key with the one from my developer console.
>
> > > > When I launch my software the MainActivity tell me always the
> > > > application is not licensed also if I specified that is Licensed from
> > > > my developer console...
>
> > > > This is the output of the logcat,
>
> > > > W/ResourceType(   57): No package identifier when getting value for
> > > > resource number 0x7f060001
> > > > I/ActivityManager(   57): Starting activity: Intent
> > > > { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCH
> > > > ER] flg=0x1020 cmp=packageName/.AndroidMarket }
> > > > I/ActivityManager(   57): Start proc packageNamefor activity
> > > > packageName/.AndroidMarket: pid=658 uid=10023 gids={3003}
> > > > I/jdwp    (  658): received file descriptor 20 from ADB
> > > > D/ddm-heap(  658): Got feature list request
> > > > I/LicenseChecker(  658): Binding to licensing service.
> > > > W/ActivityManager(   57): Unable to start service Intent
> > > > { act=com.android.vending.licensing.ILicensingService }: not fo
> > > > und
> > > > E/LicenseChecker(  658): Could not bind to service.
> > > > D/        (  658): unable to unlink '/data/data/packageName/
> > > > shared_prefs/com.android.vendi
> > > > ng.licensing.ServerManagedPolicy.xml.bak': No such file or directory
> > > > (errno=2)
>
> > > > any idea would be appreciated.
>
> > > > In addition when I click on the buy now button after it told me that
> > > > application is not licensed,
> > > > it will redirect me on the android market and I got a 404 error.
> > > > Probably because emulator isn't authorized to access the market, I
> > > > don't know...
>
> > > > 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


Re: [android-developers] Re: Subclassing Animation

2010-07-30 Thread Romain Guy
Something like that :) The way we usually do it is post a delayed
invalidate instead of using a Timer. We'll have a better solution in a
future release of Android though.

On Fri, Jul 30, 2010 at 11:52 AM, jsera  wrote:
> Thanks for the quick reply!
>
> So then would the best approach be to call invalidate, and change the
> size of the View using setMeasuredDimension on every tick of a Timer
> object?
>
> On Jul 30, 11:39 am, Romain Guy  wrote:
>> Subclassing Animation won't help you unfortunately. It would be best
>> for you to implement the animation yourself.
>>
>>
>>
>> On Fri, Jul 30, 2010 at 11:18 AM, jsera  wrote:
>> > Hi, I'd like to subclass Animation in order to get an animation that
>> > changes the clipRect of the canvas passed to a particular custom view
>> > instead of messing with the matrix of that canvas.
>>
>> > The reason for this, is that I want to animate a partially obscured
>> > bitmap up to display it fully.
>>
>> > So, say I have a bitmap 100x100 px, and at the start of the animation,
>> > I want to start out displaying the top 100x50px of it, so the clipRect
>> > will be of the size 100x50.
>>
>> > I want to move the clipRect 50px up, and add 50 px to it's size, but
>> > it looks like both the scale and translate animations just change the
>> > matrix, so I wind up displaying the same 100x50px area, but stretched
>> > to fit in in whatever space.
>>
>> > Anyway, what's the best way of accomplishing this?
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to android-developers@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-developers+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> >http://groups.google.com/group/android-developers?hl=en
>>
>> --
>> 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
>



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


Re: [android-developers] Adding headers to listview for cursor with grouped results

2010-07-30 Thread Kostya Vasilyev
It does on my phone - Samsung Galaxy S with Android 2.1update1. This is 
the built-in Android email client, set up with an IMAP account.


I just had an idea.

It should be much easier to implement the header as part of data item 
view hierarchy. This way the number of items in the list view is exactly 
the same as the number of items in the cursor, and you can avoid extra 
code dealing with counting data items and mapping their positions.


You'd have two kinds of list item views - one with the header, one 
without. Deciding which one to use is pretty simple - in the adapter's 
getView, compare the item's data with the previous item's. If they 
differ, you need to use the version with the header.


-- Kostya

30.07.2010 22:44, Connick ?:
The grouping itself is no problem ...its tossing in the arbitrary view 
to act as a header to each group within that list. From the looks of 
the client it doesn't use any type of headers in its list ...but 
thanks for the suggestion!



On Fri, Jul 30, 2010 at 2:38 PM, Kostya Vasilyev > wrote:


Stacy,

You might want to look at the source for Android's built-in email
client. It groups messages by date, i.e. "today", "yesterday",
"more recent".

Don't know for sure if its source is available, but I think it is
(K9 mail is based on it).

-- Kostya

To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com

For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


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



--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: Subclassing Animation

2010-07-30 Thread jsera
Thanks for the quick reply!

So then would the best approach be to call invalidate, and change the
size of the View using setMeasuredDimension on every tick of a Timer
object?

On Jul 30, 11:39 am, Romain Guy  wrote:
> Subclassing Animation won't help you unfortunately. It would be best
> for you to implement the animation yourself.
>
>
>
> On Fri, Jul 30, 2010 at 11:18 AM, jsera  wrote:
> > Hi, I'd like to subclass Animation in order to get an animation that
> > changes the clipRect of the canvas passed to a particular custom view
> > instead of messing with the matrix of that canvas.
>
> > The reason for this, is that I want to animate a partially obscured
> > bitmap up to display it fully.
>
> > So, say I have a bitmap 100x100 px, and at the start of the animation,
> > I want to start out displaying the top 100x50px of it, so the clipRect
> > will be of the size 100x50.
>
> > I want to move the clipRect 50px up, and add 50 px to it's size, but
> > it looks like both the scale and translate animations just change the
> > matrix, so I wind up displaying the same 100x50px area, but stretched
> > to fit in in whatever space.
>
> > Anyway, what's the best way of accomplishing this?
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> 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


Re: [android-developers] Picking up radio stations?

2010-07-30 Thread Mark Murphy
On Fri, Jul 30, 2010 at 2:17 PM, Tommy  wrote:
> Is there a way to let my app tune into a certain radio station(FM/AM?)
> Or is this something not yet possible with android?

A handful of Android devices may have built-in radio tuners. I suspect
none have built-in radio tuners and also have activities with a
documented means for other applications to launch a radio station. I'm
not saying it's a bad idea, but I'm just skeptical that anyone has
done it.

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

_Android Programming Tutorials_ Version 2.9 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


Re: [android-developers] Adding headers to listview for cursor with grouped results

2010-07-30 Thread Connick
The grouping itself is no problem ...its tossing in the arbitrary view to
act as a header to each group within that list. From the looks of the client
it doesn't use any type of headers in its list ...but thanks for the
suggestion!


On Fri, Jul 30, 2010 at 2:38 PM, Kostya Vasilyev  wrote:

> Stacy,
>
> You might want to look at the source for Android's built-in email client.
> It groups messages by date, i.e. "today", "yesterday", "more recent".
>
> Don't know for sure if its source is available, but I think it is (K9 mail
> is based on it).
>
> -- Kostya
>
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: Can't get LVL working.

2010-07-30 Thread sblantipodi
o_O
now it works... -_-
Don't develop for more than 12 hours a day... I should remember it :D

On Jul 30, 7:40 pm, Xav  wrote:
> The "Google APIs" add-on for 2.2 (in revision 2) supports testing LVL-
> enabled app.
>
> See instructions 
> athttp://developer.android.com/guide/publishing/licensing.html#acct-signin
>
> On Jul 30, 10:30 am, sblantipodi  wrote:
>
> > Really thanks but so there is no way to test LVL using emulator?
> > I don't want to test the "Buy Button" that redirect from the app to
> > the market,
> > I want to test the doCheck() method that tell me if the app is
> > licensed or not.
>
> > This should work ok on the emulator. Am I wrong?
> > Thanks.
>
> > On Jul 30, 7:22 pm, jeffro  wrote:
>
> > > I don't believe the Android Market is included on the emulator and the
> > > licensing service is included with the Market app.  I have it working
> > > successfully, but I did all my development and testing with a real
> > > phone (N1 Froyo).
>
> > > Jeff
>
> > > Visit Trackaroo.com!
> > > Trackmaster - Motorsports Lap Timer
> > > Dynomaster - Performance Dyno
>
> > > On Jul 30, 10:08 am, sblantipodi  wrote:
>
> > > > Hi all,
> > > > I'm trying to get LVL working.
>
> > > > I followed the offical guidelines, I copyed the LVL source into my
> > > > project and added the correct
> > > > manifest attribute.
>
> > > > I also copyed from LVL sample folder the mainactivity.java into my
> > > > project,
> > > > changed the public key with the one from my developer console.
>
> > > > When I launch my software the MainActivity tell me always the
> > > > application is not licensed also if I specified that is Licensed from
> > > > my developer console...
>
> > > > This is the output of the logcat,
>
> > > > W/ResourceType(   57): No package identifier when getting value for
> > > > resource number 0x7f060001
> > > > I/ActivityManager(   57): Starting activity: Intent
> > > > { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCH
> > > > ER] flg=0x1020 cmp=packageName/.AndroidMarket }
> > > > I/ActivityManager(   57): Start proc packageNamefor activity
> > > > packageName/.AndroidMarket: pid=658 uid=10023 gids={3003}
> > > > I/jdwp    (  658): received file descriptor 20 from ADB
> > > > D/ddm-heap(  658): Got feature list request
> > > > I/LicenseChecker(  658): Binding to licensing service.
> > > > W/ActivityManager(   57): Unable to start service Intent
> > > > { act=com.android.vending.licensing.ILicensingService }: not fo
> > > > und
> > > > E/LicenseChecker(  658): Could not bind to service.
> > > > D/        (  658): unable to unlink '/data/data/packageName/
> > > > shared_prefs/com.android.vendi
> > > > ng.licensing.ServerManagedPolicy.xml.bak': No such file or directory
> > > > (errno=2)
>
> > > > any idea would be appreciated.
>
> > > > In addition when I click on the buy now button after it told me that
> > > > application is not licensed,
> > > > it will redirect me on the android market and I got a 404 error.
> > > > Probably because emulator isn't authorized to access the market, I
> > > > don't know...
>
> > > > 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


Re: [android-developers] Subclassing Animation

2010-07-30 Thread Romain Guy
Subclassing Animation won't help you unfortunately. It would be best
for you to implement the animation yourself.

On Fri, Jul 30, 2010 at 11:18 AM, jsera  wrote:
> Hi, I'd like to subclass Animation in order to get an animation that
> changes the clipRect of the canvas passed to a particular custom view
> instead of messing with the matrix of that canvas.
>
> The reason for this, is that I want to animate a partially obscured
> bitmap up to display it fully.
>
> So, say I have a bitmap 100x100 px, and at the start of the animation,
> I want to start out displaying the top 100x50px of it, so the clipRect
> will be of the size 100x50.
>
> I want to move the clipRect 50px up, and add 50 px to it's size, but
> it looks like both the scale and translate animations just change the
> matrix, so I wind up displaying the same 100x50px area, but stretched
> to fit in in whatever space.
>
> Anyway, what's the best way of accomplishing this?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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


Re: [android-developers] Adding headers to listview for cursor with grouped results

2010-07-30 Thread Kostya Vasilyev

Stacy,

You might want to look at the source for Android's built-in email 
client. It groups messages by date, i.e. "today", "yesterday", "more 
recent".


Don't know for sure if its source is available, but I think it is (K9 
mail is based on it).


-- Kostya

30.07.2010 22:32, Mark Murphy пишет:

On Fri, Jul 30, 2010 at 2:29 PM, Connick  wrote:
   

Requirement: Display query results in a list with a header view atop each
group. (results grouped from database)
Looking at Mark's MergeAdapter. Wondering if I might be able to use a single
cursor and have each adapter filter on the group field? That a viable
approach?
 

I suspect that would be troublesome, since Cursor objects know their
position, and you'd need the position to be constantly jumping around.

You can do headings with a single Cursor -- my sleep-deprived brain
has a couple of ideas, none I'm in position to flesh out right this
moment -- but you'd need to take a substantially different approach
than does the MergeAdapter.

   



--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

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


Re: [android-developers] Adding headers to listview for cursor with grouped results

2010-07-30 Thread Connick
Knowing it's possible is enough for me to go on and start digging. :)
Will post back if I figure it out!


On Fri, Jul 30, 2010 at 2:32 PM, Mark Murphy wrote:

> On Fri, Jul 30, 2010 at 2:29 PM, Connick  wrote:
> > Requirement: Display query results in a list with a header view atop each
> > group. (results grouped from database)
> > Looking at Mark's MergeAdapter. Wondering if I might be able to use a
> single
> > cursor and have each adapter filter on the group field? That a viable
> > approach?
>
> I suspect that would be troublesome, since Cursor objects know their
> position, and you'd need the position to be constantly jumping around.
>
> You can do headings with a single Cursor -- my sleep-deprived brain
> has a couple of ideas, none I'm in position to flesh out right this
> moment -- but you'd need to take a substantially different approach
> than does the MergeAdapter.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 2.9 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

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

2010-07-30 Thread Mark Wyszomierski
Hi Dianne,

Thanks, I should have posted this fragment as well, what about these
references:




these are service definitions, will the references to
android.accounts.* also just be ignored?

Thanks again, sample extract below:



from the sample:



















On Jul 30, 11:26 am, Dianne Hackborn  wrote:
> Yes permissions on older platforms will be ignored.  Since older platforms
> don't know about sync adapters, they just won't do anything with them.
>
> Do be sure of course to test your code on an older platform to be sure all
> is well, though.
>
> On Fri, Jul 30, 2010 at 11:17 AM, Mark Wyszomierski wrote:
>
>
>
>
>
> > Hi,
>
> > I'm looking at the sample sync adapter here:
>
> >http://developer.android.com/resources/samples/SampleSyncAdapter/inde...
>
> > I'd like to still support sdk level 3 and 4 devices. Will including
> > the following lines in my app's manifest be problematic?:
>
> >   >        android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
> >   >        android:name="android.permission.READ_SYNC_STATS" />
>
> > are these specific to sdk level 5?
>
> > Ideally, we could include these for level 3 and 4 users, and they just
> > won't be shown the contact sync option at all. Is this how it's meant
> > to work?
>
> > Thanks
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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


Re: [android-developers] Adding headers to listview for cursor with grouped results

2010-07-30 Thread Mark Murphy
On Fri, Jul 30, 2010 at 2:29 PM, Connick  wrote:
> Requirement: Display query results in a list with a header view atop each
> group. (results grouped from database)
> Looking at Mark's MergeAdapter. Wondering if I might be able to use a single
> cursor and have each adapter filter on the group field? That a viable
> approach?

I suspect that would be troublesome, since Cursor objects know their
position, and you'd need the position to be constantly jumping around.

You can do headings with a single Cursor -- my sleep-deprived brain
has a couple of ideas, none I'm in position to flesh out right this
moment -- but you'd need to take a substantially different approach
than does the MergeAdapter.

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

_Android Programming Tutorials_ Version 2.9 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


Re: [android-developers] Intent for following a user on Twitter?

2010-07-30 Thread Shane Isbell
I'm working on this feature for devs to embed code for twitter follows in
their app. The client code will be open-source (ASL v2) and hook into my
ZappMarket servers. If you can hold off a week or so, you will be able to
use it.

On Fri, Jul 30, 2010 at 9:19 AM, TreKing  wrote:

> On Fri, Jul 30, 2010 at 10:59 AM, Chris Stewart wrote:
>
>> Hey, maybe instead of rudely "answering" the question, you could save your
>> keystrokes for something useful?
>>
>
> I was being rude? I asked a simple question in response the OP's statement.
>
> Hey, maybe instead of misinterpreting people's posts and going off-topic
> you could save YOUR keystrokes for something useful?
>
>
> On Fri, Jul 30, 2010 at 11:13 AM, Mark Carter 
>  wrote:
>
>> A standard intent may be used to execute non-standard actions.
>>
>> For example, there might be a standard Intent action to FOLLOW something.
>> A Twitter client might attempt to respond to such Intents...
>>
>
> Ah, true. I thought you meant something more "built-in" by "standard".
> As Murphy stated, you'd have to check with Twitter app authors and see if
> they handle any, but it definitely wouldn't be "standard" (each Twitter app
> would probably do their own thing). And of course there's no guarantee that
> they'd be available on the user's device.
>
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Shane Isbell (Founder of ZappMarket)
http://apps.facebook.com/zappmarket/

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

[android-developers] Adding headers to listview for cursor with grouped results

2010-07-30 Thread Connick
Requirement: Display query results in a list with a header view atop each
group. (results grouped from database)
Looking at Mark's MergeAdapter. Wondering if I might be able to use a single
cursor and have each adapter filter on the group field? That a viable
approach?

Cheers,
Stacy

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

Re: [android-developers] Sync Adapter and api level 3 & 4?

2010-07-30 Thread Dianne Hackborn
Yes permissions on older platforms will be ignored.  Since older platforms
don't know about sync adapters, they just won't do anything with them.

Do be sure of course to test your code on an older platform to be sure all
is well, though.

On Fri, Jul 30, 2010 at 11:17 AM, Mark Wyszomierski wrote:

> Hi,
>
> I'm looking at the sample sync adapter here:
>
>
> http://developer.android.com/resources/samples/SampleSyncAdapter/index.html
>
> I'd like to still support sdk level 3 and 4 devices. Will including
> the following lines in my app's manifest be problematic?:
>
>  android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
>  android:name="android.permission.READ_SYNC_STATS" />
>
> are these specific to sdk level 5?
>
> Ideally, we could include these for level 3 and 4 users, and they just
> won't be shown the contact sync option at all. Is this how it's meant
> to work?
>
> 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
>



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

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

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

[android-developers] Re: My experience with LVL and the precedence it sets

2010-07-30 Thread andrew android
I just started using the LVL also.  I had problems adding a reference
to the LVL project (I kept getting manifest errors immediately upon
adding the reference) so I just added it directly.  Then, I tried to
buile the sample code into my project but I find it all very
"clunky".  I think it is absurd to not take the time to build methods
and properties that automatically can set obfuscation properties,
obtain device Id, make a call to do the validation and such.  Having
source code is mice but they really should have made this quicker to
implement with the option to customize and do more with it or to not
and take a simpler approach.  I was so looking forward to using this
but am sorely disappointed.  There is a competing android market with
a much better licensing implementation, by the way.

On Jul 29, 2:06 am, Mark Carter  wrote:
> I believe I'm using the default eclipse compiler warning settings and
> I got a bunch of "unused import/instance variable" warnings in my
> workspace when adding the LVL project. Furthermore, all the warnings
> were doubled up - once for the library project at the top level and
> once for the library project as a child node of my own project.
>
> Since changing the project warning settings was not an option, I
> solved this by adding @SuppressWarnings annotation at the class level
> of a couple of the LVL classes. But this is far from ideal as it
> requires modifying the code (which I will later want to update as new
> versions are released).
>
> Another problem was that when I changed the LVL code (saving the
> changes), my main project required a "Clean" before it picked up the
> changes. It would be nice if library project changes triggered clean
> to all downstream projects (I think this is how things normally work).
> This problem might have been caused by me editing files in the top
> level LVL project rather than the child LVL node. Again (mentioned
> last month in another thread), this is a problem where the same class
> can appear twice in the workspace (once for the top level, once for
> the child level).
>
> The easiest solution to this would be to NOT make the LVL child node
> browsable. So forcing the dev to do everything through the top level
> project. Also trigger the Cleans accordingly.
>
> One final point about the LVL code I wanted to subclass
> ServerManagerPolicy but had to make a bunch of instance fields
> protected to do so. Would be great if they were already protected.
>
> Also, ResponseData is package private. This prevents devs from
> implementing their own Policy in their own package. Since I wanted to
> make only minimal changes the the LVL project, I just included my
> Policy class in a "com.android.vending.licensing" package within my
> main project instead. Still, would prefer to use my own package
> though...
>
> On Jul 29, 3:00 am, Zsolt Vasvari  wrote:
>
>
>
> > Thanks for your answer, Xavier.
>
> > > $NON-NLS is something specific to Eclipse that we do not use in Android.
> > > Our convention for the android source code do not enforce the use of
> > > this qualifier.
>
> > > As for importing java.lang.String, those 2 files have been created
> > > automatically by aidl (see the files in aidl/) and the tool doesn't
> > > care about unneeded imports and automatically put import statements
> > > for all the used classes.
>
> > Ok, fair comment about the java.lang.String import.  That said, since
> > you are recommending to use Eclipse as the development environment, I
> > think it would be benefitial for everybody if a few minutes taken
> > before release to make sure it compiles with any possible settings the
> > user may have in their Eclipse project.  If that means cleaning up the
> > generated code, I believe that should be undertaken.  Otherwise you
> > will end up with aggrevated users.
>
> > Do you honestly expect the user having to modify their project warning
> > levels to be able to successfully integrate LVL?  Perhaphs the answer
> > is yes, but then it should be documented and spelt out how warning
> > levels need to be set for the project.

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


Re: [android-developers] Extending multiple classes

2010-07-30 Thread Kostya Vasilyev
This is called "multiple inheritance", and Java - the language - doesn't 
have this feature, regardless of the platform (Android or not).


Break up your code logic into more fine-grained pieces. You can bind to 
the service from multiple activities, as many as necessary.


Also, you don't need to explicitly create Service objects - this is done 
for you by the Android framework, when you either bind to a service, or 
just start it.


-- Kostya

30.07.2010 21:29, Priyank пишет:

Hi,
I had a basic question.
Can my class extend 2 or more classes at a time. What is the syntax.
I want to extend Activity as well as Application. Wont this create
problems in the manifest file?
Activity because, I need to do a couple of things during the
onCreate() [binding a service]and Application, because I am creating
objects of another class [service class]which needs to be accessible
throughout my application.


Thanks,
Priyank

   



--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] Subclassing Animation

2010-07-30 Thread jsera
Hi, I'd like to subclass Animation in order to get an animation that
changes the clipRect of the canvas passed to a particular custom view
instead of messing with the matrix of that canvas.

The reason for this, is that I want to animate a partially obscured
bitmap up to display it fully.

So, say I have a bitmap 100x100 px, and at the start of the animation,
I want to start out displaying the top 100x50px of it, so the clipRect
will be of the size 100x50.

I want to move the clipRect 50px up, and add 50 px to it's size, but
it looks like both the scale and translate animations just change the
matrix, so I wind up displaying the same 100x50px area, but stretched
to fit in in whatever space.

Anyway, what's the best way of accomplishing this?

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


[android-developers] Sync Adapter and api level 3 & 4?

2010-07-30 Thread Mark Wyszomierski
Hi,

I'm looking at the sample sync adapter here:

  http://developer.android.com/resources/samples/SampleSyncAdapter/index.html

I'd like to still support sdk level 3 and 4 devices. Will including
the following lines in my app's manifest be problematic?:

  
  

are these specific to sdk level 5?

Ideally, we could include these for level 3 and 4 users, and they just
won't be shown the contact sync option at all. Is this how it's meant
to work?

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] Picking up radio stations?

2010-07-30 Thread Tommy
Hey everyone,

Is there a way to let my app tune into a certain radio station(FM/AM?)
Or is this something not yet possible with android?

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


[android-developers] Re: Can't get LVL working.

2010-07-30 Thread sblantipodi
Really thanks but so there is no way to test LVL using emulator?
I don't want to test the "Buy Button" that redirect from the app to
the market,
I want to test the doCheck() method that tell me if the app is
licensed or not.

This should work ok on the emulator. Am I wrong?
Thanks.

On Jul 30, 7:22 pm, jeffro  wrote:
> I don't believe the Android Market is included on the emulator and the
> licensing service is included with the Market app.  I have it working
> successfully, but I did all my development and testing with a real
> phone (N1 Froyo).
>
> Jeff
>
> Visit Trackaroo.com!
> Trackmaster - Motorsports Lap Timer
> Dynomaster - Performance Dyno
>
> On Jul 30, 10:08 am, sblantipodi  wrote:
>
> > Hi all,
> > I'm trying to get LVL working.
>
> > I followed the offical guidelines, I copyed the LVL source into my
> > project and added the correct
> > manifest attribute.
>
> > I also copyed from LVL sample folder the mainactivity.java into my
> > project,
> > changed the public key with the one from my developer console.
>
> > When I launch my software the MainActivity tell me always the
> > application is not licensed also if I specified that is Licensed from
> > my developer console...
>
> > This is the output of the logcat,
>
> > W/ResourceType(   57): No package identifier when getting value for
> > resource number 0x7f060001
> > I/ActivityManager(   57): Starting activity: Intent
> > { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCH
> > ER] flg=0x1020 cmp=packageName/.AndroidMarket }
> > I/ActivityManager(   57): Start proc packageNamefor activity
> > packageName/.AndroidMarket: pid=658 uid=10023 gids={3003}
> > I/jdwp    (  658): received file descriptor 20 from ADB
> > D/ddm-heap(  658): Got feature list request
> > I/LicenseChecker(  658): Binding to licensing service.
> > W/ActivityManager(   57): Unable to start service Intent
> > { act=com.android.vending.licensing.ILicensingService }: not fo
> > und
> > E/LicenseChecker(  658): Could not bind to service.
> > D/        (  658): unable to unlink '/data/data/packageName/
> > shared_prefs/com.android.vendi
> > ng.licensing.ServerManagedPolicy.xml.bak': No such file or directory
> > (errno=2)
>
> > any idea would be appreciated.
>
> > In addition when I click on the buy now button after it told me that
> > application is not licensed,
> > it will redirect me on the android market and I got a 404 error.
> > Probably because emulator isn't authorized to access the market, I
> > don't know...
>
> > 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: Compiling and obfuscating by command line...

2010-07-30 Thread sblantipodi
I have listed it in the main.xml, the problem seems that ant doesn't
find the SDK...
if you found my error on google
"taskdef class com.android.ant.SetupTask cannot be found"
you will find dozens of people with my same problem,
but I can't find a solution yet...


On Jul 30, 6:59 pm, Frank Weiss  wrote:
> On Fri, Jul 30, 2010 at 5:14 AM, sblantipodi
>
>  wrote:
> > Ok, since I founded no way to automatically do it with netbeans now
> > I'm trying the ant way posted here:
> >http://just2us.com/2009/07/tutorial-obfuscate-an-android-application/
> > previously in this thread.
>
> > I followed all the instructions but I get this error from ant o_O
>
> > taskdef class com.android.ant.SetupTask cannot be found
>
> > Any idea?
>
> I suppose the biggest problem with obfuscating code is that you have
> to laboriously list what parts of the code to not obfuscate.

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


Re: [android-developers] Extending multiple classes

2010-07-30 Thread Mark Murphy
On Fri, Jul 30, 2010 at 1:29 PM, Priyank  wrote:
> Can my class extend 2 or more classes at a time.

No, sorry.

> I want to extend Activity as well as Application.

Even if that were possible, I doubt this would be a good idea.

> Activity because, I need to do a couple of things during the
> onCreate() [binding a service]and Application, because I am creating
> objects of another class [service class]which needs to be accessible
> throughout my application.

Use a service, static data members, or a separate custom Application class.

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

_Android Programming Tutorials_ Version 2.9 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: Froyo -- How to detect that my application has been killed?

2010-07-30 Thread tomei.ninge...@gmail.com
Dianne, here's the reproduction step on Froyo:

[1] Run on Froyo - start ApiDemos, start the RemoveService sample. You
will now see two processes
com.example.android.apis
com.example.android.apis:remote

[2] You will notice that "Sample Remote Service" appears on status
bar.

[3] write an app with KILL_BACKGROUND_PROCESSES permission. Call

 
ActivityManager.killBackgroundProcesses("com.example.android.apis");

[4] Both processes created at step [1] are killed.

[5] RemoveService is never restarted, even though you see something
like

W/ActivityManager( 2426): Scheduling restart of crashed service
com.example.android.apis/.app.RemoteService in 2ms

[6] "Sample Remote Service" message still stays on status bar. This is
because StatusBarService expects a ACTION_PACKAGE_RESTARTED broadcast,
but
this braodcast is never delivered.

What's the best way to handle this -- we need to clean up some
resources if
the app process is killed.

Thanks!

On Jul 29, 8:15 pm, Dianne Hackborn  wrote:
> Applications can't kill services with this.  They can only kill background
> processes, which the OOM killer is free to kill at any time anyway.
>
> On Thu, Jul 29, 2010 at 6:37 PM, tomei.ninge...@gmail.com <
>
>
>
>
>
>
>
> tomei.ninge...@gmail.com> wrote:
> > On Froyo, we found that some new "Task Manager" apps are now using the
> > ActivityManager.killBackgroundProcesses() to kill apps. When this
> > happens, Intent.ACTION_PACKAGE_RESTARTED is no longer fired.
>
> > How can I find out that my application has been killed?
>
> > I tried to start a service, and I do see this message printed in
> > logcat:
>
> > W/ActivityManager( 2426): Scheduling restart of crashed service
> > com.example.android.apis/.app.RemoteService in 2ms
>
> > However, the service is never restarted as advertised, if the app is
> > killed using the killBackgroundProcesses API.
>
> > (If I go into adb shell and kill the service process, the service will
> > indeed be restarted ...)
>
> > This looks like a bug anyway, because the notification created by the
> > app is no longer removed like in eclair (the StatusBarService, and a
> > bunch of other system services, depend on the
> > Intent.ACTION_PACKAGE_RESTARTED broadcast).
>
> > 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
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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


  1   2   >