[android-developers] provider, thread and async

2012-08-06 Thread yvolk
Hi, you may look into the code of the AndStatus application ( 
https://github.com/andstatus/andstatus/wiki ). It does background work in the 
service (MyService). In particular it downloads data into a database. 
Activities send messages to the MyService and get responses back using 
broadcasts, see MyServiceConnector.

BTW, global variables will not work in this scenario, because there are TWO 
copies of the code instanciated in two processes. See MyPreferences class.

The code has a lot of debug logging ...

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

2012-08-06 Thread Josphat Muchiri
hae i like your code and could you pliz explain to me what the project is
all about

On Sun, Aug 5, 2012 at 11:11 PM, yvolk yvo...@gmail.com wrote:

 Hi, you may look into the code of the AndStatus application (
 https://github.com/andstatus/andstatus/wiki ). It does background work in
 the service (MyService). In particular it downloads data into a database.
 Activities send messages to the MyService and get responses back using
 broadcasts, see MyServiceConnector.

 BTW, global variables will not work in this scenario, because there are
 TWO copies of the code instanciated in two processes. See MyPreferences
 class.

 The code has a lot of debug logging ...

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


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

Re: [android-developers] how can I design a floating keyboard?

2012-08-06 Thread Kristopher Micinski
You would get farther by trying at doing this for a while and then showing
what you tried...
On Aug 6, 2012 1:16 AM, Moshe Yakobovich yako...@gmail.com wrote:

 I agree, and again - if you bump into something, please let me know. I
 googled a lot and came out with nothing. Found a good example keyboard, but
 it's code is not available.

 yakobom

 On Mon, Aug 6, 2012 at 7:44 AM, Kristopher Micinski 
 krismicin...@gmail.com wrote:

 It's such a specific use case I'd suppose the only way to find examples
 from other floating keyboards :)
 On Aug 6, 2012 12:26 AM, Moshe Yakobovich yako...@gmail.com wrote:

 Hi Kristopher,
 I did Google for it andI was not able to find anything, that's why I
 asked here again. If you happen to bump into something useful...

 Thanks
 yakobom

 On Sun, Aug 5, 2012 at 9:33 PM, Kristopher Micinski 
 krismicin...@gmail.com wrote:

 There's no sdk standard example for this one... maybe Google for
 example source?
 On Aug 5, 2012 4:10 AM, yakobom yako...@gmail.com wrote:

 Thanks - this seems to be Helpful. According to the documentation, it
 is indeed what I need. However, I could not figure out how to use it for 
 my
 goal - make my custom keyboard float. Do you have any example in mind that
 I could look at?

 Thanks,
 yakobom

 On Sunday, August 5, 2012 4:18:28 AM UTC+3, Dianne Hackborn wrote:

 You can use this to indicate how the application should be positioned
 behind your IME:  http://developer.android.com/**reference/android/**
 inputmethodservice/**InputMethodService.html#**
 onComputeInsets(android.**inputmethodservice.**
 InputMethodService.Insets)http://developer.android.com/reference/android/inputmethodservice/InputMethodService.html#onComputeInsets(android.inputmethodservice.InputMethodService.Insets)


 On Sat, Aug 4, 2012 at 12:35 AM, yakobom yako...@gmail.com wrote:

 Hi Dianne,
 If you design it to be floating so that it doesn't impact app
 content, you can easily put it anywhere - can you please explain how 
 can I
 do that? And, is it possible to design it so this mode will be 
 dynamically
 switchable? (Meaning, the user will be able to switch between the 
 floating
 and the pushing modes)

 Thanks,
 yakobom


 On Wednesday, August 1, 2012 7:14:50 PM UTC+3, Dianne Hackborn wrote:

 In the current platform your IME UI can only push app content up
 from the bottom of the screen.  If you design it to be floating so 
 that it
 doesn't impact app content, you can easily put it anywhere (if nothing 
 else
 make the window fill the entire screen and leave all the parts 
 transparent
 except where you want to draw your UI), but if you want apps to adjust
 their UI to accommodate the only option is to have their content shift 
 up
 from the bottom.

 On Wed, Oct 13, 2010 at 2:02 PM, Saied saie...@gmail.com wrote:

 Hello,

 I am a developer and recently completed the implementation of my
 keyboard MessagEase. It's available on the Market (with its very-
 different features, making it quite unlike QWERTY).

 This keyboard works fine as a replacement of the standard keyboard
 on
 an Android Phone. But for a An Android Tablet, it would work best
 if
 it's implemented as a floating, movable keyboard.

 (the footprint of this keyboard is mostly dependable on the size
 of a
 human's finger; it remains the same even if the tablet's display is
 much larger than a phone's. Therefore it'll take a relatively
 smaller
 area on a tablet.)

 If I use the current SDK hooks, it will have to take a significant
 portion of the screen, defeating the purpose.

 Can someone point me to the right direction in creating a floating
 keyboard? or is it possible?

 Thanks.

 Saied Nesbat,
 Exideas (creator of MessagEase)

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




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

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

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@**
 googlegroups.com android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+**unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 

Re: [android-developers] Eclipse and Mountain Lion for Mac

2012-08-06 Thread Harri Smått
On Aug 5, 2012, at 6:31 PM, Dan Uff danny@gmail.com wrote:
 
 Is anyone else having this issue?

Upgraded my Mac to OSX Mountain Lion yesterday and didn't see anything out of 
ordinary.

--
H

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

2012-08-06 Thread yakobom
I'm trying to do this for quite a long while, and when I failed I posted 
the question. I have nothing to specify since I do not know how to do this. 
I kept searching for a way and failed. The only lead I got was here,  
onComputeInsetshttp://developer.android.com/reference/android/inputmethodservice/InputMethodService.html#onComputeInsets(android.inputmethodservice.InputMethodService.Insets)
 , 
but I was not able to understand how to use it.

yakobom

On Monday, August 6, 2012 9:41:21 AM UTC+3, Kristopher Micinski wrote:

 You would get farther by trying at doing this for a while and then showing 
 what you tried... 
 On Aug 6, 2012 1:16 AM, Moshe Yakobovich yako...@gmail.com wrote:

 I agree, and again - if you bump into something, please let me know. I 
 googled a lot and came out with nothing. Found a good example keyboard, but 
 it's code is not available.

 yakobom

 On Mon, Aug 6, 2012 at 7:44 AM, Kristopher Micinski 
 krismicin...@gmail.com wrote:

 It's such a specific use case I'd suppose the only way to find examples 
 from other floating keyboards :)
 On Aug 6, 2012 12:26 AM, Moshe Yakobovich yako...@gmail.com wrote:

 Hi Kristopher,
 I did Google for it andI was not able to find anything, that's why I 
 asked here again. If you happen to bump into something useful...

 Thanks
 yakobom

 On Sun, Aug 5, 2012 at 9:33 PM, Kristopher Micinski 
 krismicin...@gmail.com wrote:

 There's no sdk standard example for this one... maybe Google for 
 example source? 
 On Aug 5, 2012 4:10 AM, yakobom yako...@gmail.com wrote:

 Thanks - this seems to be Helpful. According to the documentation, it 
 is indeed what I need. However, I could not figure out how to use it for 
 my 
 goal - make my custom keyboard float. Do you have any example in mind 
 that 
 I could look at?

 Thanks,
 yakobom

 On Sunday, August 5, 2012 4:18:28 AM UTC+3, Dianne Hackborn wrote:

 You can use this to indicate how the application should be 
 positioned behind your IME:  http://developer.android.com/**
 reference/android/**inputmethodservice/**InputMethodService.html#**
 onComputeInsets(android.**inputmethodservice.**
 InputMethodService.Insets)http://developer.android.com/reference/android/inputmethodservice/InputMethodService.html#onComputeInsets(android.inputmethodservice.InputMethodService.Insets)
  

 On Sat, Aug 4, 2012 at 12:35 AM, yakobom yako...@gmail.com wrote:

 Hi Dianne,
 If you design it to be floating so that it doesn't impact app 
 content, you can easily put it anywhere - can you please explain how 
 can I 
 do that? And, is it possible to design it so this mode will be 
 dynamically 
 switchable? (Meaning, the user will be able to switch between the 
 floating 
 and the pushing modes)

 Thanks,
 yakobom


 On Wednesday, August 1, 2012 7:14:50 PM UTC+3, Dianne Hackborn 
 wrote:

 In the current platform your IME UI can only push app content up 
 from the bottom of the screen.  If you design it to be floating so 
 that it 
 doesn't impact app content, you can easily put it anywhere (if 
 nothing else 
 make the window fill the entire screen and leave all the parts 
 transparent 
 except where you want to draw your UI), but if you want apps to 
 adjust 
 their UI to accommodate the only option is to have their content 
 shift up 
 from the bottom.

 On Wed, Oct 13, 2010 at 2:02 PM, Saied saie...@gmail.com wrote:

 Hello,

 I am a developer and recently completed the implementation of my
 keyboard MessagEase. It's available on the Market (with its very-
 different features, making it quite unlike QWERTY).

 This keyboard works fine as a replacement of the standard 
 keyboard on
 an Android Phone. But for a An Android Tablet, it would work best 
 if
 it's implemented as a floating, movable keyboard.

 (the footprint of this keyboard is mostly dependable on the size 
 of a
 human's finger; it remains the same even if the tablet's display 
 is
 much larger than a phone's. Therefore it'll take a relatively 
 smaller
 area on a tablet.)

 If I use the current SDK hooks, it will have to take a significant
 portion of the screen, defeating the purpose.

 Can someone point me to the right direction in creating a floating
 keyboard? or is it possible?

 Thanks.

 Saied Nesbat,
 Exideas (creator of MessagEase)

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




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

 Note: please don't send private questions to me, as I don't have 
 time to provide private support, and so won't reply to 

[android-developers] get IP Address of Local Wifi hotspot

2012-08-06 Thread Azmat Alikhan
Hi, 
 I am creating wifi hotspot on my android phone, and i want to get its 
IP and state. But I am not getting how to get 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] get IP Address of Local Wifi hotspot

2012-08-06 Thread Asheesh Arya
just go through this link might be it helpful for you
http://code.google.com/p/krvarma-android-samples/source/search?q=origq=btnG=Search+Trunk

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

2012-08-06 Thread Asheesh Arya
this is the correct link
http://www.krvarma.com/2010/07/getting-ip-address-of-the-device-in-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] get IP Address of Local Wifi hotspot

2012-08-06 Thread Azmat Alikhan
Its valid if I connected through Wifi network. But my issue is that I am
creating wifi Hotspot in my own phone and i want to get what IP assigned .

On Mon, Aug 6, 2012 at 2:52 PM, Asheesh Arya asheesharya...@gmail.comwrote:

 this is the correct link
 http://www.krvarma.com/2010/07/getting-ip-address-of-the-device-in-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




-- 
-- 
*thanks  regards,

Azmat Ali Khan
Software Engineer
NetProphets Cyberworks Pvt. Ltd., Noida
Ph.- +91- 663547*

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

[android-developers] how to store the data in cache/temp memory

2012-08-06 Thread vamshi ch
Hi,

I have an App that i want to store the data in cache/temp memory before
saving the data in DB like  I have created an application with 2
activities, where *A*  , *B* . if I go through *A - B*, in *B* I've some
fields  I would like to have its data cached somewhere  then I'm back
to *A*, then If i save the A fields in DB then only i needs to save B
fields.  if
I'm not saving any data fields in *A* so *B* fields will not be save..

Until and unless saving the data in *A *then only *B* fields needs to save.

Can anyone help me with a code snippet.

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

2012-08-06 Thread techno
I've been searching for hours to find this, and couldn't so I decided to 
create a thread here.
I want to create a button that will open a webpage. 
Can someone tell me how?
If possible I would like to have info on each part so that I will learn 
it...
Thanks guys!

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

[android-developers] Re: How to open smm file of samsung galaxy?

2012-08-06 Thread Izzieq Androizty
it seems that the .smm is associated with lotus word pro / samna ami pro. 
Please see this link :
http://www.fileinfo.com/extension/smm

also i would recommend you to see this link as there is a file converter ( 
i havee nnot tried it)
http://www.file-convert.com/a_ami.htm


On Friday, January 20, 2012 10:34:34 AM UTC+7, Samuel wrote:

 Hi, 

 Do you know a software that can open smm file of samsung galaxy in 
 Windows or what software can be used to convert the smm file into ms. 
 word? 

 thanks

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

[android-developers] Re: How to send vCard via SMS?

2012-08-06 Thread adrian


On Monday, April 30, 2012 8:33:39 AM UTC+1, SamuelSpring wrote:

 I'm looking for any way to send/read a vCard via SMS in my app. I've 
 read a lot of articles, web-pages, forums etc. There is still not even 
 a clue how to do that. 

 Here is transaction. 
 1. User selects some specific contact 
 2. App generates a vCard for it 
 3. User types a number to send vCard to 
 4. App sends SMS with that vCard(?) 
 5. Addressee recievs SMS with vCard and asked to browse contact/add to 
 contacts(?) 

 There are some posts on stackOverflow about it, but still nothing 
 useful... 

 I've found this nice library to work .vcf files(both write and read). 
 http://code.google.com/p/android-vcard/ 

 But is there any way to send it to another phone (and read properly of 
 course)? Just send this as a string maybe? 

 Please help! I'll be happy to get any clue, useful library or a proof 
 that it's impossible on Android. If there is no way via SMS can you 
 give me advice how to do that via MMS? 

 What's interesting, that there is a lot of apps with that 
 functionality, so I guess this is possible. 

 Thanks anyone who responds. Have a good day.


Nokia wrote the original specification for SMS messaging and published it. 
The original document was published at 
http://press.nokia.com/PR/200012/801035_5.html but unfortunately it's no 
longer there. I think it should be possible by splitting the vcard file 
across several SMS messages. It's possible that the feature was available 
in android release froyo but has been removed in subsequent releases (my 
handset, confirmed on gingerbread). 

It's definitely possible on anything from a $40 cellphone to an iphone 
specifically using SMS type messages. Messages of type MMS do work as the 
vcard file is delivered as an attachment.  It might be worth comparing the 
source code for mms.apk from gingerbread and froyo to see if anything has 
been changed. There's a lot of discussion in an issue reported to google - 
https://code.google.com/p/android/issues/detail?id=2412 but no response at 
all from google.

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

[android-developers] How to register MIME type

2012-08-06 Thread Богдан Матвійчук
How to register new MIME type on my app

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

Re: [android-developers] Message on Locked Screen

2012-08-06 Thread eagledroid
What are the hacks you are referring to?
How come a paid app called WidgetLocker can do this and you are saying it's 
not supported?

On Tuesday, November 23, 2010 12:24:16 PM UTC-5, Dianne Hackborn wrote:

 Sorry this isn't supported by the SDK.  (There are hacks that people use 
 to do this kind of stuff, but they are fragile and likely to break in newer 
 platform versions.)

 On Tue, Nov 23, 2010 at 9:17 AM, Tejas tej...@gmail.com wrote:

 Hi,

 I want to put out a message from my application on locked screen.
 Something like, If Found please call number

 Is there a way to do it ?
 I see there is a FLAG_SHOW_WHEN_LOCKED flag using which I assume it
 can be done.
 Can anyone provide some example ?

 Regards,
 Tej

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




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

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



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

[android-developers] Java to XML

2012-08-06 Thread nybras
New to Android Development and was wondering if there was some way of taking 
the users input to create an activity? For example say the user is going 
through the process of setting up a profile of themself. One of the questions 
is how many pets do you have?. The user inputs 4 and then clicks the 'Next' 
button (which opens the next activity).

How would I take the users input of 4 to create four editText objects in the 
next activity so that the user can now input the name's of his/her's pets?

I'm an ok-ish programmer (have never touched XML before though) so you don't 
need to go into much detail I just don't know how I would access this variable 
to create the four editText objects. From what I've found out you can't add 
strings to the resources at run-time nor can even edit/append files in 
resources.

I was thinking of writing an XML file from java and making the activity 
(obviously written in XML) read the XML file if that's even possible? Can XML 
files read XML 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


[android-developers] What's the best place to find Android Developers willing to participate in a Startup?

2012-08-06 Thread Bart Burg
I'm looking for someone that would like to build an Android product together 
with me, and bring that product on the market. What would be the best place to 
look for Android Developers that also have affinity in entrepreneurship? 

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

2012-08-06 Thread Kang Lu
Hi,

I'm trying to build a home screen widget for my app and I am using 
stackview, remoteviewservice. In the RemoteViewsService, I need to query 
the content provider. My cotent provider is set exported=false. However, 
when I want to add the widget on screen, I get this error
java.lang.SecurityException: Permission Denial: reading 
com.xxx.android.provider.yyyContentProvider uri content://com.zzz.an

If I set the provider to exported=true, it works well. But I don't want 
this solution. Anyone can helps me? Thanks.

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

[android-developers] How to view rtf file in webview

2012-08-06 Thread Balaji Shanmugam
Hi,

  i need to show rtf file in webview. but i cn't. anybody give some 
idea to do it.

Regards,
Balaji.S

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

2012-08-06 Thread Abhishek Chatterjee
I know I am posting to a thread thats been dead for ages, but I guess now 
replacing localhost with 10.0.2.2 solves the problem... correct?

On Monday, 11 February 2008 14:43:50 UTC+5:30, kevin wrote:

 HI, 
 are u able to retrieve data from the localhost server and display it 
 on to the android application?if yes, can u help me out in sending me 
 ur source code so that i can also learn how to. can u let me know one 
 more thing,are u retreiveing data as XMl formatfrom server or as 
 normal string.please let em know ur serer also.is it apache or jboss? 
 please help me out 

 On Jan 29, 4:09 pm, n2 daniel.mury...@googlemail.com wrote: 
  Hello! 
  i am working on  anandroidclient which is calling methods of a REST 
  web service. I am using the commons HttpClient of theandroidapi. 
  When i am calling a simple get method with HttpClient in theandroid 
  emulator i get an exception, message is Connection refused.  I cant 
  see any stacktrace, but this is a another problem (Logging inandroid??) 
  
  The (dummy) URL which is called:
 http://localhost/itsmyphone-server/rest/this/is/a/method 
  When i am loading this URL with my browser everything is fine. When i 
  am calling this Url by HttpClient in a JUnit test outside ofandroid 
  everything works fine, response is ok, no error. 
  
  Really strange: When i am calling the URL http://www.google.com; WITH 
  myandroidclient also everything works fine. 
  
  Whats the problem of theandroidHttpClient with the 
 Urlhttp://localhost/itsmyphone-server/rest/this/is/a/method?Is there a 
  feature inandroidto accept only Urls starting withhttp://
 www.google.com? 
  
  Here is my code: 
  
  -- Class 1: HalloAndroid -- 
  
  package org.n2.android.hallo; 
  import org.apache.commons.logging.Log; 
  import org.apache.commons.logging.LogFactory; 
  importandroid.app.Activity; 
  importandroid.os.Bundle; 
  importandroid.widget.TextView; 
  
  public class HalloAndroid extends Activity { 
  
  private static final Log LOG = 
  LogFactory.getLog( HalloAndroid.class ); 
  
  /** Called when the activity is first created. */ 
  @Override 
  public void onCreate(Bundle icicle) { 
  super.onCreate(icicle); 
  TextView tv = new TextView( this ); 
  HttpHandler httpHandler = new HttpHandler(); 
  try 
  { 
tv.setText( httpHandler.executeGet() ); 
  } 
  catch( Exception e ) 
  { 
LOG.error( Error while executing HTTP method: , e ); 
tv.setText( Error while executing HTTP method:  + 
  e.getMessage() ); 
  } 
  setContentView( tv ); 
  } 
  
  } 
  
  -- Class 2: HttpHandler -- 
  
  package org.n2.android.hallo; 
  
  import org.apache.commons.httpclient.HttpClient; 
  import org.apache.commons.httpclient.methods.GetMethod; 
  
  public class HttpHandler 
  { 
private static final org.apache.commons.logging.Log LOG = 
  org.apache.commons.logging.LogFactory.getLog( HttpHandler.class ); 
  
private static final String URL = http://localhost/itsmyphone- 
  server/this/is/a/method ; 
//private static final String URL = http://www.google.com;; 
  
public String executeGet() 
{ 
  String result = null; 
  HttpClient httpClient = new HttpClient(); 
  GetMethod getMethod = new GetMethod( URL ); 
  try 
  { 
httpClient.executeMethod( getMethod ); 
result = getMethod.getResponseBodyAsString(); 
  } 
  catch( Exception e ) 
  { 
LOG.error( Error while excecuting HTTP method. URL is:  + URL, 
  e ); 
throw new RuntimeException( Error while excecuting HTTP method. 
  URL is:  + URL + , Cause:  + e.getMessage(), e); 
  } 
  return result 
} 
  
  } 
  
  Can you help me? Thank you! 
  Daniel / n2

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

2012-08-06 Thread Kang Lu
This works for me. Thanks!

On Saturday, August 4, 2012 11:20:51 PM UTC+8, Kostya Vasilyev wrote:

 I've run into this exact issue before.

 My fix was to add Binder.clearCallingIdentity() in my RemoteViewsService 
 callbacks where I needed to access my non-exported provider.

 Now we're back from the launcher's identity to the identity of the app's 
 process, where access is allowed.

 It fit into the code structure like this:

 public static class MyWidgetService extends RemoteViewsService {
 @Override
  public RemoteViewsFactory onGetViewFactory(Intent intent) {
 return new MyWidgetRemoteViewsFactory(getApplicationContext(), intent);
  }
 }

 private static class MyWidgetRemoteViewsFactory implements 
 RemoteViewsService.RemoteViewsFactory {
 ...
 @Override
 public void onDataSetChanged() {
 MyLog.i(TAG, onDataSetChanged);

 * // Revert back to our process' identity so we can work with our content 
 provider*
 * long identityToken = Binder.clearCallingIdentity();*
  try {
 // Query the message list
 Cursor listCursor = mContent.queryList(LIST_ITEM_LIMIT);
  if (listCursor != null) {
 try {
 
 } finally {
  listCursor.close();
 }
 }
  } finally {
 * // Restore the identity - not sure if it's needed since we're going to 
 return right here, but*
 * // it just *seems* cleaner*
 * Binder.restoreCallingIdentity(identityToken);*
  }
 }


 The only place where MyWidgetRemoteViewsFactory uses the content provider 
 is its onDataSetChanged() -- contrary to proimises made by the 
 documentation, I've decided to play it safe and avoid keeping an open 
 cursor during the lifetime of the factory.

 If your factory keeps an open cursor outside of one method's scope, you 
 may need this trick in the other methods as well.

 -- K

 2012/8/4 NickL nicklongi...@gmail.com

  Error accessing content provider in RemoteViewService

  Hi,

 I'm trying to build a home screen widget for my app and I am using 
 stackview, remoteviewservice. In the RemoteViewsService, I need to query 
 the content provider. My cotent provider is set exported=false. However, 
 when I want to add the widget on screen, I get this error
 java.lang.SecurityException: Permission Denial: reading 
 com.xxx.android.provider.**yyyContentProvider uri 
 content://*com.zzz.an*http://com.zzz.an/
 *
 *
 If I set the provider to exported=true, it works well. But I don't want 
 this solution. Anyone can helps me? 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] Re: Source not found, but I've given a source?

2012-08-06 Thread Ajay Tribhuwan
let me ask you are you using proxy connection ?
if you are using then you have to include proxy connection class
even though you may check your program including the http url which does not
require proxy.

On 8/2/12, soynerdito soynerdito soynerd...@gmail.com wrote:
 Source not found normally means that the build version of the app is not
 exactly the same as the one being debugged. So first of all, do a project
 Clean. Delete your bin and gen folders. Then build your app and make sure
 it is building without errors. You may (but not normally required) to
 uninstall the app from the device and run again. All is to make sure that
 the app building at that moment is the one that is running on the device.

 On Thursday, August 2, 2012 2:40:10 AM UTC-4, Therion wrote:

 Hello, this is my first time posting, but I've run into a massive wall in

 my progress.

 A quick background, I started developing an app for the Android about 3-4

 months ago, off and on. It is a project I received from my college teacher

 for a sort of internship.
 I have to take a peice of text, inputted by the user, attach it to the a
 url address, and then access the website, retrieve the xml, parse it, and

 then display 3 peices of the code in separate textviews.
 Currently, I've separated the text input screen from the screen which
 displays the parsed data sections.

 However, I'm currently completely stuck trying to access the website and
 retrieve the xml.
 The debug simply says Source not found. and gives me an option to Edit
 Source Lookup Path. However, I've got the program already directed to the

 Source location.
 Currently, this is my code for attempting to access the website :

 public class Price_PageActivity extends Activity {

 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.price_page);

 HttpURLConnection con = null;
 URL url1;
 InputStream is=null;
 Intent intent = getIntent();
 String urlextra = intent.getStringExtra(android.grabber.string);
 try {
 url1 = new URL((http://www.reuters.com/finance/stocks/overview?symbol=;

 + urlextra ));
 con = (HttpURLConnection) url1.openConnection();
 // con.setReadTimeout(1 /* milliseconds */);
 // con.setConnectTimeout(15000 /* milliseconds */);
 con.setRequestMethod(GET);
 con.setDoInput(true);
 con.connect();
 is = con.getInputStream();



 BufferedReader rd = new BufferedReader(new InputStreamReader(is), 4096);
 String line;
 StringBuilder sb = new StringBuilder();
 while ((line = rd.readLine()) != null) {
 sb.append(line);
 }
 rd.close();
 String streamcontent = sb.toString();
 TextView Text = (TextView) findViewById(R.id.TextView02);
 Text.setText(streamcontent);
 } catch (IOException e) {
 //handle the exception !
 e.printStackTrace(); }



 If any more information is required, I will try my best to provide it.
 Any help I can gather with this problem would be greatly appreciated, as
 I've been stuck on this for a disappointingly long time now...



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

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

2012-08-06 Thread Kang Lu
a database column.

On Saturday, August 4, 2012 10:56:29 PM UTC+8, Mark Murphy (a Commons Guy) 
wrote:

 On Sat, Aug 4, 2012 at 10:35 AM, NickL nicklongi...@gmail.com wrote: 
  Error accessing content provider in RemoteViewService 
  
  Hi, 
  
  I'm trying to build a home screen widget for my app and I am using 
  stackview, remoteviewservice. In the RemoteViewsService, I need to query 
 the 
  content provider. My cotent provider is set exported=false. However, 
 when I 
  want to add the widget on screen, I get this error 
  java.lang.SecurityException: Permission Denial: reading 
  com.xxx.android.provider.yyyContentProvider uri content://com.zzz.an 

 What exactly is content://com.zzz.an pointing to? An image for an 
 ImageView? 

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

 _The Busy Coder's Guide to Android Development_ Version 4.0 Available! 


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

Re: [android-developers] How to view rtf file in webview

2012-08-06 Thread Mark Murphy
Find or write an RTF-HTML converter, then show the HTML in a WebView.

On Sat, Aug 4, 2012 at 2:26 AM, Balaji Shanmugam
balajishanmug...@gmail.com wrote:
 Hi,

   i need to show rtf file in webview. but i cn't. anybody give some idea
 to do it.

 Regards,
 Balaji.S

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



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

_The Busy Coder's Guide to Android Development_ Version 4.0 Available!

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


[android-developers] android emulator doesn't start

2012-08-06 Thread SPie
hi,

i was interested in developing android apps and so i installed everything i 
need for
i also created an avd to test my first helloWorld app but the problem is, 
that the emulator didn't start. 
when i start the avd from the avd manager, there apears a progress bar but 
it disapears before its finished without any reaction(no emulator and also 
no error apears)
also when i started it in eclipse, the same effect. no error message in the 
console or in logcat and no emulator(also no process in the taskmanager)
i searched for other problems like mine and tried all of the solutions, but 
nothing worked.
then, after one day trying, there comes a reaction in the eclipse console, 
when i try to launch the helloWorld app:

Android Launch!
adb is running normally.
Performing com.helloworld.HelloWorldActivity activity launch
Launching a new emulator with Virtual Device 'test'

But then its the same like before.
AND: when i start the avd through in the console, instantly an error 
apears... emulator-arm.exe doesn't work anymore

does anyone have a solution for this problem?

greez spie

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

2012-08-06 Thread imran
when I try to create a new project, while creating the project there is a 
requied text field hierarachical parent I which i dont know which to put. 
it gives a red cross if i dont know any thing but if i give any thing the 
red cross disappears but when the project is get created the R.java file 
doesnt create. I think the hierarchical parent required some special 
characters. plz tell me whats the problem?

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

[android-developers] Open Samples in Eclipse

2012-08-06 Thread Christoph
I downloaded one of the samples in the android training area. It contains 
just a src and a res directory. I could not find an easy way to import 
this into eclipse. The functionality found at 
File-new-Project-Android-Android Project from Existing Code does not 
work, since some metadata is missing. Is there an eclipse-aware version of 
the samples? Or is there some other way in eclipse to import the samples 
(better then creating a new project and merging the sample stuff into it)?
Christoph

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

2012-08-06 Thread HOUSSEM ZAIER

You have to filter all what you are receiving by the broadcast receiver. 
http://www.tutos-android.com/broadcast-receiver-android
example of using   the broadcast receiver.
Good luck 

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

[android-developers] Re: java.lang.IllegalStateException: Fragement no longer exists for key f1: index 3

2012-08-06 Thread hostj2me
I am also seeing this issue. 

java.lang.IllegalStateException: Fragement no longer exists for key f451: 
index 2
at 
android.support.v4.app.FragmentManagerImpl.getFragment(FragmentManager.java:534)
at 
android.support.v4.app.FragmentStatePagerAdapter.restoreState(FragmentStatePagerAdapter.java:208)
at android.support.v4.view.ViewPager.setAdapter(ViewPager.java:374)

Have you found a solution?


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] my applicationg works with 2.2 device but not woth 2.3(galaxy i9000)

2012-08-06 Thread wolf
someone please help me

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

[android-developers] Android Developer Console: Pricing Apps

2012-08-06 Thread Carl K.
I have never really cared in detail, even though I'm using it for a while...

After reading the documentation for Pricing Apps for Selling Apps in 
Multiple Currencies 
(http://support.google.com/googleplay/android-developer/bin/answer.py?hl=enanswer=1169947topic=15867ctx=topic),
 I'm still unsure if I understand it correctly. Here some excerpts:

 [...] When an app is uploaded to Google Play, you will be asked
 to set a default price for the app in your home currency. This price
 will be used for all countries/regions which you do not manually
 override.

In my understanding, this means that the default price is used for countries 
that you don't (can't) specify the price manually (as it says..)

Second paragraph:

 For each country that you wish sell your app in, check the box next to
 that country and enter a price. You cannot target a particular country
 without entering a price. [...] The autofill conversion uses the daily
 exchange rate on the day that you set the price; it does not float.

a) If an app should be sold in a specific country, its box requires to be 
checked and set (if a text element is there).
b) The price in that specific country should not float.

Is my understanding so far correct? In b), the price (target currency) DOES 
float ... sometimes, at least. And the original currency does change too at the 
same time. So, I am very confused.

Additional Question: For countries that do not have this currency text-element, 
will the price be automatically set to their currency on save? I guess, it does 
(should) not float either.

Kind Regards,
Carl

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

2012-08-06 Thread imran
I got an error of hierarchical parent while i was trying to create a new 
project. I am not sure what to give in the hierarchical parent text field 
while creating a new project. it shows a red cross but when i give any text 
it removes the red cross but it doesnt create the R. file in project. plz 
help.

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

2012-08-06 Thread jayd
I’m developing a training app for the company I work for and we need a way 
to install it on employees devices. Is it possible to install from a 
corporate server?

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

[android-developers] Re: How to use a custom keyboard for the application

2012-08-06 Thread vk hooda

Hi Murali,

you have to need start service for keyboard same as for softkeyboard.You 
can refer latin keyboard example for your custom keyboard.

Thanks
vk hooda


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Interview Question For 1yr Expirance in Android Application Development

2012-08-06 Thread Dharmendra Deshmukh
Friends pls help me for my given subject topics ..
I need Interview Q  there Ans also ..
technical Question + Simple HR Question Also

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

2012-08-06 Thread xisuz
Hello Cheng,

Its a long time you posted this question and there is still no answer to it.
I just ran into this issue and wanted to know if you found any solution to 
it.
Please let me know if there is any solution to it or what you did for this.

Thank you.

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

[android-developers] How to get instance of PowerManagerService?

2012-08-06 Thread macias
Hello all,

  IN SHORT:
I need to get instance of PowerManagerService (in order to call its method 
isScreenBright). However I am unable to do it, after reading Android 
sources, the closest guess was to get it (via reflection) from 
android.os.ServiceManager by calling getService. The problem is the 
resulting class name is BinderProxy (the class name of the object which I 
get after actual invoke of getService), not PowerManagerService and I am 
stuck at this point. The types have to match in order to continue working 
with reflection invoking.

  BACKGROUND STORY (safe to skip it):
I try to read real brightness of the screen (not the one that should be 
set, but the real one). All top level brightness readers method return 
theoretical values (most likely -- from settings), so when phone lowers it 
automatically, those top level methods get the same result despite, the 
brightness changed. I figured out, I try isScreenBright method, it should 
tell me if phone is in normal brightness mode, or in power save mode 
(source code which sets this mode look promising anyway).

Thank you in advance.
 

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

[android-developers] File printer for multiple sensor data

2012-08-06 Thread Roman
I´m programming a service to recollect data from several sensors. I do not 
want to overload the system with the service.

I have a sensor data listener service, this recolletc data from several 
sensors and try to save on a each sensor file. The code of the method is in 
below:

*public class SensorPrinterService extends Service implements 
SensorEventListener {*
* **
*
* private final IBinder binder = new SensorPrinterBinder();*
* **
*
* private SensorPrinter [] printers = {*
* new SensorPrinter(Sensor.TYPE_ACCELEROMETER), *
* new SensorPrinter(Sensor.TYPE_GYROSCOPE), *
* new SensorPrinter(Sensor.TYPE_MAGNETIC_FIELD), *
* new SensorPrinter(Sensor.TYPE_ORIENTATION), *
* new SensorPrinter(Sensor.TYPE_LIGHT), *
* new SensorPrinter(Sensor.TYPE_PROXIMITY)*
* };*
* **
*
* private SensorDetection [] sensors = new SensorDetection[printers.length];
*
* **
*
* public IBinder onBind(Intent intent) {*
* return binder;*
* // return the binder(myService reference) when service*
* // connected using Service Connection*
* }*
*
*
* // Instance of the Service is now in SensorPrinterBinder*
* public class SensorPrinterBinder extends Binder {*
* SensorPrinterService getService() {*
* return SensorPrinterService.this;*
* }*
* }*
* **
*
* public void onCreate() {*
* super.onCreate(); *
* **
*
* Log.i(this.getClass().getSimpleName(), Creating); *
* **
*
* for(int i = 0; i  printers.length; i++) {*
* **
*
* try {*
* if ( printers[i].open() ) {*
* sensors[i] = new SensorDetection(this.getApplicationContext(), *
* printers[i].getSensorType(), SensorManager.SENSOR_DELAY_GAME, this);*
* **
*
* sensors[i].start();*
* }*
* else { *
* if( printers[i].EXTERNAL_STORAGE_AVAILABLE == false ) {*
* Log.e(this.getClass().getSimpleName(), printers[i].getSensorName() *
* +  - EXTERNAL_STORAGE_AVAILABLE_ERROR);*
* showNotification( this.getString( 
R.string.EXTERNAL_STORAGE_AVAILABLE_ERROR ) );*
* }*
* else {*
* Log.e(this.getClass().getSimpleName(), printers[i].getSensorName() *
* +  - EXTERNAL_STORAGE_WRITEABLE_ERROR);*
* showNotification( this.getString( 
R.string.EXTERNAL_STORAGE_WRITEABLE_ERROR ) );*
* } *
* }*
* } catch (FileNotFoundException e) {*
* Log.e(this.getClass().getSimpleName(), e.toString());*
* showNotification( e.toString() );*
* }*
* **
*
* }*
* **
*
* }*
* **
*
* public void onDestroy() {*
* **
*
* Log.i(this.getClass().getSimpleName(), Destroying);*
* **
*
* for(int i = 0; i  printers.length; i++) {*
* sensors[i].stop();*
* printers[i].close( true ); *
* }*
* **
*
* super.onDestroy(); *
* **
*
* }*
* **
*
* private void showNotification(String text) {*
* **
*
* NotificationManager notificationManager = (NotificationManager) *
* getSystemService(NOTIFICATION_SERVICE);*
* Notification notification = new Notification(R.drawable.warning, *
* this.getString( R.string.service_error_titleonbar ), *
* System.currentTimeMillis());*
* notification.flags = Notification.FLAG_AUTO_CANCEL;*
* PendingIntent contentIntent = PendingIntent.*
* getActivity(this, 0, new Intent(this, Runner.class), 0);*
*
*
* notification.setLatestEventInfo(this.getApplicationContext(), *
* this.getString( R.string.service_error_title ), *
* text, contentIntent);*
*
*
* int SERVER_DATA_RECEIVED = 1;*
* notificationManager.notify(SERVER_DATA_RECEIVED, notification);*
* **
*
* }*
*
*
* public void onAccuracyChanged(Sensor sensor, int accuracy) {*
* // TODO Auto-generated method stub*
* **
*
* }*
*
*
* public void onSensorChanged(SensorEvent event) {*
* **
*
* switch( event.sensor.getType() ) {*
* case Sensor.TYPE_ACCELEROMETER:*
* **
*
* Log.i(this.getClass().getSimpleName(), TYPE_GYROSCOPE:  *
* + event.toString());*
* **
*
* synchronized( this ) {*
* printers[0].onSensorChanged(event);*
* }*
* **
*
* break;*
* case Sensor.TYPE_GYROSCOPE:*
*
*
* Log.i(this.getClass().getSimpleName(), TYPE_GYROSCOPE:  *
* + event.toString());*
* **
*
* synchronized( this ) {*
* printers[1].onSensorChanged(event);*
* }*
* **
*
* break;*
* case Sensor.TYPE_MAGNETIC_FIELD:*
*
*
* Log.i(this.getClass().getSimpleName(), TYPE_MAGNETIC_FIELD:  *
* + event.toString());*
* **
*
* synchronized( this ) {*
* printers[2].onSensorChanged(event);*
* }*
* **
*
* break;*
* case Sensor.TYPE_ORIENTATION:*
*
*
* Log.i(this.getClass().getSimpleName(), TYPE_ORIENTATION:  *
* + event.toString());*
* **
*
* synchronized( this ) {*
* printers[3].onSensorChanged(event);*
* }*
* **
*
* break;*
* case Sensor.TYPE_LIGHT:*
* **
*
* Log.i(this.getClass().getSimpleName(), TYPE_LIGHT:  *
* + event.toString());*
* **
*
* synchronized( this ) {*
* printers[4].onSensorChanged(event);*
* }*
* **
*
* break;*
* case Sensor.TYPE_PROXIMITY:*
*
*
* Log.i(this.getClass().getSimpleName(), TYPE_PROXIMITY:  *
* + event.toString());*
* **
*
* synchronized( this ) {*
* printers[5].onSensorChanged(event);*
* }*
* **
*
* break;*
* default:*
* break; *
* }*
* **
*
* }*
* **
*
* **
*
*}*

I have a printer object and a sensor detector, the code is in below:

*public class SensorDetection {

private SensorManager sensorManager;

[android-developers] D/SntpClient(61): request time failed: java.net.SocketException: Address family not supported by protocol

2012-08-06 Thread Shiningnihar
Hi,
This is my activity. I am just trying to write data to a file and again 
reading the same file as a RandomAccessFile.
Some time the code is working fine but some time it is showing
- [ D/SntpClient(61): request time failed: java.net.SocketException: 
Address family not supported by protocol].---
Plz help me. Thanks in advance.

This is the code  
--
package nihar.rajesh.records;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.io.Serializable;
import java.net.SocketException;

import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;
import android.widget.TextView;

@SuppressWarnings(serial)
public class StudentsOutput extends Activity implements Serializable{
 TextView roll,name,addr,mob,email;
 public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.studentoutput);

roll = (TextView)findViewById(R.id.textRollno);
name = (TextView)findViewById(R.id.textName);
addr = (TextView)findViewById(R.id.textAddr);
mob = (TextView)findViewById(R.id.textMob);
email = (TextView)findViewById(R.id.textEmail);

StudentRecord stdrecord= new StudentRecord();

stdrecord =(StudentRecord) 
getIntent().getExtras().get(StudentDetails);


   // Toast.makeText(this, stdrecord.roll, Toast.LENGTH_SHORT).show();

roll.setText(Roll No:  + stdrecord.roll);
name.setText(Name:  +stdrecord.name);
addr.setText(Address:  +stdrecord.addr);
mob.setText(Mob:  +stdrecord.mob);
email.setText(Email:  +stdrecord.email);

   
   //Creating the file 
String filename = Student.txt;
File file = new File(Environment.getExternalStorageDirectory(),
filename);
FileOutputStream fos;
 //creating the byte array
 if( stdrecord.toSring().length()!= 80)
   {
   StringBuilder tmp= new StringBuilder();
   tmp.append(stdrecord.toSring());
   int len=stdrecord.toString().length();
   System.out.print(len);
   for (int i=0;i(80-len); i++)
   {
   tmp.append( );
   }
 // Creating the byte array   
  byte[] data = tmp.toString().getBytes();
   
  try {
   fos = new FileOutputStream(file,false);
   fos.write(data);
   fos.flush();
   fos.close();
  } 
 catch (FileNotFoundException e)
{
   // handle exception
}
 catch (IOException e)
{
  // handle exception
}
 } 
   
/*   try{
  // Create file 
  FileWriter fstream = new FileWriter(Student.txt,true);
  BufferedWriter out = new BufferedWriter(fstream);
  out.write(Hello Java);
  //Close the output stream
  out.close();
  }catch (Exception e){//Catch exception if any
  System.err.println(Error:  + e.getMessage());
  }
  }*/
 // Reading the file in Random access form
RandomAccessFile access=null;
try 
 {
   access = new RandomAccessFile(file,r);
   System.out.println(FilePinter:+access.getFilePointer());
   System.out.println(Read full line:  + access.readLine());
   System.out.println(FilePinter:+access.getFilePointer());
 }
 catch (FileNotFoundException e)
 {
// TODO Auto-generated catch block
e.printStackTrace();
 }
catch(SocketException ex)
   {
 Log.e(Error :  , Error on soapPrimitiveData()  + 
ex.getMessage());
   ex.printStackTrace();
   }
catch (IOException e)
 {
// TODO Auto-generated catch block
e.printStackTrace();
 }
 finally
{
try {
access.close();
}
catch (IOException e)
{
// TODO Auto-generated catch block
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

[android-developers] Why does GCM unregister when I close Eclipse application?

2012-08-06 Thread PHT
Disclaimer: This is my first activity on my first app.

When I launch my app on my actual device through Eclipse I can see in the 
LogCat that a regId has been registered with GCM ... when I close the app on my 
device LogCat shows the same regId being unregistered.

Questions:
1) what would cause regId to be unassigned - is it because its running in 
Eclipse test environment?
2) while my device is still registered I send a message from my desktop app and 
the response is that ... success=1, failed=0 ... but I don't see anything on 
my phone ... I assume it is because i don't have any code to listen for it ... 
where can I get some sample code?
3) when my device has registered with GCM I don't see any traffic registered on 
Google API reports - should I?

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


Re: [android-developers] CheckedTextView tutorial

2012-08-06 Thread MAYUR BALDHA
th

On Sunday, April 18, 2010 2:26:13 AM UTC+5:30, raqz wrote:
 Hi,
 
 I need to display contents of a list of objects. Capture the selected
 
 items and later process it. I have been trying to find a tutorial on
 
 net but in vain.
 
 Could some one please advise me when can I find a tutorial.
 
 I know how to display a list but I want the CheckedTextView option.
 
 
 
 Thanks,
 
 Raqeeb
 
 
 
 -- 
 
 You received this message because you are subscribed to the Google
 
 Groups Android Developers group.
 
 To post to this group, send email to android-developers@googlegroups.com
 
 To unsubscribe from this group, send email to
 
 android-developers+unsubscr...@googlegroups.com
 
 For more options, visit this group at
 
 http://groups.google.com/group/android-developers?hl=en

ese 

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

2012-08-06 Thread pogo lin
Hi All,

I have installed NexusHD2-ICS-CM9-HWA v2.5) on HTC HD2. Then I wrote an 
Application on this machine to open USB as host.

private UsbManager mManager;
...
mManager = (UsbManager)getSystemService(Context.USB_SERVICE);
if( mManager != null )
{
log(Get USB service);
if( mManager.getDeviceList().values().size()  0 )
{
log(Has more than one device);
}
else
{
log(No device in list);
}
}
else
log(No USB service);


The result is always No USB service. Could any one give me tips to solve 
this problem?

Thanks a lot!!

Pogo

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

2012-08-06 Thread podbereznov maksim
private void circle() throws InterruptedException{
for (int i = 0; i = 100; i++ , Thread.sleep(100)) {

   



}
}

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

2012-08-06 Thread David Lanier
im curious to know if its possible to create an app that would allow you in 
insert a picture right behind a word as if you were showing inflection or 
to which emotion you were speaking (as an example, you could use the word 
really? but mean it sarcastically or hatefully) and with a picture it 
would represent that word best.  the idea would come from the concept of 
how you can wrap words around pictures in microsoft word.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: AnimationDrawable: animation can't be started in onResume

2012-08-06 Thread Doug Heisler
I know this post is old but if you are still having trouble, start your 
AnimationDrawable in the onWindowFocusChanged method.  Good luck:)





On Tuesday, January 27, 2009 10:36:03 AM UTC-5, G. Blake Meike wrote:

 There's already been some discussion of this, in various lists and 
 blogs.  I finally got an AnimationDrawable to work, but I cannot start 
 it from onResume.  I can start it from a timer that onResume starts, 
 or an onClickHandler. 

 I've poked around the source a bit and I can't figure out, 
 specifically, what state the view has to be in, in order for the 
 background AnimationDrawable to start. 

 Can anyone enlighten me? 

 Thanks 
   -blake

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] ANN: Itoa project lets you rebuild iOS applications for Android

2012-08-06 Thread Pol Oribello
Hi Dmitry,

I'm trying to build the sample project but I'm getting this error:

make:
/Users/Desktop/FirstItoaApp/ItoaNDK/toolchains/arm-eabi-4.2.1/darwin-x86_64/bin/arm-eabi-gcc:
No such file or directory

And when I'm getting the latest build I'm getting this message:

Configure: toolchain build
Building : toolchain [this can take a long time].
Error while building toolchain. See
/Users/Downloads/itoa/toolchain/out/build.log
iMac:Downloads poloribello$ ./build-ndk.sh

Thanks,
Pol

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

2012-08-06 Thread wgndrd
anyone ever used information off the http://www.kandroid.org? 
Does it relate to  http://developer.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] Android emulator, blank space surrounding the vritual device

2012-08-06 Thread seerumi
Hello

The emulator has previously worked, but now when I got a new computer the 
emulator started acting strange.
When I load my virtual device there's huge window and lots of blank white 
space surrounding the phone emulator.
This wouldn't matter otherwise, but I'm unable to click the phone's 
buttons. If I'm to click any of the phone's buttons
I have to click somewhere in the empty space.

The new computer is MacBook Pro with OS 10.7.4

Here's screenshot to elaborate:


https://lh5.googleusercontent.com/-m9z3hiPTpAM/UB-Sv0qOBwI/ADM/LlcC6orpB1o/s1600/Screen+Shot+2012-08-06+at+12.45.18.png

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

2012-08-06 Thread Joshua Li
On Thursday, 19 July 2012 00:42:27 UTC-7, marcin kolonko  wrote:
 i have 2 views in a RelativeLayout like this:?xml version=1.0 
 encoding=utf-8?
 RelativeLayout
     xmlns:android=http://schemas.android.com/apk/res/android;
     android:layout_width=match_parent
     android:layout_height=match_parent 
 
     View
         android:id=@+id/view1
         android:layout_width=match_parent
         android:layout_height=200dp
         android:background=@drawable/shape_red/
 
     View
         android:id=@+id/view2
         android:layout_width=match_parent
         android:layout_height=50dp
         android:layout_below=@id/view1
         android:background=@drawable/shape_blue/
 
 /RelativeLayout
 
 now, i animate the y property of view1 from 0 to 300. but i want view2 to 
 change its position according to view1 - because view2 is set to be below 
 (layout-below) view1.
 as this isn't working, i tried to add an onAnimationEnd listener to the 
 animation. like this:    ObjectAnimator ani = ObjectAnimator.ofFloat(view1, 
 Y, 200);
     ani.setDuration(2000);
     ani.addListener(new AnimatorListenerAdapter()
     {
         @Override
         public void onAnimationEnd(Animator animation)
         {
             LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, 
 view2.getHeight());
             params.addRule(RelativeLayout.BELOW, view1.getId());
 
             view2.setLayoutParams(params);
         }
     });
 
 but view2 didn't change its position at all.
 i would like to avoid making a new animation for view2 if possible, so please 
 don't bother to suggest one. ;)
 does anyone have some suggestions?

I'm facing the same issue. Were you ever able to find a solution to 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] Android memory allocation and static variables

2012-08-06 Thread Mario Bat
Hi everyone, I am writing on an Android application where i am registering 
to GCM. When I click the cehckbox to register i want to set a static 
variable isRegistered to true/false. Now when i receive the message I want 
to check this variable and if it is true I make an notification.
So when i get out of my app I still receive the notification and everything 
is good. But what happens when Android deletes my application from memory 
to free memoy? Does my static variable still exist?

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

2012-08-06 Thread Mark Murphy
AFAIK, this is not possible, outside of a custom build of Android.

On Sat, Aug 4, 2012 at 3:40 PM, macias pilichowski.mac...@gmail.com wrote:
 Hello all,

   IN SHORT:
 I need to get instance of PowerManagerService (in order to call its method
 isScreenBright). However I am unable to do it, after reading Android
 sources, the closest guess was to get it (via reflection) from
 android.os.ServiceManager by calling getService. The problem is the
 resulting class name is BinderProxy (the class name of the object which I
 get after actual invoke of getService), not PowerManagerService and I am
 stuck at this point. The types have to match in order to continue working
 with reflection invoking.

   BACKGROUND STORY (safe to skip it):
 I try to read real brightness of the screen (not the one that should be set,
 but the real one). All top level brightness readers method return
 theoretical values (most likely -- from settings), so when phone lowers it
 automatically, those top level methods get the same result despite, the
 brightness changed. I figured out, I try isScreenBright method, it should
 tell me if phone is in normal brightness mode, or in power save mode (source
 code which sets this mode look promising anyway).

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



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

_The Busy Coder's Guide to Android Development_ Version 4.0 Available!

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


Re: [android-developers] Re: updating layout params after animation finished

2012-08-06 Thread marcin kolonko
no.
i had to animate both views separately.



On 6 August 2012 11:10, Joshua Li li.joshua...@gmail.com wrote:

 On Thursday, 19 July 2012 00:42:27 UTC-7, marcin kolonko  wrote:
  i have 2 views in a RelativeLayout like this:?xml version=1.0
 encoding=utf-8?
  RelativeLayout
  xmlns:android=http://schemas.android.com/apk/res/android;
  android:layout_width=match_parent
  android:layout_height=match_parent 
 
  View
  android:id=@+id/view1
  android:layout_width=match_parent
  android:layout_height=200dp
  android:background=@drawable/shape_red/
 
  View
  android:id=@+id/view2
  android:layout_width=match_parent
  android:layout_height=50dp
  android:layout_below=@id/view1
  android:background=@drawable/shape_blue/
 
  /RelativeLayout
 
  now, i animate the y property of view1 from 0 to 300. but i
 want view2 to change its position according to view1 - because view2 is set
 to be below (layout-below) view1.
  as this isn't working, i tried to add an onAnimationEnd listener to the
 animation. like this:ObjectAnimator ani = ObjectAnimator.ofFloat(view1,
 Y, 200);
  ani.setDuration(2000);
  ani.addListener(new AnimatorListenerAdapter()
  {
  @Override
  public void onAnimationEnd(Animator animation)
  {
  LayoutParams params = new
 LayoutParams(LayoutParams.MATCH_PARENT, view2.getHeight());
  params.addRule(RelativeLayout.BELOW, view1.getId());
 
  view2.setLayoutParams(params);
  }
  });
 
  but view2 didn't change its position at all.
  i would like to avoid making a new animation for view2 if possible, so
 please don't bother to suggest one. ;)
  does anyone have some suggestions?

 I'm facing the same issue. Were you ever able to find a solution to 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

Re: [android-developers] Android memory allocation and static variables

2012-08-06 Thread Mark Murphy
No, when Android terminates your process, your static data members go
away. A new process will be forked to run your app on the next message
(or when the user launches your activity, or whatever), at which point
your static data members will have their default values.

On Mon, Aug 6, 2012 at 7:03 AM, Mario Bat batfudba...@gmail.com wrote:
 Hi everyone, I am writing on an Android application where i am registering
 to GCM. When I click the cehckbox to register i want to set a static
 variable isRegistered to true/false. Now when i receive the message I want
 to check this variable and if it is true I make an notification.
 So when i get out of my app I still receive the notification and everything
 is good. But what happens when Android deletes my application from memory to
 free memoy? Does my static variable still exist?

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



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

_The Busy Coder's Guide to Android Development_ Version 4.0 Available!

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


Re: [android-developers] Re: updating layout params after animation finished

2012-08-06 Thread marcin kolonko
actually i had an idea to apply layout_below on update (when view1 is
animated), but didn't try it out in the end.

On 6 August 2012 13:05, marcin kolonko makolo...@gmail.com wrote:

 no.
 i had to animate both views separately.



 On 6 August 2012 11:10, Joshua Li li.joshua...@gmail.com wrote:

 On Thursday, 19 July 2012 00:42:27 UTC-7, marcin kolonko  wrote:
  i have 2 views in a RelativeLayout like this:?xml version=1.0
 encoding=utf-8?
  RelativeLayout
  xmlns:android=http://schemas.android.com/apk/res/android;
  android:layout_width=match_parent
  android:layout_height=match_parent 
 
  View
  android:id=@+id/view1
  android:layout_width=match_parent
  android:layout_height=200dp
  android:background=@drawable/shape_red/
 
  View
  android:id=@+id/view2
  android:layout_width=match_parent
  android:layout_height=50dp
  android:layout_below=@id/view1
  android:background=@drawable/shape_blue/
 
  /RelativeLayout
 
  now, i animate the y property of view1 from 0 to 300. but i
 want view2 to change its position according to view1 - because view2 is set
 to be below (layout-below) view1.
  as this isn't working, i tried to add an onAnimationEnd listener to the
 animation. like this:ObjectAnimator ani = ObjectAnimator.ofFloat(view1,
 Y, 200);
  ani.setDuration(2000);
  ani.addListener(new AnimatorListenerAdapter()
  {
  @Override
  public void onAnimationEnd(Animator animation)
  {
  LayoutParams params = new
 LayoutParams(LayoutParams.MATCH_PARENT, view2.getHeight());
  params.addRule(RelativeLayout.BELOW, view1.getId());
 
  view2.setLayoutParams(params);
  }
  });
 
  but view2 didn't change its position at all.
  i would like to avoid making a new animation for view2 if possible, so
 please don't bother to suggest one. ;)
  does anyone have some suggestions?

 I'm facing the same issue. Were you ever able to find a solution to 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

Re: [android-developers] Android memory allocation and static variables

2012-08-06 Thread Mario Bat
Ok...the problem is that if I unregister from GCM the app will still 
receive notifications until GCM sets it to unregistered that can wait for 
2-3 days. Thats what i heard at least...
The only way I see here is to write it to a file if its registered or not, 
and when the push comes check in the file if it is registered. You have any 
other suggestions?


Dana ponedjeljak, 6. kolovoza 2012. 13:05:54 UTC+2, korisnik Mark Murphy (a 
Commons Guy) napisao je:

 No, when Android terminates your process, your static data members go 
 away. A new process will be forked to run your app on the next message 
 (or when the user launches your activity, or whatever), at which point 
 your static data members will have their default values. 

 On Mon, Aug 6, 2012 at 7:03 AM, Mario Bat batfudba...@gmail.com wrote: 
  Hi everyone, I am writing on an Android application where i am 
 registering 
  to GCM. When I click the cehckbox to register i want to set a static 
  variable isRegistered to true/false. Now when i receive the message I 
 want 
  to check this variable and if it is true I make an notification. 
  So when i get out of my app I still receive the notification and 
 everything 
  is good. But what happens when Android deletes my application from 
 memory to 
  free memoy? Does my static variable still exist? 
  
  -- 
  You received this message because you are subscribed to the Google 
  Groups Android Developers group. 
  To post to this group, send email to android-developers@googlegroups.com 
  To unsubscribe from this group, send email to 
  android-developers+unsubscr...@googlegroups.com 
  For more options, visit this group at 
  http://groups.google.com/group/android-developers?hl=en 



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

 _The Busy Coder's Guide to Android Development_ Version 4.0 Available! 


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

[android-developers] getting assets file in Uri ......FileNotFoundException

2012-08-06 Thread Narendra Singh Rathore
Hi all,
I am not getting what is wrong here in the following statement. Please tell
if anyone know about the cause of this behaviour.

*mUris[0]=Uri.parse(file:///android_asset/bottom_logo.png);*

I am getting *FileNotFoundException* for the above statement.
Am I giving the wrong path or something else is the problem?

I do have this image in my assets folder, and put a lot of efforts to find
the solution, but still unsuccessful.

Please, let me know what I am doing wrong.


Thanks n Regards,
NSR

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] What's the best place to find Android Developers willing to participate in a Startup?

2012-08-06 Thread Josphat Muchiri
yeah thats nice wonna work  with you

On Mon, Aug 6, 2012 at 2:14 AM, Bart Burg burgb...@gmail.com wrote:

 I'm looking for someone that would like to build an Android product
 together with me, and bring that product on the market. What would be the
 best place to look for Android Developers that also have affinity in
 entrepreneurship?

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

2012-08-06 Thread Meena Rengarajan
Is there any way to make the application prefer android mobile over WiFi 
connection?

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

2012-08-06 Thread Meena Rengarajan
Is there any way to make the application prefers Android mobile over WiFi 
connection?

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

[android-developers] Re: Accelerometer OnSensorChanged() no longer occur in standby

2012-08-06 Thread Pavel Brans
Hi all,
Three years pased. We faced the same problem. Sensors turn off after 
turning off the screen. Wake lock does not always help. Is this bug fixed? 
 In what version is it fixed (2х, 4x)?

---
Regards,
Pavel Konovalov

пятница, 28 августа 2009 г., 18:04:11 UTC+3 пользователь polymorph написал:

 Hi, 
 I have written an application (a service) that uses the accelerometer 
 to detect movement, and up until recently this has worked fine when 
 the device was in standby.   It has been regularly tested on HTC G1 
 and Magic and tested specifically to work under these conditions, but 
 it seems that a recent Firmware upgrade may have broken this (my Magic 
 stopped working in this scenario since the last firmware I think, a 
 few weeks ago).  I have recently acquired an HTC Hero and this also 
 fails to get the notifications. 

 What seems to occur now, is that the 
 SensorEventListener.OnSensorChanged() messages are not occuring at all 
 in standby, and they continue once the device is switched back on. 

 The application also checks for other changes such as GPS location 
 changes, and these continue to work in standby, so I would expect the 
 sensor messages to also continue to get through as they did 
 previously. 

 I have tried a wakelock, but only the full, screen-on wakelock allows 
 it to work, which is undesirable behaviour. 

 Can anyone help?  This has effectively broken my Android Market 
 application :( 


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

[android-developers] Custom theme for android DatePicker Dialog shows unpleasant border

2012-08-06 Thread sweta
Hi,
I am trying to use a custom date picker dialog
for this I modified code as below

@Override
protected Dialog onCreateDialog(int id) {
switch (id) {
case DATE_DIALOG_ID:
 return new DatePickerDialog(this,Android.R.style.
Theme_DeviceDefault_Light_Dialog, mDateSetListener, mYear, month, mDay);
}
return null;
}

after setting theme  I get an ugly non-transparent border around my date 
picker when it is displayed:

(screenshot here: http://i.stack.imgur.com/WO1YD.png)

What can I do to get rid of the border?


Thanks in Advance..


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

[android-developers] Got fail to set top app changed! when rotating the device.

2012-08-06 Thread Steven Nie
Hello everyone, 

I'm new to Android development, and I'm not sure why I'm getting this 
exception when I'm rotating the screen.

08-05 21:15:43.850: ERROR/ActivityManager(276): fail to set top app 
changed! (2)
java.lang.NullPointerException
at 
com.android.server.am.ActivityManagerService.handleTopAppChanged(ActivityManagerService.java:15942)
at 
com.android.server.am.ActivityManagerService.updateOomAdjLocked(ActivityManagerService.java:15392)
at 
com.android.server.am.ActivityManagerService.updateLruProcessInternalLocked(ActivityManagerService.java:1957)
at 
com.android.server.am.ActivityManagerService.updateLruProcessLocked(ActivityManagerService.java:1964)
at 
com.android.server.am.ActivityStack.resumeTopActivityLocked(ActivityStack.java:1692)
at 
com.android.server.am.ActivityStack.finishCurrentActivityLocked(ActivityStack.java:3910)
at 
com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3841)
at 
com.android.server.am.ActivityManagerService.forceStopPackageLocked(ActivityManagerService.java:3964)
at 
com.android.server.am.ActivityManagerService.access$400(ActivityManagerService.java:183)
at 
com.android.server.am.ActivityManagerService$2.handleMessage(ActivityManagerService.java:1231)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:156)
at 
com.android.server.am.ActivityManagerService$AThread.run(ActivityManagerService.java:1580)


You can see the code here http://pastebin.com/03GpfSLw. Also, I noticed 
that in the code here:
if (fragment != null) {
the fragment becomes null when the device rotates after the progress dialog 
is shown.

Thanks!

Steven

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] New Installation - Eclipse not recognizing the Android Development Kit on Windows Vista

2012-08-06 Thread dsxh

I looked through the FAQs for download issues and scanned through the 
forums, but didn't see this particular question. Please forgive me if it's 
been asked and answered elsewhere. 

This is on a personal non-work computer. I'm the administrator on the 
machine. 
This was a brand new installation of the JDK, Eclipse, and the ADK.

With help from a brief tutorial, I was able to install the JDK to 
C:\Program Files\Java\jre7 and edited my environment variables path in 
Advanced System Settings to include
c:\program files\java\jdk1.7.0_05\bin\  .  Off hand, it looks like I've 
installed to one folder and the bin file is in a different folder under jdk 
1.7.0_05\bin. In the tutorial that I viewed, it mentioned that you had to 
specific with the exact version that you were using. 

Then I installed Eclipse SDK also in the C:\Program Files folder. I read 
that no adjustment was necessary to the environment variables. 
At this point, it was suggested that I try Eclipse to find out how it was 
going so far. I opened Eclipse, chose my workgroup, and chose File, New, 
Java Project as suggested and was prompted for a project name. It seems as 
though everything was going great so far with no hitches. ... so far so 
good 


Finally, I installed the JDK in the C:\Program Files folder. After I 
finished, then I edited my environment variables path in Advanced System 
Settings to include
c:\program files (x86)\android-sdk\tools\ .  I wasn't sure why it was 
necessary to add the  ( x86 ) and the -sdk to the path , but this was from 
a trusted source. 
I went out to http://dl-ssl.google.com/android/eclipse from Help and 
Install New Software. I downloaded everything that was suggested.

However, this is where I ran into trouble. When I opened Eclipse, as an 
Administrator ( per the suggestion in the tutorial), I was supposed to 
choose File, New, and see the option for Android Project, but it wasn't 
included in the menu. 

In troubleshooting, I tried changing the environment variables path 
dropping the (x86) and the -sdk. Then I tried dropping just the -sdk and 
leaving the (x86) and vice versa. I tried reinstalling the tools
from http://dl-ssl.google.com/android/eclipse , but I received a message 
that the components had already been installed on this pc. 

In order to provide as many details as was necessary, I decided to go out 
and check the version number of the software (version 4.2.0 ..the latest 
version at the Eclipse website) . I saw a button for Installation Details 
which I clicked on. Android DDMS, Android Development Tools, Android 
Hierarchy Viewer, Android Native Development Tools, Android TraceView, 
Eclipse SDK, and Tracer for Open GLES are all in the list under Installed 
Software. Under Features , that whole host of software is included in 
addition to the Dalvik Debug Monitor. They're also included under Plug-Ins. 

In one thread on the forum, I saw where an additional Google plug-in was 
suggested to a user who was having an installation problem, BUT I was 
afraid to possibly add additional problems to resolve. 

Thanks, in advance, for any help you can provide




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] permission denied when trying to pull file from /data/data/packagename/files/junitreport.xml

2012-08-06 Thread tejasvi manmatha
I have rooted my device 
Now i want to pull the file from my phone
It show permission denied
each time i have to get into the directory on phone and change permission using 
chmod 
only then i will be able to pull the file

Is there are permanent solution ?

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

2012-08-06 Thread Rajeev chaubey
Android Native map is opening on direction listview not on map show 
directly... How it can be open directly to mapview?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Custom theme for android DatePicker dialog shows unpleasant border

2012-08-06 Thread sweta
Hi All,

I am trying to use custom DatePicker dialog.
For that I modified the OnCreateDialog method so that it returns a date 
picker with specific theme like this 
@Override
protected Dialog onCreateDialog(int id) {
switch (id) {
case DATE_DIALOG_ID:

return new 
DatePickerDialog(getActivity(),Android.R.style.Theme_DeviceDefault_Light_Dialog,
 
this, year, month, day);
 }
 I get an ugly non-transparent border around my date picker when it is 
displayed: 

(screenshot here: http://i.stack.imgur.com/WO1YD.png)

What can I do to get rid of the border?

Thanks in advance...


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

[android-developers] Factory mode is on !!!!!

2012-08-06 Thread Roman De Lara
hello everybody! someone know how to turn off the factory mode and change 
to user mode on android icecream??

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

[android-developers] How to connect to MySQL db

2012-08-06 Thread Andrey Shloma
Now i user mysql-connector-java-5.1.21-bin.jar library
And try next code:

private static final String CONNECTION = jdbc:mysql://x.x.x.x:3306/db;

private void getMySQLConnection() {
Connection con = null;
String str_res = ;

try{
Class.forName(com.mysql.jdbc.Driver).newInstance();

// Properties for user and password.
Properties p = new Properties();
p.put(user,***);
p.put(password,***);

// Now try to connect
Connection c = DriverManager.getConnection(CONNECTION, p);
} catch (Exception e) {}

Exception code:
com.mysql.jdbc.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The 
driver has not received any packets from the server.

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

2012-08-06 Thread Shivdeep Roy
I'm new to android programming. I have installed SDK and AVD Managers when 
i start my emulator with the AVD manager it doesn't start up. It only shows 
the Android Boot Screen, i keep it on for more than 5 hrs but no response. 
I also tried with the snapshot option but it also seem to be of no help. 
Please help ASAP.

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

[android-developers] Fragments : Advanced example or tutorials?

2012-08-06 Thread Simon Engler
Good Day,

I am trying to create a user interface for driving a robotic platform 
around. I have a number of programs that work indpendantly displaying 
video, logs, or graphical representation of a compass etc.

I follow tutorials given online, but when I try to implement my programs 
crash. The tutorials are simply, fragmenting lists to display text. They do 
not seem to work for displaying two different activities which are 
converted into fragments.

Are there any advanced user interface tutorials or shareware available that 
I can work with?


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

[android-developers] How to analyze message sending from broadcast receiver in android

2012-08-06 Thread Rajeev chaubey
How to analyze message sending from broadcast receiver in 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] [Question:developer] Simple Spinner Example ?

2012-08-06 Thread Ridho maulana
hai, im new in developing android program. and i just learn to make a
dropdown menu in android is a little handful.
cant you give me an Simple EXAMPLE of make=ing a GOOD Spinner. and when im
SELECTED item it will content an INTENT to move to another CLASS

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

2012-08-06 Thread tandra anil
Hi everyone,

My project is to create a Photo Timeline app for android mobiles, yea it is
existing already but still planning to add some extra features to it.. so
can you al please give me some guidelines how to start of with it.
and what all modules to include and al.

please provide me with some code snippets if existing with you so that
they'll be useful for me to start of.

please do reply ASAP

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

[android-developers] android app not running on emulator or device

2012-08-06 Thread HopelessDev
My emulator has problem running apps. I've been having these problems for 
the last 3 days, even simple apps like hello world does not run most of the 
time. I've set run config as manual to let me pick my own device, but after 
running my app, it doesn't even ask me to pick my device(for the past 3 
days i only managed to see that window trice) theres just a progress bar on 
the lower left that shows 100% but doesn't launch my app. The emulator 
boots fine, there's no error on the logcat or console, it just wont run. It 
ran a few times but most of the times it does not, I really want to learn 
android dev but these problems are stopping me. WHen I got home from school 
or before i go to school, i spent those times figurng out how to make this 
work. please help

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

2012-08-06 Thread Utsav
Hi,
I work on Microsoft Windows Vista 64-bit OS, I have installed 
- Eclipse(Version: Indigo Service Release 2)
- ADT(Version: 20.0.1.v201207132230-403220)
- Android 4.1(API 16)

But I need to get Android 2.3.3(API 10), so when I select Android 2.3.3(API 
10) and try to install, my catalog shows this errors

Preparing to install archives
Downloading SDK Platform Android 2.3.3, API 10, revision 2
File not found: C:\Program Files 
(x86)\eclipse\android_sdk\temp\android-2.3.3_r02-linux.zip (Access is 
denied)
Downloading Samples for SDK API 10, revision 1
File not found: C:\Program Files 
(x86)\eclipse\android_sdk\temp\samples-2.3.3_r01-linux.zip (Access is 
denied)
Skipping 'Google APIs, Android API 10, revision 2'; it depends on 'SDK 
Platform Android 2.3.3, API 10, revision 2' which was not installed.
Skipping 'Intel Atom x86 System Image, Android API 10, revision 1'; it 
depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was not 
installed.
Skipping 'Dual Screen APIs, Android API 10, revision 1'; it depends on 'SDK 
Platform Android 2.3.3, API 10, revision 2' which was not installed.
Skipping 'Real3D, Android API 10, revision 2'; it depends on 'SDK Platform 
Android 2.3.3, API 10, revision 2' which was not installed.
Skipping 'ADMIRAL, Android API 10, revision 5'; it depends on 'SDK Platform 
Android 2.3.3, API 10, revision 2' which was not installed.
Skipping 'ATRIX2, Android API 10, revision 2'; it depends on 'SDK Platform 
Android 2.3.3, API 10, revision 2' which was not installed.
Skipping 'Bionic, Android API 10, revision 2'; it depends on 'SDK Platform 
Android 2.3.3, API 10, revision 2' which was not installed.
Skipping 'defy+, Android API 10, revision 1'; it depends on 'SDK Platform 
Android 2.3.3, API 10, revision 2' which was not installed.
Skipping 'Droid4, Android API 10, revision 2'; it depends on 'SDK Platform 
Android 2.3.3, API 10, revision 2' which was not installed.
Skipping 'DroidRAZR, Android API 10, revision 5'; it depends on 'SDK 
Platform Android 2.3.3, API 10, revision 2' which was not installed.
Skipping 'MotorolaPro+, Android API 10, revision 2'; it depends on 'SDK 
Platform Android 2.3.3, API 10, revision 2' which was not installed.
Skipping 'MT870, Android API 10, revision 2'; it depends on 'SDK Platform 
Android 2.3.3, API 10, revision 2' which was not installed.
Skipping 'MT917, Android API 10, revision 1'; it depends on 'SDK Platform 
Android 2.3.3, API 10, revision 2' which was not installed.
Skipping 'PHOTON, Android API 10, revision 1'; it depends on 'SDK Platform 
Android 2.3.3, API 10, revision 2' which was not installed.
Skipping 'XT882, Android API 10, revision 2'; it depends on 'SDK Platform 
Android 2.3.3, API 10, revision 2' which was not installed.
Skipping 'XT928, Android API 10, revision 3'; it depends on 'SDK Platform 
Android 2.3.3, API 10, revision 2' which was not installed.
Skipping 'Sony Xperia Extensions EDK 2.0, Android API 10, revision 2'; it 
depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was not 
installed.
Done. Nothing was installed.

So, please help me with this,
Thank you.

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

[android-developers] HELP: Adding an entry to the Android Address Book upon App installation

2012-08-06 Thread Vasudev Bhandarkar
I'm building a Voice Messaging App, and would like an entry to be made in the 
Address book for each of my friends that have a mobile phone, as soon as my App 
is installed.  How do I do this?  What API calls do I invoke?  Any advice will 
be much appreciated.  

Specifically: as an Android USER I would like my App icon to appear in my 
native address book to initiate a new (my App's function) message. When I click 
on the button in the Address Book, the recording message panel from my App will 
open with the User's name in the delivery field.

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


[android-developers] How to submit data to google excel doc in android?

2012-08-06 Thread vijay .
Hi all,

I have a project in which i have to save the data from a form to google 
excel doc.
Kindly suggest me the necessary steps.

Thanks
Vijay

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

[android-developers] Application package 'AndroidManifest.xml' must have a minimum of 2 segments.

2012-08-06 Thread tushar
problem 
Application package 'AndroidManifest.xml' must have a minimum of 2 segments.

it keep on happning also R.java not generating in eclipse done all the 
rebuilding  project clearing but keep on happning

is there a possibility of bug on my eclipse IDE ???

anyone please reply ASAP

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


[android-developers] Connectivity Between Oracle9i database and Android device

2012-08-06 Thread Uma Maheshwari
I am in a need to connect my android device to the oracle8i database.Please
let me know whether it is possible?

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

2012-08-06 Thread tushar
need some guidelines for using ftp on my app to upload data or file on my 
server with out root if possible can someone please guided with any link that 
are working for them

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] Improving speech recognition in Arabic in Jelly Bean

2012-08-06 Thread Wisam
It seems that Arabic language voice to text input is not very good compared 
with English and Japanese (tried them all).
Is there a way to help Google improve Arabic language recognition for voice 
to text input ? I'm a native speaker and I'd like to help.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Help for update phone number of contacts (ContactsContract)

2012-08-06 Thread Antonio Edson Siqueira Cavalcanti
Hi,

I need help to update contact numbers. Does anyone know how I can update 
contact numbers that I could recover? I looked and saw a lot about RAW_ID, 
_ID but I'm not getting used.

I'm recovering contacts with the code below:

Cursor phones = 
 getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
  
 null,null, null, null);
 while (phones.moveToNext()) {
 String name = 
 phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));

 String phoneNumber = 
 phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));

 String idContato = 
 phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.RAW_CONTACT_ID));


Would you like to update each chosen number. Each would receive a different 
value, so I know I should use some _ID Android.

Thank you for your help.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Can I set the focal distance of android camera?

2012-08-06 Thread steven


I am trying to manual control focal distance

like this video : http://www.youtube.com/watch?v=Nh_PNXD4Jqk

I already know how to use the basic function of camera.

Does everyone know how to set the focal distance by manual?

Thank you for your time and help :D

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

2012-08-06 Thread VIPIN
Hello All,
I am new  in Android 
I have develop a app in android api level 8( version 2.2). And it is 
working fine. But when i run this program in Lower version , then it work 
fine with API level 6  7. But it gives error in API level 5. It shows 
error :

 ERROR/AndroidRuntime(287): Uncaught handler: thread main exiting due to 
uncaught exception

 ERROR/AndroidRuntime(287): java.lang.RuntimeException: Unable to start 
activity ComponentInfo{com.tech.gift/com.tech.gift.HomeLayoutActivity}: 
android.view.InflateException: Binary XML file line #24: Error inflating 
class android.widget.FrameLayout
 

I have check all xml file as well as activity files. but there is not any 
problam.

Plz suggest we what i do to rum my App on API level 5 of 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: NFC Secure Element

2012-08-06 Thread ThyMythos
Am Mittwoch, 11. April 2012 09:05:34 UTC+2 schrieb Alexander Sytnik:
 Great work!
 It helped me very much. My current goal - to download into the Secure Element 
 a
 cardlet, which can securely manage MIFARE part and communicate with our own 
 TSM
 through an additional application in a phone. But this possibility, that can 
 be
 used even in old Nokia 3220 with NFC cover, seems to be blocked in new 
 Android platforms.
 
 
 Additional
 information (how I understand it):
 
 
 - 
 Google
 wallet is Mastercard PayPass payment application;
 
 
 - 
 Document
 that defines the requirements for UICCs intended to host a payment system’s
 mobile payment application within mobile consumer device are called 
 “EMVProfiles of Global Platform UICC Configuration”. It can be free 
 downloaded. It can be useful for understanding
 architecture of infrastructure that used by Google to download and manage 
 Google
 Wallet. Also there is second interesting document “EMV Contactless Mobile
 Payment - Application Activation User Interface”.
 
 
 - 
 The
 document with may describe a target state of secure element it the phone (how 
 I
 think) is Global Platform UICC Configuration v1.0.1. But it cost about 1.5K 
 and it is
 silly to download the document that can’t help you download your applet in NFC
 phone.
 
 
 Resume: Joe
 doesn’t share food! Google wants to use single-handedly new business 
 possibilities
 which are given to us by new technologies. Nick Pelly: “So we did not put card
 emulation APIs in Gingerbread because we want to make sure that we have a
 compelling user story before we do that. And we really think that peer-to-peer
 is the way to go for future NFC uses.”, “There are a bunch of
 different reasons. Again, the secure element is a very limited resource. It
 can't hold a large amount of data in there. And if we open it up to any
 third-party application, there's going to be a huge resource contention over
 the secure element.”.
 
 
 P.S.: Please correct me if I'm wrong.
 P.P.S.: Sorry
 for my English.

Latest official update on that:
http://www.youtube.com/watch?v=HkzPc8ZvCco#t=3490s

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

2012-08-06 Thread Jim Graham
Hi.

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)MiSTie #49997   Running Mac OS X Lion 
spooky1...@gmail.comICBM/Hurr.: 30.44406N 86.59909W

   My policy on spammers:
  Castrate first, ask questions later.

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


Re: [android-developers] Cant Install Android 2.3.3

2012-08-06 Thread Jim Graham
On Sun, Aug 05, 2012 at 01:19:36AM -0700, Utsav wrote:

 But I need to get Android 2.3.3(API 10), so when I select Android 2.3.3(API 
 10) and try to install, my catalog shows this errors

You want to write an Android app using the SDK that installs Android
2.3.3 on users' phones?  Why?

Later,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)MiSTie #49997   Running Mac OS X Lion 
spooky1...@gmail.comICBM/Hurr.: 30.44406N 86.59909W

   My policy on spammers:
  Castrate first, ask questions later.

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: How to submit data to google excel doc in android?

2012-08-06 Thread RichardC
Have a look at the source code for the ACRA project  
http://code.google.com/p/acra/   it can post from an Android app to a 
Google Spread sheet via a form.

ps there is no such thing as a google excel doc

On Monday, August 6, 2012 12:56:37 PM UTC+1, vijay . wrote:

 Hi all,

 I have a project in which i have to save the data from a form to google 
 excel doc.
 Kindly suggest me the necessary steps.

 Thanks
 Vijay


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

2012-08-06 Thread Ricardo Cardoso
?

2012/8/5 Ricardo Cardoso rick@gmail.com

 I have a ListActivity and she is populated with the result of a Json ...
 I put a EditText to do a search on ListActivity ... however I do not know
 how to do when the result is a json ... can anyone help me?

 /**

  * Definition of the list adapter

  */

 public class FriendListAdapter extends BaseAdapter {

 private LayoutInflater mInflater;

 EscolhaAmigosFacebook friendsList;


 public FriendListAdapter(EscolhaAmigosFacebook friendsList) {

 this.friendsList = friendsList;

 if (Utility.model == null) {

 Utility.model = new FriendsGetProfilePics();

 }

 Utility.model.setListener(this);

 mInflater = LayoutInflater.from(friendsList.getBaseContext());

 }


 @Override

 public int getCount() {

 return jsonArray.length();

 }


 @Override

 public Object getItem(int position) {

 return null;

 }


 @Override

 public long getItemId(int position) {

 return 0;

 }


 @Override

 public View getView(int position, View convertView, ViewGroup
 parent) {

 JSONObject jsonObject = null;

 try {

 jsonObject = jsonArray.getJSONObject(position);

 } catch (JSONException e1) {

 // TODO Auto-generated catch block

 e1.printStackTrace();

 }





 etSearch.addTextChangedListener(new TextWatcher() {



  @Override

  public void onTextChanged(CharSequence s, int start, int before, 
 intcount) {



  }



  @Override

  public void beforeTextChanged(CharSequence s, int start, int count,

   int after) {





  }



  @Override

  public void afterTextChanged(Editable s) {

   // TODO Auto-generated method stub



  }

  });



 View hView = convertView;

 if (convertView == null) {

 hView = mInflater.inflate(R.layout.friend_item, null);

 ViewHolder holder = new ViewHolder();

 holder.profile_pic = (ImageView) hView.findViewById(R.id.
 profile_pic);

 holder.name = (TextView) hView.findViewById(R.id.name);

 holder.info = (TextView) hView.findViewById(R.id.info);

 hView.setTag(holder);

 }








 ViewHolder holder = (ViewHolder) hView.getTag();

 try {

 holder.profile_pic.setImageBitmap(Utility.model
 .getImage(

 jsonObject.getString(id),
 jsonObject.getString(picture)));

 } catch (JSONException e) {

 holder.name.setText();

 }

 try {

 holder.name.setText(jsonObject.getString(name));

 } catch (JSONException e) {

 holder.name.setText();

 }

 try {

 holder.info.setText(jsonObject.getJSONObject(
 location).getString(name));

 } catch (JSONException e) {

 holder.info.setText();

 }

 return hView;

 }


 }


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

[android-developers] Re: how to store the data in cache/temp memory

2012-08-06 Thread Mario Bat
not sure what you mean, but try looking up startyActivityForResult. Thats 
how you can get the data from B back to A. in the onActivityResult method..

 Dana ponedjeljak, 6. kolovoza 2012. 11:39:10 UTC+2, korisnik vamshi ch 
napisao je:

 Hi,

 I have an App that i want to store the data in cache/temp memory before 
 saving the data in DB like  I have created an application with 2 
 activities, where *A*  , *B* . if I go through *A - B*, in *B* I've some 
 fields  I would like to have its data cached somewhere  then I'm back to *
 A* , then If i save the A fields in DB then only i needs to save B 
 fields.  if I'm not saving any data fields in *A* so *B* fields will not 
 be save..

 Until and unless saving the data in *A *then only *B* fields needs to 
 save.

 Can anyone help me with a code snippet. 


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Custom theme for android DatePicker dialog shows unpleasant border

2012-08-06 Thread Mulsaniya Bhadresh
Remove theme argument  Android.R.style.Theme_
DeviceDefault_Light_Dialog


On Sat, Aug 4, 2012 at 4:47 PM, sweta sweta.s...@gmail.com wrote:

 Hi All,

 I am trying to use custom DatePicker dialog.
 For that I modified the OnCreateDialog method so that it returns a date
 picker with specific theme like this
 @Override
 protected Dialog onCreateDialog(int id) {
 switch (id) {
 case DATE_DIALOG_ID:

 return new
 DatePickerDialog(getActivity(),Android.R.style.Theme_DeviceDefault_Light_Dialog,
 this, year, month, day);
  }
  I get an ugly non-transparent border around my date picker when it is
 displayed:

 (screenshot here: http://i.stack.imgur.com/WO1YD.png)

 What can I do to get rid of the border?

 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

Re: [android-developers] Android memory allocation and static variables

2012-08-06 Thread Mark Murphy
On Mon, Aug 6, 2012 at 7:14 AM, Mario Bat batfudba...@gmail.com wrote:
 Ok...the problem is that if I unregister from GCM the app will still receive
 notifications until GCM sets it to unregistered that can wait for 2-3 days.
 Thats what i heard at least...
 The only way I see here is to write it to a file if its registered or not,
 and when the push comes check in the file if it is registered. You have any
 other suggestions?

Your data needs to be persistent. Whether you use a file,
SharedPreferences, or a database, is up to you.

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

_The Busy Coder's Guide to Android Development_ Version 4.0 Available!

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


[android-developers] Mecca direction app

2012-08-06 Thread Talha Qamar
Hi i wanna make a Kibla(Qibla or Mecca the holy city) direction app for
android.If any one have some knowledge about this.Please do share with
me(Tutorials,Links and code).
Regards,
Talha Qamar.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Looking for information on the Fragment dump() method (FragmentManager too)

2012-08-06 Thread bergstr
you should have close()d the PrintWriter, instead of the IOStream. Thats all

Am Sonntag, 27. Februar 2011 23:17:29 UTC+1 schrieb davemac:

 Both of these classes have a dump() method which looks useful for 
 debugging. I tried to use them in a sample application, but I'm not 
 getting any output at all. My code looks like this from within my 
 activity: 

 public void dumpFragmentMgr() { 
 FragmentManager fm = getFragmentManager(); 
 File dumpFile = new 
 File(Environment.getExternalStorageDirectory() + 
 /fmdump.txt); 
 if(dumpFile.exists()) { 
 dumpFile.delete(); 
 } 
 try { 
 FileOutputStream fos = new FileOutputStream(dumpFile, 
 true); 
 fm.dump(DIALOG, fos.getFD(), new PrintWriter(fos), 
 null); 
 fos.flush(); 
 fos.close(); 
 } catch (FileNotFoundException e) { 
 // TODO Auto-generated catch block 
 e.printStackTrace(); 
 } catch (IOException e) { 
 // TODO Auto-generated catch block 
 e.printStackTrace(); 
 } 
 } 

 I'm positive that I have fragments in my fragment manager. My output 
 file is always empty, although I can see the datetimestamp getting 
 updated. I'm always passing null for the 4th argument to dump() since 
 I have no idea what else to put there. I have enableDebugLogging set 
 to true. Any help please? 


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Looking for information on the Fragment dump() method (FragmentManager too)

2012-08-06 Thread bergstr
closing the PrintWriter instead of the IOStream would do, too

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

2012-08-06 Thread Simon Giddings
This subject is causing me some conceptual problems.

In the official documentation, it states that 1dip represents 1 pixel in a 
160dpi screen.
Does this mean that we should be creating graphic elements at a resolution 
of 160 dpi instead of 72 dpi ?

I hope someone will be able to give an authoritative answer to this 
question.

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

[android-developers] Re: how to achieve the accuracy of google navigation

2012-08-06 Thread Jef De Busser
I can see how extrapolating would yield good results if you have a small 
delay between reported position  real position, e.g. the 1s update rate 
of most GPS receivers.
What I can't see however, is how you could make that work with larger 
delays, especially for large accelerations.


Say for example you drive on a straight road at 3m/s, accelerate with 
2m/s2, and we exampime multiple delays.
We can extrapolate from the last known location at constant speed over 
that delay and compare position to where we really are.


1s delay:
const speed: 3m
reality: 4m
error: 33%

2s delay
const speed: 6m
reality: 10m
error: 66%

4s delay:
const speed: 12m
reality: 28m
error: 133%

I've measured delays varying from 1 to 4 seconds several times, and yet 
Google Nav manages to position the car at the exact location.
It can't use map data to correct its position, since we're on a straight 
road.


So that must mean that it uses sensor data, right? Or am I missing 
something?




On 08/03/2012 08:47 PM, Nadeem Hasan wrote:
That would be extrapolation. And that is actually the exact reason why 
the GPS lags on exits if they are off-route because it has 
extrapolated your position based on your route till the next actual 
GPS location update arrives. I have seen this behaviour with my Garmin 
device too when I decide not to follow the route.


On Friday, August 3, 2012 11:46:45 AM UTC-4, Nobu Games wrote:

I'd go for interpolation and take the current average speed and
the structure of the streets into account. That of course only
works when you have something like a graph / vector representation
of the streets and know how they are connected and what
orientation they have.

It is also pretty common that even Google Navigation is off,
especially on highways with exits. Sometimes the navigation draws
the car following the highway even though you are already leaving
on an exit.


On Wednesday, August 1, 2012 9:18:33 AM UTC-5, bushido wrote:

Hi all,

I'm writing an application for android for which I need good
position
accuracy, I use a Galaxy Nexus as test device.

My test application subscribes to location updates and draws a
car
symbol in a map, the map is centered to the location of the car 
rotates according to the bearing of the location (exactly like
google
maps on android does). I noticed that when up to speed, the
positions
don't match with reality, they lag behind considerably.
When I cross a street at 90km/h for example, it will take a few
seconds before the car on the map is also crossing that
street. It
isn't an error in the map data, because when I'm standing
still, the
car gets drawn on the correct location. Google maps for
android shows
exactly the same behavior.

The position of the car in Google Navigate on the other hand
matches
reality rather closely. I've noticed that the position updates
are a
lot smoother as well. (10Hz rather than the 1Hz updates which
you get
from GPS)

My question is: how do they do it? What I can think of is:
- using the phone's sensors (gyro  accelero) together with a
kalman
filter or similar. But I can't see how you could make that
work for
every phone, since not all phones have these sensors.
- interpolating, but in that case I would expect overshooting
when
there is a sudden stop or a sharp corner

Thanks in advance.
Bushido



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

2012-08-06 Thread Nicholas Campion
Yup, that setting is factored in when 'sp' units are used anywhere on the 
device.

On Friday, August 3, 2012 3:26:47 PM UTC-5, bob wrote:

 Is this what you're talking about?

 http://postimage.org/image/8y0sxvyej/

 On Friday, August 3, 2012 1:54:29 PM UTC-5, Nicholas Campion wrote:

 On the nexus 7 its under settings-display.

 On Friday, August 3, 2012 1:50:54 PM UTC-5, bob wrote:

 Where is this font scaling feature?  I looked all throughout settings on 
 my Galaxy Tab, and I don't see one.


 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: Creating custom icons with Photoshop - dip

2012-08-06 Thread RichardC
Ignore the dpi setting in photoshop (and other graphics packages) just 
ensure that you create your images with the correct width and height (in 
pixels). So for example when creating launcher icons use:

xhdpi 96x96 pixels

hdpi  72x72 pixels

mdpi  48x48 pixels

ldpi  36x36 pixels 




On Monday, August 6, 2012 2:41:59 PM UTC+1, Simon Giddings wrote:

 This subject is causing me some conceptual problems.

 In the official documentation, it states that 1dip represents 1 pixel in a 
 160dpi screen.
 Does this mean that we should be creating graphic elements at a resolution 
 of 160 dpi instead of 72 dpi ?

 I hope someone will be able to give an authoritative answer to this 
 question.


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

2012-08-06 Thread bob
 

Maybe you're getting a timeout?  I hear Mountain Lion can be slower.

On Sunday, August 5, 2012 10:31:51 AM UTC-5, Dan Uff wrote:

 Hi all,
 I've recently upgraded my Mac to Mountain Lion (10.8) and use Eclipse as a 
 development environment.

 Now, when ever I use the simulator for testing, it shows the old version 
 of the app and does not automatically run when the simulator first boots 
 into the environment.

 Is anyone else having this issue?

 Thanks,
 Dan Uff



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