Re: [android-developers] Re: Syntax error: Unterminated quoted string

2011-05-20 Thread Dianne Hackborn
"am" is the shell command that is run to launch an application.  So a bad
character got in that command line somehow...  though I'm not sure how that
could be, I think the main thing that is used there that comes from the app
at all is the manifest package name.

On Thu, May 19, 2011 at 11:00 PM, Daniel Mack  wrote:

>
>
> On May 20, 6:18 am, Brill Pappin  wrote:
> > adding a quote symbol in the XML might cause it, although I'm surprised
> that
> > the editor doesn't escape things as needed :)
>
> Well, as I said, all the code is auto-created by Eclipse (and the
> Android plugin), and I can't see anything that is syntactically wrong
> with it. FWIW, I uploaded the package, so you can have a look at it:
> http://zonque.org/android-bla.zip
>
> Thanks for your help.
>
> Daniel
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
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: TransitionDrawable with different sized bitmaps

2011-05-20 Thread Dianne Hackborn
You could write your own Drawable that keeps its size consistent across the
images and does whatever transition you want.  Or use a ViewFlipper to swap
between ImageViews.

On Thu, May 19, 2011 at 9:46 PM, Brill Pappin  wrote:

> The funny thing is how its actually handling it. Both parts of the
> transition are getting scaled.
>
> What i'm doing is cycling through images from the MediaResolver (like
> camera shots) and crossfading between them.
> Do you have any suggestions for other ways to do that?
>
> At the moment I'm playing around with creating a "template" bitmap that is
> used to draw everything onto, then give it to the ImageView, but I'm not
> feeling all that good about the solution so far.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: How to close all activities on android app

2011-05-20 Thread Rocky
use function movetasktoback().


On Fri, May 20, 2011 at 7:32 AM, Bruno Lopes  wrote:

> thanks
>
> On 19 maio, 12:04, TreKing  wrote:
> > On Wed, May 18, 2011 at 8:28 PM, Bruno Lopes 
> wrote:
> > > I'he a android app with 5 activities and i would close all open
> activities
> > > by pressing a button, for example. How I do it exactly? What is the
> better
> > > strategy? Somebody can help me?
> >
> > IDK about "best", but discussed here has been the idea of a flag you pass
> > down the stack in onActivityResult() that tells each parent Activity in
> the
> > chain that it should commit suicide and pass the message along.
> >
> >
> -
> > 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




-- 
Thanks & Regards

Rakesh Kumar Jha
Software Developer
Symphony Services Corp (India) Pvt Ltd
Bangalore
(O) +918030274295
(R) +919886336619

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

[android-developers] MediaPlayer blocked(AudioFlinger write blocked) while playing animation

2011-05-20 Thread quill
Hi all,

I have a thread to play audio and animation together. It's a frame
animation. The drawable resources are in sdcard. When I play the
animation, I use a handler to send message to refresh images one by
one.
Here's my code:
final Handler handle = new Handler(){
 public void handleMessage(Message msg){
  super.handleMessage(msg);
  BitmapDrawable bmpDraw = new BitmapDrawable("sdcard/
anim/"+msg.obj);
  imageView.setBackgroundDrawable(bmpDraw);
  imageView.invalidate();
  if(msg.what < fileNames.length-1){
  sendMessageDelayed(obtainMessage((msg.what+1),
fileNames[msg.what+1]),50);
 }
 }
};
handler.sendMessage(handler.obtainMessage(0,fileNames[0]);
MediaPlayer mp = new MediaPlayer();
...//play audio

The animation performs fine, but the audio will be stopped when it
begins to play for seconds. From logcat I see AudioFlinger: write
blocked for 89 msec...

I don't use AnimationDrawable because there are many images in sdcard,
when I use addFrame(AnimationDrawable.createFromPath(...)) I got an
OutOfMemory Exception.

Am I doing the right thing? Can anyone help me?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Changing application description shown in option list when multiple apps can do same job

2011-05-20 Thread Kacee
Ok..
But I have seen applications that do not appear with their package
name in the list created by intent (dont know what to call this dialog
box )
That means there is a way to atleast hide package name. Package name
looks bit ugly, I only want to show a meaningful string (eg. app
name ) that makes sense even to a layman.

Is there a way just to show app name or a single string text ?


On May 13, 9:31 pm, Dianne Hackborn  wrote:
> Yes you can't, this is a security feature to help the user if apps are
> trying to spoof other apps.  You should give the activity that is handling
> this Intent a more descriptive label so the user better knows what it does.
>
> On Fri, May 13, 2011 at 8:29 AM, Justin Anderson wrote:
>
>
>
> > AFAIK you can't...
>
> > Thanks,
> > Justin Anderson
> > MagouyaWare Developer
> >http://sites.google.com/site/magouyaware
>
> > On Fri, May 13, 2011 at 5:38 AM, Kacee  wrote:
>
> >> Hello there,
>
> >> I have a viewer app. There are other apps installed on my device as
> >> well doing same job. So when i open a document, android as usual shows
> >> a list of apps that can do that job (which is file open here).
>
> >> In my app, along with App name, just beneath it, package name gets
> >> displayed. I want to set App description instead of package name. I
> >> tried with
> >>  
>
> >> its not working. Where to set this custom string ?
>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group.
> >> To post to this group, send email to android-developers@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> android-developers+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >>http://groups.google.com/group/android-developers?hl=en
>
> >  --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, 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: Devs with paid apps -- check your enabled countries

2011-05-20 Thread MarcoAndroid
Thanks for the tip! Had indeed some of the new countries with no
amount filled in, so probably those countries didn't see my app.

On 19 mei, 08:49, Zsolt Vasvari  wrote:
> The Android Market team moved some countries from the first list to
> the "overflow" list.  But, since there appears to be no actual testing
> done by them, when the countries were moved they now appear as not
> being available to see your app.

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


[android-developers] Orientation change and setRender

2011-05-20 Thread qwesthead
I've a region on an activity that uses GLSurfaceView. When the
Activity is resumed, I call the setRenderer and then the content of
the screen. They work fine. But, the problem arise when I change
orientation (configurationChange.) Upon orientation change, I need to
change the layout. After orientation change, surfaceChanged is getting
called. However, even when I call GLSurfaceview.requestrender,
Renderer.onDrawFrame is not getting called.
What are all the things I need to do when there is an orientation
change.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Problem when coming back to activity after changing font in Galaxy S

2011-05-20 Thread Suresh Chandra Pal
Hi Simon,
You suggested to make activity singleton.
But is 'making activity' singleton not equal to single instance.
At a time I'll be having a single instance. and I dont want to do that.
Moreover mainly, I want a way which is acceptable according to android
concepts.
and if that is not possible then only I will have to do some trick.
But in any case I dont want my activity to be singleinstance or singletask.

That's why I want something android specific.

If I got you wrong then please explain your solution.


On Fri, May 20, 2011 at 10:45 AM, Simon Jackson wrote:

> how about to singleton something
>
> static Activity me;
>
> oncreate()
> if(me==null)
> me = this
> 
> else
> me.
> finish();
>
> or such
>
> Cheers Jacko
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 

Best Wishes,



Suresh Pal



*Skype:   *suresh.pal

*Gtalk:*sapient.suresh

*Facebook:*
http://www.facebook.com/people/Suresh-Chandra-Pal/676583036

*LinkedIn: * http://www.linkedin.com/in/sapientsuresh

*Blogs:  *  http://www.sapientsuresh.blogspot.com

*Twitter: *http://twitter.com/sapientsuresh

*Google Profile:  *http://www.google.com/profiles/sapient.suresh

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

[android-developers] I connect Acer iconia a500 with ddms

2011-05-20 Thread Chi Kit Leung
Hi all,
I bought Acer. Iconia A500 last week.  I cannot get it work with dens. Do I
need to get a driver ?

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

2011-05-20 Thread Zsolt Vasvari
I am sure.  Even the Xoom is not suported by the Google USB driver as
I've learned today.

On May 20, 3:57 pm, Chi Kit Leung  wrote:
> Hi all,
> I bought Acer. Iconia A500 last week.  I cannot get it work with dens. Do I
> need to get a driver ?

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

2011-05-20 Thread Zsolt Vasvari
No, that's different.  No amount filled in means that they will see
pricing in US$.  I was referring to the checkboxes in the list at the
bottom.

On May 20, 3:23 pm, MarcoAndroid  wrote:
> Thanks for the tip! Had indeed some of the new countries with no
> amount filled in, so probably those countries didn't see my app.
>
> On 19 mei, 08:49, Zsolt Vasvari  wrote:
>
>
>
> > The Android Market team moved some countries from the first list to
> > the "overflow" list.  But, since there appears to be no actual testing
> > done by them, when the countries were moved they now appear as not
> > being available to see your app.- Hide quoted text -
>
> - Show quoted text -

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


Re: [android-developers] Specific drawable not working?????

2011-05-20 Thread Marcin Orlowski
On 19 May 2011 23:08, mikedrmfs  wrote:

> In a very simple menu the drawable @android:drawable/ic_media_stop
> doesn''t work and @android:drawable/ic_media_pause does.
>
> I get problem
> [2011-05-19 14:04:52 - Twitter Update] W/ResourceType( 7852): Bad XML
> block: header size 151 or total size 0 is larger than data size 0
> [2011-05-19 14:04:52 - Twitter Update] M:\Development\Eclipse_Java
> \eclipse\Workapace\Twitter Update\res\menu\menu.xml:6: error: Error:
> No resource found that matches the given name (at 'icon' with value
> '@android:drawable/ic_media_stop').
>
> Both of them are in
> M:\Program Files\Android\android-sdk\platforms\android-8\data\res
> \drawable-mdpi
>

You should copy drawables to your app's res folder.

Regards,
Marcin Orlowski

*Tray Agenda * - keep you daily schedule handy...
*Date In Tray*  - current date at glance...
WebnetMobile on *Facebook * and
*Twitter
*

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

[android-developers] Java Guru needed -- compiler bug?

2011-05-20 Thread Zsolt Vasvari
private void method(Collection s)
{
// Nothing
}


private void caller()
{
   // Complies fine
Collection s = Collections.emptyList();
method(s);

   // Doesn't compile -- gives error message
   // The method method(Collection) in the type Import is
not applicable for the arguments
   //  (List)
method(Collections.emptyList());
}


What's going on here?   The two statements look identical to me...

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


Re: [android-developers] Java Guru needed -- compiler bug?

2011-05-20 Thread Nikolay Elenkov
On Fri, May 20, 2011 at 5:46 PM, Zsolt Vasvari  wrote:
>    private void method(Collection s)
>    {
>        // Nothing
>    }
>
>
>    private void caller()
>    {
>       // Complies fine
>        Collection s = Collections.emptyList();
>        method(s);
>
>       // Doesn't compile -- gives error message
>       // The method method(Collection) in the type Import is
> not applicable for the arguments
>       //  (List)
>        method(Collections.emptyList());
>    }
>
>
> What's going on here?   The two statements look identical to me...
>

I'm not going to pretend to be a guru, but here goes :)

It's a generic method:

public static final  List emptyList()

In the second call there is no way to determine the type of the generic
parameter, so you get a list of Object.

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

2011-05-20 Thread Daniel Mack


On May 20, 9:08 am, Dianne Hackborn  wrote:
> "am" is the shell command that is run to launch an application.  So a bad
> character got in that command line somehow...  

I can't find that binary, otherwise I would debug and wrap it and dump
the arguments it has to deal with. Any hint where this binary is
located? Any other debugging options I can possibly enable to nail
this down?

> though I'm not sure how that
> could be, I think the main thing that is used there that comes from the app
> at all is the manifest package name.

As you can see from the package I uploaded, the AndroidManifest.xml
seems to be alright.

Thanks,
Daniel


>
>
>
>
>
>
>
>
>
> On Thu, May 19, 2011 at 11:00 PM, Daniel Mack  wrote:
>
> > On May 20, 6:18 am, Brill Pappin  wrote:
> > > adding a quote symbol in the XML might cause it, although I'm surprised
> > that
> > > the editor doesn't escape things as needed :)
>
> > Well, as I said, all the code is auto-created by Eclipse (and the
> > Android plugin), and I can't see anything that is syntactically wrong
> > with it. FWIW, I uploaded the package, so you can have a look at it:
> >http://zonque.org/android-bla.zip
>
> > Thanks for your help.
>
> > Daniel
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> 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: Problem when coming back to activity after changing font in Galaxy S

2011-05-20 Thread Suresh Chandra Pal
Sorry for the wrong code, but the ActivityOne do not have a button, but is
starting ActivityTwo immediately in its onCreate() method. and this code is
creating problem.


@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Log.d("ActivityOne", " setOnClickListener()");
 Intent intent = new Intent();
intent.setComponent(new ComponentName("com.demo.backpress",
"com.demo.backpress.ActivityTwo"));
 startActivityForResult(intent, 1);
}



On Fri, May 20, 2011 at 1:14 PM, Suresh Chandra Pal <
sureshchandra...@gmail.com> wrote:

> Hi Simon,
> You suggested to make activity singleton.
> But is 'making activity' singleton not equal to single instance.
> At a time I'll be having a single instance. and I dont want to do that.
> Moreover mainly, I want a way which is acceptable according to android
> concepts.
> and if that is not possible then only I will have to do some trick.
> But in any case I dont want my activity to be singleinstance or singletask.
>
> That's why I want something android specific.
>
> If I got you wrong then please explain your solution.
>
>
> On Fri, May 20, 2011 at 10:45 AM, Simon Jackson wrote:
>
>> how about to singleton something
>>
>> static Activity me;
>>
>> oncreate()
>> if(me==null)
>> me = this
>> 
>> else
>> me.
>> finish();
>>
>> or such
>>
>> Cheers Jacko
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
>
> --
>
> Best Wishes,
>
>
>
> Suresh Pal
>
>
>
> *Skype:   *suresh.pal
>
> *Gtalk:*sapient.suresh
>
> *Facebook:*
> http://www.facebook.com/people/Suresh-Chandra-Pal/676583036
>
> *LinkedIn: * http://www.linkedin.com/in/sapientsuresh
>
> *Blogs:  *  http://www.sapientsuresh.blogspot.com
>
> *Twitter: *http://twitter.com/sapientsuresh
>
> *Google Profile:  *http://www.google.com/profiles/sapient.suresh
>
>


-- 

Best Wishes,



Suresh Pal



*Skype:   *suresh.pal

*Gtalk:*sapient.suresh

*Facebook:*
http://www.facebook.com/people/Suresh-Chandra-Pal/676583036

*LinkedIn: * http://www.linkedin.com/in/sapientsuresh

*Blogs:  *  http://www.sapientsuresh.blogspot.com

*Twitter: *http://twitter.com/sapientsuresh

*Google Profile:  *http://www.google.com/profiles/sapient.suresh

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

2011-05-20 Thread neha
hi
Is there are anyone who worked on SIP server.
I want to get registered with server and make call.

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

2011-05-20 Thread wasabee18
sorry. I intended to post it on ndk list. my mistake.
I have re-posted to ndk list.

Thanks.

On May 12, 4:01 pm, Marcin Orlowski  wrote:
> On 11 May 2011 09:35, wasabee18  wrote:
>
> > Hi everyone, that's my first post, please be nice :)
>
> I beliee your problem shall be discussed on NDK list, not here (SDK).
>
> Regards,
> Marcin Orlowski
>
> *Tray Agenda * - keep you daily schedule handy...
> *Date In Tray*  - current date at glance...
> WebnetMobile on *Facebook * and
> *Twitter
> *

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: regarding HTTPClient : How to get the HTTP request posted by the native browser

2011-05-20 Thread Jens
Apache - as in the HttpClient, org.apache.http.* or the web server?
Further - the browser in the phone typically doesn't use the apache
HTTP client library, it's JNI to WebKit.

The good thing is that you're not going to be able to sniff either
without building your own firmware and flashing the phone.

On 19 Maj, 13:41, Viju  wrote:
> Hi,
>
> Is it possible to get all the HTTP URL request triggered by the
> browser (Apache) from my client application ? If then, can you please
> tell me the framework API which gives me the URL ?
>
> I'm developing some kinda of HTTP sniffer application for android
> which will log all the HTTP Url request made by the native browser
> (Apace) and store it in a local file.

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


[android-developers] ldd for android

2011-05-20 Thread wasabee18
Hi everyone,

there is no ldd for android available in the ndk. is it available
somewhere else ?
It is useful when troubleshooting libraries.

i know it has already been been posted in a different list (http://
groups.google.com/group/android-platform/browse_thread/thread/
3e4a52d24373611c/e9503ff6bebb83b1?#e9503ff6bebb83b1) but no reply.

Cheers.

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


[android-developers] Re: need reference page for how to write a png from res/drawable to background as wallpaper

2011-05-20 Thread Spooky


On May 20, 1:04 am, Saurav  wrote:

> Hope this helps.

Looks like exactly what I need.  Thanks!   I also have something
far more likely to get better search results (for a reference page),
too---so thanks for that, as well!

Later,
   --jim

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

2011-05-20 Thread Mark Murphy
This page is updated irregularly. It will be updated when it is updated.

On Thu, May 19, 2011 at 9:19 AM, Chris Ti  wrote:
> Dear Sir or Madam,
>
>
> in the following I am refering to
> http://developer.android.com/resources/dashboard/platform-versions.html
>
>
> When will the "Current Distribution" section of the "Platform
> Versions"
> page be updated?
>
> The end of the most recent 14-days data collection period must have
> ended on 16th of May 2011.
>
>
> Yours faithfully
> Chris
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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


[android-developers] Problem when dealing with multiple screen sizes

2011-05-20 Thread lou
Hi !
I have some problems when dealing with different resolutions and sizes
of screen : my goal is to display an image in a square which is draw
in my background picture.
I have a main RelativeLayout which is filling the entire screen :

http://schemas.android.com/apk/res/
android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/my_background">



In my background picture, there is a square ( for example at 10px from
the left and 40px from the top of the picture ). I want to display the
ImageView my_imageview IN this square.
In my manifest :






I tried to set my_imageview parameters like that :



But even with 3 types of drawable ( hdpi -> 1.5x, mdpi -> 1x, ldpi ->
0.75x), the imageview is not always displayed in the square.
For this  example :
- HVGA - MDPI : OK
- HVGA - HDPI : the imageview is underneath the square
- WVGA - HDPI : the imageview is a little over the square
- WVGA - HDPI : the imageview is a lot over the square
I also tried to set the layout_marginTop and the layout_marginLeft
three times ( values-small, values-normal, values-large ), but there
are still some bugs..

Is there anybody who can help me with that ?

Thanks, a lot !!
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


Re: [android-developers] Why ImageView doesn't show up inside ScrollView

2011-05-20 Thread Mark Murphy
Why are you using LinearLayout.LayoutParams for a child of a
ScrollView subclass?

On Thu, May 19, 2011 at 9:21 PM, Frank  wrote:
> Hi All,
>
> I have the following code. I only got a black screen without seeing
> the white image.
>
> public class Demo extends Activity {
>    private MyCtrl mCtrl;
>    protected void onCreate(Bundle savedInstanceState) {
>        super.onCreate(savedInstanceState);
>
>        mCtrl = new MyCtrl(this);
>        setContentView(mCtrl);
>    }
> }
>
> public class MyCtrl extends ScrollView {
>
>    public MyCtrl (Context context) {
>        super(context);
>        setFocusable(true);
>
>        int width = 100;
>        int height = 100;
>        int size = width * height;
>        int buf[] = new int[size];
>        for ( int i = 0; i < size; ++i) {
>                buf[i] = 0x; //white image
>        }
>
>        Bitmap bmp = Bitmap.createBitmap(buf, width, height,
> Bitmap.Config.ARGB_);
>        ImageView iv = new ImageView(getContext());
>        iv.setLayoutParams( new LinearLayout.LayoutParams(width, height) );
>        iv.setImageBitmap(bmp);
>        iv.setScaleType(ImageView.ScaleType.CENTER);
>        addView(iv);
>    }
> }
>
>
> However, if I derive MyCtrl from ImageView directly, the white image
> shows up.
>
> Your help is highly appreciated.
>
> Cheers,
> Frank
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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


Re: [android-developers] How to disable USB tethering in android

2011-05-20 Thread Mark Murphy
On Thu, May 19, 2011 at 7:06 AM, satish kuma s,n.  wrote:
> Can you please tell me how we can disable the USB tethering in
> android.

This is not possible from an SDK application, sorry.

If your interest is in creating custom firmware that has USB tethering
disabled, please visit http://source.android.com and use the support
resources found there.

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

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

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


Re: [android-developers] Can I change appwidget-provider XML 's android:initialLayout? How to do?

2011-05-20 Thread Mark Murphy
Just use your desired layout on the first onUpdate() call of your
AppWidgetProvider. You cannot literally modify android:initialLayout,
or anything inside of a resource, at runtime.

On Thu, May 19, 2011 at 3:06 AM, Perry168  wrote:
> Hi all,
>
>    Following was the appwidget-provider XML for my widget. About the
> < android:initialLayout="@layout/sc1" >, how to change the "@layout/
> sc1" value in activity(Java)? e.g. change the sc1 to sc2.
>    From this , I hope my widget is more flexible to use different
> layout.
>
> 
>         xmlns:android="http://schemas.android.com/apk/res/android";
>        android:minWidth="150.0dip"
>        android:minHeight="150.0dip"
>        android:updatePeriodMillis="0"
>        android:initialLayout="@layout/sc1"
>        android:configure="com.test.runningtest.Setting"
>        >
> 
>
> Thanks a lot!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

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

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


Re: [android-developers] Key capture background

2011-05-20 Thread Mark Murphy
On Thu, May 19, 2011 at 3:01 AM, coder_sym  wrote:
> I saw a post saying key capturing in the background is not possible ..
> is this still the case?

Yes.

> or was thre any recent changes to make this
> happen ?

No.

> I wonder why this capability is closed when there are lot of
> genuine use cases.

You are welcome to write your own mobile operating system that enables
spyware to monitor key presses from other applications.

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

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

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


[android-developers] appwidget setOnClickPendingIntent not always working

2011-05-20 Thread biokys
Hi, I have an issue with my appwidget. It has really strange behaviour, 
because when I add widget to desktop it *not always* become clickable, even 
i defined setOnClickPendingIntent. On different phones it has different 
"successfull install ratio".

Thank you for your help

public class BasicWidget extends AppWidgetProvider {


private static final String LOG_TAG = "WalletWidget";

@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager, 
int[] appWidgetIds) {
Log.d(LOG_TAG, "onUpdate(): ");
context.startService(new Intent(context, UpdateService.class));
 }
 
public static class UpdateService extends Service {
@Override
public void onStart(Intent intent, int startId) {
RemoteViews updateViews = buildUpdate(this);

ComponentName thisWidget = new ComponentName(this, BasicWidget.class);
AppWidgetManager manager = AppWidgetManager.getInstance(this);
manager.updateAppWidget(thisWidget, updateViews);
}

public RemoteViews buildUpdate(Context context) {
RemoteViews updateViews = null;
Intent intent = new Intent(context, RecordActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 
PendingIntent.FLAG_UPDATE_CURRENT);
updateViews = new RemoteViews(context.getPackageName(), 
R.layout.widget_layout);
updateViews.setOnClickPendingIntent(R.id.layout_widget, pendingIntent);

new UpdateWidgetTask(context).execute();

return updateViews;
}

@Override
public void onConfigurationChanged(Configuration newConfig)
{
RemoteViews updateViews = buildUpdate(this);

ComponentName thisWidget = new ComponentName(this, BasicWidget.class);
AppWidgetManager manager = AppWidgetManager.getInstance(this);
manager.updateAppWidget(thisWidget, updateViews);
}

@Override
public IBinder onBind(Intent intent) {
// We don't need to bind to this service
return null;
}
}
 @Override
public void onDeleted(final Context ctx, final int[] aiAppWidgetIds)
{
super.onDeleted(ctx, aiAppWidgetIds);
ctx.stopService(new Intent(ctx, UpdateService.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] Application crashes when downloding long data in from server and in loop.............

2011-05-20 Thread imran ali
Hi all
I have been using AsyncTask to download data
from server,
in between it has been crashing with message in DDMS.
05-20 16:37:11.656: DEBUG/Zygote(33): Process 9489 terminated by
signal (11)

can any one has idea, what would be solution, i am downloading big
size of data approx 10MB of text.

Regards
Imran ali

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

2011-05-20 Thread Martin

Hello Michael,

here are the information I promised you yesterday.

Reader: Omnikey 55x3
Software: HID Reader Utility Version 4.0.0.0

Key:  it works for each sector.

This is what we found in the api:

// The well-known default MIFARE read key. All keys are set to this at
the factory.
// Using this key will effectively make the payload in the sector
public.

 public static final byte[] KEY_DEFAULT =

  {(byte)0xFF,(byte)0xFF,(byte)0xFF,(byte)0xFF,
(byte)0xFF,(byte)0xFF};

I checked the UID of the SecureElement, which I can get by calling the
getSecureElementUid() of the NfcSecureElement class via reflection.
And I also checked the sector 00 block 00 of the emulated MiFare card
with our external NFC reader to get the UID. They match!

Do you think it is possible to read/write data with APDU commands?
There is a hidden method in the NfcSecureElement class called
exchangeAPDU.
public byte [] exchangeAPDU(int handle,byte [] data){...}

I have tried some commands, which I found on page eleven at the
following pdf document:

http://www.nfc-reader.com/NFC-smart-card-reader/ACR122-API-Manual/API_ACR122.pdf

But I always get back 6E 00.

Best wishes!

Martin


On 19 Mai, 20:18, Michael Roland  wrote:
> Hallo Martin,
>
> > After enabling the card emulation mode on the Nexus S, I am able to
> > read and write data to the emulated MiFare Classic 4k card by an
> > external NFC reader. I would like to do that within an android app.
>
> Have you verified that you actually wrote data to the MIFARE Classic? I
> really doubt that you did. What MIFARE keys did you use? In my tests
> authentication passed regardless of the keys I used. In fact every
> command seemed to return successfully, but in fact no data was ever
> written to the card.
>
> > You have
> > spoken about the access keys, but aren't they the same for internal
> > and external access?
>
> Yes, they would be the same for internal and external access.
>
> br,
> Michael
>
>
>
>
>
>
>
> > On 19 Mai, 00:59, Michael Roland  wrote:
> >> Hallo,
>
> >>> I more or less understand how to do it but I don't understand if after
> >>> is possible to build application on card emulation.
>
> >> Regarding the internalsecureelement(SmartMX): No. Even if you
> >> activate this chip as thesecureelement, you could only use its UID for
> >> your application. To edit data on it/install applications into it you
> >> would need to have the access keys for thatsecureelement.
>
> >> Regarding an externalsecureelementon the UICC ("SIM" card): Partly
> >> yes. You can activate an SWP-UICC assecureelement. But access is
> >> limited to external readers for the moment. Until now, there is no known
> >> way to get access to application on the UICC from a phone application.
>
> >>> Moreover some of you speak about authentication, and about a password
> >>> that is not possible to have? (What are you talking about when you
> >>> speak about this stuff).
>
> >> The SmartMX in the Nexus S contains a JavaCard operating system that is
> >> compliant to GlobalPlatform. GlobalPlatform defines methods to manage
> >> multiple applications on this JavaCard. A central component of this card
> >> management is the Card Manager, which itself is one application on 
> >> thesecureelement. The card manager provides an interface to load, install,
> >> ... delete applications on thesecureelement. Additionally it controls
> >> access to these methods. To establish asecurechannel with the card
> >> manager (i.e. a connection that provides authenticity, integrity and
> >> possibly confidentiality) both, the entity that wants to manage the card
> >> and the card manager need to know one or more shared secrets, the
> >> authentication keys.
>
> >>> Anyway some news aboutNFCcard emulation
> >>> [nearfieldcommunicationworld]
> >>> it seems that Google dev will not give use api about that in the next
> >>> future.
>
> >> Still there is some developments towards card emulation going on 
> >> (cf.http://www.nfctimes.com/news/android-card-emulation-expected-despite-...
> >> )
>
> >>> Moreover, what does it mean "And if you improperly authenticate
> >>> yourself a certain number of times, there aresecureelements out
> >>> there that will physically destroy themselves and can never be
> >>> recovered"? Is related to the password of my previous questions?
>
> >> While the card manager is protected by access keys, there still exist
> >> some methods to find such keys. One of these methods would be brute
> >> forces (i.e. trying each possible key value). While such methods are
> >> usually very inefficient (if the key has an appropriate length) there
> >> might be some methods that could significantly speed up this process. As
> >> a safety mechanism the card manager usually implements an additional
> >> protection against such an attack: After ten consecutive authentication
> >> failures, the card manager locks itself and refuses any further
> >> commands. (Other applications that were pr

Re: [android-developers] Application crashes when downloding long data in from server and in loop.............

2011-05-20 Thread Daniel Drozdzewski
Imran,

Any debug info?
Listing of your doInBackground() perhaps?

Are you saving the whole 10MB of text into memory or do you save it to
a file via some buffer?

Daniel



On Fri, May 20, 2011 at 12:22 PM, imran ali  wrote:
> Hi all
> I have been using AsyncTask to download data
> from server,
> in between it has been crashing with message in DDMS.
> 05-20 16:37:11.656: DEBUG/Zygote(33): Process 9489 terminated by
> signal (11)
>
> can any one has idea, what would be solution, i am downloading big
> size of data approx 10MB of text.
>
> Regards
> Imran ali
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Daniel Drozdzewski

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

2011-05-20 Thread lbendlin
You have to be aware that the majority of web users in Asia do not know Google. 
They use Baidu,Yandex or local equivalents. Yes, shocking, I know. 

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

2011-05-20 Thread cellurl
try this jetboy video tutorial.
http://www.udemy.com/write-and-publish-an-app-for-your-android-smartphone/



On May 19, 1:30 pm, behery  wrote:
> HI,
>
> I did all the configuration on eclipse helios, running on UBUNTU, and
> after copying code from the helloworld tutorial on ANDROID.COM, I run
> the application ...
>
> The emulator pops up and displaying " Android " Logo mirroring, but
> NOTHING HAPPENS AFTER THAT .
>
> I was using WINDOWS in the beginning, I had the same result, then I
> turned into UBUNTU wishing to get a better result, but it seems to
> have the same problem ...
>
> ANY SUGGESTION TO SOLVE THIS PROBLEM ??!!!

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


[android-developers] Aw: Re: PackageManage: Couldn't copy package file to temp file.

2011-05-20 Thread Matthias
I see this happening with rooted G1s, was your phone rooted by any chance?

In any case, I can install packages via adb and Eclipse, but not using the 
'pm' command on the device.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: How can I draw/move a point on screen ?!

2011-05-20 Thread Diogo Salaberri
If you see the first email from that thread, you'll see:

*Any tutorial ? Any link ?*

-- 
Atenciosamente;
Diogo Bonoto Salaberri
Bacharel em Ciência da Computação - UFPel

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

2011-05-20 Thread Hitendrasinh Gohil
hi,

anybody is there?

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

[android-developers] Re: ArrayIndexOutOfBounds in Thread.getState() ...

2011-05-20 Thread Pent
>
>             int state = thread.getStatus();
>             if(state != -1) {
>                 return VMThread.STATE_MAP[state]; // 812
>             }
>

Thanks for tracking down the source :-)

Since I only get one or two of these a week, I guess it's a SDK/device
specific problem, only under extreme load, or similar. I'll catch the
exception and retry a couple of times I guess, see if that helps.

Pent

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


[android-developers] Re: Appwidget set background and set background transparency/alpha

2011-05-20 Thread Jake Colman
> "N" == Niall   writes:

   N> Worked perfectly. Thanks very much.  I lifted this color picker
   N> http://code.google.com/p/color-picker-view/ and wrapped it in a
   N> custom preference and it works delightfully :)

So your user can now use a preference option to control the background
color and the transparency of that background?  Would you mind sharing
code or explaining what you did?

-- 
Jake Colman -- Android Tinkerer

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


[android-developers] Re: Appwidget set background and set background transparency/alpha

2011-05-20 Thread String
Assuming his code is similar to mine, it's a simple matter of implementing 
the color picker (from the source link) and then passing the selected 
colorValue through this call into the widget (from earlier in the thread):

RemoteViews.setInt(id, "setBackgroundColor", colorValue);

Is there some additional explanation needed?

String

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

Re: [android-developers] internet not working with emulator?

2011-05-20 Thread Diogo Salaberri
hi..

- verify if you have internet acess on your computer
- if you are testing through a app, verify if you add on your manifest.xml a
permission to INTERNET_ACESS

Bye

-- 
Atenciosamente;
Diogo Bonoto Salaberri
Bacharel em Ciência da Computação - UFPel

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

2011-05-20 Thread Adam Ratana
I've put my very modest apps in Amazon App Store now, and I've just been 
thinking about this, and musing about Amazon's future strategy, complete 
speculation:

- if Amazon is planning its Android tablets not to have the official google 
seal of approval, and not have android market (similar to what almost 
happened with motorola/skyhook), this could be the reason for their own 
curated market
- Someone's purchases on Android Market thus will not be installable on such 
a device?
- The more secondary markets to Android Market, the more this becomes an 
issue for the consumer and a potential nightmare for google?
- If someone buys a piece of software, ideally it should follow them from 
device to device (iTunes, current Android Market, the "cloud" model), this 
may break that
- If Amazon market will always be available on google devices (could be in 
question), but the same is not true for Android Market, wouldn't consumers 
then want to stick with Amazon App Store?

Just wondering what other peoples takes on this are and if it is a concern 
to them?  Or if anyone has insight into this sort of thing?  I doubt Amazon 
would attempt devices without the Android Market, but if there's a critical 
mass of the high quality apps in Amazon App Store, perhaps they would. 

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

2011-05-20 Thread Hitendrasinh Gohil
ya i have define internet_access and i am testing it with my emultor.
i have just change my internet service provider.


-- 
Regards,
Hitendrasinh Gohil

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

[android-developers] How to Hide Alert Builder using Custom Layout

2011-05-20 Thread gaurav gupta
Hi guys.
i need to hide a alert dialog builder on its onclick listener.
m using a custom view for alert dialog, when i click on submit button of its
custom view, this will do some work and hide.
i cant set negative button here.Custom layout must have only one button.
suggest me .how to do this.
Thanks in advance.a

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

2011-05-20 Thread quique123
Really?  An android twitter app question has nothing to do with android 
development?

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

2011-05-20 Thread Streets Of Boston
At least some of them had working touch-screens at Google IO! 't Was pretty 
cool :)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Multi-touch pointer ids on Sony Xperia Play & spurious ACTION_DOWN events

2011-05-20 Thread Leigh McRae
Thank you for taking the time for such a great reply.  I have couple of 
comments still though.


On 5/19/2011 3:35 AM, Jeffrey Brown wrote:

Some tips:

1. Use MotionEvent.getActionMasked() and MotionEvent.getActionIndex()
to retrieve the masked action and changed pointer id respectively.
This will remove the need for your own masking and shifting code,
which is currently using deprecated constants.
I'm targeting min sdk of 7 (5 actually it it seems to have been 
misplaced) and this is level 8.

2. Your code for ACTION_MOVE contains: "ptrId =
event.getPointerId( index ); if ( ptrId>= 0 ) { ...} ".  The pointer
id returned by getPointerId will always be>= 0 so you can omit this
condition.

3. You need to be more careful in your handling of ACTION_CANCEL.
When ACTION_CANCEL is received, you should reset the state for *all*
of the pointers you think are down.  So you should keep track of which
pointers you think are down, loop over them and cancel them all.

Something should be added to the docs about this then.

4. Before handling ACTION_DOWN, you should do the work of canceling
all pointers you think are down.  If everything is working properly,
then there shouldn't be any pointers down.  However, if your code did
not receive the matching ACTION_UP or ACTION_CANCEL from a previous
gesture, it's possible that some pointers got *stuck* down.  So you
want to clear those out before you start handling the new pointers.
I get a down event for one finger, say it lands on my virtual gamepad.  
The user holds that finger down and slides the control around to make 
their unit move.  Now they put another finger down on a fire button 
while the previous finger is still on the gamepad.  At this point I 
think you're suggesting I clear the first finger on the gamepad.  It 
doesn't sound right.

5. The sleep() is entirely unnecessary.  It is just making the input
latency of your game worse.  Remove it.  The framework already
throttles move events for you.
I'm all for this but every game engine I have found for Android does 
this, even Replica Island.  How sure are you of this?  Keep in mind that 
my game needs to run on older 2.0 that might suffer from this problem.


Leigh

Jeff.

On May 18, 8:40 am, Leigh McRae
wrote:

The blog 
posthttp://android-developers.blogspot.com/2010/06/making-sense-of-multit...
was a good read but oddly enough it doesn't really covermulti-touch
IMHO.  It covers tracking a single touch where another touch could
follow.  My game needs to track one touch for the game pad and then at
least another for the fire buttons.

Currently my game is broken on the Xoom and I'm assuming it's because
of the same problem this thread talks about.  I can make the changes as
others have suggested by mapping but I still have some issues.  I'm not
sure if I handle Cancel correctly.  It's a really large concern as my
game captures pointers so I know whether the finger was over the button
it pressed when it was released.  I really need to get matching events
or buttons will get stuck.  It's not so bad when IDs are 0 or 1 but when
they cycle to 15 it will be harsh.

As you can see I have added some sleep code below but I'm not sure if
it's needed.  It's really hard to know what to do here as people
complain about unresponsive controls but they work fine on my phone and
I just don;t have the funds to be buy 3-4 other phones.

Here is my code I use to inject pointer events into my game engine.

  @Override

  public boolean onTouch( View v, MotionEvent event )

  {

  int action = event.getAction();

  int numPointers= event.getPointerCount();

  int ptrIndex= (numPointers>1) ? (action&
MotionEvent.ACTION_POINTER_ID_MASK)>>MotionEvent.ACTION_POINTER_ID_SHIFT : 0;

  int ptrId = event.getPointerId( ptrIndex );

  PointerEventpe= null;

  switch( action&MotionEvent.ACTION_MASK )

  {

  case MotionEvent.ACTION_DOWN:

  case MotionEvent.ACTION_POINTER_DOWN:

  pe = (PointerEvent)m_PointerEvents.alloc();

  if ( pe != null )

  {

  pe.owner= m_PointerEvents;

  pe.action= PointerEvent.ACTION_DOWN;

  pe.id= ptrId;

  pe.x= (int)event.getX( ptrIndex );

  pe.y= (int)event.getY( ptrIndex );

  m_App.getGame().postUIEvent( pe );

  //m_App.getLogger().verbose( pe.toString() );

  }

  break;

  case MotionEvent.ACTION_UP:

  case MotionEvent.ACTION_POINTER_UP:

  case MotionEvent.ACTION_CANCEL:

  pe = (PointerEvent)m_PointerEvents.alloc();

  if ( pe != null )

  {

  pe

Re: [android-developers] Re: How can I draw/move a point on screen ?!

2011-05-20 Thread TreKing
On Fri, May 20, 2011 at 7:18 AM, Diogo Salaberri  wrote:

> If you see the first email from that thread, you'll see:
>
> *Any tutorial ? Any link ?*
>

If you see the subsequent emails from this thread you will see several links
posted. You will also see people asking you followup questions that are
meant to get more information to try to help you.

Here's a link to a tutorial on getting any answer: http://tinyurl.com/5dgqk7

-
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: ISO 15693 UID inversed

2011-05-20 Thread Michael Roland
Hallo Johannes,

the byte-order in the UID array exactly matches the byte-order defined
in ISO/IEC 15693-3:

 MSB LSB
+--+--+--+--+--+--+--+--+
|64  57|56  49|48  1|
+--+--+--+--+--+--+--+--+
| 'E0' | MFG  |  SERIAL NUMBER  |
+--+--+--+--+--+--+--+--+
 Figure 1 — UID format

br,
Michael


On May 18, 7:47 pm, Johannes  wrote:
> I'm not entirely sure whether this is an Android issue, but the byte
> array Tag.getId() returns on an ISO 15693 tag seems to return the
> actual UID bytes in inversed order. Any ideas on this?
>
> Johannes

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

2011-05-20 Thread Francois Masurel
One is available there and it has a touch screen :

http://www.toutpourlavideo.com/totem-android-p-383.html

Francois

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

[android-developers] How to capture system warnings in application ?

2011-05-20 Thread chcat
I am writing media streaming application...
At some point i see the following warnings in LogCat:

"OsclNativeFile: writing xx bytes takes too long"

Any idea how i can capture that warning in my application code?

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] Android Twitter App

2011-05-20 Thread TreKing
On Fri, May 20, 2011 at 8:46 AM, quique123  wrote:

> Really?  An android twitter app question has nothing to do with android
> development?


Yes, really. Just because you're making an Android App does not
automatically make every question you have on it it appropriate for this
list.

These are the key things you mentioned in your post:
- OAuth
- Twitter
- Eclipse
- 401 Error
- Your Twitter Account
- Twitter-registered application with key & secret & callback URL

No a single mention of Android or the Android SDK. So yes, really, an
Android Twitter app question has nothing to do with Android Development if
the questions are about connecting to Twitter and not with using the Android
SDK to make the app.

Much like a question about an Android Facebook app should not be posted here
if it's regarding connecting to and using the Facebook API.

Again: you got this sample project from "Marakana"? Sounds like it's their
problem - ask them.

-
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: Java Guru needed -- compiler bug?

2011-05-20 Thread Streets Of Boston
Welcome to the wonderful world of generics.

The emptyList method is defined as follows:

public static final  List 
 
emptyList()

With the statement Collection s = Collections.emptyList(), the 
compiler knows (because of the declaration of 's'), what the type for 'T' 
is. It is 'String'.

And i'm still not sure why the compiler can't pick up the same info from the 
's' parameter declaration of the method 'method'.

However,  you can fix this by changing the method signature just a bit:
private void qqmethod(Collection<*? super *String> s) 
{ 
// Nothing 
} 


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

[android-developers] Re: Java Guru needed -- compiler bug?

2011-05-20 Thread Streets Of Boston
Welcome to the wonderful world of generics.

The emptyList method is defined as follows:

public static final  List 
 
emptyList()

With the statement Collection s = Collections.emptyList(), the 
compiler knows (because of the declaration of 's'), what the type for 'T' 
is. It is 'String'.

And i'm still not sure why the compiler can't pick up the same info from the 
's' parameter declaration of the method 'method' 
However,  you can fix this by changing the method signature just a bit:
private void method(Collection<*? super *String> s) 
{ 
// Nothing 
} 

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

[android-developers] Loading all Contacts from the Phone

2011-05-20 Thread Stefan S
I'm loading my Contacts with the following Uri
Uri uri = ContactsContract.CommonDataKinds.Phone.CONTENT_URI;

The problem is that I'm getting only the Contacts which are having a
phone entry. Those which only have
an e-mail will be ignored.

What do I have to change for getting all Contacts from my phone?

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


[android-developers] FragmentPager component?

2011-05-20 Thread Scythe
During the Android 3.0 UI design talk on IO 2011, it was mentioned
that we'll get a "FragmentPager" component soon. I'd like to know a
bit more about this component, when'll this be released and what'll it
be able to do? I'm quite curious, because it awfully sounds something
that I'm working on right now. Is it about some kind of left-to-right
fragment paging mechanism that's used in the Honeycomb Gmail app?

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

2011-05-20 Thread kypriakos

Ah sleep is good ...

Ok revisiting this I can see the wrong path I went down to ...

I built a servlet for the ijetty web server that launches an Activity
once
a particular remote request comes in. The ijetty code provides the
AndroidContext
in all servlets through:

Object o =
config.getServletContext().getAttribute("org.mortbay.ijetty.contentResolver");
android.content.ContentResolver resolver =
(android.content.ContentResolver)o;
androidContext =
(android.content.Context)config.getServletContext().getAttribute("org.mortbay.ijetty.context");

So while implementing the methods for the servlet I got carried away
with the fact that I had
the appropriate context available and used the Context's startActivity
method and the Intent object to launch
the Activity (after I declared it in the ijetty's AndroidManifest). I
kept looking in there for the startActivityForResult
I needed a bit more reading on the difference between the two
startActivity methods across two different classes in the inheritance.
The code snippet I sent out does work but I cannot of course use the
startActivityForResult.
Up to this pt I was having the launched activity save the results in a
file and then had the servlet poll for
them but that's not an ideal solution. The servlet itself implements
HttpServlet so by not being an Activity
I could not see how any callback to it would be possible - what do you
think?

@Kostya
> If this case, use a broadcast, a pending intent, or a handler message (just
> some of the options) to send/receive the result.

I agree with that but I need to figure out how the servlet fits into
this. I could launch
the activity as a service.

> Oh, and I see that the intent you're trying to start is for a service. Using
> startActivity (for result or not) with a service intent just doesn't make
> sense.

Where do you see that? The intent I am starting is an Activity class.
Can you explain please?

Thanks again for the feedback to all fo you - it certainly helps

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


[android-developers] Re: Appwidget set background and set background transparency/alpha

2011-05-20 Thread Niall
Might be helpful for people to see the code.

The preference (change as appropriate. My coding style is to have classes 
named with a lower first letter, so that has been changed from the link 
above): 
http://pastebin.com/1EkdJNnE

Preference code: 
http://pastebin.com/r5LYfF2r

Doing set colour (with android version check): 
http://pastebin.com/iyZEcSdM


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

2011-05-20 Thread Nikolay Elenkov
On Fri, May 20, 2011 at 11:51 PM, kypriakos  wrote:
>
> Ah sleep is good ...
>
> Ok revisiting this I can see the wrong path I went down to ...
>
> I built a servlet for the ijetty web server that launches an Activity
> once
> a particular remote request comes in. The ijetty code provides the
> AndroidContext
> in all servlets through:
>

If you could take a step back, why are you using Jetty in the first place?
Sounds interesting and all, but unless this is a research project, what
have you got to gain by running a servlet engine on your phone?

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


[android-developers] Re: Can I change appwidget-provider XML 's android:initialLayout? How to do?

2011-05-20 Thread Perry168
Thanks a lot!

   Could you give me a hint? I just know to use
RemoteViews(getPackageName(),R.Layout.LO1) to change the layout. About
AppWidgetProvider XML, i had try to use (getPackageName(),R.xml.sc1),
but I failed.



On 5月20日, 下午6時07分, Mark Murphy  wrote:
> Just use your desired layout on the first onUpdate() call of your
> AppWidgetProvider. You cannot literally modify android:initialLayout,
> or anything inside of a resource, at runtime.
>
>
>
>
>
> On Thu, May 19, 2011 at 3:06 AM,Perry168 wrote:
> > Hi all,
>
> >Following was the appwidget-provider XML for my widget. About the
> > < android:initialLayout="@layout/sc1" >, how to change the "@layout/
> > sc1" value in activity(Java)? e.g. change the sc1 to sc2.
> >From this , I hope my widget is more flexible to use different
> > layout.
>
> > 
> >  >xmlns:android="http://schemas.android.com/apk/res/android";
> >android:minWidth="150.0dip"
> >android:minHeight="150.0dip"
> >android:updatePeriodMillis="0"
> >android:initialLayout="@layout/sc1"
> >android:configure="com.test.runningtest.Setting"
> >>
> > 
>
> > Thanks a lot!
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, 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 App Developer Books:http://commonsware.com/books- 隱藏被引用文字 -
>
> - 顯示被引用文字 -

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


Re: [android-developers] Re: Java Guru needed -- compiler bug?

2011-05-20 Thread Kostya Vasilyev

20.05.2011 18:24, Streets Of Boston ?:
And i'm still not sure why the compiler can't pick up the same info 
from the 's' parameter declaration of the method 'method' 


This has some interesting stuff on Java's type inference for generics:

http://www.angelikalanger.com/GenericsFAQ/FAQSections/TechnicalDetails.html#Topic7

My impression is, there are several special cases where the type is 
inferred, one of them being assignment.


The page has examples where type inference doesn't work, and suggests 
using a temporary variable to help the compiler, just as was discovered.


--
Kostya Vasilyev -- 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] Re: Can I change appwidget-provider XML 's android:initialLayout? How to do?

2011-05-20 Thread Mark Murphy
2011/5/20 Perry168 :
>   Could you give me a hint?

I thought I did.

> I just know to use
> RemoteViews(getPackageName(),R.Layout.LO1) to change the layout.

Correct. The layout supplied to the RemoteViews constructor does not
have to be the same layout supplied to android:initialLayout.

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

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

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


[android-developers] Merchant Sales Report Issues

2011-05-20 Thread polyclefsoftware
I'm happy that Google has now added more detailed sales reporting to the 
Android Developer Console. Reconciling my payouts to partners and sales 
taxes was a nightmare before. 

However, there seems to be an issue with the reports from Jan 2011 and all 
months prior. 

Many of the fields have entries such as:

DEFAULT_HARDWARE
DEFAULT_TITLE
DEFAULT_PACKAGE

instead of properly listing the device name, app title, and app package. 

Also, the number of sales is way off. Has anyone else noticed this? If there 
is a more appropriate forum to note this issue, or a place to report bugs, 
please point me to it. Otherwise, could someone from Google respond to this? 
Sales reporting is one of the biggest headaches with regard to running a 
small business based on Android development.

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

[android-developers] Re: Can I change appwidget-provider XML 's android:initialLayout? How to do?

2011-05-20 Thread Perry168
Hi,
Or how to change appwidget-provider XML in onUpdate()?

On 5月20日, 下午6時07分, Mark Murphy  wrote:
> Just use your desired layout on the first onUpdate() call of your
> AppWidgetProvider. You cannot literally modify android:initialLayout,
> or anything inside of a resource, at runtime.
>
>
>
>
>
> On Thu, May 19, 2011 at 3:06 AM, Perry168  wrote:
> > Hi all,
>
> >Following was the appwidget-provider XML for my widget. About the
> > < android:initialLayout="@layout/sc1" >, how to change the "@layout/
> > sc1" value in activity(Java)? e.g. change the sc1 to sc2.
> >From this , I hope my widget is more flexible to use different
> > layout.
>
> > 
> >  >xmlns:android="http://schemas.android.com/apk/res/android";
> >android:minWidth="150.0dip"
> >android:minHeight="150.0dip"
> >android:updatePeriodMillis="0"
> >android:initialLayout="@layout/sc1"
> >android:configure="com.test.runningtest.Setting"
> >>
> > 
>
> > Thanks a lot!
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, 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 App Developer Books:http://commonsware.com/books- 隱藏被引用文字 -
>
> - 顯示被引用文字 -

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


Re: [android-developers] Re: Can I change appwidget-provider XML 's android:initialLayout? How to do?

2011-05-20 Thread Mark Murphy
2011/5/20 Perry168 :
> Or how to change appwidget-provider XML in onUpdate()?

As I wrote, you cannot change appwidget-provider XML, or any resource,
at runtime.

In your RemoteViews constructor, use the layout you want.

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

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

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


[android-developers] Re: Can I change appwidget-provider XML 's android:initialLayout? How to do?

2011-05-20 Thread Perry168
Thanks for your teaching! ~^O^~

On 5月20日, 下午11時41分, Mark Murphy  wrote:
> 2011/5/20 Perry168 :
>
> > Or how to change appwidget-provider XML in onUpdate()?
>
> As I wrote, you cannot change appwidget-provider XML, or any resource,
> at runtime.
>
> In your RemoteViews constructor, use the layout you want.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android App Developer Books:http://commonsware.com/books

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


Re: [android-developers] Re: PDF Reader in Android OS

2011-05-20 Thread khanh_qhi™
Can anyone show me how to use PDFBox lib to view pdf files?
I try to convert one pdf page to image, and then read it as an image.

On Fri, May 20, 2011 at 6:52 PM, lbendlin  wrote:

> You have to be aware that the majority of web users in Asia do not know
> Google. They use Baidu,Yandex or local equivalents. Yes, shocking, I know.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Regards,
Khanh.

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

[android-developers] OpenGL ES 2 support in emulator?

2011-05-20 Thread Thomas
I'm wondering if Google has any plans to include OpenGL ES 2 support
in the Android emulator at some point in the future?  ES 2 is becoming
increasingly more important as users upgrade for 2nd generation
Android phones and the percentage of 1st generation phones (that do
not support ES 2) diminishes.  I'm considering not supporting earlier
versions at all (as of now, they are less than 6% of the total market-
see http://developer.android.com/resources/dashboard/platform-versions.html).
The only solution at the moment is to either compile OpenGL ES 2 code
straight to a desktop OS (provided you're only using features
compatible with standard OpenGL) or to get a 3rd party OpenGL ES 2
emulator.

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

2011-05-20 Thread TreKing
On Fri, May 20, 2011 at 8:30 AM, Adam Ratana  wrote:

> I doubt Amazon would attempt devices without the Android Market, but if
> there's a critical mass of the high quality apps in Amazon App Store,
> perhaps they would.


Seems like that's exactly what they're aiming for.

-
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] FragmentPager component?

2011-05-20 Thread Dianne Hackborn
It is something I have been working on.  I don't know when it will be out to
be used, but it will likely still be quite rough at that point.  The code is
not used by anything released at this point.  It lets you do interactions
like the swiping between panels in the news and weather app...  though it
won't include the tab part any time soon.

On Fri, May 20, 2011 at 7:34 AM, Scythe  wrote:

> During the Android 3.0 UI design talk on IO 2011, it was mentioned
> that we'll get a "FragmentPager" component soon. I'd like to know a
> bit more about this component, when'll this be released and what'll it
> be able to do? I'm quite curious, because it awfully sounds something
> that I'm working on right now. Is it about some kind of left-to-right
> fragment paging mechanism that's used in the Honeycomb Gmail app?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Appwidget RemoteViews copy

2011-05-20 Thread Niall
Hi all. 

I've a quick question pertaining to remote views. 

Is it safe to keep and maintain a copy of the last RemoteViews that was used 
for updating the appwidget? I have a status message that is updated 
regularily (more so than the rest of the widget). Suppose I have something 
like... 

This updates the views (this is called before manager.updateAppWidget( 
ids[i], remoteViews ); )

  void updateAppWidgetFunction( Context context ) {
RemoteViews remoteViews = new RemoteViews( 
  context.getPackageName(),
  R.layout.main );
  
// Set all the views stuff

lastRemoteViews = remoteViews;  // lastRemoteViews is a static private 
member of the class
  }


And I have a method that updates the status message like so:

  void updateStatusMessage( String str ) {
RemoteViews remoteViews = null; 
if ( lastRemoteViews == null )
  remoteViews = remoteViewsWithIntents( context );
else
  remoteViews = lastRemoteViews; 
  
remoteViews.setTextViewText( R.id.textview_status, str );
refreshWidgetViews( context, remoteViews );
  }



Is this good practise? Or should I make a means of specialising the 
updateAppWidgetFunction to update the status message only? 

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

[android-developers] Re: Why ImageView doesn't show up inside ScrollView

2011-05-20 Thread Frank
Thank you, Mark,  for the reply.

For of all, I am pretty new to Android and my code is by no means
doing things in the most meaningful way. :)
Before answering your question, can I ask does using
LinearLayout.LayoutParams prevent it from working? I tried to comment
it out, but it still doesn't work.

In fact, this is just a trial code. What I really want to do is to
tile a ViewGroup with a whole bunch of ImageViews. I want to specify
the absolute location and dimensions of each ImageView inside the
parent ViewGroup. However, it looks to me that I cannot do this. I
found there is AbsoluteLayout, but it is deprecated. So do you know of
any option to achieve this?

Thank you very much.

Frank

On May 20, 3:03 am, Mark Murphy  wrote:
> Why are you using LinearLayout.LayoutParams for a child of 
> aScrollViewsubclass?
>
>
>
>
>
>
>
>
>
> On Thu, May 19, 2011 at 9:21 PM, Frank  wrote:
> > Hi All,
>
> > I have the following code. I only got a black screen without seeing
> > the white image.
>
> > public class Demo extends Activity {
> >    private MyCtrl mCtrl;
> >    protected void onCreate(Bundle savedInstanceState) {
> >        super.onCreate(savedInstanceState);
>
> >        mCtrl = new MyCtrl(this);
> >        setContentView(mCtrl);
> >    }
> > }
>
> > public class MyCtrl extendsScrollView{
>
> >    public MyCtrl (Context context) {
> >        super(context);
> >        setFocusable(true);
>
> >        int width = 100;
> >        int height = 100;
> >        int size = width * height;
> >        int buf[] = new int[size];
> >        for ( int i = 0; i < size; ++i) {
> >                buf[i] = 0x; //white image
> >        }
>
> >        Bitmap bmp = Bitmap.createBitmap(buf, width, height,
> > Bitmap.Config.ARGB_);
> >        ImageViewiv = newImageView(getContext());
> >        iv.setLayoutParams( new LinearLayout.LayoutParams(width, height) );
> >        iv.setImageBitmap(bmp);
> >        iv.setScaleType(ImageView.ScaleType.CENTER);
> >        addView(iv);
> >    }
> > }
>
> > However, if I derive MyCtrl fromImageViewdirectly, the white image
> > shows up.
>
> > Your help is highly appreciated.
>
> > Cheers,
> > Frank
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android App Developer Books:http://commonsware.com/books

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


Re: [android-developers] Re: startActivityForResult

2011-05-20 Thread Kostya Vasilyev

20.05.2011 18:51, kypriakos ?:

>  Oh, and I see that the intent you're trying to start is for a service. Using
>  startActivity (for result or not) with a service intent just doesn't make
>  sense.

Where do you see that? The intent I am starting is an Activity class.
Can you explain please?


> Intent intent = new Intent();
> intent.setClass(androidContext, mysnapPic2ServiceImpl.class);

You class is named ...Pic2*Service*Impl, so I assumed it was a Service. 
If it's an Activity, well, so it is - you know your code, whereas I 
could only guess from the class name :)


--
Kostya Vasilyev -- 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] Re: Why ImageView doesn't show up inside ScrollView

2011-05-20 Thread Mark Murphy
On Fri, May 20, 2011 at 12:47 PM, Frank  wrote:
> Before answering your question, can I ask does using
> LinearLayout.LayoutParams prevent it from working?

Quite possibly.

> I tried to comment
> it out, but it still doesn't work.

Just call addView() with the child View. Note that I have never tried
populating a ScrollView from Java (most people use XML).

> In fact, this is just a trial code. What I really want to do is to
> tile a ViewGroup with a whole bunch of ImageViews. I want to specify
> the absolute location and dimensions of each ImageView inside the
> parent ViewGroup. However, it looks to me that I cannot do this. I
> found there is AbsoluteLayout, but it is deprecated. So do you know of
> any option to achieve this?

Write your own ViewGroup.

Or, don't use widgets at all, and draw on the Canvas, the way 2D games do.

Bear in mind that there is a massive range of screen resolutions
(based on size/density), which is why AbsoluteLayout is deprecated, as
it does not lend itself to creating UIs that work well on everything
from a 3" phone to a 10" tablet to a 42" TV.

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

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

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


Re: [android-developers] Re: startActivityForResult

2011-05-20 Thread luiX_
Haven't read carefully all the responses but just a quick note:

It's not a good idea to declare the request code as a local variable, I
usually declare them as constants because you'll need it in the
onActivityResult method :)

2011/5/20 Kostya Vasilyev 

>  20.05.2011 18:51, kypriakos пишет:
>
>  > Oh, and I see that the intent you're trying to start is for a service. 
> Using> startActivity (for result or not) with a service intent just doesn't 
> make> sense.
>
>  Where do you see that? The intent I am starting is an Activity class.
> Can you explain please?
>
>
> > Intent intent = new Intent();
> > intent.setClass(androidContext, mysnapPic2ServiceImpl.class);
>
> You class is named ...Pic2*Service*Impl, so I assumed it was a Service. If
> it's an Activity, well, so it is - you know your code, whereas I could only
> guess from the class name :)
>
> --
> Kostya Vasilyev -- 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
>

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

Re: [android-developers] Appwidget RemoteViews copy

2011-05-20 Thread Kostya Vasilyev


Keeping the same RemoteViews object and repeatedly adding more 
operations will cause the copy in your process to get bigger and bigger, 
and the actual updates in the launcher process to get slower and slower 
over time.


The basic pattern is really simple:

rv = new RemoteViews ()
rv.setSomethingOrOther()

if (needStatusMessage) {
rv.setTextViewText(..., "Loading 100TB, 0.0001% complete...");
}
else {
rv.setViewVisibility(..., View.GONE);
}

appWidgetManager.updateAppWidget(, rv)


On the other hand, if you just want to reuse the remote views object 
once, that's probably fine.  But I don't think it's really worth the 
risk of accidentally breaking something.


-- Kostya

20.05.2011 20:32, Niall ?:

And I have a method that updates the status message like so:

  void updateStatusMessage( String str ) {
RemoteViews remoteViews = null;
if ( lastRemoteViews == null )
  remoteViews = remoteViewsWithIntents( context );
else
  remoteViews = lastRemoteViews;
remoteViews.setTextViewText( R.id.textview_status, str );
refreshWidgetViews( context, remoteViews );
  }



Is this good practise? Or should I make a means of specialising the 
updateAppWidgetFunction to update the status message only?



--
Kostya Vasilyev -- 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] Merchant Sales Report Issues

2011-05-20 Thread TreKing
On Fri, May 20, 2011 at 10:24 AM, polyclefsoftware  wrote:

> If there is a more appropriate forum to note this issue, or a place to
> report bugs, please point me to it.


http://www.google.com/support/androidmarket/developer/bin/answer.py?answer=136601&hl=en


> Otherwise, could someone from Google respond to this?


Unlikely.

-
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] urgent help

2011-05-20 Thread TreKing
On Fri, May 20, 2011 at 4:20 AM, neha  wrote:

> hi
> Is there are anyone who worked on SIP server.
> I want to get registered with server and make call.
>

This is an Android Development group, not a SIP server group.

-
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: ListPreference.getSummary

2011-05-20 Thread String
Reviving an old [degenerate] thread, rather than creating a new one...

I've been getting occasional UnknownFormatConversionException error
reports in my Dev Console, and had no idea what they were from. Today
I think I've figured it out, because it's occurring reliably on my
Honeycomb device.

Turns out it happens when there's a "%" character in a string resource
used as a label in a PreferencesActivity. Seems that the system thinks
it's going to be a format specifier, tries to evaluate it as such,
fails, and then falls over. But in my case, it's not; I'm letting the
user specify a pref for transparency of an AppWidget, with options
like 25%, 50%, etc.

I'm not sure how to fix it yet, and I'm open to suggestions. I tried "/
%", like you do for an apostrophe char, but that didn't work at all.
Tried "%" (the entity for "%"), but apparently that gets evaluated
too early, and the same problem occurs. If all else fails, I could
just use "percent", but that's kind of hokey.

Any other ideas?

String

On Apr 5, 8:38 am, mastermind  wrote:
> Some error occured on device with Cyanogen:
> 04-03 14:35:04.793 E/AndroidRuntime(21105):
> java.util.UnknownFormatConversionException: Conversion is ''
> 04-03 14:35:04.793 E/AndroidRuntime(21105): at java.util.Formatter
> $FormatSpecifierParser.advance(Formatter.java:2641)
> 04-03 14:35:04.793 E/AndroidRuntime(21105): at java.util.Formatter
> $FormatSpecifierParser.parseConversionType(Formatter.java:2716)
> 04-03 14:35:04.793 E/AndroidRuntime(21105): at java.util.Formatter
> $FormatSpecifierParser.parseArgumentIndexAndFlags(Formatter.java:2687)
> 04-03 14:35:04.793 E/AndroidRuntime(21105): at java.util.Formatter
> $FormatSpecifierParser.parseFormatToken(Formatter.java:2624)
> 04-03 14:35:04.793 E/AndroidRuntime(21105): at
> java.util.Formatter.doFormat(Formatter.java:1072)
> 04-03 14:35:04.793 E/AndroidRuntime(21105): at
> java.util.Formatter.format(Formatter.java:994)
> 04-03 14:35:04.793 E/AndroidRuntime(21105): at
> java.lang.String.format(String.java:2254)
> 04-03 14:35:04.793 E/AndroidRuntime(21105): at
> java.lang.String.format(String.java:2219)
> 04-03 14:35:04.793 E/AndroidRuntime(21105): at
> android.preference.ListPreference.getSummary(ListPreference.java)
> It happens only on Cyanogen's firmware when there's "%" symbol in
> ListPreference's summary.
>
> If u will open ListPreference.java from Froyo's sources u wouldn't
> find method ListPreference.getSummary, so it looks like ListPreference
> uses base method from Preference.java:
>  public CharSequence getSummary() {
>         return mSummary;
>     }
> And javadoc's from eclipse it confirms that:Returns the summary of
> this Preference.
>
> Ok, now let's open ListPreference.java from Cyanogen's sources:
>   public CharSequence getSummary() {
>         final CharSequence entry = getEntry();
>         if (mSummary == null || entry == null) {
>             return super.getSummary();
>         } else {
>             return String.format(mSummary, entry);
>         }
>     }
> It look's like it's Cyanogen's feature (only 8 bug reports from >3000
> users), but let's go 
> tohttp://developer.android.com/reference/android/preference/ListPrefere...
> Returns the summary of this ListPreference. If the summary has a
> String formatting marker in it (i.e. "%s" or "%1$s"), then the current
> entry value will be substituted in its place.
>
> WHAT IS GOING ON HERE???
> Can someone explain how *exactly* getSummary works?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 load resources like texture images & sound files in native code?

2011-05-20 Thread Halsafar
The example basically involves loading up the PNG Java side using the
Android Bitmap class.  Then exposing some Java functions to the native
side so the native side can ask for the bytes of the image.

Which part is giving you trouble?  I'll guide as best I can.


On May 19, 2:10 am, Atul Prakash  wrote:
> Dear Stephen,
>
> I am new to Android Development through native code. As per your
> directions, I followed the 
> examplehttp://lol.zoy.org/blog/2011/3/2/load-pngs-using-android-ndk
>
> Unfortunately, I am not able to fully understand it. I am bit confused
> about its integration with actual code. Plz help.
>
> Rgds/Atul Prakash Singh
>
> On May 19, 11:56 am, Stephen Damm  wrote:
>
>
>
>
>
>
>
> > On 11-05-19 12:50 AM, Atul Prakash wrote:> Dear Friends,
>
> > > I am trying to load resources(e.g. texture images, sound files) in my
> > > native .CPP file. As I have to use the resources like texture images
> > > in native code, this why I am looking for any method to add them in my
> > > native code itself.
>
> > > Is this possible to add resources in my JAVA file and access these
> > > resources in my native code? If yes then how?
>
> > > Please guide me.
>
> > > Atul Prakash Singh
>
> > You can load the PNG for example into a Bitmap Java side.  The standard
> > way you normally would in Android using AssetManager.  Then fetch the
> > pixels into an array and then read from native side.  Example 
> > here:http://lol.zoy.org/blog/2011/3/2/load-pngs-using-android-ndk
>
> > The alternative is to use libzip and unzip the apk (yes they are really
> > just a zip, even after signed and zipalign this still works).  Once you
> > have used libzip to get a handle to the archive you can start reading
> > files.  This is definitely a lot more work but depending your needs it
> > might be a necessity.  Example here:http://androgeek.info/?p=275
>
> > Stephen Damm

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

2011-05-20 Thread Kostya Vasilyev
Percent character in String.format() is obtained by specifying "%%" (two 
percent signs).


http://download.oracle.com/javase/1.5.0/docs/api/java/util/Formatter.html

( search for "percent", where it says "The result is a literal '%'" )

But I bet you already knew that :)

On the other hand, this requires that the string pass through Format to 
produce the single percent sign, which it doesn't for stock Android source.


How about you create a subclass of ListPreference, override getSummary, 
and return whatever you need, skipping the call to String.format(), 
effectively undoing the CM change.


As a side note, that's custom firmware for you. Users probably love the 
feature to see the current list entry in every application, but it seems 
so insignificant compared to a possible crash. And no try/catch block in 
the modified version either...


-- Kostya

20.05.2011 21:15, String пишет:

Reviving an old [degenerate] thread, rather than creating a new one...

I've been getting occasional UnknownFormatConversionException error
reports in my Dev Console, and had no idea what they were from. Today
I think I've figured it out, because it's occurring reliably on my
Honeycomb device.

Turns out it happens when there's a "%" character in a string resource
used as a label in a PreferencesActivity. Seems that the system thinks
it's going to be a format specifier, tries to evaluate it as such,
fails, and then falls over. But in my case, it's not; I'm letting the
user specify a pref for transparency of an AppWidget, with options
like 25%, 50%, etc.

I'm not sure how to fix it yet, and I'm open to suggestions. I tried "/
%", like you do for an apostrophe char, but that didn't work at all.
Tried "%" (the entity for "%"), but apparently that gets evaluated
too early, and the same problem occurs. If all else fails, I could
just use "percent", but that's kind of hokey.

Any other ideas?

String

On Apr 5, 8:38 am, mastermind  wrote:

Some error occured on device with Cyanogen:
04-03 14:35:04.793 E/AndroidRuntime(21105):
java.util.UnknownFormatConversionException: Conversion is ''
04-03 14:35:04.793 E/AndroidRuntime(21105): at java.util.Formatter
$FormatSpecifierParser.advance(Formatter.java:2641)
04-03 14:35:04.793 E/AndroidRuntime(21105): at java.util.Formatter
$FormatSpecifierParser.parseConversionType(Formatter.java:2716)
04-03 14:35:04.793 E/AndroidRuntime(21105): at java.util.Formatter
$FormatSpecifierParser.parseArgumentIndexAndFlags(Formatter.java:2687)
04-03 14:35:04.793 E/AndroidRuntime(21105): at java.util.Formatter
$FormatSpecifierParser.parseFormatToken(Formatter.java:2624)
04-03 14:35:04.793 E/AndroidRuntime(21105): at
java.util.Formatter.doFormat(Formatter.java:1072)
04-03 14:35:04.793 E/AndroidRuntime(21105): at
java.util.Formatter.format(Formatter.java:994)
04-03 14:35:04.793 E/AndroidRuntime(21105): at
java.lang.String.format(String.java:2254)
04-03 14:35:04.793 E/AndroidRuntime(21105): at
java.lang.String.format(String.java:2219)
04-03 14:35:04.793 E/AndroidRuntime(21105): at
android.preference.ListPreference.getSummary(ListPreference.java)
It happens only on Cyanogen's firmware when there's "%" symbol in
ListPreference's summary.

If u will open ListPreference.java from Froyo's sources u wouldn't
find method ListPreference.getSummary, so it looks like ListPreference
uses base method from Preference.java:
  public CharSequence getSummary() {
 return mSummary;
 }
And javadoc's from eclipse it confirms that:Returns the summary of
this Preference.

Ok, now let's open ListPreference.java from Cyanogen's sources:
   public CharSequence getSummary() {
 final CharSequence entry = getEntry();
 if (mSummary == null || entry == null) {
 return super.getSummary();
 } else {
 return String.format(mSummary, entry);
 }
 }
It look's like it's Cyanogen's feature (only 8 bug reports from>3000
users), but let's go 
tohttp://developer.android.com/reference/android/preference/ListPrefere...
Returns the summary of this ListPreference. If the summary has a
String formatting marker in it (i.e. "%s" or "%1$s"), then the current
entry value will be substituted in its place.

WHAT IS GOING ON HERE???
Can someone explain how *exactly* getSummary works?



--
Kostya Vasilyev -- 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: ListPreference.getSummary

2011-05-20 Thread String
No, I hadn't thought of using "%%". That works, thanks!

FWIW, this is happening in stock Honeycomb, not CM as the OP was
experiencing.

String

On May 20, 6:34 pm, Kostya Vasilyev  wrote:
> Percent character in String.format() is obtained by specifying "%%" (two
> percent signs).
>
> http://download.oracle.com/javase/1.5.0/docs/api/java/util/Formatter
>
> ( search for "percent", where it says "The result is a literal '%'" )
>
> But I bet you already knew that :)
>
> On the other hand, this requires that the string pass through Format to
> produce the single percent sign, which it doesn't for stock Android source.
>
> How about you create a subclass of ListPreference, override getSummary,
> and return whatever you need, skipping the call to String.format(),
> effectively undoing the CM change.
>
> As a side note, that's custom firmware for you. Users probably love the
> feature to see the current list entry in every application, but it seems
> so insignificant compared to a possible crash. And no try/catch block in
> the modified version either...
>
> -- Kostya
>
> 20.05.2011 21:15, String пишет:
>
>
>
>
>
>
>
>
>
> > Reviving an old [degenerate] thread, rather than creating a new one...
>
> > I've been getting occasionalUnknownFormatConversionExceptionerror
> > reports in my Dev Console, and had no idea what they were from. Today
> > I think I've figured it out, because it's occurring reliably on my
> > Honeycomb device.
>
> > Turns out it happens when there's a "%" character in a string resource
> > used as a label in a PreferencesActivity. Seems that the system thinks
> > it's going to be a format specifier, tries to evaluate it as such,
> > fails, and then falls over. But in my case, it's not; I'm letting the
> > user specify a pref for transparency of an AppWidget, with options
> > like 25%, 50%, etc.
>
> > I'm not sure how to fix it yet, and I'm open to suggestions. I tried "/
> > %", like you do for an apostrophe char, but that didn't work at all.
> > Tried "%" (the entity for "%"), but apparently that gets evaluated
> > too early, and the same problem occurs. If all else fails, I could
> > just use "percent", but that's kind of hokey.
>
> > Any other ideas?
>
> > String
>
> > On Apr 5, 8:38 am, mastermind  wrote:
> >> Some error occured on device with Cyanogen:
> >> 04-03 14:35:04.793 E/AndroidRuntime(21105):
> >> java.util.UnknownFormatConversionException: Conversion is ''
> >> 04-03 14:35:04.793 E/AndroidRuntime(21105): at java.util.Formatter
> >> $FormatSpecifierParser.advance(Formatter.java:2641)
> >> 04-03 14:35:04.793 E/AndroidRuntime(21105): at java.util.Formatter
> >> $FormatSpecifierParser.parseConversionType(Formatter.java:2716)
> >> 04-03 14:35:04.793 E/AndroidRuntime(21105): at java.util.Formatter
> >> $FormatSpecifierParser.parseArgumentIndexAndFlags(Formatter.java:2687)
> >> 04-03 14:35:04.793 E/AndroidRuntime(21105): at java.util.Formatter
> >> $FormatSpecifierParser.parseFormatToken(Formatter.java:2624)
> >> 04-03 14:35:04.793 E/AndroidRuntime(21105): at
> >> java.util.Formatter.doFormat(Formatter.java:1072)
> >> 04-03 14:35:04.793 E/AndroidRuntime(21105): at
> >> java.util.Formatter.format(Formatter.java:994)
> >> 04-03 14:35:04.793 E/AndroidRuntime(21105): at
> >> java.lang.String.format(String.java:2254)
> >> 04-03 14:35:04.793 E/AndroidRuntime(21105): at
> >> java.lang.String.format(String.java:2219)
> >> 04-03 14:35:04.793 E/AndroidRuntime(21105): at
> >> android.preference.ListPreference.getSummary(ListPreference.java)
> >> It happens only on Cyanogen's firmware when there's "%" symbol in
> >> ListPreference's summary.
>
> >> If u will open ListPreference.java from Froyo's sources u wouldn't
> >> find method ListPreference.getSummary, so it looks like ListPreference
> >> uses base method from Preference.java:
> >>   public CharSequence getSummary() {
> >>          return mSummary;
> >>      }
> >> And javadoc's from eclipse it confirms that:Returns the summary of
> >> this Preference.
>
> >> Ok, now let's open ListPreference.java from Cyanogen's sources:
> >>    public CharSequence getSummary() {
> >>          final CharSequence entry = getEntry();
> >>          if (mSummary == null || entry == null) {
> >>              return super.getSummary();
> >>          } else {
> >>              return String.format(mSummary, entry);
> >>          }
> >>      }
> >> It look's like it's Cyanogen's feature (only 8 bug reports from>3000
> >> users), but let's go 
> >> tohttp://developer.android.com/reference/android/preference/ListPrefere...
> >> Returns the summary of this ListPreference. If the summary has a
> >> String formatting marker in it (i.e. "%s" or "%1$s"), then the current
> >> entry value will be substituted in its place.
>
> >> WHAT IS GOING ON HERE???
> >> Can someone explain how *exactly* getSummary works?
>
> --
> Kostya Vasilyev --http://kmansoft.wordpress.com

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

[android-developers] Unlock thing

2011-05-20 Thread Renan
I have a running android Service. It runs even on the lockscreen, and
I want it to somehow Unlock the lockscreen.

How can I interfere with the lockscreen activity or whatever the
lockscreen is, to unlock it...

I want my service to Unlock the lockscreen, just like if the user
slided the unlock thing.

How might I do this?

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


Re: [android-developers] How to capture system warnings in application ?

2011-05-20 Thread TreKing
On Fri, May 20, 2011 at 9:11 AM, chcat  wrote:

> Any idea how i can capture that warning in my application code?


Define "capture".

-
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] NoClassDefFoundError thrown when an Android project references Eclipse project where project layout is set to "project folder as root for sources and class files layout"

2011-05-20 Thread Xavier Ducrohet
The only possible workaround is to export the referenced project as a
jar file and use that in the android project.

I've seen the bug you filed and will be looking at it to see what's up
in our builder (thanks for providing a test project too!)

thanks
Xav

On Thu, May 19, 2011 at 1:35 PM, Anar Huseynov  wrote:
> I have noticed a bug like behavior when an Android project is referencing
> other Java project with project layout where .java and .class files reside
> in the same package  (First option "Use project folder as root for sources
> and class files" in project layout section when one creates a new Java
> project in Eclipse) as opposed to separate src and bin folders (second and
> default option "Create separate folders for sources and class files" for new
> java projects).  In this case, the application would compile just fine in
> Eclipse but when it runs, it would throw NoClassDefFoundError exception when
> any class in the referenced project is used.  This behavior is not observed
> when a referenced project is created using the second option.  I have
> attached a zip file with 3 sample projects that exhibit this problem.  If
> one changes the reference in AndroidLayoutTest project from
> FailingLayoutTest to WorkingLayoutTest, the exception would not be thrown
> when application starts.  Both FailingLayoutTest and WorkingLayoutTest
> contain identical java files.
>
> In my case, my Android project is referencing a big Eclipse project created
> using the first option so changing the project layout is not an option.
> However, I have to reference certain classes in order to develop my Android
> application.  Does anybody know how to workaround this problem?  I know that
> Android projects are using special Android builders. Is there any way to
> look how they work and possible fix them to work properly with the first
> layout option?
>
> Thanks,
> Anar
> --
> Anar Huseynov
> Master of Software Engineering Program (MSE)
> School of Computer Science (SCS)
> Carnegie Mellon University
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. 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] how to generate ID's for dynamic radio buttons

2011-05-20 Thread jotobjects
I am generating RadioButtons in code and adding them to a RadioGroup.
Seems like I need ID values to be able to use check(id) and so forth.
The bug I have now is that calling RadioButton.setChecked(true) does
not uncheck the already checked button.

For creating ID's in code can I just use  1,2,3,... id values or
whatever for the RadioButtons to work correctly with check(id)?

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


[android-developers] Re: Why ImageView doesn't show up inside ScrollView

2011-05-20 Thread Frank

> > In fact, this is just a trial code. What I really want to do is to
> > tile a ViewGroup with a whole bunch of ImageViews. I want to specify
> > the absolute location and dimensions of eachImageViewinside the
> > parent ViewGroup. However, it looks to me that I cannot do this. I
> > found there is AbsoluteLayout, but it is deprecated. So do you know of
> > any option to achieve this?
>
> Write your own ViewGroup.
>
> Or, don't use widgets at all, and draw on the Canvas, the way 2D games do.

Hi Mark,

If I can tile a ViewGroup as I planned originally, I can tile beyond
the visible region. Then when it is scrolled, Android can just quickly
scroll in the new tiles (with whatever hardware acceleration it can
use). If I use Canvas, I need to redraw the entire Canvas using the
tiles (basically, copying tile buffer onto Canvas using drawBitmap),
would this be slower than the first option, because it cannot benefit
from the possible hardware acceleration? This is just my concern. Your
expertise is highly appreciated!

Thanks,
Frank


>
> Bear in mind that there is a massive range of screen resolutions
> (based on size/density), which is why AbsoluteLayout is deprecated, as
> it does not lend itself to creating UIs that work well on everything
> from a 3" phone to a 10" tablet to a 42" TV.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android App Developer Books:http://commonsware.com/books

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


Re: [android-developers] Re: Why ImageView doesn't show up inside ScrollView

2011-05-20 Thread Mark Murphy
On Fri, May 20, 2011 at 2:12 PM, Frank  wrote:
> If I can tile a ViewGroup as I planned originally, I can tile beyond
> the visible region. Then when it is scrolled, Android can just quickly
> scroll in the new tiles (with whatever hardware acceleration it can
> use). If I use Canvas, I need to redraw the entire Canvas using the
> tiles (basically, copying tile buffer onto Canvas using drawBitmap),
> would this be slower than the first option, because it cannot benefit
> from the possible hardware acceleration? This is just my concern. Your
> expertise is highly appreciated!

You are outside my areas of expertise, sorry.

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

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

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


[android-developers] Re: IllegalStateException: Fragment not added in ActionBarTabs example

2011-05-20 Thread Ed Burnette
Ok, I've entered a bug report. See/vote for:
http://code.google.com/p/android/issues/detail?id=17029 . Thanks.

On May 19, 2:46 pm, Shane Isbell  wrote:
> I've run into this on occasion, I surrounded it with a general Exception
> catch to handle this, which seemed to have no side affects for my
> application, as to whether this is platform bug, who knows? Without the
> source code to look at, it is anyone's guess.
>
> Shane

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

2011-05-20 Thread jotobjects
Adding more detail to question - the source for CompoundButton shows
that findViewById() is used to find the currently checked button.  So
that means ID's I assign to these buttons must be unique in the
current View hierarchy.

Does anyone have a suggestion on generating unique View ID''s at
runtime?

On May 20, 11:07 am, jotobjects  wrote:
> I am generating RadioButtons in code and adding them to a RadioGroup.
> Seems like I need ID values to be able to use check(id) and so forth.
> The bug I have now is that calling RadioButton.setChecked(true) does
> not uncheck the already checked button.
>
> For creating ID's in code can I just use  1,2,3,... id values or
> whatever for the RadioButtons to work correctly with check(id)?

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

2011-05-20 Thread Dianne Hackborn
Lots of votes for bugs just makes me want to ignore the bug.  Just saying.

I hate bug voting.  Drives me crazy.

On Fri, May 20, 2011 at 11:23 AM, Ed Burnette  wrote:

> Ok, I've entered a bug report. See/vote for:
> http://code.google.com/p/android/issues/detail?id=17029 . Thanks.
>
> On May 19, 2:46 pm, Shane Isbell  wrote:
> > I've run into this on occasion, I surrounded it with a general Exception
> > catch to handle this, which seemed to have no side affects for my
> > application, as to whether this is platform bug, who knows? Without the
> > source code to look at, it is anyone's guess.
> >
> > Shane
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: IllegalStateException: Fragment not added in ActionBarTabs example

2011-05-20 Thread Mark Murphy
On Fri, May 20, 2011 at 2:29 PM, Dianne Hackborn  wrote:
> Lots of votes for bugs just makes me want to ignore the bug.  Just saying.

Is there another mechanism on b.android.com to subscribe to an issue
without voting for it?

> I hate bug voting.  Drives me crazy.

There's no question that it's fairly pointless, at least in the way
the core Android team is using the issue tracker. However, voting and
subscribing appear intertwined. Some issues, like this one, I simply
want to be notified regarding their progress or posted workarounds.

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

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

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


Re: [android-developers] Appwidget RemoteViews copy

2011-05-20 Thread Niall
See. The problem is that I generate a table (with nested ListViews) and 
display it on the appwidget, and the elements of the table (as well as the 
buttons) have on intents tied to them when a user presses on a place of the 
table. And if the orientation of the phone changes (which isn't beyond the 
realms of possibility) with the simple update that you pasted above the 
table I generated and the intents associated will neither be shown or be 
clickable... or at least I am lead to believe they won't. 
Am I correct in this assertion? 

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

2011-05-20 Thread Rogério de Souza Moraes
Hi Satish,

if you plan to build your own SDK, delete the line "usb0"
inside the file "frameworks/base/core/res/res/values/config.xml" this will
disable the usb tethering.

Regards,

Rogerio

2011/5/20 Mark Murphy 

> On Thu, May 19, 2011 at 7:06 AM, satish kuma s,n. 
> wrote:
> > Can you please tell me how we can disable the USB tethering in
> > android.
>
> This is not possible from an SDK application, sorry.
>
> If your interest is in creating custom firmware that has USB tethering
> disabled, please visit http://source.android.com and use the support
> resources found there.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android App Developer Books: http://commonsware.com/books
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] How to disable USB tethering in android

2011-05-20 Thread Chris Stratton
On Friday, May 20, 2011 2:46:13 PM UTC-4, Roger wrote:

if you plan to build your own SDK, delete the line "usb0" 
> inside the file "frameworks/base/core/res/res/values/config.xml" this will 
> disable the usb tethering.
>

That would be kind of pointless, as the SDK does not get installed on the 
device.   

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

Re: [android-developers] Appwidget RemoteViews copy

2011-05-20 Thread Niall
I should explain better. 

A user presses a refresh button (or an alarm service triggers the same 
effect) on the appwidget. I want to tell the user that the system is 
refreshing so they know the widget's doing something. But I want to tell the 
user that it's happening immediately. So I need to update the status message 
(it's always shown) and update the appwidget, and then trigger the refresh 
task which might take 10 seconds or so (downloading info from the net). 
That's really the only time I need to do what I explained. 

The best way I can think about doing it is by saving the previous 
RemoteViews that I generated when generating the table layouts. Does that 
make sense? 
I *think* it should be safe... 

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

2011-05-20 Thread Goutom
Hello Jens
May I have tutorial link on this topics(How to get synced Google contact
group programmatically ?)?

On Thu, May 19, 2011 at 3:31 PM, Jens  wrote:

> I assume you mean :
>
>
> http://developer.android.com/reference/android/provider/ContactsContract.Groups.html
>
> http://developer.android.com/reference/android/provider/ContactsContract.CommonDataKinds.GroupMembership.html
>
> Groups & group membership information is in the same ContentProvider
> that stores the actual contacts synced with Google.
>
> On 19 Maj, 08:55, Goutom  wrote:
> > Hi All
> >
> > We know android phone can sync google contact group dynamically if we add
> > account.Now I want to get the file where the groups information  are
> saved.I
> > need code to get groups information and need to show in my activity.
> >
> > Can any one help ?
> >
> > Cheers
> > Goutom
> > WebRep
> > Overall rating
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Help to do a trick on the Lock screen

2011-05-20 Thread TreKing
On Thu, May 19, 2011 at 9:40 AM, Renan  wrote:

> I'm doing an App that need's to interfere with the Lock Screen...
>

That doesn't sound suspicious at all.


> How can i do that???
>

You can't, AFAIK.

-
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] Null Pointer Exception on accessing value of EditText

2011-05-20 Thread TreKing
On Thu, May 19, 2011 at 4:16 PM, Ankur Kumar  wrote:

>  I am getting java.lang.NullPointerException at step 3 in my code. Have not
> been able to figure this out.
>

1 - Use your debugger.
2 - Figure out what is null.
3 - Make it not null.

-
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] Null Pointer Exception on accessing value of EditText

2011-05-20 Thread gaurav gupta
First set any value in edittext then u can get value .

   1.  EditText IPInput = (EditText)
findViewById(R.id.ip);
iPinput.setText("Value inserted successfully");
   2.  IPInput.getText().toString();
System.out.println(ip);
   3.  System.out.println(IPInput.getText().toString());

On Sat, May 21, 2011 at 12:40 AM, TreKing  wrote:

> On Thu, May 19, 2011 at 4:16 PM, Ankur Kumar wrote:
>
>>  I am getting java.lang.NullPointerException at step 3 in my code. Have
>> not been able to figure this out.
>>
>
> 1 - Use your debugger.
> 2 - Figure out what is null.
> 3 - Make it not null.
>
>
> -
> 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
>

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

[android-developers] Re: Appwidget set background and set background transparency/alpha

2011-05-20 Thread Jake Colman

Thanks to both of you, I appreciate it.

> "N" == Niall   writes:

   N> Might be helpful for people to see the code.
   N> The preference (change as appropriate. My coding style is to have classes 
   N> named with a lower first letter, so that has been changed from the link 
   N> above): 
   N> http://pastebin.com/1EkdJNnE

   N> Preference code: 
   N> http://pastebin.com/r5LYfF2r

   N> Doing set colour (with android version check): 
   N> http://pastebin.com/iyZEcSdM

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

-- 
Jake Colman -- Android Tinkerer

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