Re: [android-developers] Re: Copyright question: Can I remix a Final Fantasy song and use it in my game?

2012-01-20 Thread Jim Graham
On Sat, Jan 21, 2012 at 02:43:42AM -0500, Kristopher Micinski wrote:
> I suspect that what happened was that he was using GMail and read a
> previous thread in the conversation to which he was replying, and
> *then* pushed reply,

That might work, except for one thing:  it was a direct reply to my post,
not one that just happened to include my post  :-)

> ...which automatically quotes the entire conversation

Replies don't quote the entire coversation...they only quote the previous
post (which, we can assume, was edited, like any other, to quote only the
spefic bits that are being replied to.

> and dumps you at the end of it

Not with any e-mail client I've ever used...when you go into the editor
for your reply, you start at the top (headers) and move down to trim the
quoted text and add your reply.

But then, at this point, we're getting WAY off-topic here...and I'm about
to go to bed for a few hours of sleep, so

Later,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)| Peter da Silva:  No, try "rm -rf /"
spooky1...@gmail.com| Dave Aronson:As your life flashes before
< Running FreeBSD 7.0 > |  your eyes, in the unit of time known as an
ICBM / Hurricane:   |  ohnosecond (alt.sysadmin.recovery)
   30.44406N 86.59909W  |

Android Apps Listing at http://www.jstrack.org/barcodes.html

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


[android-developers] Getting Blank page in WebView

2012-01-20 Thread Pawan
Hi,

I am trying open twitter link : http://mobile.twitter.com/pawan_rathore88 
in my activity. 
If I set WebViewClient to webview I am getting blank page.
But when I load url without setting any webviewclient, it loads page 
properly. 
Does anyone have an idea what can be a problem. 
Following is my code snippet.

webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setJavaScriptEnabled(true);
//if I comment the following line then webpage loads properly in default 
Android browser.
webview.setWebViewClient(new WebViewClient() {
   public void onReceivedError(WebView view, int errorCode, String 
description, String failingUrl) {
 Toast.makeText(activity, "Oh no! " + description, 
Toast.LENGTH_SHORT).show();
   }
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {

Log.v(tag, "url :" + url);
view.loadUrl(url);
return true;
}
 });
webview.loadUrl("http://mobile.twitter.com/pawan_rathore88";);

Thanks,
Pawan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Copyright question: Can I remix a Final Fantasy song and use it in my game?

2012-01-20 Thread Kristopher Micinski
I suspect that what happened was that he was using GMail and read a
previous thread in the conversation to which he was replying, and
*then* pushed reply, which automatically quotes the entire
conversation and dumps you at the end of it, I occasionally do this
and have to correct for it.

kris

On Sat, Jan 21, 2012 at 2:32 AM, Jim Graham  wrote:
> On Fri, Jan 20, 2012 at 03:12:10PM +0100, Chihwah wrote:
>> Op 20-1-2012 14:51, Jim Graham wrote:
>> >On Thu, Jan 19, 2012 at 12:50:30PM -0800, hzakimoto wrote:
>> >
 I'm also a musician.
>>
>>> You've no doubt already done some composition, then, so why not just
>>> write your own?  Or just ad lib.  Either way, it's a LOT easier, as
>>> a musician, to just write your own music than to get out of legal
>>> trouble for violating copyright laws  Besides, it's not as if
>>> you're going to be writing a concerto...all you need is background
>>> and effects.  In other words, even easier.
>
>> I am sure that is not legal, you would still be using parts of an
>> original song, so you need permission.
>
> Ummm, think about what you just wrote.  Now open your eyes so you can
> actually read it, and look at it again.
>
> Now look at the post you're responding to (mine).  Try READING it.
>
> Now, here's my question for you:  are you on crack or something?  If he
> writes HIS OWN MUSIC, how do you get the insane idea that it'd be illegal
> for him to use it?  Of course, he could always ask himself for permission
> to use parts of his own "original [composition]" .  :-)
>
> Geez, I never knew copyright law prevents you from using YOUR OWN STUFF!
>
> Later,
>   --jim
>
> --
> THE SCORE:  ME:  2  CANCER:  0
> 73 DE N5IAL (/4)        | Peter da Silva:  No, try "rm -rf /"
> spooky1...@gmail.com    | Dave Aronson:    As your life flashes before
> < Running FreeBSD 7.0 > |      your eyes, in the unit of time known as an
> ICBM / Hurricane:       |      ohnosecond     (alt.sysadmin.recovery)
>   30.44406N 86.59909W  |
>
> Android Apps Listing at http://www.jstrack.org/barcodes.html
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2012-01-20 Thread Thomas Fjellstrom
On Sat Jan 21, 2012, Alexander Mikhnin wrote:
> Check this tutorial
> http://developer.android.com/intl/zh-CN/resources/tutorials/opengl/opengl-e
> s10.html
> 
> In addition there is class RectF.

I bet it doesn't come with a render() mehod ;) This code is really just a 
proof of concept to get the GL bits working, then I move on to more 
complicated objects.

> And it is a bad idea to allocate objects in render method.

Good to know. I'll eventually switch to a scene-graph of sorts, so the 
allocation in the render method will go away.

> Do you have calls to GLSurfaceView.onPause and GLSurfaceView.onResume
> in your Activty's onPause and onResume?

Yes I do.

> On 21 янв, 10:25, Thomas Fjellstrom  wrote:
> > I've started on a little toy app to get familiar with working with OpenGL
> > and Android, and I can't seem to get anything to display (other than the
> > initial screen clear).
> > 
> > I've pasted the relevant code here:http://pastebin.com/SpLJBfJ8
> > 
> > I can't figure out what I'm doing wrong.


-- 
Thomas Fjellstrom
tho...@fjellstrom.ca

-- 
Thomas Fjellstrom
tfjellst...@gmail.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: Android webview retain form data when orientation changes

2012-01-20 Thread IndianDragon
Thanks for your reply, but onRetainNonConfigurationInstance() was not
helpful for my situation and a Fragement/Webview solution seemed
better. So Iam working on a Fragment based webview for my issue.

On Jan 20, 3:15 am, TreKing  wrote:
> On Wed, Jan 18, 2012 at 11:07 AM, IndianDragon 
> wrote:
>
> > How to retain the form data in the webview after the change
> > the orientation ?
>
> Not sure if it's the best solution, but you could use
> onRetainNonConfigurationInstance() to keep the same WebView instance alive
> across Activity changes.
>
> --- 
> --
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


Re: [android-developers] Re: Copyright question: Can I remix a Final Fantasy song and use it in my game?

2012-01-20 Thread Jim Graham
On Fri, Jan 20, 2012 at 03:12:10PM +0100, Chihwah wrote:
> Op 20-1-2012 14:51, Jim Graham wrote:
> >On Thu, Jan 19, 2012 at 12:50:30PM -0800, hzakimoto wrote:
> >
>>> I'm also a musician.
>
>> You've no doubt already done some composition, then, so why not just
>> write your own?  Or just ad lib.  Either way, it's a LOT easier, as
>> a musician, to just write your own music than to get out of legal
>> trouble for violating copyright laws  Besides, it's not as if
>> you're going to be writing a concerto...all you need is background
>> and effects.  In other words, even easier.

> I am sure that is not legal, you would still be using parts of an
> original song, so you need permission.

Ummm, think about what you just wrote.  Now open your eyes so you can
actually read it, and look at it again.

Now look at the post you're responding to (mine).  Try READING it.

Now, here's my question for you:  are you on crack or something?  If he
writes HIS OWN MUSIC, how do you get the insane idea that it'd be illegal
for him to use it?  Of course, he could always ask himself for permission
to use parts of his own "original [composition]" .  :-)

Geez, I never knew copyright law prevents you from using YOUR OWN STUFF!

Later,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)| Peter da Silva:  No, try "rm -rf /"
spooky1...@gmail.com| Dave Aronson:As your life flashes before
< Running FreeBSD 7.0 > |  your eyes, in the unit of time known as an
ICBM / Hurricane:   |  ohnosecond (alt.sysadmin.recovery)
   30.44406N 86.59909W  |

Android Apps Listing at http://www.jstrack.org/barcodes.html

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


[android-developers] Re: Android webview retain form data when orientation changes

2012-01-20 Thread IndianDragon
Thanks for the reply.

Actually Iam using fragment now for webview like you said.
But I call the Fragment/webview class from Oncreate() in an Activity
which extends FragmentActivity, which basically makes the purpose of
me using fragment useless as when orientation changes the the
Oncreate() restarts again creating new instance of Fragment/webview .

Iam using setRetainInstance(true) in the Fragment/Webview .

How can I make sure that, the webiview/Fragment does not get recreated
even when it's call from Oncreate() in the Activity is recreated
everytime when Orientation changes ?

Should I be using a onSaveInstanceState() and restorestate() in the
Fragment/webview class ?


On Jan 20, 3:19 am, Mark Murphy  wrote:
> Better yet would be to have the WebView in a dynamic fragment with
> setRetainInstance(true). Passing a widget between activity instances
> requires some patch-up work to avoid memory leaks -- you're better
> served letting existing Android code handle that.
>
>
>
>
>
>
>
>
>
> On Thu, Jan 19, 2012 at 5:15 PM, TreKing  wrote:
> > On Wed, Jan 18, 2012 at 11:07 AM, IndianDragon 
> > wrote:
>
> >> How to retain the form data in the webview after the change
> >> the orientation ?
>
> > Not sure if it's the best solution, but you could use
> > onRetainNonConfigurationInstance() to keep the same WebView instance alive
> > across Activity changes.
>
> > --- 
> > --
> > 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
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!

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

2012-01-20 Thread Alexander Mikhnin
Check this tutorial
http://developer.android.com/intl/zh-CN/resources/tutorials/opengl/opengl-es10.html

In addition there is class RectF. And it is a bad idea to allocate
objects in render method.
Do you have calls to GLSurfaceView.onPause and GLSurfaceView.onResume
in your Activty's onPause and onResume?

On 21 янв, 10:25, Thomas Fjellstrom  wrote:
> I've started on a little toy app to get familiar with working with OpenGL
> and Android, and I can't seem to get anything to display (other than the
> initial screen clear).
>
> I've pasted the relevant code here:http://pastebin.com/SpLJBfJ8
>
> I can't figure out what I'm doing wrong.

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


Re: [android-developers] Re: Restrict opening Settings application

2012-01-20 Thread Kristopher Micinski
You're talking about the fact that you don't want the user to reset
your app from the settings app on the phone right?

If this is the case then, no, you can't change the behavior of that
app, so you'll just need to either get over it, or design your app to
recover from the situations when its data has been erased.

kris

On Sat, Jan 21, 2012 at 1:15 AM, ramkumar pinninti
 wrote:
> Thanks for the reply,
> Mr.Sheikh Basiruddin i cannot understand your idea.Do i need to write
> a new Settings application?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2012-01-20 Thread Kristopher Micinski
That doesn't make sense...

Every time the the user presses the home key you want to think you're
in "emergency mode?"

(By the way, you know that phones, at least in the US, do this already
when you dial 911, I believe..)

kris

On Fri, Jan 20, 2012 at 11:04 PM, Dhaval Varia  wrote:
> i am going to make one emeergency alert app
> As we know we dont have time to open app in emergency.
> so it should fire on some hard key.
> so plz suggeat alternet solution
> thanx.
>
> On Jan 21, 2012 9:25 AM, "Kumar Bibek"  wrote:
>>
>> There would always be a few things which you cannot do.
>>
>> I don't understand how does this "No" affect the popularity of Android.
>>
>> Their could be other ways to solve your problem, that is, if you could
>> mention exactly what you are trying to do.
>>
>> Thanks and Regards,
>> Kumar Bibek
>>
>> http://techdroid.kbeanie.com
>> http://www.kbeanie.com
>>
>>
>>
>> On Sat, Jan 21, 2012 at 9:21 AM, Dhaval Varia 
>> wrote:
>>>
>>> i m getting all the times answer no..
>>> then why android is this mch popular?
>>>
>>> On Jan 21, 2012 8:56 AM, "Kristopher Micinski" 
>>> wrote:

 Basically, no.

 To explain the basically: you can't do it.

 kris

 On Fri, Jan 20, 2012 at 10:19 PM, Dhaval Varia 
 wrote:
 > dear,
 >
 > is there any way to override home key?
 >
 > i want to start my app,by pressing home key for few times.
 > thanx
 >
 > --
 > You received this message because you are subscribed to the Google
 > Groups "Android Developers" group.
 > To post to this group, send email to
 > android-developers@googlegroups.com
 > To unsubscribe from this group, 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
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, 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
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Regarding integration of ffmpeg libraries with android sdk

2012-01-20 Thread Himanshi Saxena
The platform is windows..please reply

Thanks in advance.

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


Re: [android-developers] override home key

2012-01-20 Thread Rocky
check www.alltechsolution.wordpres.com

On Fri, Jan 20, 2012 at 8:30 PM, Dhaval Varia wrote:

> thanx sir
> On Jan 21, 2012 9:51 AM, "Kumar Bibek"  wrote:
>
>> I am not sure about this, but I think it would work for you.
>>
>> When you press the Home button, there would be an Intent fired
>> system-wide. So, you could write a receiver that tracks these particular
>> kind of intent.
>>
>> Now, in the receiver, you could monitor the frequency of these intents.
>> IF you could detect that the frequency is the same as you would want your
>> app to be triggered, you can very well start a service or activity, or
>> whatever.
>>
>>
>> *Thanks and Regards,
>> Kumar Bibek*
>> *
>> http://techdroid.kbeanie.com
>> http://www.kbeanie.com*
>>
>>
>>
>> On Sat, Jan 21, 2012 at 9:34 AM, Dhaval Varia wrote:
>>
>>> i am going to make one emeergency alert app
>>> As we know we dont have time to open app in emergency.
>>> so it should fire on some hard key.
>>> so plz suggeat alternet solution
>>> thanx.
>>> On Jan 21, 2012 9:25 AM, "Kumar Bibek"  wrote:
>>>
 There would always be a few things which you cannot do.

 I don't understand how does this "No" affect the popularity of Android.

 Their could be other ways to solve your problem, that is, if you could
 mention exactly what you are trying to do.

 *Thanks and Regards,
 Kumar Bibek*
 *
 http://techdroid.kbeanie.com
 http://www.kbeanie.com*



 On Sat, Jan 21, 2012 at 9:21 AM, Dhaval Varia 
 wrote:

> i m getting all the times answer no..
> then why android is this mch popular?
> On Jan 21, 2012 8:56 AM, "Kristopher Micinski" 
> wrote:
>
>> Basically, no.
>>
>> To explain the basically: you can't do it.
>>
>> kris
>>
>> On Fri, Jan 20, 2012 at 10:19 PM, Dhaval Varia <
>> dhavalkva...@gmail.com> wrote:
>> > dear,
>> >
>> > is there any way to override home key?
>> >
>> > i want to start my app,by pressing home key for few times.
>> > thanx
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to
>> android-developers@googlegroups.com
>> > To unsubscribe from this group, 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
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to
> android-developers@googlegroups.com
> To unsubscribe from this group, 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
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, 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
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 & Reg

[android-developers] Rendering Problem with GLSurfaceView

2012-01-20 Thread Thomas Fjellstrom
I've started on a little toy app to get familiar with working with OpenGL 
and Android, and I can't seem to get anything to display (other than the 
initial screen clear).

I've pasted the relevant code here: http://pastebin.com/SpLJBfJ8

I can't figure out what I'm doing wrong.

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

Re: [android-developers] Installing Android SDK

2012-01-20 Thread Manoj Bawane
hi,
Install Eclipse tool,
goto help menu-> install new softwares

add ADT plugin and restart the eclipse.

then open Android SDK manager and set path where your android SDK install.

then restart eclipse..
 and create AVD..
enjoy...


On Thu, Jan 19, 2012 at 10:19 PM, vivek elangovan  wrote:

> Hi members,
>   i m facing difficulty in installing Android SDK
> when i checked the SDK Manager log i found that it is not fetching
> anything from the following url  "http://innovator.samsungmobile.com/
> android/repository/repository.xml".
> because of this i m not able to select packages and not able to create
> AVD.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Restrict opening Settings application

2012-01-20 Thread ramkumar pinninti
Thanks for the reply,
Mr.Sheikh Basiruddin i cannot understand your idea.Do i need to write
a new Settings application?

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


Re: [android-developers] Restrict opening Settings application

2012-01-20 Thread Kristopher Micinski
If you want them from accessing the "Settings" app on their phone, the
one that allows them to uninstall your app, etc..,

You can't do this.., this would be a security hole.  In general, you
can't "block" other apps, or interfere with the user experience in
apps you don't write.

Even if it makes sense for your app, imagine some stupid app which
kills your device, opens up tons of threads, etc.., you want to shut
it down / clear the data / uninstall it, but the app stops you from
doing so... bad thing, right :-)...

kris

P.s., if the user knows enough to find how to clear your apps data,
the probability they're doing it "by accident" is almost zero...

On Sat, Jan 21, 2012 at 12:45 AM, ramkumar pinninti
 wrote:
> Hi,
> I Am working in a organization.We developed a project in which more
> than 50 users will use Android mobiles with O.S 2.2(Froyo).My users
> are having less knowledge on Android.So i want to restrict them not to
> open Settings application because they accidentally or intensionally
> change seetings that may cause loss of data or stop my app.
> I need following Settings shuold not be changed
>
> 1)Time,Time zone always automatic(Network provider)
> 2)User should not clear my app data
>
> Please tell me if u have any ideas.
>
> Thanks and Regards
> P.Ramkumar.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Restrict opening Settings application

2012-01-20 Thread Manoj Bawane
I think you, disable any click event on setting tab.

On Fri, Jan 20, 2012 at 9:45 PM, ramkumar pinninti <
ramkumar.pinni...@gmail.com> wrote:

> Hi,
> I Am working in a organization.We developed a project in which more
> than 50 users will use Android mobiles with O.S 2.2(Froyo).My users
> are having less knowledge on Android.So i want to restrict them not to
> open Settings application because they accidentally or intensionally
> change seetings that may cause loss of data or stop my app.
> I need following Settings shuold not be changed
>
> 1)Time,Time zone always automatic(Network provider)
> 2)User should not clear my app data
>
> Please tell me if u have any ideas.
>
> Thanks and Regards
> P.Ramkumar.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Decryption Bad Padding Exception

2012-01-20 Thread chander
Hi all,

I have written a File Encryption application for android, i am using
AES 256 bit encryption, encryption process is working good, but while
decrypting the files program giving exception as

javax.crypto.BadPaddingException  : Pad block corrupted.
i am not able to understand why this exception is coming, even on
internet no proper explanation is given why this exception comes and
how to solve this problem?
please help me, i am giving my decryption code please check if i am
doing something wrong..

Decryption Process Code:

public void decrypt(ArrayList  decList, String pass)
{
long total = totalSpaceDecrypt(decList);

// Decryption Code goes here
try
{
System.out.println("Total size of ArrayList: " +total + 
"Bytes");
for(File f: decList)
{
FileOutputStream fout;
OutputStream out;
InputStream in;

file = new File(f.getAbsolutePath());   // 
/mnt/sdcard/abc.txt

abpath = file.getAbsolutePath();
String dir = abpath.substring(0, 
abpath.lastIndexOf("/"));  // /mnt/
sdcard
System.out.println("Current Directory:" +dir);
String name = file.getName();   
// abc.txt
System.out.println("File name is :" +name);
String name1 = name.substring(0, 
name.lastIndexOf("."));// abc
System.out.println("File name is :" + name1);   
//abc

filetemp = new File(dir + "/" + name1 +".tmp"); 
// /mnt/sdcard/
abc.tmp

// Creating a PBE Key Specification
// Providing the passphrase,salt,iteration 
count and key length
kspec = new 
PBEKeySpec(pass.toCharArray(),salt,iterations,keylen);

// Locate a PBE Secret Key Factory
factory = 
SecretKeyFactory.getInstance("PBEWITHSHAAND256BITAES-CBC-
BC");

// Generate the secret key from the PBEKeySpec
key = factory.generateSecret(kspec);

// Locating a PBE Cipher
cipher = 
Cipher.getInstance("AES/CBC/PKCS5Padding");

// Initializing the cipher for encryption
cipher.init(Cipher.DECRYPT_MODE, key);

in = new FileInputStream(file); 
// /mnt/sdcard/abc.txt
fout = new FileOutputStream(filetemp);  // 
/mnt/sdcard/abc.tmp
out = new CipherOutputStream(fout,cipher);

int num = 0;

while((num = in.read(buffer)) >= 0)
{

byte[] decode = cipher.doFinal(buffer);
out.write(decode,0,num);

}

filetemp.renameTo(file);
in.close();
out.close();
fout.close();

}

}


Thanks
Chandra
catch (Exception e)
{
e.printStackTrace();
}

}

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

2012-01-20 Thread Sheikh Basiruddin
simply make the options in the settings and unfocus it and donot implement
on click method if u do then just toast saying that u are restricted.

On Sat, Jan 21, 2012 at 11:15 AM, ramkumar pinninti <
ramkumar.pinni...@gmail.com> wrote:

> Hi,
> I Am working in a organization.We developed a project in which more
> than 50 users will use Android mobiles with O.S 2.2(Froyo).My users
> are having less knowledge on Android.So i want to restrict them not to
> open Settings application because they accidentally or intensionally
> change seetings that may cause loss of data or stop my app.
> I need following Settings shuold not be changed
>
> 1)Time,Time zone always automatic(Network provider)
> 2)User should not clear my app data
>
> Please tell me if u have any ideas.
>
> Thanks and Regards
> P.Ramkumar.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Restrict opening Settings application

2012-01-20 Thread ramkumar pinninti
Hi,
I Am working in a organization.We developed a project in which more
than 50 users will use Android mobiles with O.S 2.2(Froyo).My users
are having less knowledge on Android.So i want to restrict them not to
open Settings application because they accidentally or intensionally
change seetings that may cause loss of data or stop my app.
I need following Settings shuold not be changed

1)Time,Time zone always automatic(Network provider)
2)User should not clear my app data

Please tell me if u have any ideas.

Thanks and Regards
P.Ramkumar.

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

2012-01-20 Thread Dhaval Varia
thanx sir
On Jan 21, 2012 9:51 AM, "Kumar Bibek"  wrote:

> I am not sure about this, but I think it would work for you.
>
> When you press the Home button, there would be an Intent fired
> system-wide. So, you could write a receiver that tracks these particular
> kind of intent.
>
> Now, in the receiver, you could monitor the frequency of these intents. IF
> you could detect that the frequency is the same as you would want your app
> to be triggered, you can very well start a service or activity, or whatever.
>
>
> *Thanks and Regards,
> Kumar Bibek*
> *
> http://techdroid.kbeanie.com
> http://www.kbeanie.com*
>
>
>
> On Sat, Jan 21, 2012 at 9:34 AM, Dhaval Varia wrote:
>
>> i am going to make one emeergency alert app
>> As we know we dont have time to open app in emergency.
>> so it should fire on some hard key.
>> so plz suggeat alternet solution
>> thanx.
>> On Jan 21, 2012 9:25 AM, "Kumar Bibek"  wrote:
>>
>>> There would always be a few things which you cannot do.
>>>
>>> I don't understand how does this "No" affect the popularity of Android.
>>>
>>> Their could be other ways to solve your problem, that is, if you could
>>> mention exactly what you are trying to do.
>>>
>>> *Thanks and Regards,
>>> Kumar Bibek*
>>> *
>>> http://techdroid.kbeanie.com
>>> http://www.kbeanie.com*
>>>
>>>
>>>
>>> On Sat, Jan 21, 2012 at 9:21 AM, Dhaval Varia wrote:
>>>
 i m getting all the times answer no..
 then why android is this mch popular?
 On Jan 21, 2012 8:56 AM, "Kristopher Micinski" 
 wrote:

> Basically, no.
>
> To explain the basically: you can't do it.
>
> kris
>
> On Fri, Jan 20, 2012 at 10:19 PM, Dhaval Varia 
> wrote:
> > dear,
> >
> > is there any way to override home key?
> >
> > i want to start my app,by pressing home key for few times.
> > thanx
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to
> android-developers@googlegroups.com
> > To unsubscribe from this group, 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

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

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

2012-01-20 Thread Kumar Bibek
I am not sure about this, but I think it would work for you.

When you press the Home button, there would be an Intent fired system-wide.
So, you could write a receiver that tracks these particular kind of intent.

Now, in the receiver, you could monitor the frequency of these intents. IF
you could detect that the frequency is the same as you would want your app
to be triggered, you can very well start a service or activity, or whatever.


*Thanks and Regards,
Kumar Bibek*
*
http://techdroid.kbeanie.com
http://www.kbeanie.com*



On Sat, Jan 21, 2012 at 9:34 AM, Dhaval Varia wrote:

> i am going to make one emeergency alert app
> As we know we dont have time to open app in emergency.
> so it should fire on some hard key.
> so plz suggeat alternet solution
> thanx.
> On Jan 21, 2012 9:25 AM, "Kumar Bibek"  wrote:
>
>> There would always be a few things which you cannot do.
>>
>> I don't understand how does this "No" affect the popularity of Android.
>>
>> Their could be other ways to solve your problem, that is, if you could
>> mention exactly what you are trying to do.
>>
>> *Thanks and Regards,
>> Kumar Bibek*
>> *
>> http://techdroid.kbeanie.com
>> http://www.kbeanie.com*
>>
>>
>>
>> On Sat, Jan 21, 2012 at 9:21 AM, Dhaval Varia wrote:
>>
>>> i m getting all the times answer no..
>>> then why android is this mch popular?
>>> On Jan 21, 2012 8:56 AM, "Kristopher Micinski" 
>>> wrote:
>>>
 Basically, no.

 To explain the basically: you can't do it.

 kris

 On Fri, Jan 20, 2012 at 10:19 PM, Dhaval Varia 
 wrote:
 > dear,
 >
 > is there any way to override home key?
 >
 > i want to start my app,by pressing home key for few times.
 > thanx
 >
 > --
 > You received this message because you are subscribed to the Google
 > Groups "Android Developers" group.
 > To post to this group, send email to
 android-developers@googlegroups.com
 > To unsubscribe from this group, 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
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, 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
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] override home key

2012-01-20 Thread Dhaval Varia
i am going to make one emeergency alert app
As we know we dont have time to open app in emergency.
so it should fire on some hard key.
so plz suggeat alternet solution
thanx.
On Jan 21, 2012 9:25 AM, "Kumar Bibek"  wrote:

> There would always be a few things which you cannot do.
>
> I don't understand how does this "No" affect the popularity of Android.
>
> Their could be other ways to solve your problem, that is, if you could
> mention exactly what you are trying to do.
>
> *Thanks and Regards,
> Kumar Bibek*
> *
> http://techdroid.kbeanie.com
> http://www.kbeanie.com*
>
>
>
> On Sat, Jan 21, 2012 at 9:21 AM, Dhaval Varia wrote:
>
>> i m getting all the times answer no..
>> then why android is this mch popular?
>> On Jan 21, 2012 8:56 AM, "Kristopher Micinski" 
>> wrote:
>>
>>> Basically, no.
>>>
>>> To explain the basically: you can't do it.
>>>
>>> kris
>>>
>>> On Fri, Jan 20, 2012 at 10:19 PM, Dhaval Varia 
>>> wrote:
>>> > dear,
>>> >
>>> > is there any way to override home key?
>>> >
>>> > i want to start my app,by pressing home key for few times.
>>> > thanx
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> > Groups "Android Developers" group.
>>> > To post to this group, send email to
>>> android-developers@googlegroups.com
>>> > To unsubscribe from this group, 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
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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

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

2012-01-20 Thread Kumar Bibek
There would always be a few things which you cannot do.

I don't understand how does this "No" affect the popularity of Android.

Their could be other ways to solve your problem, that is, if you could
mention exactly what you are trying to do.

*Thanks and Regards,
Kumar Bibek*
*
http://techdroid.kbeanie.com
http://www.kbeanie.com*



On Sat, Jan 21, 2012 at 9:21 AM, Dhaval Varia wrote:

> i m getting all the times answer no..
> then why android is this mch popular?
> On Jan 21, 2012 8:56 AM, "Kristopher Micinski" 
> wrote:
>
>> Basically, no.
>>
>> To explain the basically: you can't do it.
>>
>> kris
>>
>> On Fri, Jan 20, 2012 at 10:19 PM, Dhaval Varia 
>> wrote:
>> > dear,
>> >
>> > is there any way to override home key?
>> >
>> > i want to start my app,by pressing home key for few times.
>> > thanx
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to
>> android-developers@googlegroups.com
>> > To unsubscribe from this group, 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
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] override home key

2012-01-20 Thread Kristopher Micinski
On Fri, Jan 20, 2012 at 10:51 PM, Dhaval Varia  wrote:
> i m getting all the times answer no..
> then why android is this mch popular?
>

In general, you should pretend like the "home" key doesn't exist.
Think of it as being a meta key, you don't use it to interact with
your app, the user uses it with their phone, and the platform dictates
how it behaves.

Typically people who want to do things they shouldn't lack a
fundamental understanding of the android way of doing things.  The
model is heavily sandboxed, you don't get full access to the entire
platform as you can on a windows machine, it just doesn't work like
that.  The *default* is to give you a restricted set of options, and
then you can request access to more options..

But in this case, you just shouldn't act like the home key is there..
In general being able to mess around with the home key would be
considered a violation.

kris

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

2012-01-20 Thread Dhaval Varia
i m getting all the times answer no..
then why android is this mch popular?
On Jan 21, 2012 8:56 AM, "Kristopher Micinski" 
wrote:

> Basically, no.
>
> To explain the basically: you can't do it.
>
> kris
>
> On Fri, Jan 20, 2012 at 10:19 PM, Dhaval Varia 
> wrote:
> > dear,
> >
> > is there any way to override home key?
> >
> > i want to start my app,by pressing home key for few times.
> > thanx
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, 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

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

2012-01-20 Thread Kristopher Micinski
Basically, no.

To explain the basically: you can't do it.

kris

On Fri, Jan 20, 2012 at 10:19 PM, Dhaval Varia  wrote:
> dear,
>
> is there any way to override home key?
>
> i want to start my app,by pressing home key for few times.
> thanx
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] override home key

2012-01-20 Thread Kumar Bibek
You cannot override, but you can make your app as one of the home
applications. In that case, whenever you press the home key, you will get
an option to choose one of the many home applications, one of which could
be yours.

Few times ? No.

*Thanks and Regards,
Kumar Bibek*
*
http://techdroid.kbeanie.com
http://www.kbeanie.com*



On Sat, Jan 21, 2012 at 8:49 AM, Dhaval Varia wrote:

> dear,
>
> is there any way to override home key?
>
> i want to start my app,by pressing home key for few times.
> thanx
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] override home key

2012-01-20 Thread Dhaval Varia
dear,

is there any way to override home key?

i want to start my app,by pressing home key for few times.
thanx

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

2012-01-20 Thread Brian Dols
I know, but I want to see warnings for other methods that are
deprecated so that I am aware of functionality that is broken or
discouraged in releases like ICS. It's an intensive process to go thru
every API call and find deprecated methods..
My app would have been always sending data in the background
regardless of whether it was allowed, apparently.

On Jan 20, 7:13 pm, Jonathan S  wrote:
> You can remove that method.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Supporting Galaxy Note Issues Due To It Displaying Itself as a LARGE screen layout.

2012-01-20 Thread jtoolsdev
I have a similar problem with one of my apps where I created a special 
version (same app different APK) for 10" Honeycomb tablets.  If a 7" 
Honeycomb tablet (1024x600) tries to run the app the screen will get 
cropped and if a 7" tablet with 1280x720 runs it the widgets will be 
difficult to use.   The layout for small, normal and large will work fine 
on 7" screens even with 1280x720 resolution.  So there needs to be a way to 
handle an overlap.  I agree this was all not thought out very well.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Supporting Galaxy Note Issues Due To It Displaying Itself as a LARGE screen layout.

2012-01-20 Thread Zsolt Vasvari
Don't be mistake, Galaxy Notes are popular...  There was an article on
Verge or one of the other sites about the # sold and, personally, I've
seen many Notes here in Singapore.



On Jan 20, 10:05 pm, Chris  wrote:
> Thanks
> I will just exclude , can't find any other stupid devices like the
> note.
> Kindle sales are in the 100's per day , not doing all that change for
> a few Galaxy Note's.
>
> It's a shame Google did not sort this mess out on an earlier release ,
> it's becoming a real pain
>
> On Jan 20, 1:45 pm, Mark Murphy  wrote:
>
>
>
> > On Fri, Jan 20, 2012 at 8:40 AM, Chris  wrote:
> > > I am having issues support the Galaxy Note
>
> > > My app runs on Android 2.1+ , so I can't use the DPI based screen
> > > differentiation , and the Galaxy note is 2.3.5 I believe.
>
> > > My app has a normal display size which works great for small/normal ,
> > > I also have a large display layout that has been working great for
> > > 7-10inch tablets like Xoom and Amazon Kindle Fire.
>
> > > However this Galaxy Note has thrown a spanner in the mix.
>
> > > It is displaying itself as a Large , but my display does not fit on
> > > the screen.
> > > The normal layout looks fine on it.
>
> > > Any ideas how I can make that device use the normal display ?
>
> > You can't. You need to create a -large set of resources that work well
> > on the Galaxy Note and Kindle Fire. The XOOM can use -xlarge
> > resources, if the revised -large ones do not work well on a 10"
> > screen.
>
> > > at the
> > > moment I am tempted to just exclude it from compatible devices - but
> > > if there is an elegant workaround it would be better !
>
> > Bear in mind that your issue is not strictly one tied to the Galaxy
> > Note. I would expect you to encounter similar problems on
> > similarly-sized devices.
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> > Android 4.0 Programming Books:http://commonsware.com/books- Hide quoted 
> > text -
>
> - Show quoted text -

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


[android-developers] Re: deprecated method warnings (ConnectivityManager.getBackgroundDataSetting)

2012-01-20 Thread Jonathan S
You can remove that method.

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

2012-01-20 Thread Jonathan S
https://developer.android.com/reference/android/net/ConnectivityManager.html#getBackgroundDataSetting%28%29

under Ice Cream Sandwhich, it always return true.

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

[android-developers] Http post and get

2012-01-20 Thread n3d!m
My application connects to website which requires username and password. 
After POST is done http GET cannot access next page after login.
After searching for solution I cam e to conclusion I need to send cookie 
with http POST.
Tried this 

DefaultHttpClient mHttpClient = new DefaultHttpClient();
BasicHttpContext mHttpContext = new BasicHttpContext();
CookieStore mCookieStore  = new BasicCookieStore();
mHttpContext.setAttribute(ClientContext.COOKIE_STORE, mCookieStore);

HttpResponse response = mHttpClient.execute(mRequest, mHttpContext);

But it doesnt work.
Other examples shows usage of
httpclient.getCookieStore().getCookies();

My problem is there is no method getCookieStore in http client.

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

[android-developers] deprecated method warnings (ConnectivityManager.getBackgroundDataSetting)

2012-01-20 Thread Brian Dols
I am having the same problem as detailed in this post:
http://stackoverflow.com/q/8430253/395195

Except for me, I was expecting a deprecation warning for
ConnectivityManager.getBackgroundDataSetting().

I have my Ecilpse settings for Java->Compiler->Error/Warnings-
>Deprecated and restricted API set to Error and not seeing any mention
of this.
My project is building with 4.0.3 and if I F3 into the source code, I
see the proper @Deprecated annotation.

Any ideas on how to fix this?

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


[android-developers] What is The Google Music App doing that the Netflix app is not?

2012-01-20 Thread milind
I have always experienced lag on all Android phones I have used -
right from the G1.  Dainne Hackborn's blogs recently suggested that
it's the app not Android.  Normally, I would have attributed it to
spin, but the Google Music app actually makes me believe that may
indeed be possible.

The Recent Tab in landscape mode is nothing short of amazing.  In
Portrait mode, it's a list view which is notoriously bad in almost
every app I have used including the contacts app.  You start scrolling
and it starts stuttering and pausing.  But even in the songs list view
with over 2000 songs, there is no stuttering in the Music app.  There
is still lag.  If you drag the scrollbar on the right and move it uo
and down, you can see the scrollbar chasing your finger.  But if you
look at the list, it's silky smooth.

In contrast, the Netflix app is extremely laggy.  And I'm not
referring to video playback.  That's a different issue.  I'm referring
to standard screens like the Browsing screen.  Both the horizontal and
vertical scrolling in the app is awful.  And I'm running it on the
Transformer Prime running ICS 4.0.3!

It would be nice if someone from Google, especially from the Google
Music team, were to write a blog post on how it achieved such great
performance so the rest of us can emulate that in our code.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Included javax JNDI Factory built successfully but can't be instantiated

2012-01-20 Thread EnNuages
I think I found the problem -- Android has bugs in it with Reflection
prior to version 2.3

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

I ported my QpidDroid project to Android 2.3 and it looks like JNDI is
successfully creating the InitialContext now with the QPID connection
params



On Jan 19, 11:44 am, EnNuages  wrote:
> Hi Android folks,
>
> I'm trying to port:  ApacheQpidClient, JMS and JNDI -- to Android.
> I'm able to get a successful compile/build of my QpidDroid project
> when running the ant debug install targets after passing Dalvik the --
> core-library parameter to allow javax packages for JMS/JNDI.  I'm
> hoping to do this before considering repackaging/refactoring javax
> classes into a different package namespace using jarjar.
>
> I think this is legally legit because I'm using the old/first seperate
> JNDI jar currently provided by Oracle's website.  I'm using the JMS
> jar that comes with Apache Geronimo inQpid,.. but I think it's also
> available from Oracle as a seperate download.  My dev environment uses
> Android platform 2.1 and jdk 1.6.
>
> The problem is, it seems it currently cannot instantiate my custom
> jndi connection factory: PropertiesFileInitialContextFactory.  This is
> a .java source file in my QpidDroid project(not a .class in a libs
> jar)   (I extracted the class out of the qpidClient jar).
>
> Would someone have any idea as to why it cannot be instantiated here?
> I was wondering if proguard might be breaking reflection,... but I'm
> building it with the debug ant task,.. so I'm thinking proguard
> shouldn't be running at all.  The exception occurs when I run the
> installed app on the emulator.  I have the ApacheQpidservice running
> on the same machine with the default port that it uses.
>
> 01-18 18:05:16.966: W/System.err(296): [Root exception is
> java.lang.ClassNotFoundException:
> org.apache.qpid.jndi.PropertiesFileInitialContextFactory]javax.naming.NoIni 
> tialContextException:
> Cannot instantiate class:
> org.apache.qpid.jndi.PropertiesFileInitialContextFactory
> 01-18 18:05:17.006: W/System.err(296):  at
> javax.naming.spi.NamingManager.getDefaultInitialContextFactory(NamingManage 
> r.java:
> 720)
> 01-18 18:05:17.006: W/System.err(296):  at
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:
> 768)
> 01-18 18:05:17.016: W/System.err(296):  at
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:169)
> 01-18 18:05:17.016: W/System.err(296):  at
> javax.naming.InitialContext.(InitialContext.java:146)
> 01-18 18:05:17.016: W/System.err(296):  at
> org.rif.QpidDroid.Hello.runTest(Hello.java:56)
>
> Thanks for any tips!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Included javax JNDI Factory built successfully but can't be instantiated

2012-01-20 Thread EnNuages

I think I found the problem -- Android has bugs in it with Reflection
prior to version 2.3

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

I ported my QpidDroid project to Android 2.3 and it looks like JNDI is
successfully creating the InitialContext now with the QPID connection
params



On Jan 19, 11:44 am, EnNuages  wrote:
> Hi Android folks,
>
> I'm trying to port:  Apache Qpid Client, JMS and JNDI -- to Android.
> I'm able to get a successful compile/build of my QpidDroid project
> when running the ant debug install targets after passing Dalvik the --
> core-library parameter to allow javax packages for JMS/JNDI.  I'm
> hoping to do this before considering repackaging/refactoring javax
> classes into a different package namespace using jarjar.
>
> I think this is legally legit because I'm using the old/first seperate
> JNDI jar currently provided by Oracle's website.  I'm using the JMS
> jar that comes with Apache Geronimo in Qpid,.. but I think it's also
> available from Oracle as a seperate download.  My dev environment uses
> Android platform 2.1 and jdk 1.6.
>
> The problem is, it seems it currently cannot instantiate my custom
> jndi connection factory: PropertiesFileInitialContextFactory.  This is
> a .java source file in my QpidDroid project(not a .class in a libs
> jar)   (I extracted the class out of the qpidClient jar).
>
> Would someone have any idea as to why it cannot be instantiated here?
> I was wondering if proguard might be breaking reflection,... but I'm
> building it with the debug ant task,.. so I'm thinking proguard
> shouldn't be running at all.  The exception occurs when I run the
> installed app on the emulator.  I have the Apache Qpid service running
> on the same machine with the default port that it uses.
>
> 01-18 18:05:16.966: W/System.err(296): [Root exception is
> java.lang.ClassNotFoundException:
> org.apache.qpid.jndi.PropertiesFileInitialContextFactory]javax.naming.NoIni 
> tialContextException:
> Cannot instantiate class:
> org.apache.qpid.jndi.PropertiesFileInitialContextFactory
> 01-18 18:05:17.006: W/System.err(296):  at
> javax.naming.spi.NamingManager.getDefaultInitialContextFactory(NamingManage 
> r.java:
> 720)
> 01-18 18:05:17.006: W/System.err(296):  at
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:
> 768)
> 01-18 18:05:17.016: W/System.err(296):  at
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:169)
> 01-18 18:05:17.016: W/System.err(296):  at
> javax.naming.InitialContext.(InitialContext.java:146)
> 01-18 18:05:17.016: W/System.err(296):  at
> org.rif.QpidDroid.Hello.runTest(Hello.java:56)
>
> Thanks for any tips!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 is onDoubleTap being called before second tup's up action?

2012-01-20 Thread Kostya Vasilyev
( will try responding at the bottom for a change )

21 января 2012 г. 2:38 пользователь skink  написал:

>
>
> Kostya Vasilyev wrote:
> > Have you tried using MotionEvent.ACTION_CANCEL in the double-tap
> listener?
> >
> > GestureDetector has code to reset its internal state in response to this:
> >
> >
> https://github.com/android/platform_frameworks_base/blob/master/core/java/android/view/GestureDetector.java#L594
> >
> > I'm thinking you'd need post a handler message to self to get out of the
> > current stack state when onDoubleTap is called, and then in response to
> > that message, use ACTION_CANCEL to reset the gesture listener and then
> > start the activity.
> >
> > -- Kostya
> >
>
> Kostya,
>
> do you mean that in onDoubleTap (MotionEvent e) listener I should
> modify "e" by:
>
> e.setAction(MotionEvent.ACTION_CANCEL)
>
> and then "feed" gesture detector with that modified event?
>

No, that won't get you out of the call chain that exists when your
onDoubleTap is called:

https://github.com/android/platform_frameworks_base/blob/master/core/java/android/view/GestureDetector.java#L488

There is code in GestureDetector's onTouchEvent after the call to
onDoubleTap, and replacing the event's action will do nothing to skip it.
The switch at line 468 won't go back to be re-evaluated, etc.



>
> but if it cancels internal state of detector why to use a Handler?
>

To return from your onDoubleTap listener to the gesture detector's
onTouchEvent, let it execute the rest of its code, and only then send the
cancel event to reset its state.


>
> btw I already tried in  onDoubleTap to post Runnable that starts
> activity and it worked well but I decided it's dirty workaround -
> that's why I used onDoubleTapEvent
>

That's pretty similar to what I was suggesting, and also unwinds the call
chain from the double-tap listener call.

Perhaps the framework sends a cancel event in this case -- or perhaps your
letting go after the double tap has time to register.

I'd do a test to find out, keeping the finger down after the double-tap's
second touch.

If the gesture detector still works Ok after returning back to this
activity (like your original email mentioned), good.

If it doesn't, it would mean that you were just getting lucky with the
timing of the second up event, and that sending a cancel is still necessary.

Hope this makes sense.

-- Kostya


>
> pskink
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] why is onDoubleTap being called before second tup's up action?

2012-01-20 Thread skink


Kostya Vasilyev wrote:
> Have you tried using MotionEvent.ACTION_CANCEL in the double-tap listener?
>
> GestureDetector has code to reset its internal state in response to this:
>
> https://github.com/android/platform_frameworks_base/blob/master/core/java/android/view/GestureDetector.java#L594
>
> I'm thinking you'd need post a handler message to self to get out of the
> current stack state when onDoubleTap is called, and then in response to
> that message, use ACTION_CANCEL to reset the gesture listener and then
> start the activity.
>
> -- Kostya
>

Kostya,

do you mean that in onDoubleTap (MotionEvent e) listener I should
modify "e" by:

e.setAction(MotionEvent.ACTION_CANCEL)

and then "feed" gesture detector with that modified event?

but if it cancels internal state of detector why to use a Handler?

btw I already tried in  onDoubleTap to post Runnable that starts
activity and it worked well but I decided it's dirty workaround -
that's why I used onDoubleTapEvent

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Avoid android taking screenshot/snapshot of activity while going in background

2012-01-20 Thread Johan Appelgren
Did you try using the FLAG_SECURE flag? 

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


[android-developers] Possible race condition whlie installing an application

2012-01-20 Thread Kostya Vasilyev
I just got an interesting exception on my Galaxy Nexus while doing the
usual change-compile-debug cycle with Eclipse:

01-21 02:19:03.340 E/AndroidRuntime(  667): FATAL EXCEPTION: main
01-21 02:19:03.340 E/AndroidRuntime(  667): java.lang.RuntimeException:
Unable to instantiate application
org.kman.AquaMail.core.AquaMailApplication: java.lang.NullPointerException
01-21 02:19:03.340 E/AndroidRuntime(  667): at
android.app.LoadedApk.makeApplication(LoadedApk.java:482)
01-21 02:19:03.340 E/AndroidRuntime(  667): at
android.app.ActivityThread.handleBindApplication(ActivityThread.java:3909)
01-21 02:19:03.340 E/AndroidRuntime(  667): at
android.app.ActivityThread.access$1300(ActivityThread.java:122)
01-21 02:19:03.340 E/AndroidRuntime(  667): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1184)
01-21 02:19:03.340 E/AndroidRuntime(  667): at
android.os.Handler.dispatchMessage(Handler.java:99)
01-21 02:19:03.340 E/AndroidRuntime(  667): at
android.os.Looper.loop(Looper.java:137)
01-21 02:19:03.340 E/AndroidRuntime(  667): at
android.app.ActivityThread.main(ActivityThread.java:4340)
01-21 02:19:03.340 E/AndroidRuntime(  667): at
java.lang.reflect.Method.invokeNative(Native Method)
01-21 02:19:03.340 E/AndroidRuntime(  667): at
java.lang.reflect.Method.invoke(Method.java:511)
01-21 02:19:03.340 E/AndroidRuntime(  667): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
01-21 02:19:03.340 E/AndroidRuntime(  667): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
01-21 02:19:03.340 E/AndroidRuntime(  667): at
dalvik.system.NativeStart.main(Native Method)
01-21 02:19:03.340 E/AndroidRuntime(  667): Caused by:
java.lang.NullPointerException
01-21 02:19:03.340 E/AndroidRuntime(  667): at
android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:362)
01-21 02:19:03.340 E/AndroidRuntime(  667): at
android.app.LoadedApk.getClassLoader(LoadedApk.java:305)
01-21 02:19:03.340 E/AndroidRuntime(  667): at
android.app.LoadedApk.makeApplication(LoadedApk.java:474)
01-21 02:19:03.340 E/AndroidRuntime(  667): ... 11 more

The app was on the screen, and then, while it was being reinstalled after a
source change, I briefly saw the "app stopped unexpectedly" dialog flash on
the screen, and the above appeared in the logcat.

Occasionally my Market console or users report weird errors which go away
after reinstalling the same .apk, and I remember others sharing similar
experiences on this list as well.

The exception above may be related - it seems that Andorid tried to do
something with the application while the .apk was being installed.

I've never seen this before, but thread race bugs -- if that's what's
behind this -- happen much more frequently on multicore hardware. They can
still happen on single-core systems, although less frequently - which may
explain corrupted applications when you get above a certain number of
installations.

This is the line that crashed:

https://github.com/android/platform_frameworks_base/blob/master/core/java/android/app/LoadedApk.java#L362

... implying that pm.getPackageInfo() for the application's package
returned null.

Anyone else seen this?

Any thoughts on investigating this further?

Thanks,
-- Kostya

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

Re: [android-developers] why is onDoubleTap being called before second tup's up action?

2012-01-20 Thread Kostya Vasilyev
Have you tried using MotionEvent.ACTION_CANCEL in the double-tap listener?

GestureDetector has code to reset its internal state in response to this:

https://github.com/android/platform_frameworks_base/blob/master/core/java/android/view/GestureDetector.java#L594

I'm thinking you'd need post a handler message to self to get out of the
current stack state when onDoubleTap is called, and then in response to
that message, use ACTION_CANCEL to reset the gesture listener and then
start the activity.

-- Kostya

20 января 2012 г. 17:37 пользователь skink  написал:

> hi,
>
> i'm using GestureDetector to detect double tup actions and having a
> little problem when trying to startActivity() inside onDoubleTap
> listener.
>
> namely i have observed when onDoubleTap is empty i see the following:
>
> D/GestureActivity(  987): onTouchEvent action=0
> D/GestureActivity(  987): onTouchEvent action=1
> D/GestureActivity(  987): onTouchEvent action=0
> D/GestureActivity(  987): onDoubleTap
> D/GestureActivity(  987): onTouchEvent action=1
>
> here action == 0 for ACTION_DOWN, while action == 1 for ACTION_UP
>
> as you can see onDoubleTap is being called after second tups's
> ACTION_DOWN and before its ACTION_UP, strange but OK
>
> but when i call startActivity() in onDoubleTap listener i see:
>
> D/GestureActivity( 1019): onTouchEvent action=0
> D/GestureActivity( 1019): onTouchEvent action=1
> D/GestureActivity( 1019): onTouchEvent action=0
> D/GestureActivity( 1019): onDoubleTap
> D/GestureActivity( 1019): onPause
>
> as you can see there is missing second ACTION_UP (i think it's because
> my main activity is paused and doesn't handle touch events) and when i
> return back to my main activity GestureDetector is somehow mislead and
> behaves a bit strange
>
> in the end i used onDoubleTapEvent (instead of onDoubleTap) like this:
> public boolean onDoubleTapEvent(MotionEvent e) {
>if (e.getAction() == MotionEvent.ACTION_UP) {
>// start activity here
>}
> }
>
> and it works OK but i'm still not sure if it's a good solution
>
> any ideas how to use onDoubleTap in my scenario?
>
> pskink
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Re: Partial invalidation in custom Android view with hardware acceleration

2012-01-20 Thread Romain Guy
> The reason for this is one of the things I'm drawing in the View are lines
> (potentially lots of them), and hardware acceleration does not support AA
> for drawing lines.

It does as of API level 12 (Android 3.2.) I would recommend you switch
to using hardware AA lines if possible (all devices that shipped with
API level 11 should have now be upgraded to 12.) Make sure to use
drawLines() as well to batch the geometry.

> So, I draw everything to a Bitmap cache and simply update
> a section of the Bitmap cache when the View's data is updated, then I call
> invalidate(Rect) hoping to only update the View's Canvas with that portion
> of the Bitmap cache that was updated. But I end up redrawing the entire
> Canvas every time. This ends up being a lot slower than doing the same
> technique without hardware acceleration enabled.

Since you are doing your own buffering I would recommend you keep
track of the dirty region yourself. Note that you could instead set
your View's layer type to be LAYER_TYPE_SOFTWARE. If you do so, the
View will be drawn into a Bitmap for you *and* the clip rect in
onDraw() will be the same as when you call invalidate(Rect).

Note however that the rendering engine will have to upload the entire
bitmap as a texture which can be expensive.

-- 
Romain Guy
Android framework engineer
romain...@android.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: ICS Recent apps thumbnails

2012-01-20 Thread Kostya Vasilyev
This does it:

Window win = getWindow();
win.addFlags(WindowManager.LayoutParams.FLAG_SECURE);

-- K

21 января 2012 г. 1:33 пользователь tegbird  написал:

> Hi Daz,
> I am facing the same problem. Did you find any solution. It would be
> great help if you can provide any guidance.
> Thanks in advance.
> Tegbir
>
> On Dec 17 2011, 10:55 am, Daz  wrote:
> > Hi Diane,
> >
> > Sorry I should have been more specific but this was my 3rd attempt at
> > asking the question, the previous 2 not making it past the "New member
> > moderation". I didn't want to waste too much time as I was unsure the
> post
> > would appear.
> >
> > Basically it is exactly as Zsolt says. My app should not have its
> contents
> > visible unless a valid password has been entered. I understand that
> > physical access to the phone is required to see the thumbnails but the
> fact
> > is that the data should not be accessible outside the app at all.
> >
> > As a user as well as a dev, I may pass my phone to another person to
> show a
> > photo, web page etc and tablets in my household tend to be partly
> communal
> > for looking up web sites etc. At present I have to ensure that the app
> has
> > been "swiped away" from the recent apps list before I allow anybody else
> > access.
> >
> > So back to the original question. Is there a way to prevent the screen
> grab
> > or at the very least, an override I can use to hide the sensitive data
> > manually before the screen grab is taken?
> >
> > Thanks for any help anybody can give.
> >
> > Daz
> >
> > p.s After my first post I am now being spammed. "We saw your post on
> google
> > groups, would you like to ."  Any tips to prevent 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
>

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

2012-01-20 Thread Lester Quintero
Hi,

It's a Content Provider that use SQLite Database.

I want pass data of one table to another with  Insert-Select sintax
and/or check that data not exist in second table.

I Found that SQLite permit sintax:

Insert into Table(t1, t2)
Select tx, ty
>From Table  --To insert select from one table to another

OR

Insert into Table(t1, t2)
Select tx, ty  WHERE NOT EXISTS ... --To Check if data exist or not

I thought that through the Content Provider could emulate this syntax

thanks.


On 20 ene, 12:59, "A. Elk"  wrote:
> Are you talking about a content provider or an SQLite database? They aren't
> equivalent. A content provider *may* use an SQLite database as its database
> repository, but it doesn't have to, and you can't assume that it does.
>
> *If it's a content provider:*
>
> You can do an insert followed by a query. Generally, it has to be done in
> two separate method calls:
>
> ContentResolver.insert();
> ContentResolver.query();
>
> One row can be inserted per insert().
>
> You can also do a "transaction" using ContentProviderOperation objects and
> then ContentResolver.applyBatch();
>
> *If it's an SQLite database:*
>
> You can do anything you can do in SQLite itself, using the classes in
> android.database.SQLite. Remember, though, that in general you *can't* use
> SQLite classes against a content provider (in general).
>
> *In addition:*
> *
> *
> If this doesn't answer your question, you might try to explain your use
> case rather than simply asking if SQLite operations translate to Android.

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


[android-developers] Re: Avoid android taking screenshot/snapshot of activity while going in background

2012-01-20 Thread tegbird
it captures the last shown screen of my app, when another app comes to
foreground or home key is pressed. The captured screenshot is visible
on task-switcher button.

On Jan 20, 12:37 pm, Harri Smått  wrote:
> On Jan 20, 2012, at 1:25 PM, tegbird wrote:
>
> > If you press the task-switcher button, you
> > can see the snapshot of your app.
>
> Does this happen also if you jump to another task, and press task-switcher 
> button from that other task again? Is your application still available there?
>
> --
> Harri

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

2012-01-20 Thread Kristopher Micinski
On Fri, Jan 20, 2012 at 4:40 PM, Ab Caballero  wrote:
> I only need to move files from the device to the cloud so that they
> can be analyzed. However, I need a mechanism to determine which files
> from the device to sync with the cloud, i.e., i do not wish to use
> bandwidth moving files to the cloud that are already there. I also
> need this to be a scheduled job, not something initiated by the user.
>

Nothing in that description dictates the use of a content provider...,
perhaps an alarm manager instead.

kris

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

2012-01-20 Thread Ab Caballero
I only need to move files from the device to the cloud so that they
can be analyzed. However, I need a mechanism to determine which files
from the device to sync with the cloud, i.e., i do not wish to use
bandwidth moving files to the cloud that are already there. I also
need this to be a scheduled job, not something initiated by the user.


On Jan 19, 2:32 pm, "A. Elk"  wrote:
> A sync adapter doesn't automatically communicate data to and from the
> cloud. It's more of a convenience class that scopes out the methods you'll
> need to implement in order to *synchronize* data linked to a particular
> user account, and do it on a regular schedule. In that way, a sync adapter
> ties into the synchronization infrastructure that's part of the OS.
>
> The documentation uses content providers because the primary use case for a
> sync adapter is communicating data from a cloud service to and from a
> central repository of data on the device. The easiest way to manage such a
> repository is a content provider, but it's not mandatory.
>
> From what you've said, you want to move the files from the device to the
> cloud. Do you want to move files from the cloud to the device, such that
> you can force the cloud and the device to have the same versions?
> Synchronization is not just moving files back and forth; it's *intelligent* 
> movement
> that guarantees that two places have the same data. If you need that, then
> you need synchronization. Of course, even if you're *not* synchronizing,
> you need some sort of network transport, but if you're just sending files
> to the cloud then you don't need a sync adapter.
>
> The Android sync adapter framework assumes that sending data to the cloud
> requires authentication and authorization, which is reasonable for
> real-world use cases. The sync adapter is associated with a user account,
> so the user doesn't have to enter credentials every time a sync occurs. The
> rest of the work is having the sync adapter figure out what needs to be
> updated on the device, and then what needs to be updated on the cloud. Even
> if you're using files, it's easier to track the device state within a
> content provider. You can write a content provider that tracks metadata in
> tables but also has URI links to files you have stored 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: Partial invalidation in custom Android view with hardware acceleration

2012-01-20 Thread Andrew Hughes
Ah. Okay. I understand this more and more every time I read a post by you
or re-watch the Android Accelerated Rending talk from last year's I/O.

So what if I'm drawing a Bitmap to the Canvas in that View's onDraw, rather
than making canvas drawing calls?

The reason for this is one of the things I'm drawing in the View are lines
(potentially lots of them), and hardware acceleration does not support AA
for drawing lines. So, I draw everything to a Bitmap cache and simply
update a section of the Bitmap cache when the View's data is updated, then
I call invalidate(Rect) hoping to only update the View's Canvas with that
portion of the Bitmap cache that was updated. But I end up redrawing the
entire Canvas every time. This ends up being a lot slower than doing the
same technique without hardware acceleration enabled.

Is there a way I can use hardware acceleration so I can take advantage of
the rendering framework and not have overlapping or parent/child View's
invalidated as well, while still only invalidating and updating part of my
View using a Bitmap cache?

(Please let me know if there's still something I'm not understanding
correctly).

Thanks,
Andrew

On Fri, Jan 20, 2012 at 1:11 PM, Romain Guy  wrote:

> > I would expect (though my expectation could very well be wrong :P) that
> when
> > I call invalidate(Rect) on a hardware accelerated View, that onDraw()
> would
> > get called on that view with the Canvas clip set to the Rect provided in
> > invalidate(Rect) and that only that portion of the Canvas would need to
> be
> > updated.
>
> onDraw() will get called but you won't get the Rect you've provided in
> invalidate(Rect). What will happen however is that the rendering
> pipeline will only execute the drawing instructions that intersect
> with the Rect you've supplied with your invalidate call. When onDraw()
> is executed, your drawing calls are only recorded for later use. At
> playback time they can be ignored.
>
> > What I am experiencing is that I call invalidate(Rect) on a hardware
> > accelerated View and that onDraw() is called with a Canvas containing no
> > clip and the Canvas is blank, so I need to redraw the entire Canvas.
>
> There is no such concept as "blank Canvas." The clip will indeed be
> set to be the entire View (to properly rebuild its display list.)
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.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

[android-developers] Re: ICS Recent apps thumbnails

2012-01-20 Thread tegbird
Hi Daz,
I am facing the same problem. Did you find any solution. It would be
great help if you can provide any guidance.
Thanks in advance.
Tegbir

On Dec 17 2011, 10:55 am, Daz  wrote:
> Hi Diane,
>
> Sorry I should have been more specific but this was my 3rd attempt at
> asking the question, the previous 2 not making it past the "New member
> moderation". I didn't want to waste too much time as I was unsure the post
> would appear.
>
> Basically it is exactly as Zsolt says. My app should not have its contents
> visible unless a valid password has been entered. I understand that
> physical access to the phone is required to see the thumbnails but the fact
> is that the data should not be accessible outside the app at all.
>
> As a user as well as a dev, I may pass my phone to another person to show a
> photo, web page etc and tablets in my household tend to be partly communal
> for looking up web sites etc. At present I have to ensure that the app has
> been "swiped away" from the recent apps list before I allow anybody else
> access.
>
> So back to the original question. Is there a way to prevent the screen grab
> or at the very least, an override I can use to hide the sensitive data
> manually before the screen grab is taken?
>
> Thanks for any help anybody can give.
>
> Daz
>
> p.s After my first post I am now being spammed. "We saw your post on google
> groups, would you like to ."  Any tips to prevent 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] Re: Partial invalidation in custom Android view with hardware acceleration

2012-01-20 Thread Romain Guy
> I would expect (though my expectation could very well be wrong :P) that when
> I call invalidate(Rect) on a hardware accelerated View, that onDraw() would
> get called on that view with the Canvas clip set to the Rect provided in
> invalidate(Rect) and that only that portion of the Canvas would need to be
> updated.

onDraw() will get called but you won't get the Rect you've provided in
invalidate(Rect). What will happen however is that the rendering
pipeline will only execute the drawing instructions that intersect
with the Rect you've supplied with your invalidate call. When onDraw()
is executed, your drawing calls are only recorded for later use. At
playback time they can be ignored.

> What I am experiencing is that I call invalidate(Rect) on a hardware
> accelerated View and that onDraw() is called with a Canvas containing no
> clip and the Canvas is blank, so I need to redraw the entire Canvas.

There is no such concept as "blank Canvas." The clip will indeed be
set to be the entire View (to properly rebuild its display list.)

-- 
Romain Guy
Android framework engineer
romain...@android.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: Partial invalidation in custom Android view with hardware acceleration

2012-01-20 Thread Andrew Hughes
Sorry, I'm not following what you are saying.

I would expect (though my expectation could very well be wrong :P) that
when I call invalidate(Rect) on a hardware accelerated View, that onDraw()
would get called on that view with the Canvas clip set to the Rect provided
in invalidate(Rect) and that only that portion of the Canvas would need to
be updated.

What I am experiencing is that I call invalidate(Rect) on a hardware
accelerated View and that onDraw() is called with a Canvas containing no
clip and the Canvas is blank, so I need to redraw the entire Canvas.

Is there something I am misunderstanding?

Thanks,
Andrew

On Fri, Jan 20, 2012 at 12:55 PM, Romain Guy  wrote:

> invalidate(Rect) works just fine with hardware acceleration. What it
> does not do (and what it was never documented to do) is force parents
> of the invalidated View to re-executed their draw() method.
>
> On Fri, Jan 20, 2012 at 12:51 PM, ashughes  wrote:
> > Matt,
> >
> > I just posted a comment on your post at stackoverflow
> > (http://stackoverflow.com/q/7233830/287575) about this (unfortunately
> not
> > with the answer).
> >
> > I was wondering if you or anyone else has figured out the answer to your
> > question?
> >
> > I have been unable to find any information from the Android team or
> anywhere
> > else describing why invalidate(Rect) does not work with HW acceleration.
> If
> > it just inherently won't work because of how HW acceleration is
> implemented,
> > it would be nice to know why. If it will work, it would be really
> helpful to
> > know how to do it!
> >
> > Because of this, my current application actually performs better without
> HW
> > acceleration than with HW acceleration because I don't have to redraw the
> > screen every time. However, enabling HW acceleration prevents child and
> > overlapping views from being invalidated who haven't changed because of
> the
> > new DisplayList drawing framework. I would really like to benefit from
> both
> > not having to redraw things that haven't changed (via DisplayList by
> > enabling HW accel) and be able to only redraw parts of things that have
> > changed (via invalidate(Rect)).
> >
> > Thanks,
> > Andrew
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/android-developers?hl=en
>
>
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Re: Partial invalidation in custom Android view with hardware acceleration

2012-01-20 Thread Romain Guy
invalidate(Rect) works just fine with hardware acceleration. What it
does not do (and what it was never documented to do) is force parents
of the invalidated View to re-executed their draw() method.

On Fri, Jan 20, 2012 at 12:51 PM, ashughes  wrote:
> Matt,
>
> I just posted a comment on your post at stackoverflow
> (http://stackoverflow.com/q/7233830/287575) about this (unfortunately not
> with the answer).
>
> I was wondering if you or anyone else has figured out the answer to your
> question?
>
> I have been unable to find any information from the Android team or anywhere
> else describing why invalidate(Rect) does not work with HW acceleration. If
> it just inherently won't work because of how HW acceleration is implemented,
> it would be nice to know why. If it will work, it would be really helpful to
> know how to do it!
>
> Because of this, my current application actually performs better without HW
> acceleration than with HW acceleration because I don't have to redraw the
> screen every time. However, enabling HW acceleration prevents child and
> overlapping views from being invalidated who haven't changed because of the
> new DisplayList drawing framework. I would really like to benefit from both
> not having to redraw things that haven't changed (via DisplayList by
> enabling HW accel) and be able to only redraw parts of things that have
> changed (via invalidate(Rect)).
>
> Thanks,
> Andrew
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Romain Guy
Android framework engineer
romain...@android.com

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

2012-01-20 Thread ashughes
Matt,

I just posted a comment on your post at stackoverflow (
http://stackoverflow.com/q/7233830/287575) about this (unfortunately not 
with the answer).

I was wondering if you or anyone else has figured out the answer to your 
question?

I have been unable to find any information from the Android team or 
anywhere else describing why invalidate(Rect) does not work with HW 
acceleration. If it just inherently won't work because of how HW 
acceleration is implemented, it would be nice to know why. If it will work, 
it would be really helpful to know how to do it!

Because of this, my current application actually performs better without HW 
acceleration than with HW acceleration because I don't have to redraw the 
screen every time. However, enabling HW acceleration prevents child and 
overlapping views from being invalidated who haven't changed because of the 
new DisplayList drawing framework. I would really like to benefit from both 
not having to redraw things that haven't changed (via DisplayList by 
enabling HW accel) and be able to only redraw parts of things that have 
changed (via invalidate(Rect)).

Thanks,
Andrew

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

[android-developers] Adding custom enum states to an ImageButton

2012-01-20 Thread Nick
I have searched around and I found good examples on adding custom
boolean states to a drawable but I am having issues adding a state
that is a list of enums.  I am sure most of my problems lie within the
onCreateDrawableState call so I have a few questions.

1) Is the extraSpace param to onCreateDrawableState the number of
additional int[] that I would like to add or the size of the int[]? So
since I am just adding MODE I should just be increasing extraSpace by
1 and not by MODE.length?
2) I don't quite understand the mergeDrawableStates method.  If I put
it in an IF statement I am getting what I expect, but I think I am
just getting lucky.  I don't feel my IF check is correct.  My initial
assumption was that I don't do a check and always call
mergeDrawableStates but then the drawable never changes.  I have seen
where if the extra state is a boolean then the if statement checks for
that.  I don't quite know what to do about an enum.
3) When I do get it working, my ic_button_a is drawn correctly.
However every time when ic_button_c is getting drawn, ic_button_c is
resized and stretch to fit the View which includes a background
graphic that is larger than ic_button_c.  ic_button_a and ic_button_a
are the same size.

I have my custom view:


which extends ImageButton.:
public class CustomView extends ImageButton {

private static final int[] MODE = {R.attr.mode};
private int mMode = 1;

@Override
public int[] onCreateDrawableState(int extraSpace) {
final int[] drawableState =
super.onCreateDrawableState(extraSpace + 1);
if (mMode != 0) {
mergeDrawableStates(drawableState, MODE);
}
return drawableState;
}

public void setMode(int mode) {
mMode = mode;
refreshDrawableState();
}
}

I am defining my modes here:















My @drawable/ic_button is:
http://schemas.android.com/apk/res/android";
xmlns:app="http://schemas.android.com/apk/res/com.pkg";>





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

2012-01-20 Thread Kostya Vasilyev
If you really wanted to use a for-each loop, you could do it like this
(among other ways):

for (int value : Arrays.asList(1, 2, 3, 4, 5)) {
 }

Substituting the actual values for the 1, 2, 3...

20 января 2012 г. 20:05 пользователь Kristopher Micinski <
krismicin...@gmail.com> написал:

> What do you mean, how?  You just pick the constants out of the class,
> one by one.
>
> int a = MediaRecorder.AudioSource.CAMCORDER;
> int b = ...
> ...
>
> This is a very simple question, you might want to read up on Java
> quite a bit more if you wanted to use an array and for to get these
> values..
>
> kris
>
> On Fri, Jan 20, 2012 at 10:56 AM, Giuseppe Porcelli- FINM
>  wrote:
> > Ok , how?
> >
> > -Messaggio originale-
> > Da: android-developers@googlegroups.com
> > [mailto:android-developers@googlegroups.com] Per conto di Kristopher
> > Micinski
> > Inviato: venerdì 20 gennaio 2012 16:51
> > A: android-developers@googlegroups.com
> > Oggetto: Re: [android-developers] How to iterate Class
> >
> > Still doesn't make any sense...  You know the elements you want out of
> the
> > class, so just get them, don't write it in some strange hacky way just to
> > use a for, if you want the values, this has nothing to do with an
> adapter.
> >
> > (Theoretically you could use reflection here, but using an array and for
> is
> > a really bad design vs just taking the values.)
> >
> > kris
> >
> > On Fri, Jan 20, 2012 at 1:12 AM, Giuseppe Porcelli
> >  wrote:
> >> Want to do a for to create a string array to use with an arrayadaptarer.
> >>
> >> Giuseppe Porcelli
> >>
> >> Il giorno 20/gen/2012, alle ore 01:41, Kristopher Micinski
> >  ha scritto:
> >>
> >>> What?  Why would you do it inside of a for each?
> >>>
> >>> Mark already answered this, but this question sounds very confused...
> >>>
> >>> Don't use a for, just read the values..
> >>>
> >>> kris
> >>>
> >>> On Thu, Jan 19, 2012 at 6:38 AM, Giuseppe  >
> > wrote:
>  I need to get the  MediaRecorder.AudioSource constants list, es.
> 
>  CAMCORDER
>  DEFAULT
>  MIC
>  VOICE_CALL
>  VOICE_COMMUNICATION
>  VOICE_DOWNLINK
>  VOICE_RECOGNITION
>  DEFAULT
>  VOICE_UPLINK
> 
>  and their INT value.
> 
>  How to do it inside a for each?
> 
>  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
> >>>
> >>> --
> >>> You received this message because you are subscribed to the Google
> >>> Groups "Android Developers" group.
> >>> To post to this group, send email to
> >>> android-developers@googlegroups.com
> >>> To unsubscribe from this group, 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
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, 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
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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-de

Re: [android-developers] FragmentTransaction commitAllowingStateLoss problem

2012-01-20 Thread Mark Murphy
On Fri, Jan 20, 2012 at 2:01 PM, Nick Parker  wrote:
> I am invoking the context menu selection from the ListFragment, which is the
> first fragment, not the new'ed up fragment.  On the selection of the menu
> item from the context menu I want to perform the fragment transaction, which
> is failing following the screen rotation.  Any ideas why the call to
> getActivity() would fail at that point, the lifecycle should have completed
> at that point, correct?  Thanks.

Beats me, based on the descriptions in this thread. If you create a
sample project that demonstrates the issue, post it somewhere and I'll
take a peek at it. Or, if you try creating a sample project and can't
reproduce the problem, that'll help you narrow down where the
differences between the two projects are.

Unfortunately, I don't have a ListFragment-with-context-menu sample in
my stable, otherwise I'd point you to it.

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

Android 4.0 Programming 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] FragmentTransaction commitAllowingStateLoss problem

2012-01-20 Thread Nick Parker
Hi Mark, 

I am invoking the context menu selection from the ListFragment, which is the 
first fragment, not the new'ed up fragment.  On the selection of the menu item 
from the context menu I want to perform the fragment transaction, which is 
failing following the screen rotation.  Any ideas why the call to getActivity() 
would fail at that point, the lifecycle should have completed at that point, 
correct?  Thanks. 


Nick Parker


On Friday, January 20, 2012 at 12:24 PM, Mark Murphy wrote:

> On Fri, Jan 20, 2012 at 12:11 PM, Nick Parker  (mailto:npar...@zetetic.net)> wrote:
> > I am using setRetainInstance(true) with all of the Fragments.
> 
> 
> OK, I'm perhaps barking up the wrong tree then.
> 
> > I am actually
> > new'ing up the detail fragment on the invocation of the
> > onContextItemSelected() so there is no old reference hanging around.
> > 
> 
> 
> Yup, that tree's looking mighty sad.
> 
> > After
> > looking a bit further, I am starting to wonder if it has something to do
> > with the context menu.  I am able to perform a separate Fragment Transaction
> > replace operation during screen rotations triggered from the onListItemClick
> > without issue.  Following screen rotation, I logged the getActivity() call
> > in onCreateContextMenu which is still valid, but the onContextItemSelected
> > shows getActivity() returning null.  Any thoughts as to why that might be?
> > 
> 
> 
> On which fragment is getActivity() returning null? The ListFragment(?)
> on which you have the context menu, or the newly instantiated one? If
> it's the newly-instantiated one, that's not especially surprising, as
> it will not go through any of its lifecycle methods until the
> FragmentTransaction gets commit()'d and processing begins on it
> shortly thereafter.
> 
> -- 
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
> 
> Android 4.0 Programming 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 
> (mailto:android-developers@googlegroups.com)
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com 
> (mailto: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] projects ideas for degree project

2012-01-20 Thread Kristopher Micinski
This question is pretty broad, and probably not that appropriate for
this forum.  It's somewhat akin to someone asking: "what app should I
write next."  This list is mostly for technical aspects of the Android
SDK.

That being said, since you posted here, it's understandable that you
probably want topics that influence the Android ecosystem.  This can
be a huge range of things, and you don't really specify.  What kind of
a student are you?  What year are you?  What is your degree in?  What
level of programming experience do you have?  Remember that education
systems differ vastly across countries, so you'll have to be specific.
 Along with that, you'd probably want to include some rough
approximation of the expectations set forth for your project (is it
supposed to be a super intensive program designed to run for six
months and test a culmination of your programming abilities and
engineering, for example?)

Along with that, if you're developing, you might want to pick a topic
based on what you've studied before, there are lots of *hot* fields
these days.  You might be in any of:
  security -- study security in Android apps and what the permissions
model does well and badly, compare and contrast with apple and windows
  HCI -- study user interfaces in apps, and how they can be made better?
  PLDI -- study how vm perf has changed over the years and how the jit
on dalvik works
  Graphics -- a graphics engine for android apps, or a demonstration
of the capabilities of the rendering and differences between devices,
perhaps..

these are obviously just rough starting points, you'll have to choose
for yourself..

kris

On Fri, Jan 20, 2012 at 1:12 PM, bint-e -hava  wrote:
> hi
>
> can any one suggest ideas for degree final project its may not be big and
> new but accept able as final project .
> help would be highly appreciated
> thanks
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2012-01-20 Thread TreKing
On Fri, Jan 20, 2012 at 12:12 PM, bint-e -hava wrote:

> can any one suggest ideas for degree final project its may not be big and
> new but accept able as final project .
> help would be highly appreciated
>

Make an app that will monitor this list and automatically filter out and
delete posts that have the words "urgent", "plz", or "pls" anywhere.

-
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: projects ideas for degree project

2012-01-20 Thread Ubiracy Santos
Develop some application for children learning...

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

2012-01-20 Thread Ubiracy Santos
In my OnCreate Method i need to create four buttons for example, but will 
be dynamically creations.  but this does not work =/

> Button botao = new Button(LinearLayoutActivity.this);
>
> botao.setText("Clique");
>
> 
>
> botao.setOnClickListener(new OnClickListener() {
>
>  @Override
>
> public void onClick(View v) {
>
> Toast.makeText(LinearLayoutActivity.this, "Clicado", 
>> Toast.LENGTH_LONG).show();
>
> }
>
> });
>
> 
>
> setContentView(R.layout.main);   
>
> 
>
> LinearLayout mainLayout = (LinearLayout)findViewById(R.id.layout1);
>
> for (int i = 0; i < 4; i++) {
>
>  mainLayout.addView(botao);
>
> }
>
>

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

2012-01-20 Thread Mark Murphy
On Fri, Jan 20, 2012 at 12:11 PM, Nick Parker  wrote:
> I am using setRetainInstance(true) with all of the Fragments.

OK, I'm perhaps barking up the wrong tree then.

> I am actually
> new'ing up the detail fragment on the invocation of the
> onContextItemSelected() so there is no old reference hanging around.

Yup, that tree's looking mighty sad.

> After
> looking a bit further, I am starting to wonder if it has something to do
> with the context menu.  I am able to perform a separate Fragment Transaction
> replace operation during screen rotations triggered from the onListItemClick
> without issue.  Following screen rotation, I logged the getActivity() call
> in onCreateContextMenu which is still valid, but the onContextItemSelected
> shows getActivity() returning null.  Any thoughts as to why that might be?

On which fragment is getActivity() returning null? The ListFragment(?)
on which you have the context menu, or the newly instantiated one? If
it's the newly-instantiated one, that's not especially surprising, as
it will not go through any of its lifecycle methods until the
FragmentTransaction gets commit()'d and processing begins on it
shortly thereafter.

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

Android 4.0 Programming 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: Webservice in android

2012-01-20 Thread Ubiracy Santos
Use KSOAP2 its very simple!!

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

2012-01-20 Thread Christopher Van Kirk

Definitely an Android topic.

On 1/21/2012 2:12 AM, bint-e -hava wrote:

hi

can any one suggest ideas for degree final project its may not be big 
and new but accept able as final project .

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


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


[android-developers] projects ideas for degree project

2012-01-20 Thread bint-e -hava
hi

can any one suggest ideas for degree final project its may not be big and
new but accept able as final project .
help would be highly appreciated
thanks

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

[android-developers] Re: Newbie question about Content Provider

2012-01-20 Thread A. Elk
Are you talking about a content provider or an SQLite database? They aren't 
equivalent. A content provider *may* use an SQLite database as its database 
repository, but it doesn't have to, and you can't assume that it does.

*If it's a content provider:*

You can do an insert followed by a query. Generally, it has to be done in 
two separate method calls:

ContentResolver.insert();
ContentResolver.query();

One row can be inserted per insert().

You can also do a "transaction" using ContentProviderOperation objects and 
then ContentResolver.applyBatch();

*If it's an SQLite database:*

You can do anything you can do in SQLite itself, using the classes in 
android.database.SQLite. Remember, though, that in general you *can't* use 
SQLite classes against a content provider (in general).

*In addition:*
*
*
If this doesn't answer your question, you might try to explain your use 
case rather than simply asking if SQLite operations translate to Android.


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

Re: [android-developers] Fwd: startActivityForResult problem

2012-01-20 Thread TreKing
On Fri, Jan 20, 2012 at 1:43 AM, vani reddy wrote:

> who=null


That seems to imply that it does not know where the Intent came from.
Specify the Activity in the Intent constructor.

-
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] How to get the real device screen size

2012-01-20 Thread TreKing
On Thu, Jan 19, 2012 at 8:03 AM, Eric Tseng  wrote:

> Like my device, I'd like to get 1280*800 not 1280*752(which
> excludes status bar).
>

Hide the status bar first?

-
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] How I use Web Services in android.?

2012-01-20 Thread TreKing
On Thu, Jan 19, 2012 at 6:39 AM, Harpreet Singh  wrote:

> How can I communicate with the database which that site is using?


Have the site developers provide you an api.

-
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] How can I load my custom map by using map api?

2012-01-20 Thread TreKing
On Wed, Jan 18, 2012 at 5:04 AM, kyawswa aung wrote:

>
> would like to develop a kind of map app for stand alone device. Is
> that possible? if it is possible, could you please give me some
> advices or references.


Try reading the documentation.

-
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] problem: two instances of the app are running- only on start up

2012-01-20 Thread TreKing
On Thu, Jan 19, 2012 at 7:20 AM, SVRP VARMA  wrote:

> I am facing a strange issue. Two instances of the app are running when I
> configure the app to run on-boot.
>

How are you determining that there are two instances running?

-
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] Webservice in android

2012-01-20 Thread TreKing
On Thu, Jan 19, 2012 at 3:46 AM, Pradeep  wrote:

> I want to create a webservice in android. To export data from the device
> on demand. I need to call it from .net. Do any have any idea about how to
> create a webservice in android. Where to deploy it? If possible, send me
> the link or sample program to create it.
>

http://www.justfuckinggoogleit.com/
http://www.catb.org/~esr/faqs/smart-questions.html

-
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] Class File Collision?

2012-01-20 Thread TreKing
On Wed, Jan 18, 2012 at 10:25 AM, PSchuette of Ignite  wrote:

> Any expertise on the matter would be more than helpful considering Google
> articles have proved to be unhelpful thus far.
>

http://bit.ly/wBkYKK

If you tried that already, comment out everything and comment stuff back in
one thing at a time until you determine what causes the issue.

-
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] Submit username and password to website

2012-01-20 Thread TreKing
On Tue, Jan 17, 2012 at 5:45 AM, n3d!m  wrote:

> I am trying to post login and username to the website.
> How to do that?
>

http://bit.ly/Aa2O3z
This has nothing to do with Android.

-
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] widget stop working after force close in setting page

2012-01-20 Thread TreKing
On Fri, Jan 20, 2012 at 4:08 AM, dara kok  wrote:

> My issue is that when the app is force close using a button


You are "force closing" your app on press of a button?

-
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] FragmentTransaction commitAllowingStateLoss problem

2012-01-20 Thread Nick Parker
Hi Mark, 

I am using setRetainInstance(true) with all of the Fragments.  I am actually 
new'ing up the detail fragment on the invocation of the onContextItemSelected() 
so there is no old reference hanging around.  After looking a bit further, I am 
starting to wonder if it has something to do with the context menu.  I am able 
to perform a separate Fragment Transaction replace operation during screen 
rotations triggered from the onListItemClick without issue.  Following screen 
rotation, I logged the getActivity() call in onCreateContextMenu which is still 
valid, but the onContextItemSelected shows getActivity() returning null.  Any 
thoughts as to why that might be?  Thanks. 


Nick Parker


On Friday, January 20, 2012 at 10:46 AM, Mark Murphy wrote:

> On Fri, Jan 20, 2012 at 11:39 AM, Nick Parker  (mailto:npar...@zetetic.net)> wrote:
> > I am not exactly sure what you are suggesting.  I do call
> > registerForContextMenu inside the onActivityCreated() method and super, but
> > nothing else.  Are you suggesting I do something there?
> > 
> 
> 
> I am suggesting that wherever you were calling getActivity(), and it
> was returning null, was too early in the fragment lifecycle. Solving
> that would eliminate your need to hold onto the Activity separately
> yourself, and it might clear up other problems that you are
> encountering.
> 
> >  The invocation of
> > the to perform the FragmentTransaction replace occurs from the
> > onContextItemSelected.
> > 
> 
> 
> Where are you getting the Fragment from that you are passing to
> replace()? If it not one that you instantiated just now, it may be
> that you are trying use a fragment that has been destroyed due to the
> configuration change.
> 
> BTW, are you using setRetainInstance(true) with your fragments? If
> not, bear in mind that the fragments are destroyed and recreated
> during the configuration change, when the activity is destroyed and
> recreated.
> 
> -- 
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
> 
> Android 4.0 Programming 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 
> (mailto:android-developers@googlegroups.com)
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com 
> (mailto: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] Flipping pages

2012-01-20 Thread Kristopher Micinski
Actually, I didn't know about ViewFlipper, you might want to look here as well:

http://stackoverflow.com/questions/3202749/touch-scroll-on-view-flipper-in-android

kris

On Fri, Jan 20, 2012 at 11:46 AM, TreKing  wrote:
> On Thu, Jan 19, 2012 at 8:44 AM, Borealis  wrote:
>>
>> I want to have some "cards" that I can flip back and forth.
>>
>> I know this might be very simple, but I could not find the right view to
>> start from.
>
>
> http://developer.android.com/search.html#q=flip&t=0
>
> -
> 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


Re: [android-developers] FragmentTransaction commitAllowingStateLoss problem

2012-01-20 Thread Mark Murphy
On Fri, Jan 20, 2012 at 11:39 AM, Nick Parker  wrote:
> I am not exactly sure what you are suggesting.  I do call
> registerForContextMenu inside the onActivityCreated() method and super, but
> nothing else.  Are you suggesting I do something there?

I am suggesting that wherever you were calling getActivity(), and it
was returning null, was too early in the fragment lifecycle. Solving
that would eliminate your need to hold onto the Activity separately
yourself, and it might clear up other problems that you are
encountering.

> The invocation of
> the to perform the FragmentTransaction replace occurs from the
> onContextItemSelected.

Where are you getting the Fragment from that you are passing to
replace()? If it not one that you instantiated just now, it may be
that you are trying use a fragment that has been destroyed due to the
configuration change.

BTW, are you using setRetainInstance(true) with your fragments? If
not, bear in mind that the fragments are destroyed and recreated
during the configuration change, when the activity is destroyed and
recreated.

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

Android 4.0 Programming 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: NFC Secure Element

2012-01-20 Thread Michael Roland
Hallo Saurabh,

> You mean page 12 , section *5.3 Reading Binary Block*.
I didn't find any "section *5.3 Reading Binary Block*" on that page. In
fact, I mean have you tried the whole command sequence described for
"Card Access -- How to access MIFARE Classic Tags?" on that page.

You have to do the polling using these commands to access the card. The
standard PC/SC commands will not work.

I just looked through my code and found that I also explicitly disabled
ISO 14443-4 activation (before polling) using this command:
  FF0003D41224

> Can you tell me the name of card reader where we cant see
> this behavior (reader automatically performed protocol selection up to
> ISO 14443-4 / APDU layer)
The ACR 122U was the only reader with which I successfully accessed the
MIFARE area of the SmartMX so far.

br,
Michael



> On Thu, Jan 19, 2012 at 6:14 PM, Michael Roland  > wrote:
> 
> Hallo Saurabh,
> 
> > I am getting This ATR now : *3B 8A 80 01 00 31 C1 73 C8 40 00 00 90 00
> > 90* , which I have read in this group that it is for SmartMX.
> 
> Correct, that's the PC/SC ATR for the SmartMX.
> 
> > I am looking into writing onto it but so far I am getting 63 00
> > response(which means error)
> > I am trying to load., authenticate the keys and then read -write and
> > then read back from the SmartMX (Secure Element).
> >
> > *_Here is my list of commands : _*
> >
> > FF82006006// load keys
> > FF86050100026000// authenticate
> > FFB210//read sector 2
> > FFD6000210// write sector 2
> > FFB210 // read sector 2 again
> >
> > I followed this -- > http://www.nfc-reader.com/
> > NFC-smart-card-reader/ACR122-API-Manual/API_ACR122.pdf
> 
> I would guess, that the reader automatically performed protocol
> selection up to ISO 14443-4 / APDU layer. In that state it is not
> possible to access the MIFARE part of the chip with reader-side MIFARE
> emulation. You could try the example on page 12ff of this document.
> 
> br,
> Michael
> 
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to
> android-developers@googlegroups.com
> 
> To unsubscribe from this group, 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

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

2012-01-20 Thread TreKing
On Thu, Jan 19, 2012 at 8:44 AM, Borealis  wrote:

> I want to have some "cards" that I can flip back and forth.
>
> I know this might be very simple, but I could not find the right view to
> start from.
>

http://developer.android.com/search.html#q=flip&t=0

-
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] Dashboard Application

2012-01-20 Thread Ubiracy Santos
Great... I will test it!!

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

Re: [android-developers] Choosing the CTS version for ICS

2012-01-20 Thread Atul Raut
Most of the times Yes, You needs to go with latest version available on
Google's site.

Its always good to go with latest version.

Thanks,
--
Atul Raut
http://rautatul.weebly.com/
http://atulraut.wordpress.com/ 
atulrau...@gmail.com 




On Wed, Jan 18, 2012 at 7:01 AM, Kal  wrote:

> Hi All,
>
> I am currently working on porting android ICS ver 4.0 the CTS version
> in my source tree is 4.0_r1.
>
> I saw that the latest CTS version available for download is 4.0.3_r1.
>
> I want to start execution of CTS on my target. Which CTS version
> should I choose ?
>
> Is there a necessity that CTS version should match with the android
> version ?
>
> Please advice. Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Sending mail through GMail (again...)

2012-01-20 Thread Kookamonga
I want to be able to send mail using GMail without user intervention
in my app. I was able to do this using the Google example here:

http://code.google.com/p/google-mail-xoauth-tools/wiki/JavaSampleCode

Note, though, that that sample code uses a Python script (xoauth.py)
to obtain the oauth_token and oauth_token_secret parameters in order
to be able to connect to the GMail servers. This involves running the
script, obtaining a verification URL which you then have to visit to
grant access to your "app", then supplying the script with the
verification code returned by Google and finally obtaining the
oauth_token and oauth_token_secret values. Of course, I want to be
able to do this in my app.

In Android, one can obtain some sort of an authToken using
AccountManager.getAuthToken(). Following this link:
http://stackoverflow.com/questions/6649388/android-accountmanager-authtoken-and-oauth,
I have tried using that authTokenType value, but I never get an
auth_token_secret value back... After TONS of reading/searching, I
think the problem here is that the AccountManager method is returning
a ClientLogin authToken, whereas the sample implementation (first link
I gave) requires XOAuth tokens. So finally, the question: is there any
way to get from the ClientLogin token returned by the
AccountManager.getAuthToken(...) method to the XOAuth tokens used by
the sample app?

This (http://groups.google.com/group/google-accounts-api/browse_thread/
thread/df3a6382a01d73ab) claims that it is a matter of using an
appropriate URL. I have not been able to get this to work.

This (http://blog.doityourselfandroid.com/2010/11/10/oauth-flow-in-
android-app/) explains how to get the OAuth tokens as part of your
Android app... But the whole point of me wanting to use AccountManager
is so that users of my app don't have to enter their password into the
app...

This (http://code.google.com/p/google-api-java-client/source/browse/
tasks-android-sample/src/main/java/com/google/api/services/samples/
tasks/android/TasksSample.java?repo=samples) shows how to use the
AccountManager.getAuthToken(...) token to access a different Google
API (Tasks). But again, I'm using the *Google provided* sample for
Mail... And that seems to require something other than the ClientLogin
credentials returned by AccountManager.

I realize this is sort of a long, involved question. But after lots of
looking, I'm hoping someone can help.

Thanks.

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


Re: [android-developers] FragmentTransaction commitAllowingStateLoss problem

2012-01-20 Thread Nick Parker
Hi Mark, 

I am not exactly sure what you are suggesting.  I do call 
registerForContextMenu inside the onActivityCreated() method and super, but 
nothing else.  Are you suggesting I do something there?  The invocation of the 
to perform the FragmentTransaction replace occurs from the 
onContextItemSelected.  The view has already redrawn itself well before I 
attempt to trigger the context menu following the screen rotation, but the 
commitAllowingStateLoss() still fails.  I'm open to suggestions.  Thanks.

Nick Parker


On Friday, January 20, 2012 at 10:09 AM, Mark Murphy wrote:

> On Fri, Jan 20, 2012 at 11:04 AM, Nick Parker  (mailto:npar...@zetetic.net)> wrote:
> > I was initially just calling getActivity() from the ListFragment, however
> > that was returning null.
> > 
> 
> 
> Then you were doing the work in too early of a lifecycle method, most
> likely. Try sliding to a slightly later one (e.g.,
> onActivityCreated()).
> 
> -- 
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
> 
> Android 4.0 Programming 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 
> (mailto:android-developers@googlegroups.com)
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com 
> (mailto: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] add radio button in table

2012-01-20 Thread Narendra Singh Rathore
i'm trying to add radio button in the table roa as dynamically i'm
> getting error


How are you trying to achieve your goal?
And what error are you getting?

Please be more specific if you really want a proper solution.

Thnx n Regards,
Narendra Singh.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Downloaded .apk file always gives package parsing error on installations

2012-01-20 Thread Kristopher Micinski
What is the package parsing error you get?

Do you have a logcat dump of what you get on install?

kris

On Fri, Jan 20, 2012 at 7:45 AM, rahul verma  wrote:
> hi everyone,
> i am caught in a big problem...
>
> I have made a downloading app. it works fine ,but one big problem is
> there.
>
> When i am downloading a .apk file using my code,on installing the
> downloaded file i am always getting a package parsing error
>
> My code:
>
>
>  try {
>                                URL url = new URL(link);
>                                HttpURLConnection connection;
>                                try {
>                                        connection = (HttpURLConnection) 
> url.openConnection();
>                                         File file=new 
> File(SDCardDir+File.separator
> +"DownloadEverythingPro"+File.separator+fileName);
>                                        if(file.exists()){
>                                             downloaded = (int) file.length();
>                                             status=Handlerr.RESUMED;
>                                             
> connection.setRequestProperty("Range", "bytes="+
> (file.length())+"-");
>
>                                        }
>                                    else{
>                                        downloaded=0;
>                                        connection.setRequestProperty("Range", 
> "bytes=" + 0 +
> "-");
>                                        status=Handlerr.FRESH_DOWNLOAD;
>
>                                    }
>                                        connection.setDoInput(true);
>                                        connection.setDoOutput(true);
>                                        j=connection.getContentLength();
>                                        int lastSlash = 
> url.toString().lastIndexOf('/');
>                                        fileName = "file.bin";
>                                        if(lastSlash >=0)
>                                        {
>                                            fileName = 
> url.toString().substring(lastSlash + 1);
>                                        }
>                                        if(fileName.equals(""))
>                                        {
>                                            fileName = "file.bin";
>                                        }
>
>
>
>                                        k=j+downloaded;
>                                        BufferedInputStream in = new
> BufferedInputStream(connection.getInputStream());
>                                        FileOutputStream fos=(downloaded==0)? 
> new
> FileOutputStream(SDCardDir+File.separator
> +"DownloadEverythingPro"+File.separator+fileName): new
> FileOutputStream(SDCardDir+File.separator
> +"DownloadEverythingPro"+File.separator+fileName,true);
>                                        BufferedOutputStream bout = new 
> BufferedOutputStream(fos,
> 1024);
>                                       byte[] data = new byte[1024];
>                                       int x = 0;
>                                       while ((x = in.read(data, 0, 1024)) >= 
> 0) {
>                                       bout.write(data, 0, x);
>
>                                            downloaded += x;
>                                            
> informMiddle(status+"!"+downloaded+"/"+k
> +"!"+this.fileName+"!"+this.link2);
>                                       }
>                                       in.close();
>                                       fos.close();
>                                       bout.close();
>                                } catch (IOException e) {
>                                        // TODO Auto-generated catch block
>                                        e.printStackTrace();
>                                        return;
>                                }
>
>
>
>                        } catch (MalformedURLException e) {
>                                // TODO Auto-generated catch block
>                                e.printStackTrace();
>                                return;
>
>                        }
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Net Work slow

2012-01-20 Thread Kristopher Micinski
Additionally, if you're doing network communication from the main
thread you should see an exception..

http://stackoverflow.com/questions/6343166/android-os-networkonmainthreadexception

In general if you're doing any socket communication over a UI thread,
you've made a mistake.  The right way to handle this is with a
background thread (or perhaps AsyncTask, or even using a Service) and
set up a Messenger / Handler between them.

kris

On Fri, Jan 20, 2012 at 8:55 AM, Chihwah  wrote:
>
> Hello,
>
> In a few cases  you will need to create a seperate thread. You could get an
> message that your app is not responding. If that's the case, create a new
> thread, Inside this new thread you execute your code.
>
> Might be handy to send some code, so that people can have a look. Hope this
> helps you.
>
> Cwli
>
> Op 20-1-2012 10:27, aru padam schreef:
>
>> Hi all,
>>
>>   I am using internet connection in android application.Suppose net
>> connection is slow ,then the app is force closed .
>>
>> How can i rectify this problem .Please help me .urgent...
>>
>> Thanks in Advance
>>
>> Deepesh C
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2012-01-20 Thread Mark Murphy
On Fri, Jan 20, 2012 at 11:04 AM, Nick Parker  wrote:
> I was initially just calling getActivity() from the ListFragment, however
> that was returning null.

Then you were doing the work in too early of a lifecycle method, most
likely. Try sliding to a slightly later one (e.g.,
onActivityCreated()).

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

Android 4.0 Programming 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: ContentProvider - Update Field with multiplication result of other

2012-01-20 Thread Lester Quintero
I found that: 
http://stackoverflow.com/questions/5465212/android-increment-db-field-via-contentvalues
Apparently can not be done by sending the name of the fields

Thanks for your help.


On 20 ene, 10:55, Lester Quintero  wrote:
> Hi,
>
> Ok I believe that i make wrong question, i think that content provider
> take that and transform To
>
> UPDATE ORDERLINE
> SET TOTAL = Quantity * Price
>
> There is way to do that, and yes i need known more of java.
>
> Thanks
>
> On 20 ene, 10:16, Yahel  wrote:
>
>
>
>
>
>
>
> > > but my surprise was find in column total this
> > > content: "Price * Quantity"
>
> > Hi,
>
> > Why is it a surprise ? That is exactly what you are asking Android to
> > do : Put the STRING : OrderLineContract.Columns.PRICE + " * " +
> > OrderLineContract.Columns.QUANTITY in the column total.
>
> > Your question shows a real gap between what you want to achieve and
> > what you know about programming. Kind of like : I want to play in the
> > NBA but what is this orange round-shaped thingy for ?
>
> > OrderLineContract.Columns.PRICE does not contain the value of the
> > field, it contains the name of the field
> > Using aVariable1 + "*" + aVariable2 does not multiply, it concatenates
> > the string.
>
> > You should really start here 
> > :http://docs.oracle.com/javase/tutorial/java/nutsandbolts/index.html
>
> > Good luck.
>
> > Yahel

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

2012-01-20 Thread Kristopher Micinski
What do you mean, how?  You just pick the constants out of the class,
one by one.

int a = MediaRecorder.AudioSource.CAMCORDER;
int b = ...
...

This is a very simple question, you might want to read up on Java
quite a bit more if you wanted to use an array and for to get these
values..

kris

On Fri, Jan 20, 2012 at 10:56 AM, Giuseppe Porcelli- FINM
 wrote:
> Ok , how?
>
> -Messaggio originale-
> Da: android-developers@googlegroups.com
> [mailto:android-developers@googlegroups.com] Per conto di Kristopher
> Micinski
> Inviato: venerdì 20 gennaio 2012 16:51
> A: android-developers@googlegroups.com
> Oggetto: Re: [android-developers] How to iterate Class
>
> Still doesn't make any sense...  You know the elements you want out of the
> class, so just get them, don't write it in some strange hacky way just to
> use a for, if you want the values, this has nothing to do with an adapter.
>
> (Theoretically you could use reflection here, but using an array and for is
> a really bad design vs just taking the values.)
>
> kris
>
> On Fri, Jan 20, 2012 at 1:12 AM, Giuseppe Porcelli
>  wrote:
>> Want to do a for to create a string array to use with an arrayadaptarer.
>>
>> Giuseppe Porcelli
>>
>> Il giorno 20/gen/2012, alle ore 01:41, Kristopher Micinski
>  ha scritto:
>>
>>> What?  Why would you do it inside of a for each?
>>>
>>> Mark already answered this, but this question sounds very confused...
>>>
>>> Don't use a for, just read the values..
>>>
>>> kris
>>>
>>> On Thu, Jan 19, 2012 at 6:38 AM, Giuseppe 
> wrote:
 I need to get the  MediaRecorder.AudioSource constants list, es.

 CAMCORDER
 DEFAULT
 MIC
 VOICE_CALL
 VOICE_COMMUNICATION
 VOICE_DOWNLINK
 VOICE_RECOGNITION
 DEFAULT
 VOICE_UPLINK

 and their INT value.

 How to do it inside a for each?

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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Forcing an item in a GridView to remain highlighted after clicking

2012-01-20 Thread rperi...@yahoo.com
Okay thanks I will look into what you suggest. I did try the
setEnabled() method as well as setSelected() method among other things
and they all had no effect. I assumed the item would assume the
default behaviour in terms of selected color. But I will try
explicitly specifying that and see if it works.

On Jan 20, 2:02 am, jamesc  wrote:
> Create a new selector 
> (seehttp://developer.android.com/guide/topics/resources/drawable-resource...)
> for the item, and then configuring the colour/background values
> depending on state. By state, I mean, your item could be
> 'Checkable' (i.e. only a single item in the whole GridView can be
> checked at a time) and then when it's tapped, set it to checked, and
> the appropriate value in the selector would be chosen. Alternatively,
> you could use the item's .setEnabled() method and do something
> similar.
>
> You may also need to be aware of the android:duplicateParentState
> attribute.
>
> On Jan 20, 6:10 am, "rperi...@yahoo.com"  wrote:
>
>
>
> > I would like to make the blue border around a gridview item remain
> > highlighted after clicking on it as a reminder to the user which item
> > was slected while making the second choice. I have tried a number of
> > methods from the View class and none of them seem to have any effect -
> > the border disappears after a short while. Any ideas how to do this?- 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] FragmentTransaction commitAllowingStateLoss problem

2012-01-20 Thread Nick Parker
Hi Mark, 

Thanks for the quick response, I've included my comments inline:

Nick Parker


On Friday, January 20, 2012 at 9:49 AM, Mark Murphy wrote:

> On Fri, Jan 20, 2012 at 10:41 AM, Nick Parker  (mailto:npar...@zetetic.net)> wrote:
> > I am using the Google compatibility library for Fragments.  I have a
> > ListFragment that upon selection from a context menu performs a fragment
> > transaction replace to display another fragment.  This operation works fine,
> > however following a screen rotation the the commit operation fails giving
> > the following exception:
> > 
> > java.lang.IllegalStateException: Can not perform this action after
> > onSaveInstanceState
> > 
> 
> 
> When I have run into this error, it is because I am calling something
> on a fragment that no longer exists (e.g., destroyed in a
> configuration change).
> 
> 

This makes sense, I understand the issue with calling commit, I have not 
problem switching to commitAllowingStateLoss().

> 
> > According to the documentation I should use commitAllowingStateLoss due to
> > the onSaveInstanceState being called.  When I switch to the
> > commitAllowingStateLoss call I get the following error:
> > 
> > java.lang.IllegalStateException: Activity has been destroyed
> 
> Which is also what I see when I am calling something on a fragment
> that no longer exists (e.g., destroyed in a configuration change).
> 
> > Note, in the ListFragment I am overriding the onAttach and storing a
> > reference to the Activity which is provided following the screen rotation.
> > 
> 
> 
> You should not need to do that, as you can call getActivity() from any 
> Fragment.

I was initially just calling getActivity() from the ListFragment, however that 
was returning null.  When I captured the Activity in the onAttach method I ran 
into the issue during the commitAllowingStateLoss().
> 
> >  From the activity I call getSupportFragmentManager in order to perform the
> > FragmentTransaction.  How is the activity becoming null?
> > 
> 
> 
> Based on your description here, it is not becoming null. You would
> have a NullPointerException if it were null.
> 
> 

I was just following the stack trace and using JD-GUI to look at the code.  
More of the stack trace looks like this:

java.lang.IllegalStateException: Activity has been destroyed
at 
android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1314)
at 
android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:541)
at 
android.support.v4.app.BackStackRecord.commitAllowingStateLoss(BackStackRecord.java:529)


JD-GUI shows inside the enqueueAction method an IllegalStateException is thrown 
when the Activity is null.  Do you have any suggestions to get around this.  
I'd really just like to be able to perform replace operations on a 
FragmentTransaction following screen rotations.  Thanks again.
 
> 
> -- 
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
> 
> Android 4.0 Programming 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 
> (mailto:android-developers@googlegroups.com)
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com 
> (mailto: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: Force ndk-build to use c++ compiler

2012-01-20 Thread M J
Thanks,
I will try

On 20 Jan., 16:56, Mark Murphy  wrote:
> You may have better luck asking that on the android-ndk Google Group.
>
>
>
>
>
>
>
>
>
> On Fri, Jan 20, 2012 at 10:54 AM, M J  wrote:
> > Hey guys,
>
> > I have another problem. I want to compile all my files (*.c and *.cpp)
> > with a c++ compiler. How can I tell ndk-build to do that? Currently it
> > decides to use a normal c-compiler to compile *.c files and a c++-
> > compiler to compile *.cpp files.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, 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 4.0 Programming 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: Unable to execute Bluetooth HDP Demo

2012-01-20 Thread Raul Ruiz
Hi all,

I have Nonin working with HDP, if someone need help tell me.



On 14 ene, 13:07, jfernandez 
wrote:
> Hi Fernando,
>
> I have introduced a change in the implementation of the
> BluetoothHealthCallback mHealthCallback. Exactly, in its method
> onHealthChannelStateChange(...). I detected that the state machine
> during the stablishment of a new HDP connection is: Disconnected-
> Connecting-Connected. However, you can see that the example is
> checking the case Disconnected-Connected, but not the case Connecting-
> Connected. I added this new case Connecting-Connected, and now it
> works and I'm able to read/write data from/to UA-767PBT-C and a board
> that emulates several biomedical devices.
>
> I hope it help you.
>
> Regards.
>
> On 14 ene, 12:35, Fernando Almeida  wrote:
>
>
>
>
>
>
>
> > Hi jfernandez... i upgrade my android version to 4.03 and still can't
> > connect...
>
> > Could you please show me the changes that you made?
>
> > Thank you
>
> > On 13 Jan, 10:57, jfernandez 
> > wrote:
>
> > > Hi again,
>
> > > Well, after upgrading my Android 4.0 to 4.03, and adding some changes
> > > to the BluetoothHDPsample, I'm able to connect to the biomedical
> > > device, as well as I'm able to read/write data from/to theHDP
> > > channel. So, it seems the problem has been fixed in this new Android
> > > version.
>
> > > Regards.
>
> > > On 15 dic 2011, 18:30, jfernandez 
> > > wrote:
>
> > > > Hi all,
>
> > > > I'm executing theBluetoothHDPDemo [1]  (offered from Android 4.0
> > > > Ice Cream Sandwich) in my Android smartphone. When I have registered
> > > > the application in order to receive data, and I have paired the
> > > > biomedical device with the smartphone, I try to open the channel
> > > > connection and I can see that the device starts sending data to the
> > > > smartphone. However, the smartphone is unable to open the channel
> > > > connectionHDP.
>
> > > > At the end of this message you can see the output obtained in the
> > > > LogCat.
>
> > > > Has anybody achieved to run successfully this sample about the use of
> > > > theBluetoothHealth Profile API? Any ideas?
>
> > > > Thanks. Regards.
>
> > > > [1]http://developer.android.com/resources/samples/BluetoothHDP/index.html
>
> > > > This is the log that I obtain:
>
> > > > 12-15 16:40:54.048: I/BluetoothHDPService(1105): connectChannel()
> > > > 12-15 16:40:54.068: D/BluetoothService(147): CONNECTION_STATE_CHANGE:
> > > > 00:80:25:14:A1:BC: 0 -> 1
> > > > 12-15 16:40:55.169: D/ConnectivityService(147):
> > > > handleInetConditionHoldEnd: net=1, condition=0, published condition=0
> > > > 12-15 16:40:59.393: D/BluetoothEventLoop(147): Device property
> > > > changed: 00:80:25:14:A1:BC property: Connected value: true
> > > > 12-15 16:41:00.024: D/BluetoothEventLoop(147): Health Device :
> > > > devicePath: /org/bluez/278/hci0/dev_00_80_25_14_A1_BC:channelPath:/org/
> > > >bluez/278/hci0/dev_00_80_25_14_A1_BC/chan3115:existstrue
> > > > 12-15 16:41:00.034: E/BluetoothService.cpp(147):
> > > > getChannelApplicationNative
> > > > 12-15 16:41:00.044: E/bluetooth_common.cpp(147):
> > > > dbus_func_args_timeout_valist: D-Bus error in Acquire:
> > > > org.bluez.Error.HealthError (Cannot reconnect: MDL is not closed)
> > > > 12-15 16:41:00.044: E/BluetoothHealthProfileHandler(147): Error
> > > > obtaining fd for channel:/org/bluez/278/hci0/dev_00_80_25_14_A1_BC/
> > > > chan3115
> > > > 12-15 16:41:00.074: E/BluetoothService.cpp(147): destroyChannelNative
> > > > 12-15 16:41:00.074: E/BluetoothEventLoop.cpp(147):
> > > > onHealthDeviceConnectionResult: D-Bus error:
> > > > org.bluez.Error.HealthError (Mdl is not created)
> > > > 12-15 16:41:00.074: D/BluetoothEventLoop(147):
> > > > onHealthDeviceConnectionResult 2 6001
> > > > 12-15 16:41:00.214: D/BluetoothEventLoop(147):
> > > > onHealthDeviceConnectionResult 2 6000
> > > > 12-15 16:41:00.214: D/BluetoothEventLoop(147): Health Device : Name of
> > > > Property is: MainChannel Value:/org/bluez/278/hci0/
> > > > dev_00_80_25_14_A1_BC/chan3115

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

2012-01-20 Thread Kristopher Micinski
I agree with TreKing:  it's very bad practice to leave your verbose
logging in after development.  It it still perhaps necessary to leave
some logs in, but most of the chatty ones should be stripped from your
app, as they'll be really annoying to other people, and just get in
the way (and it's just unprofessional).  Point #1 can be solved if you
write a utility class in your app like Logger, that does the same
thing as Log, but you can then throw out the appropriate methods in
production.  Point #2 has been solved (at least in theory) by
information flow analysis, but I don't think there's a large scale
production version of this.  Point 3 can (if you find it annoying) be
solved by doing a "logcat | grep com.myapp" or something similar,
though maybe that won't quite work for everything you need.

kris

On Fri, Jan 20, 2012 at 9:07 AM, TreKing  wrote:
> On Tue, Jan 17, 2012 at 12:31 PM, Leno Britto  wrote:
>>
>> but why would you do that? the user won't see those unless he plugs the
>> phone to the pc and if he does, so what? those messages are meant for
>> troubleshooting rather then testing things out, isn't that how you're you
>> using them? because if you are, what's the problem with leaving them there?
>
>
> 1 - Excessive logging slows your app down.
> 2 - Many apps have been known to leave inappropriate contents in their logs
> (keys, passwords, etc).
> 3 - For developers, it's quite annoying to debug one's own app while the
> LogCat is flooded with crap from other apps that shouldn't be there in
> release.
>
>
> -
> 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] Creating a context menu similar to gmail app.

2012-01-20 Thread tatebn
I need to create a context menu similar to the menu that pops up in
the gmail app.  I need this menu to show up when I select text in a
web view.  I found this tutorial on quick action bars,
http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/
and it looks straight forward enough to build them.  But I don't know
how to tie in to the text selection of a web view.

Basically when a user selects text in a web view I need to build a
quick action menu on the fly based on the text they selected.  Is
there an event for that I can listen for?

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


R: [android-developers] How to iterate Class

2012-01-20 Thread Giuseppe Porcelli- FINM
Ok , how?

-Messaggio originale-
Da: android-developers@googlegroups.com
[mailto:android-developers@googlegroups.com] Per conto di Kristopher
Micinski
Inviato: venerdì 20 gennaio 2012 16:51
A: android-developers@googlegroups.com
Oggetto: Re: [android-developers] How to iterate Class

Still doesn't make any sense...  You know the elements you want out of the
class, so just get them, don't write it in some strange hacky way just to
use a for, if you want the values, this has nothing to do with an adapter.

(Theoretically you could use reflection here, but using an array and for is
a really bad design vs just taking the values.)

kris

On Fri, Jan 20, 2012 at 1:12 AM, Giuseppe Porcelli
 wrote:
> Want to do a for to create a string array to use with an arrayadaptarer.
>
> Giuseppe Porcelli
>
> Il giorno 20/gen/2012, alle ore 01:41, Kristopher Micinski
 ha scritto:
>
>> What?  Why would you do it inside of a for each?
>>
>> Mark already answered this, but this question sounds very confused...
>>
>> Don't use a for, just read the values..
>>
>> kris
>>
>> On Thu, Jan 19, 2012 at 6:38 AM, Giuseppe 
wrote:
>>> I need to get the  MediaRecorder.AudioSource constants list, es.
>>>
>>> CAMCORDER
>>> DEFAULT
>>> MIC
>>> VOICE_CALL
>>> VOICE_COMMUNICATION
>>> VOICE_DOWNLINK
>>> VOICE_RECOGNITION
>>> DEFAULT
>>> VOICE_UPLINK
>>>
>>> and their INT value.
>>>
>>> How to do it inside a for each?
>>>
>>> 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
>>
>> --
>> You received this message because you are subscribed to the Google 
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-developers@googlegroups.com
>> To unsubscribe from this group, 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

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


  1   2   3   >