[android-developers] Re: Browsing Android Source in Eclipse

2011-01-26 Thread Dan
I have learned so much from reading the Android source I wish it would
happen.

On Jan 25, 8:27 pm, Zsolt Vasvari zvasv...@gmail.com wrote:
 I don't think so.   While it would be helpful if Google would ship the
 actual API source used to build the emulator image, it still wouldn't
 help with debugging on a real device.  But it would be at least
 something.

 On Jan 26, 7:29 am, Dan king...@gmail.com wrote:







  I want to browse the Android framework in order to better understand
  the errors and as additional documentation, where the Javadoc's are a
  bit thin. The issue I'm running into is which branch/tag/version is
  appropriate to use with each emulator. For example there are 5 Android
  2.1 branches but I'm not sure which relates to the version of the
  emulator I am using. Is there a guide or git log where I can see which
  branch relates to which Android version, clearly?

  -Dan

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

2011-01-26 Thread blindfold
Thank you, Dianne, that confirms my experimental observations with the
camera. For the future it would seem better and less heuristically
defined to decouple camera use from screen use, because it allows for
(modest) power savings in computer vision applications that send/store
their output elsewhere. However, it is not a major issue as long as
the camera is a main power hog.

I need a wake lock to keep the other sensors for location (GPS) and
orientation active, although with Android 2.2 orientation readings
still fail in standby due to issue 11028 
http://code.google.com/p/android/issues/detail?id=11028
despite using a wake lock. This is reportedly fixed with Android 2.3.

Thanks!

On Jan 26, 12:14 am, Dianne Hackborn hack...@android.com wrote:
 I believe the only way to ensure the camera continues operating is to keep
 the screen on.  All you need to do is keep the screen on, you don't need to
 hold a wake lock.

 On Tue, Jan 25, 2011 at 1:00 PM, blindfold seeingwithso...@gmail.comwrote:



  I noticed that in Android 2.2 and earlier I must do either a
  FULL_WAKE_LOCK or a combination of PARTIAL_WAKE_LOCK and
  FLAG_KEEP_SCREEN_ON to make sure the camera does not get turned off
  after a while with my app in the foreground (and I need a wake lock to
  keep GPS going). The underlying assumption seems to be that the camera
  is not useful when the screen is off, but that assumption is false for
  computer vision applications where not the user but the program is
  watching the camera view. Is this fixed in Android 2.3 (Gingerbread)?

  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.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

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

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

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


[android-developers] Re: Force Close Does Not Release Camera Resource

2011-01-26 Thread blindfold
Indeed this is an old known issue (1578) 
http://code.google.com/p/android/issues/detail?id=1578
and only restarting the phone helps. You can try to  minimize
occurrences by properly releasing the camera yourself when an
exception occurs in your app.

On Jan 25, 10:41 pm, Joe McCann joseph.is...@gmail.com wrote:
 So while developing a custom camera application I've realized on rare
 occasions and on various devices if the app has to force close, it
 does not always release the camera resource.

 Is there a way to find/detect the process that is holding onto this
 resource and kill it?  Or some other technique?  It is rather
 difficult bug to reproduce (for me anyway), but ultimately the device
 has to be restarted.

 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] Notepad Sample - adding more columns to listview

2011-01-26 Thread Hein
I've done the notepad tutorial on Google's Android site, but I would
like to know how to add more fields to the list, in columns. At the
moment I can add the columns no problem, but they're not aligned like
you would a normal table on the layout:

john smith
heinrich cilliers
will peck

I would like it aligned as in a html table.

Any pointers?

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

2011-01-26 Thread Neilz
Hi all.

I've got the Galaxy Tab emulator running, and was curious to see how
my various apps worked regarding layouts. I've looked at the various
docs on this, but they mostly talk about version 2.3 which I'm not yet
supporting.

My apps generally currently specify:

android:minSdkVersion=3 android:targetSdkVersion=8

and I have folders for res/drawable and res/drawable-hdpi, and just
the one res/layout folder.

I notice that while the layouts fit nicely, the images are all too
small. So, bearing in mind my current spec above, what do I need to
add to make the apps compatible with tablets, without yet included 2.3
support?

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

2011-01-26 Thread Yaroslav.kh
Hello,

I'm working on contact sync fro multiple sources. I create 2 raw
contacts with the same name. Then they are being aggregated by system
and so I got one united contact.
The problem is that both of this raw contacts has event data field
(type - birthday) with the same date (in format dd M ), but they
are not aggregated. So new contact has 2 event field:
Birthday
7 June 1978
Birthday
7 June 1978

How can I handle this? I want this fields to be aggregated.

Thanks,
Yaroslav Madarakh

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

2011-01-26 Thread Bharathi raja
Thanks for reply
Through static wifi, i am able to browse on my phone but not able to
download using my application.

On Jan 26, 9:40 am, Brill Pappin br...@pappin.ca wrote:
 The answer was given to you by the exception.

 the problem is not  you application, it is the network between your phone
 and the remote server... so yes, you will get that error with a any socket
 connection you try.

 -Brill

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

2011-01-26 Thread Kostya Vasilyev
Every ListView item layout is separate from those next to it - 
therefore, it positions and sizes its children without any regard for 
other list items.


Two things you can try are:

- Do not try to make a table, and use multi-line layouts instead, the 
screen is typically not wide enough to fit a proper table anyway.


- For a table-like layout, position the views within your item layout so 
that they always have the same size, regardless of the data they 
contain. This can be done by using a LinearLayout, with the children 
having zero layout_width and non-zero layout_weight values.


-- Kostya

26.01.2011 11:24, Hein пишет:

I've done the notepad tutorial on Google's Android site, but I would
like to know how to add more fields to the list, in columns. At the
moment I can add the columns no problem, but they're not aligned like
you would a normal table on the layout:

john smith
heinrich cilliers
will peck

I would like it aligned as in a html table.

Any pointers?




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

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


Re: [android-developers] Tablet support up to 2.2

2011-01-26 Thread Kostya Vasilyev

Neil,

I've only done Galaxy Tab tests with the emulator as well, so my 
observations are somewhat limited, but still, here they are.


The Galaxy Tab reports itself as an HDPI device, even though its actual 
screen density is 170 dpi. This is to account for the larger display 
pixel count, and greater viewing distance.


Still, compared to a typical 4 480x800 hdpi phone screen, the Galaxy 
Tab can fit more on the screen, since it has more pixels: using a 72x72 
icon as a measurement unit, a 480x800 screen can fit 6.6 accross and 
11.11 down. The Galaxy Tab can fit 8.33 down and 14.22 across.


This makes images look *smaller relative to the rest of your layout*, 
even though they are *larger in real world units*, compared to a 4 hdpi 
phone, and have *same pixel size*.


The gist of all this is: I don't think you can expect an application 
running on the Tab to look just like it looks on a phone, only larger. 
So far, this has been the case for phones of varying screen sizes and 
densities, but for a tablet device, this is no longer true.


Now, if you want to have images in your application just for tablets, 
you can use res/drawable-large-hdpi, as phone screens are normal and 
tablet screens are large (or possibly xlarge, new in 2.3). But 
personally, I found it more useful to focus on making sure that my 
layouts can be used in landscape mode without vertical scrolling 
(sometimes creating separate -port and -land versions to achieve this).


Oh, and here is a table comparing the Tab to a 4 hdpi screen:

Pixels  Inches  DPI IconIcons/screen
480 2,06233,01  72  6,67
800 3,43233,01  72  11,11





Pixels  Inches  DPI IconIcons/screen
600 3,54169,49  72  8,33
10246,04169,49  72  14,22


-- Kostya

26.01.2011 11:40, Neilz ?:

Hi all.

I've got the Galaxy Tab emulator running, and was curious to see how
my various apps worked regarding layouts. I've looked at the various
docs on this, but they mostly talk about version 2.3 which I'm not yet
supporting.

My apps generally currently specify:

android:minSdkVersion=3 android:targetSdkVersion=8

and I have folders for res/drawable and res/drawable-hdpi, and just
the one res/layout folder.

I notice that while the layouts fit nicely, the images are all too
small. So, bearing in mind my current spec above, what do I need to
add to make the apps compatible with tablets, without yet included 2.3
support?




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

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

Re: [android-developers] SDCard question

2011-01-26 Thread Kostya Vasilyev

Scott,

You can't. Install to sd is only available if the phone is running 2.2 
(or later).


There might be custom firmwares based on earlier versions of Android 
with this function back-ported, but that's not a typical runtime 
environment.


-- Kostya

26.01.2011 8:39, Scott Deutsch пишет:

Thanks for that article.

So, how can i make it install on the on the sd card if they have below 
API Level 8?


Or, is most devices Level 8 and above now a days so I don't have to 
worry about that?


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 



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

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


[android-developers] SSL certificates on Android

2011-01-26 Thread Paolo
Hi there,
I'm new on SSL and I have one question for you about it on Android.
So, sorry me if I say something that isn't correct :)

I have to start a communication with a REST Web Service. There are two
steps I should clarify to myself... the second one is the most
important for my target.

1) I must be sure I'm starting to communicate with the WS. So I need
its own certificate (it is on the server side). I know how to do that
and the troubles connected to a CA or a self-signed certificate, after
reading this article: 
http://blog.antoine.li/index.php/2010/10/android-trusting-ssl-certificates/

I believe there is no problem to do that.


2) step 2 here... Now I have also the opposite problem. The WS must to
be sure to communicate with a mobile device (me) and not with other
one. To do that I need a certificate on the device embedded in the
app, in order to allow the WS to know who I am and then we can starts
the communication.

In other words... I need to know with who I'm speaking and the same is
for the WS. This is my problem. Usually only the first step is the
important one, in my case the second one is the most important.

I hope to be clear. If you have some questions o doubts, please ask
me.

Thanks to all in advance.

Paolo

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

2011-01-26 Thread Atif Musaddaq
Hi, Guys

a Simple Question.

I have four buttons and I am using four images for each button. is there any
way to replace the image when user Click on the button. I want to make them
more interactive. Right now it seems boring when user
click on it, no feedback to the user.

Thanks in advance.


Atif

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

2011-01-26 Thread Kostya Vasilyev

Atif,

You don't need to replace the image from code when the user clicks on a 
button - with a state list drawable this can be done entirely with 
resources:


http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList

-- Kostya

26.01.2011 13:03, Atif Musaddaq пишет:

Hi, Guys

a Simple Question.

I have four buttons and I am using four images for each button. is 
there any way to replace the image when user Click on the button. I 
want to make them more interactive. Right now it 
seems boring when user click on it, no feedback to 
the user.


Thanks in advance.


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



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

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


Re: [android-developers] Overlaying points over streets

2011-01-26 Thread José Moreira
Em 11/01/25 23:36, TreKing escreveu:
 2011/1/25 José Moreira matrixowns...@gmail.com
 mailto:matrixowns...@gmail.com

 Is it possible and if so, any pointers in the right direction?


 http://code.google.com/android/add-ons/google-apis/reference/index.html

 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

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

i was aware of the api.

What i'm exploring is the possibility of creating a georeferenced
Pacman(tm) clone and therefore, dinamically adding dots in the
surroundings of the device's location, preferably avoiding roof tops,
oceans, volcanos and other types of places that may be considered
hazardous :) hence, having access to the streets

-- 
http://zemanel.eu
http://github.com/zemanel
http://pt.linkedin.com/in/josemoreira
http://djangopeople.net/josemoreira
irc://zema...@irc.freenode.net

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

2011-01-26 Thread Neilz
Hey thanks Kostya, that's really useful. I agree, maybe ensuring that
the layout works is more important than resizing all the images again.

Portrait vs Landscape is another issue... the majority of my apps
specify portrait only, it's just the way they were intended to work.
Do I take it that these tablets are designed to set landscape mode as
their default?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Unable to upload app on Android Market having uses-configuration android:reqHardKeyboard=false/ tag in manifiest

2011-01-26 Thread Yogini
Hi All,

I am trying to upload an app onto android Market and wanted to filter
out it for the devices having hard keyboard. So i have added 'uses-
configuration android:reqHardKeyboard=false ' in its manifest but
when i did it so android market displayed 'The server could not
process your apk. Try again. error message.
When I removed the uses-configuration.. tag it got uploaded.
Please let me know if i am missing anything.
Or any other way to exclude an app from devices having hard keyboard
support.

Any help will be appreciated.
Thanks in advance.
Tinky

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

2011-01-26 Thread Kostya Vasilyev

26.01.2011 13:43, Neilz пишет:

Hey thanks Kostya, that's really useful. I agree, maybe ensuring that
the layout works is more important than resizing all the images again.

Portrait vs Landscape is another issue... the majority of my apps
specify portrait only, it's just the way they were intended to work.
Do I take it that these tablets are designed to set landscape mode as
their default?


There are lots of images of the Tab being used in portrait mode, but I 
decided that landscape is important for *my* apps - as I would want to 
use a tablet in both orientations, if I had one (maybe I'm wrong about 
that, but I've already done the work).


BTW, this is what my layouts look like:

http://kmansoft.wordpress.com/2011/01/17/wifi-manager-1-8-bluetooth-widget-1-5/

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


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


[android-developers] Re: Media Player - crop video for fullscreen mode

2011-01-26 Thread Johannes De Smedt
I also need to do this. I have seen this behaviour on the HTC desire
(Htc video player)
Can anyone tell if this is possible from java? On my htc magic
(android 1.5) when I set video to a size that is bigger than the
screen, the video is displayed as large as possible, but never
cropped ...



Thanks

Johannes

On 19 aug 2010, 16:46, Sandy snarr...@gmail.com wrote:
 I've a similar usecase. Has anyone figured out how this (croppingvideoor 
 surface views) can be achieved?

 Thanks,
 Sandy

 On Jun 30, 9:41 am, TeddybearCrisis sgr...@web.de wrote:

  I've got the same question though I have a slightly different use for
  it. I must render only a part of thevideofullscreen.
  Any Ideas?
  I didn't make any experiments with the ImageView yet. Do you think it
  is possible to extend it to some kind ofvideo-player?



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

2011-01-26 Thread Mor G.
Hi,

I've noticed some strange behavior when using the times_contacted
field in ContactsContract.Contacts (and also the last_time_contacted
field).

In some Samsung devices this counter counts emails only, in some HTC
devices this is always zero, and in other HTC devices this counter is
incremented for the wrong contacts (there's a confusion between
RawContact ids and Contact ids).

Has anyone else came across this issue?
Does anyone have a suggested solution to overcome this?

I've managed to create a BroadcastReceiver that updates
times_contacted for incoming/outgoing calls, but this doesn't solve
the wrong contacts issues, and isn't as complete as the counting in
Nexus for example (on Nexus it counts calls,emails,smss), also, I
don't want to count these calls twice on devices where this counter
already works.

Any help? Any ideas?

Thanks,
Mor.

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

2011-01-26 Thread Hein
Thank you so much.

I am considering breaking the table up into multiple views as one see
in some other apps.

It just seems strange that there is no way to do this in android,
however I've seen it in other apps, Iriduim Flares for example,
which shows many numerals in columns and it's easy to read accross,
perfect for what I needed.

Thanks again for responding.

On Jan 26, 11:06 am, Kostya Vasilyev kmans...@gmail.com wrote:
 Every ListView item layout is separate from those next to it -
 therefore, it positions and sizes its children without any regard for
 other list items.

 Two things you can try are:

 - Do not try to make a table, and use multi-line layouts instead, the
 screen is typically not wide enough to fit a proper table anyway.

 - For a table-like layout, position the views within your item layout so
 that they always have the same size, regardless of the data they
 contain. This can be done by using a LinearLayout, with the children
 having zero layout_width and non-zero layout_weight values.

 -- Kostya

 26.01.2011 11:24, Hein пишет:

  I've done the notepad tutorial on Google's Android site, but I would
  like to know how to add more fields to the list, in columns. At the
  moment I can add the columns no problem, but they're not aligned like
  you would a normal table on the layout:

  john smith
  heinrich cilliers
  will peck

  I would like it aligned as in a html table.

  Any pointers?

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

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


Re: [android-developers] Re: Notepad Sample - adding more columns to listview

2011-01-26 Thread Kostya Vasilyev


The popup in Iridium Flares looks like a TableLayout:

http://developer.android.com/reference/android/widget/TableLayout.html

TableLayout doesn't recycle views like ListView, and so isn't really 
suited for long scrollable lists, but it's just fine for presenting 
compact data (also useful for lining up controls within a layout).


-- Kostya

26.01.2011 14:42, Hein пишет:

Thank you so much.

I am considering breaking the table up into multiple views as one see
in some other apps.

It just seems strange that there is no way to do this in android,
however I've seen it in other apps, Iriduim Flares for example,
which shows many numerals in columns and it's easy to read accross,
perfect for what I needed.

Thanks again for responding.

On Jan 26, 11:06 am, Kostya Vasilyevkmans...@gmail.com  wrote:

Every ListView item layout is separate from those next to it -
therefore, it positions and sizes its children without any regard for
other list items.

Two things you can try are:

- Do not try to make a table, and use multi-line layouts instead, the
screen is typically not wide enough to fit a proper table anyway.

- For a table-like layout, position the views within your item layout so
that they always have the same size, regardless of the data they
contain. This can be done by using a LinearLayout, with the children
having zero layout_width and non-zero layout_weight values.

-- Kostya

26.01.2011 11:24, Hein пишет:


I've done the notepad tutorial on Google's Android site, but I would
like to know how to add more fields to the list, in columns. At the
moment I can add the columns no problem, but they're not aligned like
you would a normal table on the layout:
john smith
heinrich cilliers
will peck
I would like it aligned as in a html table.
Any pointers?

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



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

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


[android-developers] Re: a simple question (onClick)

2011-01-26 Thread Samsung Galaxy
This tutorial is more helpful and I found what i want.

http://developer.android.com/resources/tutorials/views/hello-formstuff.html#CustomButton

On Jan 26, 11:07 am, Kostya Vasilyev kmans...@gmail.com wrote:
 Atif,

 You don't need to replace the image from code when the user clicks on a
 button - with a state list drawable this can be done entirely with
 resources:

 http://developer.android.com/guide/topics/resources/drawable-resource...

 -- Kostya

 26.01.2011 13:03, Atif Musaddaq пишет:









  Hi, Guys

  a Simple Question.

  I have four buttons and I am using four images for each button. is
  there any way to replace the image when user Click on the button. I
  want to make them more interactive. Right now it
  seems boring when user click on it, no feedback to
  the user.

  Thanks in advance.

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

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

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


[android-developers] my Eclipse stuck while running emulator

2011-01-26 Thread Atif Musaddaq
Hi, Guys

Is there any one facing the same problem.

my Eclipse stuck while running the emulator or connected it with the Mobile
device. I was not facing this problem before. Now i have to restart it again
and again.

Please help if some one already fixed this problem.


-- 
Atif Musaddaq

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

[android-developers] Re: a simple question (onClick)

2011-01-26 Thread Samsung Galaxy
Hi,

I have 4 buttons. and right now i have this XML file to handle
pressed, focused and normal states of a button.

?xml version=1.0 encoding=utf-8?
selector xmlns:android=http://schemas.android.com/apk/res/android;
item android:drawable=@drawable/android_pressed
  android:state_pressed=true /
item android:drawable=@drawable/android_focused
  android:state_focused=true /
item android:drawable=@drawable/android_normal /
/selector

do i have to make 4 XML files for each button or is there some way to
do it in one XML file ?? Right now i am referring this file to another
XML file.

Button
android:id=@+id/button
android:layout_width=325px
android:layout_height=400px
android:padding=10dp
android:background=@drawable/diffbutt /
/LinearLayout


Atif

On Jan 26, 1:10 pm, Samsung Galaxy atif.musad...@gmail.com wrote:
 This tutorial is more helpful and I found what i want.

 http://developer.android.com/resources/tutorials/views/hello-formstuf...

 On Jan 26, 11:07 am, Kostya Vasilyev kmans...@gmail.com wrote:







  Atif,

  You don't need to replace the image from code when the user clicks on a
  button - with a state list drawable this can be done entirely with
  resources:

 http://developer.android.com/guide/topics/resources/drawable-resource...

  -- Kostya

  26.01.2011 13:03, Atif Musaddaq пишет:

   Hi, Guys

   a Simple Question.

   I have four buttons and I am using four images for each button. is
   there any way to replace the image when user Click on the button. I
   want to make them more interactive. Right now it
   seems boring when user click on it, no feedback to
   the user.

   Thanks in advance.

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

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

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


[android-developers] What colour to use for custom contentView in notification for 2.2 and 2.3

2011-01-26 Thread H
So I've got a custom view being used as a RemoteViews in a notification.

Looking in the 2.2. resource, I can see 
\layout\status_bar_latest_event_content.xml where it explicitly sets the 
colour of the title and text to ff00. Which works nicely under 2.2 
stock. The text is black.

But under 2.3, the notification bar is darker and black text is not visible. 
Looking in the same file under 2.3 I find it is now using a 
style 
android:textAppearance=@style/TextAppearance.StatusBar.EventContent.Title. 
This is using ?textColorPrimaryInverse which is white but the same value 
under 2.2 is also white.

The TextAppearance.StatusBar style hierarchy doesn't exist for 2.2 or below.

So should I check for the sdk version and if running 2.3+ then get the value 
of the style attribute and manually override the color for the custom 
view..? Seems a bit of a faff to have to do that? And how do I compile it to 
refer to that new attribute when I'm targetting 2.2? Any way to get it to 
work purely in xml with no additional java faff..?

But I'm also wondering about all that theming going on for custom roms - how 
do they handle this..? For a 2.2. phone, the text colour of black is 
hardcoded into that layout. So does that mean that no theme for a 2.2. 
device can change the colour of the notification bar background to black 
otherwise all the notifications will be unreadable? Am I missing something 
here?

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

2011-01-26 Thread Kostya Vasilyev
You need one XML file with selector, and several drawable files that 
it would reference for individual states, for example, 3 PNGs or nine 
patches.


26.01.2011 15:40, Samsung Galaxy пишет:

Hi,

I have 4 buttons. and right now i have this XML file to handle
pressed, focused and normal states of a button.

?xml version=1.0 encoding=utf-8?
selector xmlns:android=http://schemas.android.com/apk/res/android;
 item android:drawable=@drawable/android_pressed
   android:state_pressed=true /
 item android:drawable=@drawable/android_focused
   android:state_focused=true /
 item android:drawable=@drawable/android_normal /
/selector

do i have to make 4 XML files for each button or is there some way to
do it in one XML file ?? Right now i am referring this file to another
XML file.

Button
 android:id=@+id/button
 android:layout_width=325px
 android:layout_height=400px
 android:padding=10dp
 android:background=@drawable/diffbutt /
/LinearLayout


Atif

On Jan 26, 1:10 pm, Samsung Galaxyatif.musad...@gmail.com  wrote:

This tutorial is more helpful and I found what i want.

http://developer.android.com/resources/tutorials/views/hello-formstuf...

On Jan 26, 11:07 am, Kostya Vasilyevkmans...@gmail.com  wrote:








Atif,
You don't need to replace the image from code when the user clicks on a
button - with a state list drawable this can be done entirely with
resources:
http://developer.android.com/guide/topics/resources/drawable-resource...
-- Kostya
26.01.2011 13:03, Atif Musaddaq пишет:

Hi, Guys
a Simple Question.
I have four buttons and I am using four images for each button. is
there any way to replace the image when user Click on the button. I
want to make them more interactive. Right now it
seems boring when user click on it, no feedback to
the user.
Thanks in advance.
Atif
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

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



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

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


Re: [android-developers] What colour to use for custom contentView in notification for 2.2 and 2.3

2011-01-26 Thread Kostya Vasilyev

H,

You can try putting a 2.3 specific layout into res/layout-v9. You'd 
then be able to use the new style, provided you build with 2.3, and 
still remain compatible with earlier versions.


-- Kostya

26.01.2011 15:42, H пишет:

So I've got a custom view being used as a RemoteViews in a notification.

Looking in the 2.2. resource, I can see 
\layout\status_bar_latest_event_content.xml where it explicitly sets 
the colour of the title and text to ff00. Which works nicely 
under 2.2 stock. The text is black.


But under 2.3, the notification bar is darker and black text is not 
visible. Looking in the same file under 2.3 I find it is now using a 
style 
android:textAppearance=@style/TextAppearance.StatusBar.EventContent.Title. 
This is using ?textColorPrimaryInverse which is white but the same 
value under 2.2 is also white.


The TextAppearance.StatusBar style hierarchy doesn't exist for 2.2 or 
below.


So should I check for the sdk version and if running 2.3+ then get the 
value of the style attribute and manually override the color for the 
custom view..? Seems a bit of a faff to have to do that? And how do I 
compile it to refer to that new attribute when I'm targetting 2.2? Any 
way to get it to work purely in xml with no additional java faff..?


But I'm also wondering about all that theming going on for custom roms 
- how do they handle this..? For a 2.2. phone, the text colour of 
black is hardcoded into that layout. So does that mean that no theme 
for a 2.2. device can change the colour of the notification bar 
background to black otherwise all the notifications will be 
unreadable? Am I missing something here?

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



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

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


Re: [android-developers] What colour to use for custom contentView in notification for 2.2 and 2.3

2011-01-26 Thread H
Hi Kostya, cunning idea!

I've not made the leap to building against 2.3 yet as I like to see all the 
source code - plus there isn't a working 2.3 emulator with lvl support yet. 
Maybe this is the final reason...?

But surely there must be a better way to not have to resort to layouts for 
specific releases..?

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

[android-developers] Query in calling SOAP based web service in Android

2011-01-26 Thread Nandlal Viranni
Hi All ,

I am new to Android .

I am developing one application .

In which , i need to use SOAP based web service.

but i am not able to do this task .

I need to pass class object as a argumens while calling web service
method .
And I am getting error regarding Serialize .

Now , I change the way of calling web service and

I want to pass xml data as a argumens ..

Is there any solution for this problem ???

Is there any relavant link ??

thanks  Regards

Nandlal Virani

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 colour to use for custom contentView in notification for 2.2 and 2.3

2011-01-26 Thread Kostya Vasilyev
Every time the SDK gets a new feature, using it requires building with 
the new version.


I don't see anything wrong with that (think alternate drawables in 1.6, 
install to sd in 2.2).


As for the alternate layout - 2.3 seems to have received some minor but 
probably important UI tweaks: in addition to the issue at hand, status 
bar icons for notifications have a new look, different from 2.2 and below.


http://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html

I would look at it this way: it's the price you pay for making your 
application look its best on all platform versions. Takes some work, but 
then what doesn't?


YMMV

-- Kostya

26.01.2011 15:59, H пишет:

Hi Kostya, cunning idea!

I've not made the leap to building against 2.3 yet as I like to see 
all the source code - plus there isn't a working 2.3 emulator with lvl 
support yet. Maybe this is the final reason...?


But surely there must be a better way to not have to resort to layouts 
for specific releases..?

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



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

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


Re: [android-developers] What colour to use for custom contentView in notification for 2.2 and 2.3

2011-01-26 Thread H
Yeah, you're right of course.. :-)

I've already made a note a few days ago to download the gingerbread source 
after you posted how on your blog - I guess now's the time to jump in!

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: ListView adapter bug?; notify changed does nothing.

2011-01-26 Thread Brill Pappin
Yes, I do get a listing when I go to the root.

On Jan 26, 2:27 am, Dianne Hackborn hack...@android.com wrote:
 Can you at least get to the root of the repository from the open source
 project?

 http://source.android.com/source/index.html

  http://source.android.com/source/index.htmlWhich goes to 
 here:http://android.git.kernel.org/

 I am just accessing this from my home machine, this is the world-accessible
 repository.





 On Tue, Jan 25, 2011 at 10:49 PM, Zsolt Vasvari zvasv...@gmail.com wrote:
  404 No Such Project

  On Jan 26, 2:40 pm, Dianne Hackborn hack...@android.com wrote:
   No, that link is to the public open-source repository.

   On Tue, Jan 25, 2011 at 10:33 PM, Brill Pappin br...@pappin.ca wrote:
I should mention this is on a Nexus One with aOS 2.2.2 in case that
matters.

Yes, I looked all over that code and even down into AsbListView.
It actually registers an internal instance member with the adapter,
and the notify call does seem to make it to the observer as far as I
can see, but there doesn't seem to be any code that connected the
observer and the ListView.

I was digging down that far in the first place because I was sure
(three times over, I rewrote it from scratch three times using
different examples and tutorials besides my first attempt from memory)
that I had correctly implemented the Adapter and set it on the
ListView. The list view simply never called the adapter after the
notify method was called. I know that because I used the basic print-
to-log when called technique of tracing the calls. The Adapter would
get properly called when first set on the ListView but after that no
amount of data change and notify calls would cause it to re-read the
adapter, which is what I expect it to do if I notify it that my data
has changed.

I the end I simply created a new adapter and reset it on the ListView,
which seems to be working, however that's broken IMO.

I think the next step should be that I write up a quick demo app that
attempts replicate the problem. If it doesn't do anything except
demonstrate what I'm seeing, then it should allow others to test as
well.
I'll see if I can make time tomorrow for that.

BTW - That link seems to not be visible to me :) must be on your
internal network.

- Brill Pappin

On Jan 26, 12:35 am, Dianne Hackborn hack...@android.com wrote:
 AsbListView and ListView call registerDataSetObserver() on the
  adapter.
  BaseAdapter.notifyDataSetChanged() does the notification to whoever
  is
 registered with it.

 Here is working code, the Running Services UI in settings, that
implements a
 BaseAdapter and uses notifyDataSetChanged() to tell the list view
  when
its
 contents change:

 http://android.git.kernel.org/?p=platform/packages/apps/Settings.git;...

 On Tue, Jan 25, 2011 at 8:37 PM, Brill Pappin br...@pappin.ca
  wrote:
  I just searched the forums, and apparently this is a common
  problem.

  ListView with a custom adapter based on BaseAdapter.
  Its backed by a List object.

  The problem is that updating the data and calling
notifyDataSetChanged();
  does nothing.
  I have modified the adapter so that ever method that is called in
  it
prints
  itself to the console.

  my adapter has a method that does the update of the contents and
attempts
  to notify:

  public void updateData(ListEvent data) {

   this.data.clear();

   this.data.addAll(data);

   notifyDataSetChanged();

  }

  The problem is that after notifyDataSetChanged() is called, the
  list
never
  calls any other methods, not even getCount().

  My data has changed, and i've notified ListView that it has, yet it
still
  refuses to update.

  After some investigation in the OS source, I don't see where the
observer
  in the list actually tells the list to update.

  It seems the only way to get the list to update its elements is to
re-set
  the adapter on it with the new element set.

  Now I've seen many threads in the group saying that they user was
  doing
  something wrong... but I don't see how the notify is going to
  update
the
  list period (change or no change).

  So, I think i'm dealing with a bug here.

  Can someone actually find the code that does the update in the
  ListVIew
  when adapters notifyDataSetChanged() is called?

  - Brill Pappin

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to
android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
   cr...@googlegroups.com
  android-developers%2Bunsubs­cr...@googlegroups.com
  

[android-developers] Communicating between two devices directly

2011-01-26 Thread Marcin Orlowski
Hi,

I'm in need of communicating between two devices over WiFi directly,
w/o need of AP. As far as I know adhoc mode
is not supported oficially (unless you apply some unofficial patches
to wpa_suplicant) but maybe I miss something
and certain version of Android  going to officially support adhoc?
Anyway, I am open for any hints of solution I could
use to get this done (BT is out of question due to limited range. At
worst I can use client-server architecture but
I would like to avoid this as it requires data plan and/or carrier coverage)

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


[android-developers] Re: Query in calling SOAP based web service in Android

2011-01-26 Thread jman
you want to use ksoap2 since rmi does not seem to be fully supported
yet.

On Jan 26, 7:17 am, Nandlal Viranni nandlal.phys...@gmail.com wrote:
 Hi All ,

 I am new to Android .

 I am developing one application .

 In which , i need to use SOAP based web service.

 but i am not able to do this task .

 I need to pass class object as a argumens while calling web service
 method .
 And I am getting error regarding Serialize .

 Now , I change the way of calling web service and

 I want to pass xml data as a argumens ..

 Is there any solution for this problem ???

 Is there any relavant link ??

 thanks  Regards

 Nandlal Virani

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

2011-01-26 Thread Kostya Vasilyev

Marcin,

You're right about ad-hoc (ibss) networking not being supported:

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

Still, if you've got phones that are connected to the same WiFi router 
(or to different routers that are connected to one another, probably 
common in an office environment), then you should be able to get TCP/IP 
connections between phones that bypass the cellular network and go over 
WiFi.


-- Kostya

26.01.2011 16:48, Marcin Orlowski пишет:

Hi,

I'm in need of communicating between two devices over WiFi directly,
w/o need of AP. As far as I know adhoc mode
is not supported oficially (unless you apply some unofficial patches
to wpa_suplicant) but maybe I miss something
and certain version of Android  going to officially support adhoc?
Anyway, I am open for any hints of solution I could
use to get this done (BT is out of question due to limited range. At
worst I can use client-server architecture but
I would like to avoid this as it requires data plan and/or carrier coverage)




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

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


[android-developers] Call Recording on Android 2.3

2011-01-26 Thread David_Fisher
Is Voice call recording now possible on android 2.3 without going on
to the speakerphone mode? Thanks
David

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


[android-developers] Re: a simple question (onClick)

2011-01-26 Thread Samsung Galaxy
Hi, I am doing some thing stupid. Look to this XML file

?xml version=1.0 encoding=utf-8?
selector xmlns:android=http://schemas.android.com/apk/res/android;
item android:drawable=@drawable/android_pressed
  android:state_pressed=true /
item android:drawable=@drawable/android_focused
  android:state_focused=true /
item android:drawable=@drawable/android_normal /

item android:drawable=@drawable/android_pressed
  android:state_pressed=true /
item android:drawable=@drawable/android_focused
  android:state_focused=true /
item android:drawable=@drawable/android_normal /

item android:drawable=@drawable/android_pressed
  android:state_pressed=true /
item android:drawable=@drawable/android_focused
  android:state_focused=true /
item android:drawable=@drawable/android_normal /
/selector

How i will refer my individual button to my android display ? right
now i have only one button.

Button
 android:id=@+id/button
          android:layout_width=325px
          android:layout_height=400px
          android:padding=10dp
          android:background=@drawable/diffbutt /

How i can make multiple selector in an XML file and then in another
XML file refer each selector to a particular button. i have 4
(press) x 4 (focus) x 4 (normal) images for each 4 buttons.


Atif



On Jan 26, 1:47 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 You need one XML file with selector, and several drawable files that
 it would reference for individual states, for example, 3 PNGs or nine
 patches.

 26.01.2011 15:40, Samsung Galaxy пишет:









  Hi,

  I have 4 buttons. and right now i have this XML file to handle
  pressed, focused and normal states of a button.

  ?xml version=1.0 encoding=utf-8?
  selector xmlns:android=http://schemas.android.com/apk/res/android;
       item android:drawable=@drawable/android_pressed
             android:state_pressed=true /
       item android:drawable=@drawable/android_focused
             android:state_focused=true /
       item android:drawable=@drawable/android_normal /
  /selector

  do i have to make 4 XML files for each button or is there some way to
  do it in one XML file ?? Right now i am referring this file to another
  XML file.

  Button
           android:id=@+id/button
           android:layout_width=325px
           android:layout_height=400px
           android:padding=10dp
           android:background=@drawable/diffbutt /
  /LinearLayout

  Atif

  On Jan 26, 1:10 pm, Samsung Galaxyatif.musad...@gmail.com  wrote:
  This tutorial is more helpful and I found what i want.

 http://developer.android.com/resources/tutorials/views/hello-formstuf...

  On Jan 26, 11:07 am, Kostya Vasilyevkmans...@gmail.com  wrote:

  Atif,
  You don't need to replace the image from code when the user clicks on a
  button - with a state list drawable this can be done entirely with
  resources:
 http://developer.android.com/guide/topics/resources/drawable-resource...
  -- Kostya
  26.01.2011 13:03, Atif Musaddaq пишет:
  Hi, Guys
  a Simple Question.
  I have four buttons and I am using four images for each button. is
  there any way to replace the image when user Click on the button. I
  want to make them more interactive. Right now it
  seems boring when user click on it, no feedback to
  the user.
  Thanks in advance.
  Atif
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
  --
  Kostya Vasilyev -- WiFi Manager + pretty widget 
  --http://kmansoft.wordpress.com

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

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


Re: [android-developers] What colour to use for custom contentView in notification for 2.2 and 2.3

2011-01-26 Thread Kostya Vasilyev

H,

More on sources in Eclipse - I just set it up so that the debugger finds 
a different version of Android sources from the one used for building.


In my case, I am building with 2.2, debugging on 2.1update1.

This is something I've been wanting to solve for some time, the email 
exchange we had today prompted me to dive into it, so thank you.


Will make a blog post about this (probably tomorrow), as this seems like 
a useful thing.


-- Kostya

26.01.2011 16:26, H пишет:

Yeah, you're right of course.. :-)

I've already made a note a few days ago to download the gingerbread 
source after you posted how on your blog - I guess now's the time to 
jump in!


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 



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

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


Re: [android-developers] Communicating between two devices directly

2011-01-26 Thread Marcin Orlowski
On 26 January 2011 14:59, Kostya Vasilyev kmans...@gmail.com wrote:
 http://code.google.com/p/android/issues/detail?id=82

 Still, if you've got phones that are connected to the same WiFi router (or
 to different routers that are connected to one another, probably common in
 an office environment), then you should be able to get TCP/IP connections
 between phones that bypass the cellular network and go over

Thanks for the link. But this requires AP to be present. I got some
concept that requires just two devices to be linked and I wanted to
avoid need of AP presence, hence adhoc mode. Still I may limit to
rooted phones, but I am not sure who much of my target users got
devices rooted (my out-of-air estimates is that not many). Seems (as
somehow expected) i am recently out of wider luck :/

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


Re: [android-developers] What colour to use for custom contentView in notification for 2.2 and 2.3

2011-01-26 Thread H
Yeah, that would be good.

My concern with building against 2.3 was that if I debug'd, I would need to 
use a 2.3 emulator. And with the broken lvl in it, I would have to hack my 
app heavily and then couldn't rely on the testing anyway. So the ability to 
build against 2.3 but debug against 2.2 or 2.1 would fill that gap nicely.

Good work!

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

2011-01-26 Thread Kostya Vasilyev

What mode does 2.2 use for WiFi tethering?

If it's not ad-hoc, but rather full AP mode, then this might be a 
workable solution (with some complications, like tethering can only be 
enabled by the user at this time, and it's not a true peer-2-peer solution).


Limiting your app to 2.2 is probably going to give you a broader reach 
than limiting to rooted devices.


-- Kostya

26.01.2011 17:09, Marcin Orlowski пишет:

On 26 January 2011 14:59, Kostya Vasilyevkmans...@gmail.com  wrote:

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

Still, if you've got phones that are connected to the same WiFi router (or
to different routers that are connected to one another, probably common in
an office environment), then you should be able to get TCP/IP connections
between phones that bypass the cellular network and go over

Thanks for the link. But this requires AP to be present. I got some
concept that requires just two devices to be linked and I wanted to
avoid need of AP presence, hence adhoc mode. Still I may limit to
rooted phones, but I am not sure who much of my target users got
devices rooted (my out-of-air estimates is that not many). Seems (as
somehow expected) i am recently out of wider luck :/




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

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


Re: [android-developers] Re: a simple question (onClick)

2011-01-26 Thread Kostya Vasilyev
You don't have to put UI states and the image that makes it different 
from other buttons into the same drawable / image.


ImageButton can use two separate images: one is android:background and 
one is android:src. If you provide UI state feedback with one (the 
background), you can use a simple .png image for the other (the src 
one) to make buttons look different.


There is also a LayerList drawable that can combine multiple drawables 
into one, this might work too (although I haven't used it):


http://developer.android.com/guide/topics/resources/drawable-resource.html#LayerList

-- Kostya

26.01.2011 17:06, Samsung Galaxy пишет:

Hi, I am doing some thing stupid. Look to this XML file

?xml version=1.0 encoding=utf-8?
selector xmlns:android=http://schemas.android.com/apk/res/android;
 item android:drawable=@drawable/android_pressed
   android:state_pressed=true /
 item android:drawable=@drawable/android_focused
   android:state_focused=true /
 item android:drawable=@drawable/android_normal /

 item android:drawable=@drawable/android_pressed
   android:state_pressed=true /
 item android:drawable=@drawable/android_focused
   android:state_focused=true /
 item android:drawable=@drawable/android_normal /

 item android:drawable=@drawable/android_pressed
   android:state_pressed=true /
 item android:drawable=@drawable/android_focused
   android:state_focused=true /
 item android:drawable=@drawable/android_normal /
/selector

How i will refer my individual button to my android display ? right
now i have only one button.

Button
  android:id=@+id/button
   android:layout_width=325px
   android:layout_height=400px
   android:padding=10dp
   android:background=@drawable/diffbutt /

How i can make multipleselector  in an XML file and then in another
XML file refer eachselector  to a particular button. i have 4
(press) x 4 (focus) x 4 (normal) images for each 4 buttons.


Atif



On Jan 26, 1:47 pm, Kostya Vasilyevkmans...@gmail.com  wrote:

You need one XML file withselector, and several drawable files that
it would reference for individual states, for example, 3 PNGs or nine
patches.

26.01.2011 15:40, Samsung Galaxy пишет:










Hi,
I have 4 buttons. and right now i have this XML file to handle
pressed, focused and normal states of a button.
?xml version=1.0 encoding=utf-8?
selector xmlns:android=http://schemas.android.com/apk/res/android;
  item android:drawable=@drawable/android_pressed
android:state_pressed=true /
  item android:drawable=@drawable/android_focused
android:state_focused=true /
  item android:drawable=@drawable/android_normal /
/selector
do i have to make 4 XML files for each button or is there some way to
do it in one XML file ?? Right now i am referring this file to another
XML file.
Button
  android:id=@+id/button
  android:layout_width=325px
  android:layout_height=400px
  android:padding=10dp
  android:background=@drawable/diffbutt /
/LinearLayout
Atif
On Jan 26, 1:10 pm, Samsung Galaxyatif.musad...@gmail.comwrote:

This tutorial is more helpful and I found what i want.
http://developer.android.com/resources/tutorials/views/hello-formstuf...
On Jan 26, 11:07 am, Kostya Vasilyevkmans...@gmail.comwrote:

Atif,
You don't need to replace the image from code when the user clicks on a
button - with a state list drawable this can be done entirely with
resources:
http://developer.android.com/guide/topics/resources/drawable-resource...
-- Kostya
26.01.2011 13:03, Atif Musaddaq пишет:

Hi, Guys
a Simple Question.
I have four buttons and I am using four images for each button. is
there any way to replace the image when user Click on the button. I
want to make them more interactive. Right now it
seems boring when user click on it, no feedback to
the user.
Thanks in advance.
Atif
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

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

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



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

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


Re: [android-developers] Tablet support up to 2.2

2011-01-26 Thread Dianne Hackborn
I think you should try to avoid the situation where images mismatch between
the layout.

I'm not entirely sure in what scenario you are seeing this, but for many
uses of issues it should not be an issue, any more than say text looks
smaller than layout.  For example an image that is the frame of a button or
a check box or a lock or other icon: it just doesn't make sense of such an
image to grow in size just because there is more room for your layout.

The main place I see people having such an issue is when they use an image
as a background, which I think because of the variety of screen sizes just
ends up being fundamentally problematic on Android.  Best is to simply avoid
this, like the standard Android UI does.  (And note having a background
image has another big advantage: on most devices you can do 60fps scrolling
in a list view and such when on a solid color; if you put your content on
top of an image, there are very few devices that will still give you 60fps
scrolling.  It causes a huge performance hit, both to fill the background
with the image, and because the content on top now needs to be blended with
it.)

If you absolutely want a background image to give your app more style, there
are a couple ways you can do this: (a) use an abstract design, so you can
scale the image to fit the screen you are running on (and be sure you
pre-generate the scaled image at first layout or draw, or your frame rate
will totally go in the dumper); or (b) use a 9-patch image that does some
more intelligent scaling (though if the scaled parts are not a solid color,
this is still drawing a scaled image, so if you just directly draw the
9-patch you have the same significant performance hit).

On Wed, Jan 26, 2011 at 1:43 AM, Kostya Vasilyev kmans...@gmail.com wrote:

  Neil,

 I've only done Galaxy Tab tests with the emulator as well, so my
 observations are somewhat limited, but still, here they are.

 The Galaxy Tab reports itself as an HDPI device, even though its actual
 screen density is 170 dpi. This is to account for the larger display pixel
 count, and greater viewing distance.

 Still, compared to a typical 4 480x800 hdpi phone screen, the Galaxy Tab
 can fit more on the screen, since it has more pixels: using a 72x72 icon as
 a measurement unit, a 480x800 screen can fit 6.6 accross and 11.11 down. The
 Galaxy Tab can fit 8.33 down and 14.22 across.

 This makes images look *smaller relative to the rest of your layout*, even
 though they are *larger in real world units*, compared to a 4 hdpi phone,
 and have *same pixel size*.

 The gist of all this is: I don't think you can expect an application
 running on the Tab to look just like it looks on a phone, only larger. So
 far, this has been the case for phones of varying screen sizes and
 densities, but for a tablet device, this is no longer true.

 Now, if you want to have images in your application just for tablets, you
 can use res/drawable-large-hdpi, as phone screens are normal and tablet
 screens are large (or possibly xlarge, new in 2.3). But personally, I
 found it more useful to focus on making sure that my layouts can be used in
 landscape mode without vertical scrolling (sometimes creating separate -port
 and -land versions to achieve this).

 Oh, and here is a table comparing the Tab to a 4 hdpi screen:

 Pixels Inches DPI Icon Icons/screen  480 2,06 233,01 72 6,67  800 3,43
 233,01 72 11,11




   Pixels Inches DPI Icon Icons/screen  600 3,54 169,49 72 8,33  1024 6,04
 169,49 72 14,22
 -- Kostya

 26.01.2011 11:40, Neilz пишет:

 Hi all.

 I've got the Galaxy Tab emulator running, and was curious to see how
 my various apps worked regarding layouts. I've looked at the various
 docs on this, but they mostly talk about version 2.3 which I'm not yet
 supporting.

 My apps generally currently specify:

 android:minSdkVersion=3 android:targetSdkVersion=8

 and I have folders for res/drawable and res/drawable-hdpi, and just
 the one res/layout folder.

 I notice that while the layouts fit nicely, the images are all too
 small. So, bearing in mind my current spec above, what do I need to
 add to make the apps compatible with tablets, without yet included 2.3
 support?




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

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

Re: [android-developers] Re: ListView adapter bug?; notify changed does nothing.

2011-01-26 Thread Dianne Hackborn
Oh well, that is just the Settings app code.  You'll get it if you pull the
source code.  Without it, trying to build Android will fail.

On Wed, Jan 26, 2011 at 5:28 AM, Brill Pappin br...@pappin.ca wrote:

 Yes, I do get a listing when I go to the root.

 On Jan 26, 2:27 am, Dianne Hackborn hack...@android.com wrote:
  Can you at least get to the root of the repository from the open source
  project?
 
  http://source.android.com/source/index.html
 
   http://source.android.com/source/index.htmlWhich goes to here:
 http://android.git.kernel.org/
 
  I am just accessing this from my home machine, this is the
 world-accessible
  repository.
 
 
 
 
 
  On Tue, Jan 25, 2011 at 10:49 PM, Zsolt Vasvari zvasv...@gmail.com
 wrote:
   404 No Such Project
 
   On Jan 26, 2:40 pm, Dianne Hackborn hack...@android.com wrote:
No, that link is to the public open-source repository.
 
On Tue, Jan 25, 2011 at 10:33 PM, Brill Pappin br...@pappin.ca
 wrote:
 I should mention this is on a Nexus One with aOS 2.2.2 in case that
 matters.
 
 Yes, I looked all over that code and even down into AsbListView.
 It actually registers an internal instance member with the adapter,
 and the notify call does seem to make it to the observer as far as
 I
 can see, but there doesn't seem to be any code that connected the
 observer and the ListView.
 
 I was digging down that far in the first place because I was sure
 (three times over, I rewrote it from scratch three times using
 different examples and tutorials besides my first attempt from
 memory)
 that I had correctly implemented the Adapter and set it on the
 ListView. The list view simply never called the adapter after the
 notify method was called. I know that because I used the basic
 print-
 to-log when called technique of tracing the calls. The Adapter
 would
 get properly called when first set on the ListView but after that
 no
 amount of data change and notify calls would cause it to re-read
 the
 adapter, which is what I expect it to do if I notify it that my
 data
 has changed.
 
 I the end I simply created a new adapter and reset it on the
 ListView,
 which seems to be working, however that's broken IMO.
 
 I think the next step should be that I write up a quick demo app
 that
 attempts replicate the problem. If it doesn't do anything except
 demonstrate what I'm seeing, then it should allow others to test as
 well.
 I'll see if I can make time tomorrow for that.
 
 BTW - That link seems to not be visible to me :) must be on your
 internal network.
 
 - Brill Pappin
 
 On Jan 26, 12:35 am, Dianne Hackborn hack...@android.com wrote:
  AsbListView and ListView call registerDataSetObserver() on the
   adapter.
   BaseAdapter.notifyDataSetChanged() does the notification to
 whoever
   is
  registered with it.
 
  Here is working code, the Running Services UI in settings, that
 implements a
  BaseAdapter and uses notifyDataSetChanged() to tell the list view
   when
 its
  contents change:
 
  http://android.git.kernel.org/?p=platform/packages/apps/Settings.git;.
 ..
 
  On Tue, Jan 25, 2011 at 8:37 PM, Brill Pappin br...@pappin.ca
   wrote:
   I just searched the forums, and apparently this is a common
   problem.
 
   ListView with a custom adapter based on BaseAdapter.
   Its backed by a List object.
 
   The problem is that updating the data and calling
 notifyDataSetChanged();
   does nothing.
   I have modified the adapter so that ever method that is called
 in
   it
 prints
   itself to the console.
 
   my adapter has a method that does the update of the contents
 and
 attempts
   to notify:
 
   public void updateData(ListEvent data) {
 
this.data.clear();
 
this.data.addAll(data);
 
notifyDataSetChanged();
 
   }
 
   The problem is that after notifyDataSetChanged() is called, the
   list
 never
   calls any other methods, not even getCount().
 
   My data has changed, and i've notified ListView that it has,
 yet it
 still
   refuses to update.
 
   After some investigation in the OS source, I don't see where
 the
 observer
   in the list actually tells the list to update.
 
   It seems the only way to get the list to update its elements is
 to
 re-set
   the adapter on it with the new element set.
 
   Now I've seen many threads in the group saying that they user
 was
   doing
   something wrong... but I don't see how the notify is going to
   update
 the
   list period (change or no change).
 
   So, I think i'm dealing with a bug here.
 
   Can someone actually find the code that does the update in the
   ListVIew
   when adapters notifyDataSetChanged() is called?
 
   - Brill Pappin
 
   --
   You received this message because you are 

Re: [android-developers] What colour to use for custom contentView in notification for 2.2 and 2.3

2011-01-26 Thread Dianne Hackborn
You should design your notification icons to work well against any
background.

When we changed the status bar background to black, we were planning on
implementing compatibility for old apps that assumed the old background,
like we usually do.  However we realized that since there have already been
devices shipping with a black background from various vendors, it wouldn't
really help -- developers already unfortunately were in the boat where they
had to deal with making their icons work on both light and dark backgrounds.

So just design your icons to work on both.  The simplest way would be to do
something like put a black background behind them, perhaps a rounded
rectangle.

On Wed, Jan 26, 2011 at 6:17 AM, H m...@howardb.com wrote:

 Yeah, that would be good.

 My concern with building against 2.3 was that if I debug'd, I would need to
 use a 2.3 emulator. And with the broken lvl in it, I would have to hack my
 app heavily and then couldn't rely on the testing anyway. So the ability to
 build against 2.3 but debug against 2.2 or 2.1 would fill that gap nicely.

 Good work!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to 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
 http://groups.google.com/group/android-developers?hl=en




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

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

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

[android-developers] Re: Handling touch events for dragging content when changing the orientation of the screen

2011-01-26 Thread JAlexoid (Aleksandr Panzin)
You have to rotate the drag direction vector as well as canvas.
Even without looking at your code, the actual drawing code probably
doesn't translate the dragging direction in accordance with the
direction of the device.

On 26 янв, 08:13, Dave Bryson debry...@gmail.com wrote:
 I have a map application using an in-house map engine on Android. I'm
 working on a rotating Map view that rotates the map based on the
 phone's orientation using the Sensor Service. All works fine with the
 exception of dragging the map when the phone is pointing other than
 North. For example, if the phone is facing West, dragging the Map up
 still moves the Map to the South versus East as would be expected.  I
 assume translating the canvas is one possible solution but I'm
 honestly not sure the correct way to do this to swap the axes without
 disrupting the coordinate system needed by the map tiles.

 Here is the code I'm using to rotate the Canvas:

 public void dispatchDraw(Canvas canvas)
 {
     canvas.save(Canvas.MATRIX_SAVE_FLAG);
     // mHeading is the orientation from the Sensor
     canvas.rotate(-mHeading, origin[X],origin[Y]);

     mCanvas.delegate = canvas;
     super.dispatchDraw(mCanvas);
     canvas.restore();

 }

 What is the best approach to make dragging the map consistent
 regardless of the phones orientation? The sensormanager has a
 remapcoordinates() method but it's not clear to me exactly how to
 use it.  I've searched the web and posted to StackOverflow to try and
 figure this out...no luck so far.  Any pointers would be greatly
 appreciated!  Thanks.

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


Re: [android-developers] Communicating between two devices directly

2011-01-26 Thread Marcin Orlowski
On 26 January 2011 15:21, Kostya Vasilyev kmans...@gmail.com wrote:
 What mode does 2.2 use for WiFi tethering?

Thought about that too, yet need to do some testing.

 If it's not ad-hoc, but rather full AP mode, then this might be a workable
 solution (with some complications, like tethering can only be enabled by the
 user at this time, and it's not a true peer-2-peer solution).

 Limiting your app to 2.2 is probably going to give you a broader reach than
 limiting to rooted devices.

Yes, may look sane, especially I got it not yet done so when I'll be ready
for prime time 2.2 may be deployed more widely Thanks

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


Re: [android-developers] What colour to use for custom contentView in notification for 2.2 and 2.3

2011-01-26 Thread H
Thanks Dianne. I wasn't too worried about the icon as I can deal with that - 
it was the colour of the text to display by the side of it in the 
contentView. But you mentioned the same thing that I was realising: custom 
Themes must have broken this a long time ago anyway so there are probably 
many apps out there on gingerbread with black text on a black background in 
a custom notification anyway.

I've coded the solution Kostya suggested above and tested it in the gb 
emulator and it works a treat!

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

2011-01-26 Thread TreKing
2011/1/26 José Moreira matrixowns...@gmail.com

 i was aware of the api.


Sorry, you did not state otherwise so I could not have known.


 What i'm exploring is the possibility of creating a
 georeferenced Pacman(tm) clone and therefore, dinamically adding dots in
 the surroundings of the device's location, preferably avoiding roof
 tops, oceans, volcanos and other types of places that may be
 considered hazardous :) hence, having access to the streets


See that kind of detailed explanation is what will net you a better answer
than a link :-)

I do not know of anything off hand, but Google Maps and Navigation know
where the streets are, so there may be some API for getting this data. I
would dig around their maps, directions, and Earth APIs.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Overlaying points over streets

2011-01-26 Thread José Moreira
Em 11/01/26 15:14, TreKing escreveu:
 2011/1/26 José Moreira matrixowns...@gmail.com
 mailto:matrixowns...@gmail.com

 i was aware of the api.


 Sorry, you did not state otherwise so I could not have known.
  

 What i'm exploring is the possibility of creating a
 georeferenced Pacman(tm) clone and therefore, dinamically adding
 dots in the surroundings of the device's location, preferably
 avoiding roof tops, oceans, volcanos and other types of places
 that may be considered hazardous :) hence, having access to the
 streets


 See that kind of detailed explanation is what will net you a better
 answer than a link :-)

 I do not know of anything off hand, but Google Maps and Navigation
 know where the streets are, so there may be some API for getting this
 data. I would dig around their maps, directions, and Earth APIs.

 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

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

Aparently it's already been done:
http://androidcommunity.com/pacmap-location-based-game-updated-20101230/

Perhaps i should try a Worms multiplayer clone where people would
launch projectiles over gmaps. i could call it angry worms. ??? . profit


-- 
http://zemanel.eu
http://github.com/zemanel
http://pt.linkedin.com/in/josemoreira
http://djangopeople.net/josemoreira
irc://zema...@irc.freenode.net

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

2011-01-26 Thread Mark Carter
Analytics for one of my apps tells me that on rare occasions this
exception is thrown from the Activity.setContentView() method:

java.io.FileNotFoundException: res/color/primary_text_light.xml

It happened on a Motorola Milestone which appears to be using official
firmware: SHOLS_U2_01.03.1.1257641482 (which is SDK 2.0, I think)

The resource in question refers to a built-in Android resource which
has been there since API level 1.

Clearly this is not a programming error but something else.

Any ideas how this can happen?

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

2011-01-26 Thread paulb
The WebView tutorial doesn't work in the 2.3 emulator because of
http://code.google.com/p/android/issues/detail?id=12987 You should use
2.2 instead.

On Jan 25, 1:49 pm, TreKing treking...@gmail.com wrote:
 On Fri, Jan 21, 2011 at 11:34 AM, TGundhus tgundhu...@gmail.com wrote:
  Here is a link to a tutorial, but I get an error, someone who got
  the entire pure source or know it, because it rly does not work for
  me (something I'm doing wrong for sure...)

 You should explain the error and makes sense if you expect to get help.

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

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


[android-developers] performance when passing background data to ui thread

2011-01-26 Thread neuron
Hi

I've got an app that spawns of a seperate thread. Parses JSON data into a 
structure. And passes it back to the main thread through a handler. Each 
part of data is sent through the handler individually. That worked fairly 
well with my previous XML parser, as XML parses data while it downloads. But 
JSON doesn't (atleast I haven't found a way to get that working). In either 
way the JSON data is much smaller and much faster to parse.

I've recently added a feature that requires me to load several sources of 
json in parallel, parse in the background, and pass all the data back again 
using a Handler. This is a bit slower than I was hoping.

Would it be faster (and possible) for me to do this:
BackgroundThread extends Thread {
onCreate (Parent) {
this.parent = parent;
}
onData {
parent.addParsedData(x);
}
}

Parent extends ListActivity {
ListAdapter list;
onCreate {
   setListAdapter(list);
   new BackgroundThread(this);
}
public synchronized addParsedData(data) {
list.add(data)
}
}

I'm thinking this won't be thread safe, as ListAdapter is in the parent 
thread. Am I right?
Should I instead inside the listadapter (which puts data in an array) have 
synchronized access to it's items?

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

[android-developers] http connection issue

2011-01-26 Thread arindam
Dear all,

I am trying to open a url like https://192.168.10.199/HSMobile/
HSService.asmx using httpclient and try to read response.

Now if i will open the above url in normal browser, it redirects to
one firewall page and asking login and password.After giving username
and password I able to view response. If i will type only firewall
page url and give login and password, it sows 1.1 Internal server
error 29.

Now I am doing it in android and using http post method. I am seding
login and password for firwall page. I am getting the same error. If
I use the actual URL i.e https://192.168.10.199/HSMobile/
HSService.asmx and sending the same login and password usng POST . I
am getting some other error.

Any possibility to solve it.

My demo  code is

String URL = https://192.168.10.199/cgi/login;;//firewall page
String URL1 = https://192.168.10.199/NUHSMobile/NUHSService.asmx?
wsdl; //actual URL
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button btn = (Button) findViewById(R.id.btn);
Button btn1 = (Button) findViewById(R.id.btn1);
txt = (TextView) findViewById(R.id.label2);
Name = (EditText) findViewById(R.id.name);
Name.setText(Sample);
btn.setOnClickListener(new OnClickListener() {

public void onClick(View v)
{
thread_creation();
}
});
btn1.setOnClickListener(new OnClickListener() {

public void onClick(View v)
{
thread_creation1();
}
});
}

public void thread_creation()
{
myProgressDialog = ProgressDialog.show(demo.this, Please 
wait...,
Connecting server..., true);

Handler handler = new Handler();
new LoadingThread(handler).start();
}

class LoadingThread extends Thread
{
Handler handler;
public LoadingThread(Handler handler) {
super();
this.handler = handler;
}
@Override
public void run()
{
try
{
url_send();
} catch (Exception E)
{
Log.i(Arindam, result + 
E.getClass().getName() + : 
+ E.getMessage());
}

handler.post(new FinishThread());
}

}

class FinishThread extends Thread
{

@Override
public void run()
{
// you can change UI etc

if (myProgressDialog != null)
myProgressDialog.dismiss();
try
{
txt.setText(return_Data);
} catch (Exception e)
{
Toast.makeText(demo.this, Network Connection 
Problem,
Toast.LENGTH_SHORT).show();
}
}
}

private void url_send()
{
nameValuePairs = new ArrayListNameValuePair(2);
nameValuePairs.add(new BasicNameValuePair(login, david));
nameValuePairs.add(new BasicNameValuePair(passwd, 
u0403668@));
nameValuePairs.add(new BasicNameValuePair(, ));

/
**
// HttpService is the class for POST and getting
responce
 
/
HttpService httpService = new HttpService(this, null, 1, URL, 1,
nameValuePairs, true);
return_Data=httpService.start();
}

public void thread_creation1()
{
myProgressDialog = ProgressDialog.show(demo.this, Please 
wait...,
Connecting server..., true);

Handler handler = new Handler();
new LoadingThread1(handler).start();
}
class LoadingThread1 extends Thread
{
Handler handler;
public LoadingThread1(Handler handler) {
super();
this.handler = handler;
}
@Override
public void run()
{

[android-developers] ENHANCEMENT: Allow java public static finals to be referenced from XML

2011-01-26 Thread mkh
One example from an AndroidManifest.xml:

provider android:name=NotePadProvider
android:authorities=com.exampl.notepad.provider.NotePad /


This deliberately includes a typo that cannot be flagged by an IDE
because it is just a string.

Instead as an enhancement, why not define @java/ to be a reference
to the a public static final, then the above becomes:

provider android:name=NotePadProvider
android:authorities=@java/
com.example.android.notepad.AUTHORITY /

Now an IDE can provide completion on these @java variables, and the
IDE can also immediately flag undefined references. Also, the
definition of the authority string can be changed in one place, and
the code does not break.

Is there any reason this would not work -- it seems like the benefits
offered are significant.

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

2011-01-26 Thread André
Is there a limit on how many characters and or lines you can have in
an edittext? Or is it unlimited?

//André

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 define a CUSTOM font (Typeface) in application wide XML Theme/Style?

2011-01-26 Thread Eric
Hello,

I have been searching the APIs for a way, ANY way, to define a custom
(developer installed) font on a style, but it does not appear this is
possible.  It appears you have to resort to using:

Typeface.createFromAsset()

to load a font file stored in your assets directory, and then
programmatically set that font on every single text view you want it
used on, with 'setTypeface'.  This is not an acceptable solution for
our application, which is very complex, and we just want to define a
single theme using our custom font that can easily be applied on an
application, or at the very least, an activity wide level.

I discovered another possible way to set the typeface through the use
of SpannableString.  It seems you can use SpannableStringBuilder to
build a String that has styles defined over its contents.  However, of
the two types of Spans that allow you to style the text, StyleSpan and
TypefaceSpace, neither of them allow you to specify a CUSTOM font.
StyleSpan lets you pick a style, but the choices are limited to
'bold, italic, etc (which is font-independent).  TypefaceSpan does
allow you to specify a typeface 'family' name, however, as far as I
know, a USER installed custom font is unknown to the
Typeface.create(String family) method, and therefore, the system will
not be able to find my custom font.  *IF* TypefaceSpan had a
constructor that took a Typeface, I might be able to use that, but it
doesn't.

It looks like I might have to resort to writing my own Typeface span,
or somehow write custom code that plugs into the Android Style/Theme
system to allow me to apply a custom typeface to my application.

Any advice would be appreciated!

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

2011-01-26 Thread Alexander Lucas
H-

Per your comments on usability (drill-down order in same report, etc) I'll
definitely pass those along to the team-  I'd recommend you also add a
feature request!  Votes on community-made feature requests have real
influence in how they prioritize their time :)

Regarding the ability to select custom variables in the left-nav with other
metadata, you can!  In left-nav, click on visitors.  It will be the very
last item in the expanded list.  From there you can drill-down from Custom
Variable names to specific values by clicking on them (much the way you can
drill-down with events by clicking on category/action/label)

Brill, alas!  But best of luck with Flurry :)

-Alex


On Tue, Jan 25, 2011 at 5:01 PM, H m...@howardb.com wrote:

 Hi Alex, thanks for the comments. I don't want to deviate from the core of
 this post, but just wanted to touch on your point a smidge

 I could do what you suggested, and I can create a custom report to get the
 page views for custom var 1 and I can further drill to get the custom var 1
 values. And then I can further drill and get the details for custom var 2
 for a specific custom var 1 value.

 But what if I wanted the total page views grouped by custom var 2 first
 instead? I would have to create another report with that first instead.

 And what if I wanted to drill from custom var 3 to custom var 2 to custom
 var 1. Another report.

 Don't get me wrong, I can see that the reports are indeed powerful, but for
 ad-hoc what if reporting, they are just too much faff to have to create
 just to see a custom value for a chunk of users. And similarly, although the
 api is again powerful, it's a bit heavy handed for a simple why is that
 happening query when you see a lonely spike on a diagram and are curious as
 to why.

 If the custom variables are indeed metadata for page views and events, then
 why aren't they available to be selected in the list with all the other
 metadata i.e. language, continent, hostname, campaign, connection speed..?
 Surely all these other attributes are also metadata about a specific
 request..?

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to 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
 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] javax.xml parserxml configuration Error

2011-01-26 Thread TreKing
On Tue, Jan 25, 2011 at 11:43 PM, cuil yahoo cuilya...@gmail.com wrote:

 1. When using gdata-client libraries, for authenticating google accounts of
 users, should the UI be made, or is it preferred to jump to a web browser
 and get authenticated. I am kind of new to this whole thing of connecting to
 google resources of users online. I made the UI for username, password for
 authentication in a separate activity.


Probably a browser. Most users won't (and shouldn't) trust your app with
their username and password.


 2. When using the following code,
 ...
 i get the following error,



 01-26 11:02:40.502: WARN/XmlParser(745):
 javax.xml.parsers.ParserConfigurationException:
 org.xml.sax.SAXNotRecognizedException:
 http://xml.org/sax/features/external-parameter-entities
 01-26 11:02:40.502: WARN/XmlParser(745):
 javax.xml.parsers.ParserConfigurationException:
 org.xml.sax.SAXNotRecognizedException:
 http://xml.org/sax/features/external-parameter-entities
 ...


 I would be grateful if someone could please point out the reason for the
 error to occur.


Google the error and read the documentation for it. It should explain when
it's thrown.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Re: Pretty sure Google Analytics for Android not working

2011-01-26 Thread TreKing
On Wed, Jan 26, 2011 at 11:51 AM, Alexander Lucas alexlu...@google.comwrote:

 I'd recommend you also add a feature request!  Votes on community-made
 feature requests have real influence in how they prioritize their time :)


Could you link to where one would do such things? I can't find anything.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Edittext max characters - not set max

2011-01-26 Thread Marcin Orlowski
On 26 January 2011 18:27, André pha...@hotmail.com wrote:
 Is there a limit on how many characters and or lines you can have in
 an edittext? Or is it unlimited?

http://developer.android.com/reference/android/widget/TextView.html#attr_android:maxLength

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

2011-01-26 Thread Alexander Lucas
Actually, it appears I spoke too soon-  There's a feature request form for
the API, but not yet for the web app.  I'll forward the feedback to someone
on the team:)

-Alex

On Wed, Jan 26, 2011 at 9:57 AM, TreKing treking...@gmail.com wrote:

 On Wed, Jan 26, 2011 at 11:51 AM, Alexander Lucas alexlu...@google.comwrote:

 I'd recommend you also add a feature request!  Votes on community-made
 feature requests have real influence in how they prioritize their time :)


 Could you link to where one would do such things? I can't find anything.


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

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


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

[android-developers] Need Help With AsyncTask HttpClient Internet Permission

2011-01-26 Thread guymac
My app attempts to do a https post from an AsyncTask's doInBackground
method. The app has permission
android:name=android.permission.INTERNET/permission in the
manifest in the correct location (it's the last line before /
manifest so it's at the same level as the application sibling
element).

But, while running in the emulator, it fails to get permission to
lookup the IP of the host, and if I switch to using a dotted quad
instead of a hostname, it gets a Permission denied socket exception.

Please help, I'm at my wit's end, it looks like everything is correct
from what I have read. Is it because the async thread doesn't have the
same permissions as the application? If so, what is the correct way to
spawn a potentially long-running http request from an activity?

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: Tablet support up to 2.2

2011-01-26 Thread Hari Edo

I think the tablets in general will be more likely to flip orientation
and good apps should handle that gracefully.  But I think they should
also have a lock orientation control at the OS or hardware level,
as it's common but annoying to have the view flipping as you lay down
in bed reading on an e-book reader (as an example).

One thing that I did in my app was to identify some views as heros
and some views as mere interface details.  I made a generic sizing
capability which makes a view, say, N% of the size of the whole
window, and I use that on all the hero elements.  So the buttons stay
the same size (finger sized) but the main elements of the screen use
their available real-estate more fully.

 (Not to toot my own horn, but see my Qwiz - Hiragana screenshots.)
 http://www.appbrain.com/app/qwiz-hiragana/cc.halley.droid.qwiz

Other applications just try to allow the additional area to be used
as a more convenient tableau, fitting more items in view at once,
because the individual items remain finger-sized.

 (NiaSoft's game Alchemy Classic uses tablet workspace well.)
 http://www.appbrain.com/app/alchemy-classic/com.niasoft.alchemyclassic

On Jan 26, 5:43 am, Neilz neilhorn...@gmail.com wrote:
 Hey thanks Kostya, that's really useful. I agree, maybe ensuring that
 the layout works is more important than resizing all the images again.

 Portrait vs Landscape is another issue... the majority of my apps
 specify portrait only, it's just the way they were intended to work.
 Do I take it that these tablets are designed to set landscape mode as
 their default?

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

2011-01-26 Thread L0rdAli3n
Ok, I'm about to write the SyncAdapter part of my App.

Due to the fact that I have a special case, I'm a little bit stuck:

Additional to the username/password I need to store a URL on a per
account base!

How I'm supposed to store this extra information, attached to an
account?

Thanks for your help an patience Dmitri!

On 23 Jan., 19:00, Dmitri Plotnikov dplotni...@google.com wrote:
 Using ContentObserver for sync adapters does not sound like a good idea.
  There are several reasons for that:

 1. Data change notifications are not delivered to processes that are not
 running. So if your sync adapter is not running for one reason or another
 (and the system kills processes when it needs resources), then you won't get
 a notification.
 2. ContactsProvider sends only general whole adapter notifications,
 meaning that when any data element in the database changes it sends a
 notification to all observers regardless of what URIs they registered for.
  For example, somebody's presence in Talk changes - you will get a
 notification.  Most of these notifications will have nothing to do with the
 changes you need to sync, but there is no way for the adapter to tell.
 3. Having the sync adapter running at all times is a major waste of
 resources.

 Fortunately, the sync framework is designed to overcome all these issues.
  SyncManager manages sync adapters, calls them at the best time from the
 system's perspective, throttles their activities etc.  Sync adapters
 themselves rely on RawContact.DIRTY flag and the
 ContactsContract.CALLER_IS_SYNCADAPTER parameter to find and process
 incremental changes.

 There are examples of how that's done.  The most comprehensive example is
 probably the Exchange (IAS) sync adapter that you can find here:

 http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=t...

 Cheers,

 On Fri, Jan 21, 2011 at 11:57 PM, himanshu jain himanshu@gmail.comwrote:

  Hi Dmitri  ,@LordAli3n
  I have couple of questions please spare some time or guide me
  direction
  1) Can we use syncAdapter to get data of a row of raw_contact table if
  that row has been affected (i.e added/deleted/edited). I know
  ContentObserver notify whenever raw_content table changes in
  onChange() method but we dont know which row has been changed ( to put
  this in another way if we add how would we know and if deleted we
  still get it through deleted flag in raw_contact table but how about
  edited one??).
  2) when we get notification in ContentObserver can we fire requestSync
  (Account account, String authority, Bundle extras) to start Sync ??
  how we can get data of raw_contact affected by contact application
  using these to parameters .
  3) Is sync started by ContentProvider API ?? whenever change to it
  happens ??. How?? does it pass any useful uri or data that has been
  changed in raw_contacts??.
  4) How do we come to know if in the process of  syncing something went
  wrong?? does it started again automatically??.

  thanks any help appreciated !!

  On Jan 19, 7:31 am, BoD bodl...@gmail.com wrote:
   If I may intervene.
   It seems to me that the OP wants to synchronize contacts using the
   sync adapters APIs, and therefore wants to have his own account type,
   and raw contacts in this account.

   But that means that when the user first starts using this app, this
   account will be empty, and will synchronize... nothing.
   Instead, they probably expect to synchronize the contacts already on
   their phones (in the local account, or, more probably, in the gmail
   account).

   --
   BoD

   On Jan 19, 9:02 am, Dmitri Plotnikov dplotni...@google.com wrote:

I am sorry. I guess I just don't understand the requirements.  I
  thought you
were writing a sync adapter.  Sync adapters all deal with their own
accounts.  Google sync adapter deals with google accounts, exchange
  adapter
with exchange accounts and so on.  If you are thinking of writing a
  sync
adapter that would handle data already handled by some other sync
  adapter,
it is probably a bad idea. The framework is not designed to have
  multiple
sync adapters handling the same data: only one syncadapter can take
advantage of data versioning. This why I suggested that if you are
  writing a
sync adapter, you should introduce a new account type. This is how they
  are
supposed to work by design.

Cheers,
Dmitri
On Jan 18, 2011 5:43 PM, L0rdAli3n 42.john.doe.1...@googlemail.com
wrote:

 Thanks for your answer Dmitri!

 Could you explain in few words, how I can use the contacts the user
 stored on his phone,
 which in fact all have already an account_type, by introducing my own
 accout_type?

 On 14 Jan., 16:26, Dmitri Plotnikov dplotni...@google.com wrote:
 I don't fully understand your requirements, but it shouldn't matter
  what
 _other_ data is in the contacts DB.  A sync adapter should only deal
  with
 its own data. Why not 

[android-developers] Re: One frame buffer per activity or one frame buffer per the whole system

2011-01-26 Thread Hari Edo

I'm not sure that this is the right forum for platform-developers;
it's more geared to app-developers.

However, I will point out that there's an important entity between
the framebuffer level and the activity level, and that is the Window.
Activities come and go, Dialogs come and go, and their views are
attached to the window to be seen.  Activities themselves aren't
users of pixels, but Views are.  I don't think any storage is given
to a View; the View is merely consulted to render into the Window.

On a phone, the Window is basically 95% of the whole screen so you
don't necessarily think of this, but it's still a separate entity.
I could definitely see some more traditional WIMP implementation
offering a Desktop that contains multiple overlapping or tiled
Window areas, and in those Windows various Views/Activities being
managed in parallel.  Not saying that's the best vision of a huge
display on Android, but it may help understand the framebuffer
question you posed.

On Jan 25, 9:59 pm, Videoguy puri_mall...@yahoo.com wrote:
 Hi
 I am trying to come up with memory footprint requirements for an
 android based settop box. Does Android maintain framebuffer per
 activity or one framebuffer per the whole system?

 Lets say I have 10 activities. Lets assume frame buffer size is 2MB.
 Does system need 10x2MB+2MB (= 22MB) for these many resident
 activities?

 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] activity and service as a package

2011-01-26 Thread Titus
Hello,

I am making a service which is having its own package name while an
activity has a diff package name? is it possible to have a single
manifest file which will do the job ? The reason why i wanted in one
install was that I didn't want the user to have the trouble of
multiple installations.

Any answers,

Thanks,
Titus

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

2011-01-26 Thread TreKing
On Wed, Jan 26, 2011 at 12:08 PM, Alexander Lucas alexlu...@google.comwrote:

 Actually, it appears I spoke too soon-  There's a feature request form for
 the API, but not yet for the web app.  I'll forward the feedback to someone
 on the team:)


OK, thanks. Well in that case, I'll make a feature request here that I hope
you can forward as well. From the docs:


 Known Issues

- Possible *inaccurate timestamps*: timestamps are recorded at the time
the application dispatches to Google Analytics, so if a user experiences
long periods of offline use, the timestamps may not be 100% accurate.


Can this be updated? It seems strange the tracker doesn't already track the
time the call was made and send this as the timestamp for tracking the
analytics in the dashboard. I can't imagine this would be very difficult to
change if the tracker is already caching the event data before doing a
dispatch later.

Thanks. Googler help always welcome around here. =)

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: Edittext max characters - not set max

2011-01-26 Thread Hari Edo

I think Andre was looking for a design limit, not how to set one.

The control can handle many pages of text, even with spanning styled
markup.  The EULA which I saw on one Android tablet was shown in a
simple text view, and it was about fifty pages of text on the tablet.
(The EditText control should have the same limits as the TextView,
as the EditText is just some additional features on the basic view.)

The answer is how much memory can you allocate?  Of course
the system needs to allocate resources to measure and typeset and
render all of that text.  If it's too long, consider showing the text
in pages or chunks.

On Jan 26, 1:05 pm, Marcin Orlowski webnet.andr...@gmail.com wrote:
 On 26 January 2011 18:27, André pha...@hotmail.com wrote:

  Is there a limit on how many characters and or lines you can have in
  an edittext? Or is it unlimited?

 http://developer.android.com/reference/android/widget/TextView.html#a...

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


Re: [android-developers] activity and service as a package

2011-01-26 Thread TreKing
On Wed, Jan 26, 2011 at 12:27 PM, Titus titus.mor...@gmail.com wrote:

 I am making a service which is having its own package name while
 an activity has a diff package name?


That's not a question?


 is it possible to have a single manifest file which will do the job ?


Not only is this possible, it's what you should be doing.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: performance when passing background data to ui thread

2011-01-26 Thread Hari Edo

If you're sure that all users of the data are within the same process
(the
same app), then using Java synchronized is the best way to go.
However,
you will need to be very careful to understand your semaphore
dependencies,
or deadlock will occur.  Not responding is almost as bad as Data
corrupted due to bad inter-thread communication.

The use of Bundles and/or ContentProviders are to enable inter-process
data
passing, and to avoid some of the danger of errant deadlock
situations.

On Jan 26, 10:37 am, neuron aagaa...@gmail.com wrote:
 Hi

 I've got an app that spawns of a seperate thread. Parses JSON data into a
 structure. And passes it back to the main thread through a handler. Each
 part of data is sent through the handler individually. That worked fairly
 well with my previous XML parser, as XML parses data while it downloads. But
 JSON doesn't (atleast I haven't found a way to get that working). In either
 way the JSON data is much smaller and much faster to parse.

 I've recently added a feature that requires me to load several sources of
 json in parallel, parse in the background, and pass all the data back again
 using a Handler. This is a bit slower than I was hoping.

 Would it be faster (and possible) for me to do this:
 BackgroundThread extends Thread {
     onCreate (Parent) {
         this.parent = parent;
     }
     onData {
         parent.addParsedData(x);
     }

 }

 Parent extends ListActivity {
     ListAdapter list;
     onCreate {
        setListAdapter(list);
        new BackgroundThread(this);
     }
     public synchronized addParsedData(data) {
         list.add(data)
     }

 }

 I'm thinking this won't be thread safe, as ListAdapter is in the parent
 thread. Am I right?
 Should I instead inside the listadapter (which puts data in an array) have
 synchronized access to it's items?

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

2011-01-26 Thread Armond
Hi Folks,

I need to access the product key (or whatever unique device ID) of the
Archos devices. I've found the following API mentioned on Archos
website which should work on Archos5 series:
Settings.System.getString(getContentResolver(), archos.product_key);

But it does not work on 101 tablets (returning NULL). Any clue?

Further Note: It seems that Telephony.getDeviceId() always returns
NULL on all Archos devices.

Thank you,
Armond

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


[android-developers] Sending AVRCP play command, getting spammed with broadcast

2011-01-26 Thread James
Hello.

I have some hardware that sends the AVRCP play command to the phone
upon bluetooth connection. What I am seeing is the MEDIA_BUTTON action
intent spammed over and over in the debugger. This is causing problems
with a few apps but mainly Pandora. Pandora will constantly play/pause
over and over. It is almost like the AVRCP command gets sent to the
phone which generates a MEDIA_BUTTON broadcast that keeps getting sent
out over and over.

I set up a Broadcast Receiver to catch it and try to determine what's
going on. Here is what is being spammed:


01-17 12:20:04.324: ERROR/NPT:(1558): Intent
{ act=android.intent.action.MEDIA_BUTTON (has extras) }
01-17 12:20:04.324: ERROR/NPT:(1558): KeyEvent{action=0 code=85
repeat=0 meta=0 scancode=200 mFlags=8}

which is the bluetooth Play/Pause media key. This is what it should
be, as the AVRCP command triggers this, but as I said, it's like the
OS just keeps spamming this.

I have tried using the abortBroadcast() method to stop it but that has
no effect. I am guessing the broadcast is non-ordered and can't be
stopped explicitly?

I have verified it is not the hardware spamming the AVRCP command by
debugging my firmware code. The spamming behavior also continues if I
unplug the hardware.

I am using 2.2.

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: Need Help With AsyncTask HttpClient Internet Permission

2011-01-26 Thread guymac
More info: this is how I am doing the post:

HttpPost req = new HttpPost(REQUEST_URL); // starts
with https://


req.setHeader(Content-Type, application/json);
String json = data.toJSON().toString();

req.setEntity(new StringEntity(json));
DefaultHttpClient client = new DefaultHttpClient();
StatusLine statusLine =
client.execute(req).getStatusLine();

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

2011-01-26 Thread Titus
Do you have an example of how a single manifest file can do this  if
both services and activities are of complete diff packages?

On Jan 26, 11:05 am, TreKing treking...@gmail.com wrote:
 On Wed, Jan 26, 2011 at 12:27 PM, Titus titus.mor...@gmail.com wrote:
  I am making a service which is having its own package name while
  an activity has a diff package name?

 That's not a question?

  is it possible to have a single manifest file which will do the job ?

 Not only is this possible, it's what you should be doing.

 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

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


[android-developers] Re: Sending AVRCP play command, getting spammed with broadcast

2011-01-26 Thread James
Anyone have any insight into this? I have not found anything on Stack
Overflow or Google searches about this.

On Jan 17, 12:36 pm, James jrs8...@gmail.com wrote:
 Hello.

 I have some hardware that sends theAVRCPplay command to the phone
 upon bluetooth connection. What I am seeing is the MEDIA_BUTTON action
 intent spammed over and over in the debugger. This is causing problems
 with a few apps but mainly Pandora. Pandora will constantly play/pause
 over and over. It is almost like theAVRCPcommand gets sent to the
 phone which generates a MEDIA_BUTTON broadcast that keeps getting sent
 out over and over.

 I set up a Broadcast Receiver to catch it and try to determine what's
 going on. Here is what is being spammed:

 01-17 12:20:04.324: ERROR/NPT:(1558): Intent
 { act=android.intent.action.MEDIA_BUTTON (has extras) }
 01-17 12:20:04.324: ERROR/NPT:(1558): KeyEvent{action=0 code=85
 repeat=0 meta=0 scancode=200 mFlags=8}

 which is the bluetooth Play/Pause media key. This is what it should
 be, as theAVRCPcommand triggers this, but as I said, it's like the
 OS just keeps spamming this.

 I have tried using the abortBroadcast() method to stop it but that has
 no effect. I am guessing the broadcast is non-ordered and can't be
 stopped explicitly?

 I have verified it is not the hardware spamming theAVRCPcommand by
 debugging my firmware code. The spamming behavior also continues if I
 unplug the hardware.

 I am using 2.2.

 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: ENHANCEMENT: Allow java public static finals to be referenced from XML

2011-01-26 Thread Hari Edo

It would create a dependancy loop:

 *   the app code requires R.java to be generated
 *   the R.java generation requires the XML to be scanned
 *   the XML @java would require the app code to be scanned

Maybe you intend the XML to be scanned twice, with two different
sets of rules as to what is allowed to be broken on each pass,
such that nothing broken slips through the two passes.  On the
first pass, find @+id kinds of things to add to R.java; on the
second pass, find @java kinds of things to validate the code.
All of the rest of the XML DTD rules would need to be covered
on at least one of those passes.  That kind of duplicity is
very error-prone and troublesome.

On Jan 26, 12:14 pm, mkh mike.hana...@gmail.com wrote:
 One example from an AndroidManifest.xml:

 provider android:name=NotePadProvider
             android:authorities=com.exampl.notepad.provider.NotePad /



 This deliberately includes a typo that cannot be flagged by an IDE
 because it is just a string.

 Instead as an enhancement, why not define @java/ to be a reference
 to the a public static final, then the above becomes:

 provider android:name=NotePadProvider
             android:authorities=@java/
 com.example.android.notepad.AUTHORITY /

 Now an IDE can provide completion on these @java variables, and the
 IDE can also immediately flag undefined references. Also, the
 definition of the authority string can be changed in one place, and
 the code does not break.

 Is there any reason this would not work -- it seems like the benefits
 offered are significant.

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

2011-01-26 Thread Emre A. Yavuz


Hi,
 
Is anyone aware of a method to take the snapshot of phone's screen while an app 
is running ? Running the app on the emulator is not an option since network 
connectivity is needed. Is there any internal method that we can use ?
 
Thanks in advance,
 
Cheers,
 
Emre
  

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

2011-01-26 Thread André
Thanks Hari that was what I was looking for.

The same goes for strings right? So what ever size could be put in a
string can be put in a edittext?
Or should I use string[] for that instead of a normal string?



On Jan 26, 8:05 pm, Hari Edo hari@gmail.com wrote:
 I think Andre was looking for a design limit, not how to set one.

 The control can handle many pages of text, even with spanning styled
 markup.  The EULA which I saw on one Android tablet was shown in a
 simple text view, and it was about fifty pages of text on the tablet.
 (The EditText control should have the same limits as the TextView,
 as the EditText is just some additional features on the basic view.)

 The answer is how much memory can you allocate?  Of course
 the system needs to allocate resources to measure and typeset and
 render all of that text.  If it's too long, consider showing the text
 in pages or chunks.

 On Jan 26, 1:05 pm, Marcin Orlowski webnet.andr...@gmail.com wrote:







  On 26 January 2011 18:27, André pha...@hotmail.com wrote:

   Is there a limit on how many characters and or lines you can have in
   an edittext? Or is it unlimited?

 http://developer.android.com/reference/android/widget/TextView.html#a...

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


Re: [android-developers] Re: Grab phonebook-contacts via ContactsContract-API

2011-01-26 Thread Dmitri Plotnikov
Take a look at AccountManager docs:
http://developer.android.com/intl/en/reference/android/accounts/AccountManager.html

AccountManager supports the notion of authentication token, which is what I
think you need.

Cheers,
- Dmitri

On Wed, Jan 26, 2011 at 10:26 AM, L0rdAli3n 42.john.doe.1...@googlemail.com
 wrote:

 Ok, I'm about to write the SyncAdapter part of my App.

 Due to the fact that I have a special case, I'm a little bit stuck:

 Additional to the username/password I need to store a URL on a per
 account base!

 How I'm supposed to store this extra information, attached to an
 account?

 Thanks for your help an patience Dmitri!

 On 23 Jan., 19:00, Dmitri Plotnikov dplotni...@google.com wrote:
  Using ContentObserver for sync adapters does not sound like a good idea.
   There are several reasons for that:
 
  1. Data change notifications are not delivered to processes that are not
  running. So if your sync adapter is not running for one reason or another
  (and the system kills processes when it needs resources), then you won't
 get
  a notification.
  2. ContactsProvider sends only general whole adapter notifications,
  meaning that when any data element in the database changes it sends a
  notification to all observers regardless of what URIs they registered
 for.
   For example, somebody's presence in Talk changes - you will get a
  notification.  Most of these notifications will have nothing to do with
 the
  changes you need to sync, but there is no way for the adapter to tell.
  3. Having the sync adapter running at all times is a major waste of
  resources.
 
  Fortunately, the sync framework is designed to overcome all these issues.
   SyncManager manages sync adapters, calls them at the best time from the
  system's perspective, throttles their activities etc.  Sync adapters
  themselves rely on RawContact.DIRTY flag and the
  ContactsContract.CALLER_IS_SYNCADAPTER parameter to find and process
  incremental changes.
 
  There are examples of how that's done.  The most comprehensive example is
  probably the Exchange (IAS) sync adapter that you can find here:
 
  http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=t...
 
  Cheers,
 
  On Fri, Jan 21, 2011 at 11:57 PM, himanshu jain himanshu@gmail.com
 wrote:
 
   Hi Dmitri  ,@LordAli3n
   I have couple of questions please spare some time or guide me
   direction
   1) Can we use syncAdapter to get data of a row of raw_contact table if
   that row has been affected (i.e added/deleted/edited). I know
   ContentObserver notify whenever raw_content table changes in
   onChange() method but we dont know which row has been changed ( to put
   this in another way if we add how would we know and if deleted we
   still get it through deleted flag in raw_contact table but how about
   edited one??).
   2) when we get notification in ContentObserver can we fire requestSync
   (Account account, String authority, Bundle extras) to start Sync ??
   how we can get data of raw_contact affected by contact application
   using these to parameters .
   3) Is sync started by ContentProvider API ?? whenever change to it
   happens ??. How?? does it pass any useful uri or data that has been
   changed in raw_contacts??.
   4) How do we come to know if in the process of  syncing something went
   wrong?? does it started again automatically??.
 
   thanks any help appreciated !!
 
   On Jan 19, 7:31 am, BoD bodl...@gmail.com wrote:
If I may intervene.
It seems to me that the OP wants to synchronize contacts using the
sync adapters APIs, and therefore wants to have his own account type,
and raw contacts in this account.
 
But that means that when the user first starts using this app, this
account will be empty, and will synchronize... nothing.
Instead, they probably expect to synchronize the contacts already on
their phones (in the local account, or, more probably, in the gmail
account).
 
--
BoD
 
On Jan 19, 9:02 am, Dmitri Plotnikov dplotni...@google.com wrote:
 
 I am sorry. I guess I just don't understand the requirements.  I
   thought you
 were writing a sync adapter.  Sync adapters all deal with their own
 accounts.  Google sync adapter deals with google accounts, exchange
   adapter
 with exchange accounts and so on.  If you are thinking of writing a
   sync
 adapter that would handle data already handled by some other sync
   adapter,
 it is probably a bad idea. The framework is not designed to have
   multiple
 sync adapters handling the same data: only one syncadapter can take
 advantage of data versioning. This why I suggested that if you are
   writing a
 sync adapter, you should introduce a new account type. This is how
 they
   are
 supposed to work by design.
 
 Cheers,
 Dmitri
 On Jan 18, 2011 5:43 PM, L0rdAli3n 
 42.john.doe.1...@googlemail.com
 wrote:
 
  Thanks for your answer Dmitri!
 
  Could you explain in 

[android-developers] Application does not use all screen in Android tablet (with android 2.2)

2011-01-26 Thread gato chlr
Hi List,

In a phone, the application works o, but in an android tablet (with android
2.2) it does not use all screen, does anybody know how to fix that?
I just see the application in the center of screen, and the rest of screen
is black.

Thanks a lot!

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

[android-developers] Re: Application does not use all screen in Android tablet (with android 2.2)

2011-01-26 Thread Hari Edo

The tarot deck answers nothing, so I'm reading the tea leaves now.  If
that
doesn't work, I will throw some chicken bones across the campfire.

What app?  Is this your app?  What are you doing to develop the
activity?
Are you making layouts in XML?  Did you try a sample application?
What
tablet are you talking about?

I'm sure this reply is not useful to you.  Google for How to ask
questions
the smart way and you may get some more useful replies.

On Jan 26, 2:10 pm, gato chlr dany...@gmail.com wrote:
 Hi List,

 In a phone, the application works o, but in an android tablet (with android
 2.2) it does not use all screen, does anybody know how to fix that?
 I just see the application in the center of screen, and the rest of screen
 is black.

 Thanks a lot!

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


Re: [android-developers] Unable to upload app on Android Market having uses-configuration android:reqHardKeyboard=false/ tag in manifiest

2011-01-26 Thread TreKing
On Wed, Jan 26, 2011 at 4:53 AM, Yogini yogin...@gmail.com wrote:

 Or any other way to exclude an app from devices having hard
 keyboard support.


That doesn't make sense. Requirements are for extra hardware, not the lack
thereof. Why do you think you need to do this? If your app works without a
keyboard, there's no reason it should not work with a keyboard.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

[android-developers] ANNOUNCE: RoboGuice 1.1 now available

2011-01-26 Thread Michael Burton
Hello Android developers,

I'd like to announce the final release of RoboGuice 1.1!

http://roboguice.org

RoboGuice is a framework that brings the simplicity and ease of Dependency 
Injection to Android, using Google's own Guice library.  If you've ever used 
Spring (the #1 enterprise framework on Java, more popular than JEE itself) or 
Guice, you already know how convenient this style of programming can be.

To give you an idea, take a look at this simple example of a typical Android 
activity:

class AndroidWay extends Activity {
TextView name;
ImageView thumbnail;
LocationManager loc;
Drawable icon;
String myName;

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

name  = (TextView) findViewById(R.id.name);
thumbnail = (ImageView) findViewById(R.id.thumbnail);
loc   = (LocationManager) 
getSystemService(Activity.LOCATION_SERVICE);
icon  = getResources().getDrawable(R.drawable.icon);
myName= getString(R.string.app_name);
name.setText( Hello,  + myName );
}
}


This example is 18 lines of code.  If you're trying to read through onCreate(), 
you have to skip over 5 lines of boilerplate initialization to find the only 
one that really matters: name.setText().  And complex activities can end up 
with a lot more of this sort of initialization code.

Compare this to the same app, written using RoboGuice:

class RoboWay extends RoboActivity {
@InjectView(R.id.name) TextView name;
@InjectView(R.id.thumbnail)ImageView thumbnail;
@InjectResource(R.drawable.icon)   Drawable icon;
@InjectResource(R.string.app_name) String myName;
@InjectLocationManager loc;

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

name.setText( Hello,  + myName );
}
}

In this example, onCreate() is much easier to take in at a glance.  All the 
platform boilerplate is stripped away and you're left with just your own app's 
business logic.  Do you need a SystemService?  Inject one.  Do you need a View 
or Resource?  Inject those, too, and RoboGuice will take care of the details.  

RoboGuice's goal is to make your code be about your app, rather than be about 
all the initialization and lifecycle code you typically have to maintain in 
Android.

RoboGuice has been in development since August 2009.  1.0 was release in March 
of 2010, and since then has become the #1 dependency injection framework on 
Android, used in several big name Android applications.  1.1 has been baking 
for about 10 months and is pretty stable at this point.  


What's new in RoboGuice 1.1?  
+ Maven support
+ Testing support
+ Improved performance
+ Improved logging
+ A very cool Event system
+ And more: http://code.google.com/p/roboguice/wiki/ReleaseHistory


We know that RoboGuice won't be for everybody.  Although RoboGuice never 
prevents you from doing things the Android way, some people will still prefer 
seeing everything spelled out explicitly in their code.  And other people who 
write extremely high performance applications such as games may not want to 
incur the small overhead imposed by yet another framework.  But for people who 
want to build simple and straightforward code that's easily testable and easy 
to read, I encourage you to give RoboGuice a try.

We hope you like it.  Stop by our discussion forums if you'd like to have any 
help getting started.

Cheers,
Mike


PS. 1.1 owes a lot to its many contributors.  I'd like to shout out to: Manfred 
Moser, Adam Tybor, John Ericksen, Pierre-Yves Ricau, Tolik N_A, Christine 
Karman, Stephen Ng, Paul Butcher, Donn Felker, the robolectric guys at 
PivotalLabs, the sonatype guys, and Sam Berlin at google guice.  Thank you for 
all your help and contributions!

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

2011-01-26 Thread TreKing
On Wed, Jan 26, 2011 at 1:33 PM, Titus titus.mor...@gmail.com wrote:

 Do you have an example of how a single manifest file can do this  if both
 services and activities are of complete diff packages?


No, because that's not possible, AFAIK. They all have to be in the same
package to be in the same app and in the same manifest of that app.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Android 2.2.2 Market app losing apps?

2011-01-26 Thread JP
Am I alone with this? After updating my Nexus One to 2.2.2 this
morning, I checked Market, and one of my published apps has gone
missing. No way to get to it. View more applications from a
remaining app, for example, comes up empty. Cross-check against a
device running 1.6: Everything's fine.

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

2011-01-26 Thread spaceraiders
Hi,

Thanks John. The main xfer modes I need are:

- XOR filter that just XORs the raw pixel values (and doesn't do
anything special depending on alpha values)

- Something that acts as a typical add blend mode.

I can't find any way to get these from combining the current modes
however.

On Jan 25, 1:33 am, John Oliver shreddedched...@gmail.com wrote:
 Unfortunately this is not possible so far that I have found. You'll
 have to do it manually or get tricky with using multiple XFermodes in
 conjunction with each other.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: question on KVM/thread scheduler and processor cores

2011-01-26 Thread longingtoadopt.com
Thanks for replying - that removes one layer (KVM).

On Jan 25, 8:30 pm, Dianne Hackborn hack...@android.com wrote:
 Each Dalvik thread is a kernel thread.  The scheduling of these is fairly
 entirely up to the kernel, except for situations such as where a GC may need
 to pause threads.

 On Tue, Jan 25, 2011 at 3:39 PM, longingtoadopt.com 
 anil.r...@gmail.comwrote:



  I need to test a program that says it will restrict the number of
  processor cores being used. I was thinking of writing a program to
  spawn 100 threads, each one performing some long, intensive
  computation. Then from a console, I could see how many cores are being
  used. If I write it in Java (Android), is there a guarantee that the
  JVM/KVM will run the threads on different cores, and run them on all
  the cores? (if the scheduler incorrectly used only one core when two
  are allowed, then that will give me an incorrect result).

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to 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
 http://groups.google.com/group/android-developers?hl=en

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

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

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


Re: [android-developers] Re: Application does not use all screen in Android tablet (with android 2.2)

2011-01-26 Thread Kostya Vasilyev
--
Kostya Vasilyev -- http://kmansoft.wordpress.com
26.01.2011 23:01 пользователь Hari Edo hari@gmail.com написал:

 The tarot deck answers nothing, so I'm reading the tea leaves now. If
 that
 doesn't work, I will throw some chicken bones across the campfire.

 What app? Is this your app? What are you doing to develop the
 activity?
 Are you making layouts in XML? Did you try a sample application?
 What
 tablet are you talking about?

 I'm sure this reply is not useful to you. Google for How to ask
 questions
 the smart way and you may get some more useful replies.

 On Jan 26, 2:10 pm, gato chlr dany...@gmail.com wrote:
 Hi List,

 In a phone, the application works o, but in an android tablet (with
android
 2.2) it does not use all screen, does anybody know how to fix that?
 I just see the application in the center of screen, and the rest of
screen
 is black.

 Thanks a lot!

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

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

[android-developers] Re: ANNOUNCE: RoboGuice 1.1 now available

2011-01-26 Thread Manfred Moser
Thanks for the great release. Going to start using it NOW!!

Love it

manfred

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

2011-01-26 Thread Anders Aagaard
Thank you! I wasn't sure what was the cleanest way of doing it. And I'm very
familiar with threading, just not how java does it (and the synchronized
isn't something I'm familiar with from other platforms).

I'll try to push some of the sorting/filtering into the threads as well, to
reduce amount of time I spend in the main thread.

On Wed, Jan 26, 2011 at 8:09 PM, Hari Edo hari@gmail.com wrote:


 If you're sure that all users of the data are within the same process
 (the
 same app), then using Java synchronized is the best way to go.
 However,
 you will need to be very careful to understand your semaphore
 dependencies,
 or deadlock will occur.  Not responding is almost as bad as Data
 corrupted due to bad inter-thread communication.

 The use of Bundles and/or ContentProviders are to enable inter-process
 data
 passing, and to avoid some of the danger of errant deadlock
 situations.

 On Jan 26, 10:37 am, neuron aagaa...@gmail.com wrote:
  Hi
 
  I've got an app that spawns of a seperate thread. Parses JSON data into a
  structure. And passes it back to the main thread through a handler. Each
  part of data is sent through the handler individually. That worked fairly
  well with my previous XML parser, as XML parses data while it downloads.
 But
  JSON doesn't (atleast I haven't found a way to get that working). In
 either
  way the JSON data is much smaller and much faster to parse.
 
  I've recently added a feature that requires me to load several sources of
  json in parallel, parse in the background, and pass all the data back
 again
  using a Handler. This is a bit slower than I was hoping.
 
  Would it be faster (and possible) for me to do this:
  BackgroundThread extends Thread {
  onCreate (Parent) {
  this.parent = parent;
  }
  onData {
  parent.addParsedData(x);
  }
 
  }
 
  Parent extends ListActivity {
  ListAdapter list;
  onCreate {
 setListAdapter(list);
 new BackgroundThread(this);
  }
  public synchronized addParsedData(data) {
  list.add(data)
  }
 
  }
 
  I'm thinking this won't be thread safe, as ListAdapter is in the parent
  thread. Am I right?
  Should I instead inside the listadapter (which puts data in an array)
 have
  synchronized access to it's items?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to 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
 http://groups.google.com/group/android-developers?hl=en




-- 
Weeks of coding can save you hours of planning.
- http://code.google.com/p/aagaande/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Application does not use all screen in Android tablet (with android 2.2)

2011-01-26 Thread Kostya Vasilyev
This is easily fixed in the manifest. Either set minSdk to 4 or above, or
add supports-screens (look it up in the reference).

http://developer.android.com/guide/practices/screens_support.html

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
26.01.2011 23:01 пользователь Hari Edo hari@gmail.com написал:

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

Re: [android-developers] How to take a snapshot of phone's screen ?

2011-01-26 Thread Marcin Orlowski
On 26 January 2011 20:42, Emre A. Yavuz eayl...@hotmail.com wrote:

 Hi,

 Is anyone aware of a method to take the snapshot of phone's screen while an
 app is running ? Running the app on the emulator is not an option since
 network connectivity is needed. Is there any internal method that we can use

In general you need rooted phone to let you grab framebuffer. Then use
one of available apps i.e. ShotMe from Market

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

2011-01-26 Thread TreKing
On Wed, Jan 26, 2011 at 2:15 PM, JP joachim.pfeif...@gmail.com wrote:

 Am I alone with this? After updating my Nexus One to 2.2.2 this morning, I
 checked Market, and one of my published apps has gone missing. No way to get
 to it. View more applications from a remaining app, for example, comes up
 empty. Cross-check against a device running 1.6: Everything's fine.


There was another post on this earlier. Try clearing your Market cache and /
or data.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Needed Oracle WMS Consultant in MO 2-3 months contract

2011-01-26 Thread arun panigrahi
-- 

*Title:**Oracle WMS Consultant*

*Location:St louis MO(**travel to nashville, pittsburg and St louis may be
required)*

*Duration: 2-3 months*



*Oracle WMS experience with implementing Oracle WM in 11i or 12.0*

*2 years of Oracle Apps experience having 1 to 2 full lifecycle
implementation/support experience on WMS. *

*Exposure mandatory with Warehouse Management System, Order Management,
Inventory. *

*Experience and knowledge of AIM methodology other Oracle Standard
Implementation methodologies *

*In-depth understanding of Organization structure, Multi-Org Concepts, its
implementation and impacts *

With excellent communication skills.

Arun Panigrahi
*Xpert**Tech Inc
*

**400 W Cummings Park,

Suite#2850

Woburn, MA-01801

Email: a...@xperttech.com
Phone: 781-926-0781
Fax: 781-207-0709
www.xperttech.com


http://www.linkedin.com/in/arunpanigrahi

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

2011-01-26 Thread Dianne Hackborn
For most devices you can attach DDMS to it and take a screenshot with it.

On Wed, Jan 26, 2011 at 11:46 AM, Marcin Orlowski
webnet.andr...@gmail.comwrote:

 On 26 January 2011 20:42, Emre A. Yavuz eayl...@hotmail.com wrote:
 
  Hi,
 
  Is anyone aware of a method to take the snapshot of phone's screen while
 an
  app is running ? Running the app on the emulator is not an option since
  network connectivity is needed. Is there any internal method that we can
 use

 In general you need rooted phone to let you grab framebuffer. Then use
 one of available apps i.e. ShotMe from Market

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to 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
 http://groups.google.com/group/android-developers?hl=en




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

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

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

Re: [android-developers] How to take a snapshot of phone's screen ?

2011-01-26 Thread TreKing
On Wed, Jan 26, 2011 at 1:42 PM, Emre A. Yavuz eayl...@hotmail.com wrote:

 Running the app on the emulator is not an option since network connectivity
 is needed.


The emulator can have network connectivity ...

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: Grab phonebook-contacts via ContactsContract-API

2011-01-26 Thread L0rdAli3n
I thought the authentication token is something specific to the
session, like a sessionID or something? I'm a little bit confused now.

On 26 Jan., 20:41, Dmitri Plotnikov dplotni...@google.com wrote:
 Take a look at AccountManager 
 docs:http://developer.android.com/intl/en/reference/android/accounts/Accou...

 AccountManager supports the notion of authentication token, which is what I
 think you need.

 Cheers,
 - Dmitri

 On Wed, Jan 26, 2011 at 10:26 AM, L0rdAli3n 42.john.doe.1...@googlemail.com

  wrote:
  Ok, I'm about to write the SyncAdapter part of my App.

  Due to the fact that I have a special case, I'm a little bit stuck:

  Additional to the username/password I need to store a URL on a per
  account base!

  How I'm supposed to store this extra information, attached to an
  account?

  Thanks for your help an patience Dmitri!

  On 23 Jan., 19:00, Dmitri Plotnikov dplotni...@google.com wrote:
   Using ContentObserver for sync adapters does not sound like a good idea.
    There are several reasons for that:

   1. Data change notifications are not delivered to processes that are not
   running. So if your sync adapter is not running for one reason or another
   (and the system kills processes when it needs resources), then you won't
  get
   a notification.
   2. ContactsProvider sends only general whole adapter notifications,
   meaning that when any data element in the database changes it sends a
   notification to all observers regardless of what URIs they registered
  for.
    For example, somebody's presence in Talk changes - you will get a
   notification.  Most of these notifications will have nothing to do with
  the
   changes you need to sync, but there is no way for the adapter to tell.
   3. Having the sync adapter running at all times is a major waste of
   resources.

   Fortunately, the sync framework is designed to overcome all these issues.
    SyncManager manages sync adapters, calls them at the best time from the
   system's perspective, throttles their activities etc.  Sync adapters
   themselves rely on RawContact.DIRTY flag and the
   ContactsContract.CALLER_IS_SYNCADAPTER parameter to find and process
   incremental changes.

   There are examples of how that's done.  The most comprehensive example is
   probably the Exchange (IAS) sync adapter that you can find here:

  http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=t...

   Cheers,

   On Fri, Jan 21, 2011 at 11:57 PM, himanshu jain himanshu@gmail.com
  wrote:

Hi Dmitri  ,@LordAli3n
I have couple of questions please spare some time or guide me
direction
1) Can we use syncAdapter to get data of a row of raw_contact table if
that row has been affected (i.e added/deleted/edited). I know
ContentObserver notify whenever raw_content table changes in
onChange() method but we dont know which row has been changed ( to put
this in another way if we add how would we know and if deleted we
still get it through deleted flag in raw_contact table but how about
edited one??).
2) when we get notification in ContentObserver can we fire requestSync
(Account account, String authority, Bundle extras) to start Sync ??
how we can get data of raw_contact affected by contact application
using these to parameters .
3) Is sync started by ContentProvider API ?? whenever change to it
happens ??. How?? does it pass any useful uri or data that has been
changed in raw_contacts??.
4) How do we come to know if in the process of  syncing something went
wrong?? does it started again automatically??.

thanks any help appreciated !!

On Jan 19, 7:31 am, BoD bodl...@gmail.com wrote:
 If I may intervene.
 It seems to me that the OP wants to synchronize contacts using the
 sync adapters APIs, and therefore wants to have his own account type,
 and raw contacts in this account.

 But that means that when the user first starts using this app, this
 account will be empty, and will synchronize... nothing.
 Instead, they probably expect to synchronize the contacts already on
 their phones (in the local account, or, more probably, in the gmail
 account).

 --
 BoD

 On Jan 19, 9:02 am, Dmitri Plotnikov dplotni...@google.com wrote:

  I am sorry. I guess I just don't understand the requirements.  I
thought you
  were writing a sync adapter.  Sync adapters all deal with their own
  accounts.  Google sync adapter deals with google accounts, exchange
adapter
  with exchange accounts and so on.  If you are thinking of writing a
sync
  adapter that would handle data already handled by some other sync
adapter,
  it is probably a bad idea. The framework is not designed to have
multiple
  sync adapters handling the same data: only one syncadapter can take
  advantage of data versioning. This why I suggested that if you are
writing a
  sync adapter, you should 

Re: [android-developers] Re: activity and service as a package

2011-01-26 Thread Mark Murphy
On Wed, Jan 26, 2011 at 2:33 PM, Titus titus.mor...@gmail.com wrote:
 Do you have an example of how a single manifest file can do this  if
 both services and activities are of complete diff packages?

Use a fully-qualified class name in the android:name attributes.

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

Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Needed Oracle WMS Consultant in MO 2-3 months contract

2011-01-26 Thread Haroon Khalid
Dear dickhead,

In response to the spam, Obama has agreed to nuke India.

--Haroon

On Wed, Jan 26, 2011 at 3:35 PM, arun panigrahi
arunp.xpertt...@gmail.comwrote:



 --

 *Title:**Oracle WMS Consultant*

 *Location:St louis MO(**travel to nashville, pittsburg and St louis may be
 required)*

 *Duration: 2-3 months*



 *Oracle WMS experience with implementing Oracle WM in 11i or 12.0*

 *2 years of Oracle Apps experience having 1 to 2 full lifecycle
 implementation/support experience on WMS. *

 *Exposure mandatory with Warehouse Management System, Order Management,
 Inventory. *

 *Experience and knowledge of AIM methodology other Oracle Standard
 Implementation methodologies *

 *In-depth understanding of Organization structure, Multi-Org Concepts, its
 implementation and impacts *

 With excellent communication skills.

 Arun Panigrahi
 *Xpert**Tech Inc
 *

 **400 W Cummings Park,

 Suite#2850

 Woburn, MA-01801

 Email: a...@xperttech.com
 Phone: 781-926-0781
 Fax: 781-207-0709
 www.xperttech.com


 http://www.linkedin.com/in/arunpanigrahi

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to 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
 http://groups.google.com/group/android-developers?hl=en

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

  1   2   3   4   >