[android-developers] Re: How can I remove application data in application?

2011-01-23 Thread Jed Kain
Where are the files which can be removed by Settings menu?

I think the data that are created by android system. I never save my
own data.



On 1월23일, 오후4시07분, TreKing treking...@gmail.com wrote:
 On Sat, Jan 22, 2011 at 8:34 PM, Jed Kain jed.k...@gmail.com wrote:
  So, I want to know how to implement Clear data in Setting menu at
  my application.

 http://developer.android.com/reference/android/content/Context.html#g...()
 http://developer.android.com/reference/android/content/Context.html#g...()http://developer.android.com/reference/android/content/Context.html#g...()

 Then use Java IO to delete what you need.

 ---­--
 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: Create Parser for the given JSON

2011-01-23 Thread Faheem Khatri
Thx all,

i've finally managed to create parser myself :)

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

Re: [android-developers] Re: Using internal Android string resources

2011-01-23 Thread String
You might try out http://www.icanlocalize.com/. I've used their paid service to 
translate an app, but it's free to set up an account, and then they have a 
web-based tool for managing translations that's quite similar to what you're 
describing. They apparently don't mind you using their tool to manage your own 
translations. 

Anyway, take a look before you build your own. 

String 

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


Re: [android-developers] Re: How can I remove application data in application?

2011-01-23 Thread TreKing
On Sun, Jan 23, 2011 at 2:01 AM, Jed Kain jed.k...@gmail.com wrote:

 Where are the files which can be removed by Settings menu?


In your cache directory, as I linked you to already.


 I think the data that are created by android system.


Yup.


 I never save my own data.


The WebView does.

-
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: Is it possible to create a two-line Toast?

2011-01-23 Thread Lior
You can also create a toast with a constructor (instead of
Toast.makeText), and then use Toast.setView to create a completely
customized toast.


Lior Gonnen - UltimateFavesPRO - http://ultimatefaves.com/

On Jan 22, 11:39 am, Bernard T. Higonnet bthigon...@gmail.com
wrote:
 Kostya Vasilyev wrote:
  Have you tried \n?

 I should have, because it works.

 Thanks

 Bernard Higonnet









  Oh, and you can use your own layouts for toasts, with separate
  caption/message areas, if you like.

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

  22.01.2011 1:04 Bernard T. Higonnet bthigon...@gmail.com
  mailto:bthigon...@gmail.com :
    TreKing wrote:
    On Fri, Jan 21, 2011 at 4:06 PM, Bernard T. Higonnet
    bthigon...@gmail.com mailto:bthigon...@gmail.com
  mailto:bthigon...@gmail.com mailto:bthigon...@gmail.com wrote:

    That is, with a line break where I want it.

    Did you try it?

    I should indeed have indicated that I have tried all manner of x0D,
    x0D0A, \r, ...

    Bernard Higonnet

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

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


[android-developers] Create Custom Shaped Image Button

2011-01-23 Thread Faheem Khatri
Is it possible to create custom shaped image button in android? If possible
then how?

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

2011-01-23 Thread Robin Talwar
You would have to make another class and extend it by views
then overwrite the constructor and ondraw() method
then you can make the object of it in the java class and use it

On Sun, Jan 23, 2011 at 2:09 PM, Faheem Khatri faheemkhatr...@gmail.comwrote:

 Is it possible to create custom shaped image button in android? If possible
 then how?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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: convert a C++ game to Android

2011-01-23 Thread Lior
Take a look at NativeActivity: 
http://developer.android.com/reference/android/app/NativeActivity.html
And the following post in the Android Developers Blog:
http://android-developers.blogspot.com/2011/01/gingerbread-ndk-awesomeness.html

---
Lior Gonnen - UltimateFavesPRO - http://ultimatefaves.com/

On Jan 22, 1:52 am, bob b...@coolgroups.com wrote:
 What is the best way to convert a C++ game to Android?  Should I port
 it to Java?

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

To make it clear: I just want to sync the contacts a user saved on
his
local phonebook/adressbook (no gmailcontacts, no facebookcontacts, no
twittercontacts)
with openXChange. Do I really need a new AccountType then? So a user
will have a openXChange-Contacts, beside the phonebook-Contacts?

On 19 Jan., 09:02, 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 introduce a new account type for this purpose?

  Cheers,
  Dmitri
  On Jan 14, 2011 5:16 AM, L0rdAli3n 42.john.doe.1...@googlemail.com
  wrote:

   Hey,

   I'm totally stuck with the ContactsContract-API. Point is that I want
   only mess around with the Contacts saved in the local phonebook. But
   it seems that every vendor but its own account_type for those
   contacts.
   And its even worse. The AccountManager isn't even aware of all
   account_types?!?
   For example on my HTC Desire with HTC Sense, the account_type all
   local contacts are saved in is: com.htc.android.pcsc. But when I grab
   a list of all available accounts from the AccountManager: This account
   is not in the list!?
   I also tested it on a Samsung Galaxy. Same here: The AccountManager is
   not aware of the account_type used for local phonebookcontacts.

   The whole story is that I wan't to write a app to sync my locale
   phonebook with OpenXchange.

   I guess I got that whole new ContactsContract-API wrong, but I don't
   see any other way, then using RawContacts. Due to that I have to care
   about the account_type, which is in fact a total mess.

   Hopefully someone can point me in the right direction. Every hint is
   highly 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.comandroid-developers%2bunsubscr...@googlegroups.com

 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@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.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: Android Contacts

2011-01-23 Thread L0rdAli3n
Thanks for the link. Unfortunately I wasn't able to find the query.
3.614 lines of code are really hard to understand. Could you
assist me?

On 16 Jan., 08:05, Zsolt Vasvari zvasv...@gmail.com wrote:
 Hi, the source code to the Contacts app is available here:

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

 As Dmitri mentioned it, if you see the desired list in the Contacts
 app, dig into the source and find out what query it is issuing the
 ContactsProvider.  And then you can issue the same query and get the
 same result.

 On Jan 12, 5:13 am, L0rdAli3n 42.john.doe.1...@googlemail.com wrote:

  Hi Community,

  I'm working on an app right now, which should handle the users
  contacts. But I have a basic problem: When I grab a list of all
  contacts from the ContactsContract.Contacts.CONTENT_URI I expect to
  get a list of all aggregated/merged contacts.
  For example the list should contain a contact John, Doe. Which also
  has a facebook contact an a twitter contact joined in this one John,
  Doe. But on the list of contacts grabbed from
  ContactsContract.Contacts.CONTENT_URI I exptect only John, Doe.
  My problem is that when I do grab a list of contacts from
  ContactsContract.Contacts.CONTENT_URI I have a listitem for every
  single contact, so instead of one single item John, Doe I have
  three:
   - John, Doe (gmail)
   - Doe John (facebook)
   - Johnny (twitter)

  Why is that so and is there any way to get the list of aggegrated
  contacts?

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

2011-01-23 Thread Kostya Vasilyev
The M860 appears to be the CDMA twin brother of the UMTS-based U8230 (sold
in Russia, Ukraine, etc.)

The specs at link below say 320x480, 3.5 - a pretty typical HVGA (other
sites I'm not posting here also give the same numbers).

You can see it quite clearly in the screenshots, too:

http://habrahabr.ru/blogs/android/97298/

-- Kostya

2011/1/23 Zsolt Vasvari zvasv...@gmail.com

 That phone has 3.5 screen (same as an iPhone), and while it's not
 impossible, I would find it extremely hard to believe that it's a
 240x320 screen.  I think you would see pixelation even on a YouTube
 video of that were the case.  I believe the HVGA part of the
 description is correct and it's, in fact, a HVGA 320x480 device.

 On Jan 23, 8:51 am, kernelpanic j.m.roya...@gmail.com wrote:
  looking at the Huawei website, it states that device is 320x240 HVGA
 
  is the HVGA the issue here?
 
  On Jan 22, 5:35 pm, kernelpanic j.m.roya...@gmail.com wrote:
 
 
 
   yes, that's how I decided I had an issue - he left a 1 star rating
   with this comment
 
   cannot play on my huawei ascend touchscreen please fix
 
   On Jan 22, 5:29 pm, Dianne Hackborn hack...@android.com wrote:
 
It should be a child of manifest, so that is fine.  Do you know
 what
device this was allowed to be installed on?
 
On Sat, Jan 22, 2011 at 2:47 PM, kernelpanic j.m.roya...@gmail.com
 wrote:
 ok, thanks. According to the docs, it should just be in the
 manifest -
 I have this
 
uses-sdk android:minSdkVersion=5 android:targetSdkVersion=8
 /
 
uses-permission android:name=android.permission.INTERNET
 /
uses-permission android:name=android.permission.VIBRATE
 /
 
 supports-screens
android:smallScreens=false
android:normalScreens=true
android:largeScreens=true android:anyDensity=true/
 
 should it be inside the application tag maybe?
 
 On Jan 22, 2:15 pm, Dianne Hackborn hack...@android.com wrote:
  It absolutely should be filtered from Market.  There are lots of
 apps
 that
  aren't available to small screen devices because they don't
 support small
  screens.  Make sure you have the tag in the right place in your
 manifest.
 
  On Sat, Jan 22, 2011 at 4:02 AM, kernelpanic 
 j.m.roya...@gmail.com
 wrote:
   I'm using the following
 
   supports-screens
  android:smallScreens=false
  android:normalScreens=true
  android:largeScreens=true android:anyDensity=true/
 
   but had someone with a 320x240 screen download the app from the
 market
   - of course it doesn't work on that small screen.
 
   My question is why would someone with a screen that small be
 able to
   see the app in the market?
 
   any insight 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.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2Bunsubs­cr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 android-developers%252Bu­nsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2Bunsubs­cr...@googlegroups.com
 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
 
--
Dianne Hackborn
Android framework engineer
hack...@android.com
 
Note: please don't send private questions to me, as I don't have time
 to
provide private support, and so won't reply to such e-mails.  All
 such
questions should be posted on public forums, where I and others can
 see and
answer them.- Hide quoted text -
 
  - Show quoted text -

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

[android-developers] Application priority

2011-01-23 Thread culonna
An application that is running for a long time in foreground will
acquire more priority in time?
I explain my problem. I ported a software for communication with a
fixed infrastructure in Android. I'm making some tests. Each test
makes 5 experiments (the mobile node sends some queries to the
infrastructure and evalutes the number of query successful and the
mean time) and the result of the test is the mean of the results of
these experiments.
During the test the application is always in foreground.
In the experiments the result improve e. g. (10% 15% 30% 40% 55% of
query ok).
I implemented the system as activity and not yet as service.
For the test the app aquire the locks SCREEN_DIM_WAKE_LOCK and
WIFI_MODE_FULL.
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] Create Custom Shaped Image Button

2011-01-23 Thread Kostya Vasilyev
It depends on what you mean by custom shaped.

You can use any drawable shape for the image or background, and don't even
have to subclass for that (rounded corners, etc).

But hit testing for is still rectangle-based, and AFAIK, is performed by the
parent of a view, so it would be difficult to change.

At the very least, you would need to subclass, intercept touch events, and
throw away the ones that are inside the bounding rectangle but outside the
shape.

-- Kostya

2011/1/23 Robin Talwar r.o.b.i.n.abhis...@gmail.com

 You would have to make another class and extend it by views
 then overwrite the constructor and ondraw() method
 then you can make the object of it in the java class and use it

 On Sun, Jan 23, 2011 at 2:09 PM, Faheem Khatri 
 faheemkhatr...@gmail.comwrote:

 Is it possible to create custom shaped image button in android? If
 possible then how?
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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.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] Application priority

2011-01-23 Thread Kostya Vasilyev
Probably has more to do with network infrastructure surrounding the phone,
than with what priority your phone application runs at (as long as it
doesn't get killed - and that won't happen if it's in the foreground).

It's really hard to say without knowing what those tests are, but, e.g. UDP
is often unreliable or slow on mobile networks, and your code could catching
slow-coming results from previous interations.

-- Kostya

2011/1/23 culonna cannavacciuolo.lu...@gmail.com

 An application that is running for a long time in foreground will
 acquire more priority in time?
 I explain my problem. I ported a software for communication with a
 fixed infrastructure in Android. I'm making some tests. Each test
 makes 5 experiments (the mobile node sends some queries to the
 infrastructure and evalutes the number of query successful and the
 mean time) and the result of the test is the mean of the results of
 these experiments.
 During the test the application is always in foreground.
 In the experiments the result improve e. g. (10% 15% 30% 40% 55% of
 query ok).
 I implemented the system as activity and not yet as service.
 For the test the app aquire the locks SCREEN_DIM_WAKE_LOCK and
 WIFI_MODE_FULL.
 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

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

2011-01-23 Thread JAlexoid (Aleksandr Panzin)
 I have no idea what a bean class is.
Bean class is an old name for awhat we call not a POJO.
Android essentially leaves only the PropertyChangeEvent, from the old
java.beans package.

On 23 янв, 02:50, TreKing treking...@gmail.com wrote:
 On Sat, Jan 22, 2011 at 1:26 AM, Deeps pradeepb...@gmail.com wrote:
  I want to get shared preference from non activity class.

 Pass a Context, the SharedPreferences, or the value itself from somewhere
 higher up that has this information.

  I want to create a bean class to get and set the shared pref.

 I have no idea what a bean class is.

 -
 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: Android Contacts

2011-01-23 Thread L0rdAli3n
Thanks for the link. Unfortunately I wasn't able to find the query.
3.614 lines of code are really hard to understand. Could you
assist me?

On 16 Jan., 08:05, Zsolt Vasvari zvasv...@gmail.com wrote:
 Hi, the source code to the Contacts app is available here:

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

 As Dmitri mentioned it, if you see the desired list in the Contacts
 app, dig into the source and find out what query it is issuing the
 ContactsProvider.  And then you can issue the same query and get the
 same result.

 On Jan 12, 5:13 am, L0rdAli3n 42.john.doe.1...@googlemail.com wrote:

  Hi Community,

  I'm working on an app right now, which should handle the users
  contacts. But I have a basic problem: When I grab a list of all
  contacts from the ContactsContract.Contacts.CONTENT_URI I expect to
  get a list of all aggregated/merged contacts.
  For example the list should contain a contact John, Doe. Which also
  has a facebook contact an a twitter contact joined in this one John,
  Doe. But on the list of contacts grabbed from
  ContactsContract.Contacts.CONTENT_URI I exptect only John, Doe.
  My problem is that when I do grab a list of contacts from
  ContactsContract.Contacts.CONTENT_URI I have a listitem for every
  single contact, so instead of one single item John, Doe I have
  three:
   - John, Doe (gmail)
   - Doe John (facebook)
   - Johnny (twitter)

  Why is that so and is there any way to get the list of aggegrated
  contacts?

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


[android-developers] Question regarding RelativeLayout

2011-01-23 Thread Rutton
  Hello there,

I am having a question regarding the layout of a RelativeLayout.
In a small test I have used a layout as this:

?xml version=1.0 encoding=utf-8?
RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:layout_width=fill_parent
android:layout_height=fill_parent

RelativeLayout android:id=@+id/right_buttons
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_alignParentRight=true
android:layout_alignParentTop=true
android:layout_alignParentBottom=true
Button android:id=@+id/ftopLeft
android:layout_width=wrap_content
android:layout_height=wrap_content 
android:text=ftopLeft
android:layout_alignParentTop=true 
android:layout_toLeftOf=@+id/
ftopRight
/Button
Button android:id=@+id/ftopRight
android:layout_width=wrap_content
android:layout_height=wrap_content 
android:text=ftopRight
android:layout_alignParentRight=true
android:layout_alignParentTop=true
/Button
Button android:id=@+id/fbottomLeft
android:layout_width=wrap_content
android:layout_height=wrap_content 
android:text=fbottomLeft
android:layout_alignParentBottom=true 
android:layout_toLeftOf=@
+id/fbottomRight
/Button
Button android:id=@+id/fbottomRight
android:layout_width=wrap_content
android:layout_height=wrap_content 
android:text=fbottomRight
android:layout_alignParentRight=true
android:layout_alignParentBottom=true
/Button
/RelativeLayout

RelativeLayout android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_alignParentLeft=true
android:layout_alignParentBottom=true
android:layout_alignParentTop=true
android:layout_toLeftOf=@id/right_buttons
Button android:layout_width=wrap_content
android:layout_height=wrap_content 
android:text=stopLeft
android:layout_alignParentLeft=true
android:layout_alignParentTop=true
/Button
Button android:layout_width=wrap_content
android:layout_height=wrap_content 
android:text=stopRight
android:layout_alignParentRight=true
android:layout_alignParentTop=true
/Button
Button android:layout_width=wrap_content
android:layout_height=wrap_content 
android:text=sbottomLeft
android:layout_alignParentLeft=true
android:layout_alignParentBottom=true
/Button
Button android:layout_width=wrap_content
android:layout_height=wrap_content 
android:text=sbottomRight
android:layout_alignParentRight=true
android:layout_alignParentBottom=true
/Button
/RelativeLayout

/RelativeLayout

Two RelativeLayouts within a single full-screen RelativeLayout.
(test only works in landscape on a large screen). I would expect, that
the first nested RelativeLayout is as large as the four aligned
buttons (because it has wrap_content as layout width). But in fact it
spans the whole screen. The result is, that the second nested
RelativeLayout, as it is aligned toLeftOf the first one,  is moved off
the screen.

If I use a layout_width with a concrete value, such as 220dp, for the
first nested RelativeLayout  this RelativeLayout is way smaller and
the second nested RelativeLayout is correctly assign as toLeftOf and
is on screen.

Can someone tell me, why? Or is this a bug?

Cheers,
Rutton.

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

2011-01-23 Thread Kostya Vasilyev
Seems like your intent is a side-by-side layout for a tablet device.

I would recommend you use a top-level LinearLayout (orientation=horizontal),
and give your two relative layouts layout_width=0dp and layout_weight=1
(that's for a start, you can also experiment with
layout_width=wrap_content and other weight values).

You could also change the way you align two buttons side by side: instead of
anchoring the right one, and setting layout_toLeftOf on the left one, try a
more natural sequence. Set layout_alignParentLeft on the left one, and
layout_toRightOf on the right one. This applies to all four left/right
button pairs you have in the entire layout.

-- Kostya

2011/1/23 Rutton rut...@web.de

  Hello there,

 I am having a question regarding the layout of a RelativeLayout.
 In a small test I have used a layout as this:

 ?xml version=1.0 encoding=utf-8?
 RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
 android
android:layout_width=fill_parent
 android:layout_height=fill_parent

RelativeLayout android:id=@+id/right_buttons
android:layout_width=wrap_content
 android:layout_height=wrap_content
android:layout_alignParentRight=true
 android:layout_alignParentTop=true
android:layout_alignParentBottom=true
Button android:id=@+id/ftopLeft
 android:layout_width=wrap_content
android:layout_height=wrap_content
 android:text=ftopLeft
android:layout_alignParentTop=true
 android:layout_toLeftOf=@+id/
 ftopRight
/Button
Button android:id=@+id/ftopRight
 android:layout_width=wrap_content
android:layout_height=wrap_content
 android:text=ftopRight
android:layout_alignParentRight=true
 android:layout_alignParentTop=true
/Button
Button android:id=@+id/fbottomLeft
 android:layout_width=wrap_content
android:layout_height=wrap_content
 android:text=fbottomLeft
android:layout_alignParentBottom=true
 android:layout_toLeftOf=@
 +id/fbottomRight
/Button
Button android:id=@+id/fbottomRight
 android:layout_width=wrap_content
android:layout_height=wrap_content
 android:text=fbottomRight
android:layout_alignParentRight=true
android:layout_alignParentBottom=true
/Button
/RelativeLayout

RelativeLayout android:layout_width=wrap_content
android:layout_height=wrap_content
 android:layout_alignParentLeft=true
android:layout_alignParentBottom=true
 android:layout_alignParentTop=true
android:layout_toLeftOf=@id/right_buttons
Button android:layout_width=wrap_content
android:layout_height=wrap_content
 android:text=stopLeft
android:layout_alignParentLeft=true
 android:layout_alignParentTop=true
/Button
Button android:layout_width=wrap_content
android:layout_height=wrap_content
 android:text=stopRight
android:layout_alignParentRight=true
 android:layout_alignParentTop=true
/Button
Button android:layout_width=wrap_content
android:layout_height=wrap_content
 android:text=sbottomLeft
android:layout_alignParentLeft=true
android:layout_alignParentBottom=true
/Button
Button android:layout_width=wrap_content
android:layout_height=wrap_content
 android:text=sbottomRight
android:layout_alignParentRight=true
android:layout_alignParentBottom=true
/Button
/RelativeLayout

 /RelativeLayout

 Two RelativeLayouts within a single full-screen RelativeLayout.
 (test only works in landscape on a large screen). I would expect, that
 the first nested RelativeLayout is as large as the four aligned
 buttons (because it has wrap_content as layout width). But in fact it
 spans the whole screen. The result is, that the second nested
 RelativeLayout, as it is aligned toLeftOf the first one,  is moved off
 the screen.

 If I use a layout_width with a concrete value, such as 220dp, for the
 first nested RelativeLayout  this RelativeLayout is way smaller and
 the second nested RelativeLayout is correctly assign as toLeftOf and
 is on screen.

 Can someone tell me, why? Or is this a bug?

Cheers,
Rutton.

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

[android-developers] Re: Question regarding RelativeLayout

2011-01-23 Thread Rutton


On 23 Jan., 14:09, Kostya Vasilyev kmans...@gmail.com wrote:
 Seems like your intent is a side-by-side layout for a tablet device.

I was working on a landscape layout and thought I could anchor a
fixed size
RelativeLayout and use a stretched/spanning second RelativeLayout. In
fact
it works here now, but the fixed size layout needs a real fixed size
with concrete dp
value.

 I would recommend you use a top-level LinearLayout (orientation=horizontal),
 and give your two relative layouts layout_width=0dp and layout_weight=1
 (that's for a start, you can also experiment with
 layout_width=wrap_content and other weight values).

Well, interesting idea.

Consider this case: I don't have two nested layouts within the parent,
rather three. And I want this line up initially anchored from the
right.
The most right one is anchored to the right top/bottom corner and the
two others are added from right to left, whereas the second one has
its
natural size and the most left one may be stretched to fill the parent
layout.
I believe this can't be achieved with a LinearLayout with orientation
horizontal.

I think the example should work as intended, and think that the
RelativeLayout
layout_width=wrap_content should just cover the place that is
actually needed
and not the whole parent layout.


 You could also change the way you align two buttons side by side: instead of
 anchoring the right one, and setting layout_toLeftOf on the left one, try a
 more natural sequence. Set layout_alignParentLeft on the left one, and
 layout_toRightOf on the right one. This applies to all four left/right
 button pairs you have in the entire layout.


Unfortunately this gives a different effect than intended.
layout_toRightOf stretches the right buttons, as layout_toLeftOf
stretches the left buttons
( if they are nailed to their respective parent layout corners)
I don't think that the RelativeLayout should depend on some sort of
natural sequence,
as layouting from right to left is as natural as doing it from left to
right. It's an algorithm,
why should it depend on something natural.

So I tend to believe its a bug in RelativeLayouts
layout_width=wrap_content calculation.
I am interested to discuss this, and if nobody comes up with a good
explanation,
why this is that way, I will report this as a bug.

R.

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

2011-01-23 Thread som
Hi Guys,

I have developed the Android Freeware Paint App which can be
downloaded from A HREF=http://www.freewarelovers.com/android/app/
android-paintAndroidPaint/A This can also be downloaded from A
HREF=http://som-itsolutions.blogspot.com/2010/12/freeware-android-
paint.htmlAndroidPaint/A

I will be looking forward to your feedback on this App.

Som

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

2011-01-23 Thread Marcin Orlowski
 I have developed the Android Freeware Paint App which can be
 downloaded from A HREF=http://www.freewarelovers.com/android/app/
 android-paintAndroidPaint/A This can also be downloaded from A
 HREF=http://som-itsolutions.blogspot.com/2010/12/freeware-android-
 paint.htmlAndroidPaint/A

This is developers' list not i-will-announce-my-app-everywhere. Please
do not post off topic stuff

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

2011-01-23 Thread Kostya Vasilyev
You should be able to place 3 (or more) layouts into a LinearLayout,
indicating which one(s) you want stretched and how by laying with
layout_weight and layout_width values.

I've seen RelativeLayout not compute the actual height for wrap_content when
its children are added bottom-to-top (using layout_above), but work
correctly when its children are added top-to-bottom (using layout_below).
Maybe there is a similar issue with width, and leftOf/rightOf positioning.
Hence, my suggestion.

-- Kostya

2011/1/23 Rutton rut...@web.de



 On 23 Jan., 14:09, Kostya Vasilyev kmans...@gmail.com wrote:
  Seems like your intent is a side-by-side layout for a tablet device.

 I was working on a landscape layout and thought I could anchor a
 fixed size
 RelativeLayout and use a stretched/spanning second RelativeLayout. In
 fact
 it works here now, but the fixed size layout needs a real fixed size
 with concrete dp
 value.

  I would recommend you use a top-level LinearLayout
 (orientation=horizontal),
  and give your two relative layouts layout_width=0dp and
 layout_weight=1
  (that's for a start, you can also experiment with
  layout_width=wrap_content and other weight values).

 Well, interesting idea.

 Consider this case: I don't have two nested layouts within the parent,
 rather three. And I want this line up initially anchored from the
 right.
 The most right one is anchored to the right top/bottom corner and the
 two others are added from right to left, whereas the second one has
 its
 natural size and the most left one may be stretched to fill the parent
 layout.
 I believe this can't be achieved with a LinearLayout with orientation
 horizontal.

 I think the example should work as intended, and think that the
 RelativeLayout
 layout_width=wrap_content should just cover the place that is
 actually needed
 and not the whole parent layout.

 
  You could also change the way you align two buttons side by side: instead
 of
  anchoring the right one, and setting layout_toLeftOf on the left one, try
 a
  more natural sequence. Set layout_alignParentLeft on the left one, and
  layout_toRightOf on the right one. This applies to all four left/right
  button pairs you have in the entire layout.


 Unfortunately this gives a different effect than intended.
 layout_toRightOf stretches the right buttons, as layout_toLeftOf
 stretches the left buttons
 ( if they are nailed to their respective parent layout corners)
 I don't think that the RelativeLayout should depend on some sort of
 natural sequence,
 as layouting from right to left is as natural as doing it from left to
 right. It's an algorithm,
 why should it depend on something natural.

 So I tend to believe its a bug in RelativeLayouts
 layout_width=wrap_content calculation.
 I am interested to discuss this, and if nobody comes up with a good
 explanation,
 why this is that way, I will report this as a bug.

 R.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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] Android Freeware Paint

2011-01-23 Thread som
Hi Guys,

I have developed the Android Freeware Paint App which can be
downloaded from http://www.freewarelovers.com/android/app/
android-paint

This can also be downloaded from 
http://som-itsolutions.blogspot.com/2010/12/freeware-android-
paint.htm

I will be looking forward to your feedback on this App.

Som

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

2011-01-23 Thread kernelpanic
thanks - I found several other sites that disagree with the
manufacturer's site and state 320x480 as well.

The app was tested and works fine (according to a few other users) on
a Samsung Transform which is 320x455, so not sure why the claim that
it doesn't work.

The person never bothered to contact me directly or ask for a refund,
so it may just be someone that wanted pay so they could vote 1 star,
who knows.



On Jan 23, 4:52 am, Kostya Vasilyev kmans...@gmail.com wrote:
 The M860 appears to be the CDMA twin brother of the UMTS-based U8230 (sold
 in Russia, Ukraine, etc.)

 The specs at link below say 320x480, 3.5 - a pretty typical HVGA (other
 sites I'm not posting here also give the same numbers).

 You can see it quite clearly in the screenshots, too:

 http://habrahabr.ru/blogs/android/97298/

 -- Kostya

 2011/1/23 Zsolt Vasvari zvasv...@gmail.com

  That phone has 3.5 screen (same as an iPhone), and while it's not
  impossible, I would find it extremely hard to believe that it's a
  240x320 screen.  I think you would see pixelation even on a YouTube
  video of that were the case.  I believe the HVGA part of the
  description is correct and it's, in fact, a HVGA 320x480 device.

  On Jan 23, 8:51 am, kernelpanic j.m.roya...@gmail.com wrote:
   looking at the Huawei website, it states that device is 320x240 HVGA

   is the HVGA the issue here?

   On Jan 22, 5:35 pm, kernelpanic j.m.roya...@gmail.com wrote:

yes, that's how I decided I had an issue - he left a 1 star rating
with this comment

cannot play on my huawei ascend touchscreen please fix

On Jan 22, 5:29 pm, Dianne Hackborn hack...@android.com wrote:

 It should be a child of manifest, so that is fine.  Do you know
  what
 device this was allowed to be installed on?

 On Sat, Jan 22, 2011 at 2:47 PM, kernelpanic j.m.roya...@gmail.com
  wrote:
  ok, thanks. According to the docs, it should just be in the
  manifest -
  I have this

     uses-sdk android:minSdkVersion=5 android:targetSdkVersion=8
  /

         uses-permission android:name=android.permission.INTERNET
  /
         uses-permission android:name=android.permission.VIBRATE
  /

  supports-screens
         android:smallScreens=false
         android:normalScreens=true
         android:largeScreens=true android:anyDensity=true/

  should it be inside the application tag maybe?

  On Jan 22, 2:15 pm, Dianne Hackborn hack...@android.com wrote:
   It absolutely should be filtered from Market.  There are lots of
  apps
  that
   aren't available to small screen devices because they don't
  support small
   screens.  Make sure you have the tag in the right place in your
  manifest.

   On Sat, Jan 22, 2011 at 4:02 AM, kernelpanic 
  j.m.roya...@gmail.com
  wrote:
I'm using the following

supports-screens
       android:smallScreens=false
       android:normalScreens=true
       android:largeScreens=true android:anyDensity=true/

but had someone with a 320x240 screen download the app from the
  market
- of course it doesn't work on that small screen.

My question is why would someone with a screen that small be
  able to
see the app in the market?

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

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

 

[android-developers] Re: Question regarding RelativeLayout

2011-01-23 Thread Rutton
Yeah, thanks. What you mention seems to be also a bug ;-).
Perhaps someone may come up with a reason for that.
Or, what about reporting it?

R.

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

2011-01-23 Thread Jonas Petersson

On 01/23/2011 03:08 PM, kernelpanic wrote:

thanks - I found several other sites that disagree with the
manufacturer's site and state 320x480 as well.

The app was tested and works fine (according to a few other users) on
a Samsung Transform which is 320x455, so not sure why the claim that
it doesn't work.

The person never bothered to contact me directly or ask for a refund,
so it may just be someone that wanted pay so they could vote 1 star,
who knows.


Getting somewhat OT here, but I wouldn't be surprised if it is in fact 
someone with a competing product that will flat out spread lies. I've 
seen such things in the past: someone kept updating a comment (about 
once a week) which claimed that my (free) phone number lookup app had 
deleted everything in his phonebook - which is technically absurd since 
the only write operation performed is an add and even if it was true, 
why would he then keep the app installed for several months to update 
that comment? Also, it's not like it is hard to send me an email so that 
I could look into that claim if it had any truth at all in it.


I'm afraid it's a dog-eat-dog world out there for some people - very 
sad. Having any way at all to respond to Market comments would be 
excellent...


Best / Jonas

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

2011-01-23 Thread Kostya Vasilyev
2011/1/23 Rutton rut...@web.de

 Yeah, thanks. What you mention seems to be also a bug ;-).

 Perhaps someone may come up with a reason for that.


Could just be a limitation, although I don't see that documented (so there
is at least a documentation bug here).


 Or, what about reporting it?


Feel free to:

http://code.google.com/p/android/issues/list

-- Kostya



 R.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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: Create Parser for the given JSON

2011-01-23 Thread nation-x
Just an update for anyone who might be looking at this thread in an
archive... it literally only takes 3-4 lines of code if you use Gson
http://code.google.com/p/google-gson/ and Gson is so awesome that it
will automatically push your json objects or arrays directly into a
POJO. http://benjii.me/2010/04/deserializing-json-in-android-using-gson/

Shawn

On Jan 22, 8:44 am, DanH danhi...@ieee.org wrote:
 A JSON parser is about 500 lines of code -- a few hours work.  (The
 encoder is another 250 or so.)  The hard part is parsing numbers per
 the JSON spec.

 Or you can probably find about 50 Java implementations on the net.

 On Jan 22, 2:45 am, Faheem Khatri faheemkhatr...@gmail.com wrote:

  I want to create parser for the given JSON below, Anyone help me out
  for this.
  { 0 : { Distance : 7.7364796125473,
        LBS_CategoryMaster_ID : 6,
        LBS_POI_Description : ,
        LBS_POI_Latitude : 24.85251,
        LBS_POI_Longitude : 67.03203,
        LBS_POI_Name : POI1
      },
    1 : { Distance : 7.68653354773716,
        LBS_CategoryMaster_ID : 6,
        LBS_POI_Description : ,
        LBS_POI_Latitude : 24.85247,
        LBS_POI_Longitude : 67.03211,
        LBS_POI_Name : POI1
      },
    2 : { Distance : 2.44026574305725,
        LBS_CategoryMaster_ID : 6,
        LBS_POI_Description : ,
        LBS_POI_Latitude : 24.85118,
        LBS_POI_Longitude : 67.03118,
        LBS_POI_Name : POI2
      },
    3 : { Distance : 8.0421178896909,
        LBS_CategoryMaster_ID : 6,
        LBS_POI_Description : ,
        LBS_POI_Latitude : 24.85251,
        LBS_POI_Longitude : 67.03216,
        LBS_POI_Name : POI3
      },
    4 : { Distance : 4.6843846750868,
        LBS_CategoryMaster_ID : 6,
        LBS_POI_Description : ,
        LBS_POI_Latitude : 24.8514,
        LBS_POI_Longitude : 67.03073,
        LBS_POI_Name : POI4
      }

  }



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

2011-01-23 Thread Kostya Vasilyev
Getting a little futher OT - I sometimes get comments from users of custom
firmware, in fact, at this point, issues are typically caused by
Frankenstein-like firmware (kernel from here, apps from there, WiFi and
radio drivers extracted from standard firmware, well, you get the idea).

I would really love to see a way to respond to comments to address this.

And something good - recently someone posted an ignorant 1-star comment for
my app, that was full of swear words (in Russian). After a few days, the
comment disappeared - so it looks Google has an algorithm that searches for
certain words in comments and removes them.

-- Kostya

2011/1/23 Jonas Petersson jonas.peters...@xms.se

 On 01/23/2011 03:08 PM, kernelpanic wrote:

 thanks - I found several other sites that disagree with the
 manufacturer's site and state 320x480 as well.

 The app was tested and works fine (according to a few other users) on
 a Samsung Transform which is 320x455, so not sure why the claim that
 it doesn't work.

 The person never bothered to contact me directly or ask for a refund,
 so it may just be someone that wanted pay so they could vote 1 star,
 who knows.


 Getting somewhat OT here, but I wouldn't be surprised if it is in fact
 someone with a competing product that will flat out spread lies. I've seen
 such things in the past: someone kept updating a comment (about once a week)
 which claimed that my (free) phone number lookup app had deleted everything
 in his phonebook - which is technically absurd since the only write
 operation performed is an add and even if it was true, why would he then
 keep the app installed for several months to update that comment? Also, it's
 not like it is hard to send me an email so that I could look into that claim
 if it had any truth at all in it.

 I'm afraid it's a dog-eat-dog world out there for some people - very sad.
 Having any way at all to respond to Market comments would be excellent...

Best / Jonas


 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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] Re: Using internal Android string resources

2011-01-23 Thread Brill Pappin
Nice. There are times I could certainly use a service like that!

What I was thinking though is something a bit more dynamic, so you could build 
resource collections out of what was stored in the database and/or contribute 
more translations. License them under the Apache License so you can use them in 
your Android apps etc.

We'll see if it actually gets built :)
It all a matter of the time I don't have.

- Brill Pappin

On 2011-01-23, at 3:24 AM, String wrote:

 You might try out http://www.icanlocalize.com/. I've used their paid service 
 to translate an app, but it's free to set up an account, and then they have a 
 web-based tool for managing translations that's quite similar to what you're 
 describing. They apparently don't mind you using their tool to manage your 
 own translations. 
 
 Anyway, take a look before you build your own. 
 
 String 
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: AttributeSet, getAttributeValue method returns null.

2011-01-23 Thread xramonz
you should specify the namespace as 
http://schemas.android.com/apk/res/android; instead of android
for your own namespace use for example 
http://schemas.android.com/apk/gen/com.example.yourapp;

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

2011-01-23 Thread Rutton


On 23 Jan., 15:38, Kostya Vasilyev kmans...@gmail.com wrote:

 Feel free to:

 http://code.google.com/p/android/issues/list


I will do so.
Tried a bit with LinearLayout and weight (haven't used that before).
Learned something new with that, thanks :-).

R.

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


[android-developers] Get my SIM Phone Number

2011-01-23 Thread André Barbosa
Is any way to get the SIM phone number without use
TelephonyManager.getLine1Number()?

I tried use :
TelephonyManager tMgr
=(TelephonyManager)mAppContext.getSystemService(Context.TELEPHONY_SERVICE);
  mPhoneNumber = tMgr.getLine1Number();

but don't work with my SIM Card. Anybody know other method to get the
SIM phone number without use the rild to get this information?

Best Regards,
André Barbosa.

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

2011-01-23 Thread culonna
Thanks. The infrastructure is ok because in the original version with
the client application running on a fixed node
the results are stable.
I add some information. In the last experiment often the application
give an OutOfMemoryError. During the experiments the heap size of the
app (monitored with DDMS) grows. It seems that if the process get
enough memory it makes better and at some point it require too much
memory and is killed by os.

On 23 Gen, 11:58, Kostya Vasilyev kmans...@gmail.com wrote:
 Probably has more to do with network infrastructure surrounding the phone,
 than with what priority your phone application runs at (as long as it
 doesn't get killed - and that won't happen if it's in the foreground).

 It's really hard to say without knowing what those tests are, but, e.g. UDP
 is often unreliable or slow on mobile networks, and your code could catching
 slow-coming results from previous interations.

 -- Kostya

 2011/1/23 culonna cannavacciuolo.lu...@gmail.com

  An application that is running for a long time in foreground will
  acquire more priority in time?
  I explain my problem. I ported a software for communication with a
  fixed infrastructure in Android. I'm making some tests. Each test
  makes 5 experiments (the mobile node sends some queries to the
  infrastructure and evalutes the number of query successful and the
  mean time) and the result of the test is the mean of the results of
  these experiments.
  During the test the application is always in foreground.
  In the experiments the result improve e. g. (10% 15% 30% 40% 55% of
  query ok).
  I implemented the system as activity and not yet as service.
  For the test the app aquire the locks SCREEN_DIM_WAKE_LOCK and
  WIFI_MODE_FULL.
  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

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


[android-developers] Package Installation Error from store

2011-01-23 Thread John Lussmyer
I just posted a new app to the store, and I've already received 2 reports
that users couldn't download it.
One said they got a Package Installation Error, and the other just said it
wouldn't download.
I've just tried re-downloading again with my phone, and it worked just fine.
(CasaDelGato Life - if you want to see if it downloads for you.)

Any suggestions on why this might be happening?

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

2011-01-23 Thread Kostya Vasilyev
Yes, this happens sometimes.

If you can contact the users, ask them to remove data caches for Download
Manager and Market:

http://kmansoft.wordpress.com/2010/11/06/android-market-install-failures/

-- Kostya

2011/1/23 John Lussmyer johnlussm...@gmail.com

 I just posted a new app to the store, and I've already received 2 reports
 that users couldn't download it.
 One said they got a Package Installation Error, and the other just said
 it wouldn't download.
 I've just tried re-downloading again with my phone, and it worked just
 fine.
 (CasaDelGato Life - if you want to see if it downloads for you.)

 Any suggestions on why this might be happening?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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] drawing and refreshing small paint over static bitmap

2011-01-23 Thread Paolo Russian
Hello. I thought it was an easy find over all these android forums but
it seems i cannot find if there is a pre-built way to draw my sprite
(made up with a couple of shapes) over a static bitmap as background.
What I currently do is redrawing the background and drawing over same
canvas the sprite, for each onDraw() event, with some performance
issues ofcourse.
I remember some mode 0x13h experiments in old C, so there surely are
ways to copy-pixels behind the sprite, move the sprite, rederaw the
copied part of background to cover the old sprite, and draw the new
sprite position.
My question is different: is there a way to set up a certain number of
layers/levels and leave the bitmap on the bottom layer and going on
erasing-drawing only the sprite in the top layer? That would you
normally do for instance in actionscript3, you create 2 canvas, and
operate them individually. But if you want to be old-school you can
work with copypixel but there is almost never the need.
But whenever I search for layers or overlays searches spit out
GoogleMaps layers coding, MapView overlays stuff which really don't
matter :D
So what classes am I missing for doing this very basic thing?

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] managing the apps in Android market

2011-01-23 Thread Alexander
Hi.
i'm also posting this question in the help forum but i think its a
mixed issue as it is with respect the developer.

We have a small team working on several apps that are going to be
released on android market, and one thing we are having
problems with is how to manage the publisher account. The owner of the
account (bank and credit card information) is not the developer that
is in charge of the android apps (prepare, sign, etc. for distribution
and control their status).
So this developer needs to have access to the publisher site and
upload the apps, update them, etc... but independently of the bank
data and unable to change it.

So the question is, how do you deal with this case?... or is it the
market supposed to work with only one developer with his personal
credit card managing everything?. i don't think that must be the only
possible way...

Thank you for any help and guide, i haven't found much information
about this particular problem.

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


[android-developers] onPostExecute and Activity State

2011-01-23 Thread Doug Gordon
After the background thread of an AsyncTask has completed (i.e., 
doInBackground returns), it is stated that onPostExecute runs on the UI 
thread. Can I assume that if the activity has gone into the paused 
state or other non-active state, that onPostExecute will not be called 
until the activity has resumed (and is in the foreground)?


It seems like it has to work this way, but I'm not sure exactly how the 
threading model works in Android.


  Doug Gordon
  GHCS Software

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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-23 Thread Dmitri Plotnikov
The answer is: yes you do.  Your sync adapter will need to adopt the
no-account contacts, otherwise some other syncadapter will claim them and
then synchronization will become impossible.  The no-account contacts
literally have accountType=NULL so they are easy to find.  Find them and
assign the account type/name right away.  Please note that once you have a
sync adapter in the system,  you can no longer create any no-account
contacts.  At least that is true for the stock implementation of Android.

Cheers,
- Dmitri

On Sun, Jan 23, 2011 at 2:14 AM, L0rdAli3n
42.john.doe.1...@googlemail.comwrote:

 Thanks for those informationen Dmitri.

 To make it clear: I just want to sync the contacts a user saved on
 his
 local phonebook/adressbook (no gmailcontacts, no facebookcontacts, no
 twittercontacts)
 with openXChange. Do I really need a new AccountType then? So a user
 will have a openXChange-Contacts, beside the phonebook-Contacts?

 On 19 Jan., 09:02, 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 introduce a new account type for this purpose?
 
   Cheers,
   Dmitri
   On Jan 14, 2011 5:16 AM, L0rdAli3n 42.john.doe.1...@googlemail.com
 
   wrote:
 
Hey,
 
I'm totally stuck with the ContactsContract-API. Point is that I
 want
only mess around with the Contacts saved in the local phonebook.
 But
it seems that every vendor but its own account_type for those
contacts.
And its even worse. The AccountManager isn't even aware of all
account_types?!?
For example on my HTC Desire with HTC Sense, the account_type all
local contacts are saved in is: com.htc.android.pcsc. But when I
 grab
a list of all available accounts from the AccountManager: This
 account
is not in the list!?
I also tested it on a Samsung Galaxy. Same here: The AccountManager
 is
not aware of the account_type used for local phonebookcontacts.
 
The whole story is that I wan't to write a app to sync my locale
phonebook with OpenXchange.
 
I guess I got that whole new ContactsContract-API wrong, but I don't
see any other way, then using RawContacts. Due to that I have to
 care
about the account_type, which is in fact a total mess.
 
Hopefully someone can point me in the right direction. Every hint is
highly 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.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
 
  android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@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 

Re: [android-developers] onPostExecute and Activity State

2011-01-23 Thread Kostya Vasilyev
Doug,

AsyncTask doesn't know anything about Activity lifecycle (and can be used
with other app components).

As far as messaging goes, the UI thread continues to run and process
messages even if no activities are visible (there may be messages related to
services or app widgets, and also that's how your next activity is brought
onto the screen), so your onPostExecute will get called as soon as
doInBackground completes.

So - either cancel your task in onPause (beware that there was a thread race
issue, AFAIK fixed in 2.2), or set some kind of flag in the task object so
it doesn't try to update views that are no longer on the screen.

-- Kostya

2011/1/23 Doug Gordon gordo...@gmail.com

 After the background thread of an AsyncTask has completed (i.e.,
 doInBackground returns), it is stated that onPostExecute runs on the UI
 thread. Can I assume that if the activity has gone into the paused state
 or other non-active state, that onPostExecute will not be called until the
 activity has resumed (and is in the foreground)?

 It seems like it has to work this way, but I'm not sure exactly how the
 threading model works in Android.

  Doug Gordon
  GHCS Software

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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] drawing and refreshing small paint over static bitmap

2011-01-23 Thread Kevin Duffey
This brings me back some years! I remember when trying to dabble in this
area of game/graphics drawing, thinking to myself.. if I have multiple
objects on the screen, and one goes behind another, I don't want to draw the
one behind it. It should speed things up a bit. I never could figure out how
to do it right. I was just doing a loop and drawing everything as fast I
could, not using a timing loop like 60 times a second and trying to get all
the drawing in there each 60th of a second.

I don't know if this is the right way to do this, but I would guess each
draw object, be it a background or any object at any layer in between,
would have it's own drawing handler. You would have some sort of logic that
would figure out if a given layer is completely hidden.. obstructed by an
object in a layer above it. However, like I said above, I could never figure
out how you figure out if a given object is completely covering an object
below it. Each object could have transparency sections, like a plane with
windows, where part of the object below it might actually be seen through
the window of the object above it. I always figured draw from bottom up
allowing for transparency so that bottom objects would appear through. This
would of course mean you end up drawing everything, all the time,
completely. I figured that would be faster than trying to figure out code
that would determine if an object was partially hidden or completely hidden
using some sort of algorithm that determines the shape or not. If you could
use a pure square outline, that was fine, but then it wouldn't look right if
you had say a triangle bitmap over a square bitmap.. you'd have to account
for the portion of the square that is visible beyond the triangle edges. I
sucked in math, hence why this sort of stuff always frustrated me.


On Sun, Jan 23, 2011 at 8:17 AM, Paolo Russian paolo.russ...@gmail.comwrote:

 Hello. I thought it was an easy find over all these android forums but
 it seems i cannot find if there is a pre-built way to draw my sprite
 (made up with a couple of shapes) over a static bitmap as background.
 What I currently do is redrawing the background and drawing over same
 canvas the sprite, for each onDraw() event, with some performance
 issues ofcourse.
 I remember some mode 0x13h experiments in old C, so there surely are
 ways to copy-pixels behind the sprite, move the sprite, rederaw the
 copied part of background to cover the old sprite, and draw the new
 sprite position.
 My question is different: is there a way to set up a certain number of
 layers/levels and leave the bitmap on the bottom layer and going on
 erasing-drawing only the sprite in the top layer? That would you
 normally do for instance in actionscript3, you create 2 canvas, and
 operate them individually. But if you want to be old-school you can
 work with copypixel but there is almost never the need.
 But whenever I search for layers or overlays searches spit out
 GoogleMaps layers coding, MapView overlays stuff which really don't
 matter :D
 So what classes am I missing for doing this very basic thing?

 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

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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-23 Thread Dmitri Plotnikov
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=tree;f=src/com/android/exchange

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 introduce a new account type for this purpose?
 
Cheers,
Dmitri
On Jan 14, 2011 5:16 AM, L0rdAli3n 
 42.john.doe.1...@googlemail.com
wrote:
 
 Hey,
 
 I'm totally stuck with the ContactsContract-API. Point is that I
 want
 only mess around with the Contacts saved in the local phonebook.
 But
 it seems that every vendor but its own account_type for those
 contacts.
 And its even worse. The 

Re: [android-developers] onPostExecute and Activity State

2011-01-23 Thread Mark Murphy
On Sun, Jan 23, 2011 at 12:56 PM, Kostya Vasilyev kmans...@gmail.com wrote:
  so your onPostExecute will get called as soon as
 doInBackground completes.

Not necessarily.

When doInBackground() completes, the background thread from the thread
pool sends a Message to a Handler, to cause onPostExecute() to be run
on the main application thread.

If the main application thread is not processing messages at this
time, then the onPostMessage() Message will be stuck in the queue
until such time as that state changes.

For example, during a configuration change, messages are not processed
on the old activity from onRetainNonConfigurationInstance() onward.
And, messages will not start up again until the new activity completes
onCreate(). This is how we can safely pass the AsyncTask from old to
new, and associate that task with the right activity, without
onPostExecute() being invoked during this transition.

I *think* that messages for an activity are not processed when it is
paused, but I'm not certain, as I haven't tried to test that specific
scenario, and I don't remember a particular Googly note on the
subject. Heck, the only reason I know what I wrote in the previous
paragraph is courtesy of a post on this list from Ms. Hackborn.

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

_Android Programming Tutorials_ Version 3.1 Available!

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


Re: [android-developers] Get my SIM Phone Number

2011-01-23 Thread Marcin Orlowski
 but don't work with my SIM Card. Anybody know other method to get the
 SIM phone number without use the rild to get this information?

I believe some SIMs do not expose own number. Mine is one of that type
and I never been able to read its number no matter on what platform
I've tried (Symbian, Palm, Android)

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


Re: [android-developers] onPostExecute and Activity State

2011-01-23 Thread Kostya Vasilyev
Yes, there is that special case for orientation changes, thank you, but it's
temporary.

I suppose also if the UI thread is stuck on something and is heading for an
ANR, then it's not processing messages either.

Under normal conditions, the UI thread does process messages - here is a
simple test (I was curious about the messaging behavior here, so spent a few
minutes writing one):

 ---
new AsyncTaskVoid, Void, String() {
private Context context = getApplicationContext();

@Override
protected void onPostExecute(String result) {
Toast.makeText(context, AsyncTask says:  + result,
Toast.LENGTH_SHORT).show();
}

@Override
protected String doInBackground(Void... params) {
try {
Thread.sleep(1000 * 5);
} catch (InterruptedException x) {
  Log.i(TAG, x.toString());
}
return Hello world;
}
}.execute();
--

You can put this in onStart of any activity (the main one will do), launch
it, and immediately press Back so that the activity is not only paused,
but also destroyed.

Five seconds later the toast will show up over the home screen, showing that
onPostExecute did get called.

-- Kostya

2011/1/23 Mark Murphy mmur...@commonsware.com

 On Sun, Jan 23, 2011 at 12:56 PM, Kostya Vasilyev kmans...@gmail.com
 wrote:
   so your onPostExecute will get called as soon as
  doInBackground completes.

 Not necessarily.

 When doInBackground() completes, the background thread from the thread
 pool sends a Message to a Handler, to cause onPostExecute() to be run
 on the main application thread.

 If the main application thread is not processing messages at this
 time, then the onPostMessage() Message will be stuck in the queue
 until such time as that state changes.

 For example, during a configuration change, messages are not processed
 on the old activity from onRetainNonConfigurationInstance() onward.
 And, messages will not start up again until the new activity completes
 onCreate(). This is how we can safely pass the AsyncTask from old to
 new, and associate that task with the right activity, without
 onPostExecute() being invoked during this transition.

 I *think* that messages for an activity are not processed when it is
 paused, but I'm not certain, as I haven't tried to test that specific
 scenario, and I don't remember a particular Googly note on the
 subject. Heck, the only reason I know what I wrote in the previous
 paragraph is courtesy of a post on this list from Ms. Hackborn.

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

 _Android Programming Tutorials_ Version 3.1 Available!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.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] Re: another problem with Galaxy Tab and fullscreen

2011-01-23 Thread Mark Murphy
I cannot reproduce your problem. Here is a sample project with your
manifest settings and FULLSCREEN call, and I do not see the behavior
you cite:

http://misc.commonsware.com/GalaxyTabList.zip

On Fri, Jan 21, 2011 at 11:04 AM, guich guiha...@gmail.com wrote:
 Hi Mark,

 How are you? How was Christmas and the new year? :-)

 A simple code will be very dificult for me. However, i can provide two
 apks that would reproduce the problem. But, basically, when the app
 loads, at the activitie's onCreate, i call the

      if (fullscreen)  // now set in the
 AndroidManifest.xml / .Fullscreen property

 getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
 WindowManager.LayoutParams.FLAG_FULLSCREEN);

 Is the apk enough to help?

 cheers

    guich

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




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

_Android Programming Tutorials_ Version 3.1 Available!

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


[android-developers] Re: Shared preference from non activity class

2011-01-23 Thread FrankG
Hi Hari.
Just my two cents but if you mean
the Java Bean specification, then the spec is
a J2SE technology  ( 
http://www.oracle.com/technetwork/java/javase/documentation/spec-136004.html
)
and comes into world long before the people start to thinking in terms
of EJBs and so on. Good luck ! Frank

On 23 Jan., 02:24, Hari Edo hari@gmail.com wrote:
 On Jan 22, 7:50 pm, TreKing treking...@gmail.com wrote:

  I have no idea what a bean class is.

 It's one of those J2EE things that they shove at you in
 diploma-mill university IT classes.  Basically, an object
 with a hashmap of properties, so that it's trivial to make
 GUI front-ends that can manipulate the properties directly.

 While I haven't weaned myself off all of the Collections
 classes, I'd say heavy Beans and lightweight Android are
 at diametric odds with regard to garbage collection
 stressors.

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


[android-developers] High memory usage reported in running services activity

2011-01-23 Thread Joan Pujol
I've seen that my background service is allocating 25Mbs according to
the Running Services android window. As it is a lot of memory that I
think I don't use I looked to ddms and also made a head dump of my
process and then the memory usage is only 2.9Mb

What's is the real memory usage? If it is the ddms one is there any
way to let running services give the correct usage? Because I'm afraid
that if some user look at the running services it will say that the
application is wasting a lot of memory.

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

2011-01-23 Thread jtoolsdev
A little off topic but Samsung still needs to release a skin for the
Galaxy tablet that has the Google API in it.  I think most if not all
Galaxy tablets available have the API but the skin doesn't.

On Jan 21, 5:47 am, guich guiha...@gmail.com wrote:
 Hi,

 I'm running our application on galaxy tab. My app draws everything on
 a bitmap and displays it on screen. I always use fullscreen by using
 the properties:

     application android:icon=@drawable/icon
 android:label=TotalCross Virtual Machine
          android:theme=@android:style/Theme.Black.NoTitleBar 
         activity android:name=.Loader android:label=Loading
 application...
         android:configChanges=keyboardHidden|orientation|screenLayout|
 fontScale|keyboard /
     /application

 However, on galaxy tab, even if it correctly detects that the screen
 is 600x1024, the bottom pixels of the bitmap becomes strange: it
 shows, at the bottom of the screen the top row of the screen twice,
 like this picture:

 img src='http://187.0.198.189/galaxy_fs.jpg'http://187.0.198.189/
 galaxy_fs.jpg/img

 Seems that it thinks that there's still a taskbar at the top, even if
 i set the property like above.

 Am I missing something?

 thanks

      guich

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


[android-developers] Controlling the shutter of the camera

2011-01-23 Thread Montario
Hi,
There are different options to have longer/shorter shutter times in
the camera intent but does anyone know if these could be controlled
manually?
Say that I can specify a custom time the shutter should be open?

Thanks in advance!
/Chris

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


Re: [android-developers] onPostExecute and Activity State

2011-01-23 Thread Dianne Hackborn
There actually isn't a special state for orientation changes.  We just
specify that the implementation will do the destruction of the old activity
and construction of the new activity during processing of a single message,
so no other messages can be dispatched while it is doing this.

That is, there is no concept of message dispatching turned off.  If there
is a message available to be dispatched, it will be.  It's just that the
next message can't be dispatched until you return from the previous on.

Also the activity lifecycle is completely independent of message
dispatching.  Completely.  If you enqueue a message in a handler while
executing in some activity, and that activity is completely
destroyed/finished (not being restarted), the message you enqueued will
still be processed even though the activity is gone.  It is your
responsibility to remove any messages from the queue in onDestroy() if you
don't want them executed after onDestroy().  (Likewise onPause() etc.)

The same applies for AsyncTask -- it knows nothing about activities, so it
will just keep running and eventually call back with the result, regardless
of what happens to whatever activity you were in when you started it.

This is also another place to look for leaks.  If you have an AsyncTask that
is an inner class of an activity, it implicitly holds a reference on the
activity.  Thus if you leave it running after your activity is destroyed, it
will continue holding that reference, not allowing the activity object (and
everything it holds like its view hierarchy) to be GCed until the task
completes and calls back on your inner object of a destroyed activity.

On Sun, Jan 23, 2011 at 10:23 AM, Kostya Vasilyev kmans...@gmail.comwrote:

 Yes, there is that special case for orientation changes, thank you, but
 it's temporary.

 I suppose also if the UI thread is stuck on something and is heading for an
 ANR, then it's not processing messages either.

 Under normal conditions, the UI thread does process messages - here is a
 simple test (I was curious about the messaging behavior here, so spent a few
 minutes writing one):

  ---
 new AsyncTaskVoid, Void, String() {
 private Context context = getApplicationContext();

 @Override
 protected void onPostExecute(String result) {
 Toast.makeText(context, AsyncTask says:  + result,
 Toast.LENGTH_SHORT).show();
 }

 @Override
 protected String doInBackground(Void... params) {
 try {
 Thread.sleep(1000 * 5);
 } catch (InterruptedException x) {
   Log.i(TAG, x.toString());
 }
 return Hello world;
 }
 }.execute();
 --

 You can put this in onStart of any activity (the main one will do), launch
 it, and immediately press Back so that the activity is not only paused,
 but also destroyed.

 Five seconds later the toast will show up over the home screen, showing
 that onPostExecute did get called.

 -- Kostya

 2011/1/23 Mark Murphy mmur...@commonsware.com

 On Sun, Jan 23, 2011 at 12:56 PM, Kostya Vasilyev kmans...@gmail.com
 wrote:
   so your onPostExecute will get called as soon as
  doInBackground completes.

 Not necessarily.

 When doInBackground() completes, the background thread from the thread
 pool sends a Message to a Handler, to cause onPostExecute() to be run
 on the main application thread.

 If the main application thread is not processing messages at this
 time, then the onPostMessage() Message will be stuck in the queue
 until such time as that state changes.

 For example, during a configuration change, messages are not processed
 on the old activity from onRetainNonConfigurationInstance() onward.
 And, messages will not start up again until the new activity completes
 onCreate(). This is how we can safely pass the AsyncTask from old to
 new, and associate that task with the right activity, without
 onPostExecute() being invoked during this transition.

 I *think* that messages for an activity are not processed when it is
 paused, but I'm not certain, as I haven't tried to test that specific
 scenario, and I don't remember a particular Googly note on the
 subject. Heck, the only reason I know what I wrote in the previous
 paragraph is courtesy of a post on this list from Ms. Hackborn.

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

 _Android Programming Tutorials_ Version 3.1 Available!

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

Re: [android-developers] onPostExecute and Activity State

2011-01-23 Thread Mark Murphy
On Sun, Jan 23, 2011 at 3:55 PM, Dianne Hackborn hack...@android.com wrote:
 There actually isn't a special state for orientation changes.  We just
 specify that the implementation will do the destruction of the old activity
 and construction of the new activity during processing of a single message,
 so no other messages can be dispatched while it is doing this.

Ah.

 That is, there is no concept of message dispatching turned off.  If there
 is a message available to be dispatched, it will be.  It's just that the
 next message can't be dispatched until you return from the previous on.

More ah.

Many thanks!

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

_Android Programming Tutorials_ Version 3.1 Available!

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


Re: [android-developers] High memory usage reported in running services activity

2011-01-23 Thread Dianne Hackborn
You can use adb shell dumpsys memoryinfo to see more details information
about app memory usage.

Note that Running Services (especially starting with Gingerbread) is showing
the aggregate of your process and any processes you are causing to keep
around.  Look at the details to see if there are other processes involved,
and it should say why they are needed.

Or it could just be that you have allocations elsewhere -- for example I
think DDMS only shows the Java heap in its main view.  If you have a lot of
native allocations (bitmaps, web view, etc) then they may not show up there.

On Sun, Jan 23, 2011 at 12:16 PM, Joan Pujol joanpu...@gmail.com wrote:

 I've seen that my background service is allocating 25Mbs according to
 the Running Services android window. As it is a lot of memory that I
 think I don't use I looked to ddms and also made a head dump of my
 process and then the memory usage is only 2.9Mb

 What's is the real memory usage? If it is the ddms one is there any
 way to let running services give the correct usage? Because I'm afraid
 that if some user look at the running services it will say that the
 application is wasting a lot of memory.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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 priority

2011-01-23 Thread Dianne Hackborn
Running longer does not give you a higher priority, using more memory does
not give you a higher priority.

It sounds like you have a memory leak.  That's probably the first thing to
look at.  Also you may be keeping data in caches and stuff so that in later
iterations you have the data local without needing to do more work.

On Sun, Jan 23, 2011 at 7:36 AM, culonna cannavacciuolo.lu...@gmail.comwrote:

 Thanks. The infrastructure is ok because in the original version with
 the client application running on a fixed node
 the results are stable.
 I add some information. In the last experiment often the application
 give an OutOfMemoryError. During the experiments the heap size of the
 app (monitored with DDMS) grows. It seems that if the process get
 enough memory it makes better and at some point it require too much
 memory and is killed by os.

 On 23 Gen, 11:58, Kostya Vasilyev kmans...@gmail.com wrote:
  Probably has more to do with network infrastructure surrounding the
 phone,
  than with what priority your phone application runs at (as long as it
  doesn't get killed - and that won't happen if it's in the foreground).
 
  It's really hard to say without knowing what those tests are, but, e.g.
 UDP
  is often unreliable or slow on mobile networks, and your code could
 catching
  slow-coming results from previous interations.
 
  -- Kostya
 
  2011/1/23 culonna cannavacciuolo.lu...@gmail.com
 
   An application that is running for a long time in foreground will
   acquire more priority in time?
   I explain my problem. I ported a software for communication with a
   fixed infrastructure in Android. I'm making some tests. Each test
   makes 5 experiments (the mobile node sends some queries to the
   infrastructure and evalutes the number of query successful and the
   mean time) and the result of the test is the mean of the results of
   these experiments.
   During the test the application is always in foreground.
   In the experiments the result improve e. g. (10% 15% 30% 40% 55% of
   query ok).
   I implemented the system as activity and not yet as service.
   For the test the app aquire the locks SCREEN_DIM_WAKE_LOCK and
   WIFI_MODE_FULL.
   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
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@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.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: Shared preference from non activity class

2011-01-23 Thread Kevin Duffey
 Bean class is a pojo. You have private instance variables, with public
get/set methods. A property is an instance field with a get/set method. I
forget though if you need both.. there are some cases where you may want to
make a mutable property by using a constructor to set it, then only have a
getter so it can't be changed.

On Sun, Jan 23, 2011 at 11:52 AM, FrankG frankgru...@googlemail.com wrote:

 Hi Hari.
 Just my two cents but if you mean
 the Java Bean specification, then the spec is
 a J2SE technology  (
 http://www.oracle.com/technetwork/java/javase/documentation/spec-136004.html
 )
 and comes into world long before the people start to thinking in terms
 of EJBs and so on. Good luck ! Frank

 On 23 Jan., 02:24, Hari Edo hari@gmail.com wrote:
  On Jan 22, 7:50 pm, TreKing treking...@gmail.com wrote:
 
   I have no idea what a bean class is.
 
  It's one of those J2EE things that they shove at you in
  diploma-mill university IT classes.  Basically, an object
  with a hashmap of properties, so that it's trivial to make
  GUI front-ends that can manipulate the properties directly.
 
  While I haven't weaned myself off all of the Collections
  classes, I'd say heavy Beans and lightweight Android are
  at diametric odds with regard to garbage collection
  stressors.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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] Package Installation Error from store

2011-01-23 Thread John Lussmyer
I've been chatting with one user with the problem.  Droid running 2.2.
Uninstalling and Clearing the cache hasn't helped.  Still won't successfully
download and install.

On Sun, Jan 23, 2011 at 7:52 AM, Kostya Vasilyev kmans...@gmail.com wrote:

 Yes, this happens sometimes.

 If you can contact the users, ask them to remove data caches for Download
 Manager and Market:

 http://kmansoft.wordpress.com/2010/11/06/android-market-install-failures/



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

[android-developers] DDMS Screen Capture won't work for WVGA854?

2011-01-23 Thread John Lussmyer
I just build a AVD with the WVGA854 spec.
My app runs in it nicely, but DDMS Device Screen Capture just says Screen
not available.

Is there any way to get this to 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] DDMS Screen Capture won't work for WVGA854?

2011-01-23 Thread Kostya Vasilyev
Did you select the emulator in the list before clicking the capture button?

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
24.01.2011 0:36 пользователь John Lussmyer johnlussm...@gmail.com
написал:

 I just build a AVD with the WVGA854 spec.
 My app runs in it nicely, but DDMS Device Screen Capture just says Screen
not available.

 Is there any way to get this to 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

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

2011-01-23 Thread Kostya Vasilyev
OK, just tried it on my Galaxy S with 2.2. Same thing, downloaded okay, then
got an install failure, so it looks like something is wrong with the
package. Are you sure it's properly signed?

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
24.01.2011 0:35 пользователь John Lussmyer johnlussm...@gmail.com
написал:
 I've been chatting with one user with the problem. Droid running 2.2.
 Uninstalling and Clearing the cache hasn't helped. Still won't
successfully
 download and install.

 On Sun, Jan 23, 2011 at 7:52 AM, Kostya Vasilyev kmans...@gmail.com
wrote:

 Yes, this happens sometimes.

 If you can contact the users, ask them to remove data caches for
Download
 Manager and Market:

 http://kmansoft.wordpress.com/2010/11/06/android-market-install-failures/



 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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] Package Installation Error from store

2011-01-23 Thread Kostya Vasilyev
A follow up - the logcat says:

Manifest specifies bad sharedUserId: casadelgato, must have at least one
. separator.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
24.01.2011 0:41 пользователь Kostya Vasilyev kmans...@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] DDMS Screen Capture won't work for WVGA854?

2011-01-23 Thread John Lussmyer
Yes.
And on the 3rd try, it finally worked.

2011/1/23 Kostya Vasilyev kmans...@gmail.com

 Did you select the emulator in the list before clicking the capture button?

 --


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

2011-01-23 Thread John Lussmyer
Interesting.
It's been working fine on Android 2.1 devices.  (Several friends, and I,
have downloaded it on 2.1 devices with no problem.)
This must be a new restriction for 2.2 devices.
I'll try changing it.

2011/1/23 Kostya Vasilyev kmans...@gmail.com

 A follow up - the logcat says:

 Manifest specifies bad sharedUserId: casadelgato, must have at least one
 . separator.

 --
 Kostya Vasilyev -- http://kmansoft.wordpress.com
 24.01.2011 0:41 пользователь Kostya Vasilyev kmans...@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.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: High memory usage reported in running services activity

2011-01-23 Thread Joan Pujol
Thanks Dianne,

I've tried with the dumpsys memoryinfo and it says I have the same
that is reported in running services.
It seems you are right and that the memory is used in the native part:
  Native  Dalvik
allocated:18259 4659  N/A22918

But how can I get some detail of where is used the native memory.
Because with only the number I haven't any clue.

And also, if the native memory isn't displayed in the HEAD DUMP, it is
really useful??

Cheers,

On Jan 23, 10:00 pm, Dianne Hackborn hack...@android.com wrote:
 You can use adb shell dumpsys memoryinfo to see more details information
 about app memory usage.

 Note that Running Services (especially starting with Gingerbread) is showing
 the aggregate of your process and any processes you are causing to keep
 around.  Look at the details to see if there are other processes involved,
 and it should say why they are needed.

 Or it could just be that you have allocations elsewhere -- for example I
 think DDMS only shows the Java heap in its main view.  If you have a lot of
 native allocations (bitmaps, web view, etc) then they may not show up there.









 On Sun, Jan 23, 2011 at 12:16 PM, Joan Pujol joanpu...@gmail.com wrote:
  I've seen that my background service is allocating 25Mbs according to
  the Running Services android window. As it is a lot of memory that I
  think I don't use I looked to ddms and also made a head dump of my
  process and then the memory usage is only 2.9Mb

  What's is the real memory usage? If it is the ddms one is there any
  way to let running services give the correct usage? Because I'm afraid
  that if some user look at the running services it will say that the
  application is wasting a lot of memory.

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  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
  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: How to stream video to android device over HTTP.

2011-01-23 Thread Thierry Legras
After digging here and there for some times...  It turns out that it is
completly possible to stream video over HTTP using MP4 muxing on Android, it
is just that VLC software can't do that. So it seems there is no universal
video streaming solution over 3G network with VLC as server and Android
device as client :(

Summary:

Flash Video/HTTP: compatible with VLC, compatible with 3G network, not
compatible with all android device
MP4/HTTP: not compatible with VLC, OK with 3G network, OK with all android
device
MP4/RTSP: OK with VLC, not compatible with all 3G network, OK with all
android device
Sound only/HTTP: compatible with VLC, compatible with 3G network, compatible
with all android device

Thierry.


2010/12/20 Thierry Legras tleg...@gmail.com

 Hi,

 I would like to stream video files to Android device, and intend to
 integrate playback in my application.

 I first tried to use flash video streaming, which works pretty nice on my
 HTC Hero which integrated flash player, but now on Floyo ROM it does not
 work any more. I guess HTC player is more complete than froyo 2.2 flash
 support.

 Then I tried to stream with VLC software using RTSP and it appears to work
 only with WiFi. On 3G, I see on the streaming PC that the stream is sent,
 but nothing is displayed on the Android device, whereas it works on WiFi.
 I found this very interesting page from VLC stream  convert developper
 which seems to show that this method is hazardous. Indeed the proposed test
 does not work at all on my device/operator.
 http://traveldevel.com/vlc-stream-convert/streaming-over-3g

 Finally I am trying to stream over HTTP. I made it work (WiFi AND 3G) for
 audio stream only, but when I try to stream audio+video, it does not work at
 all (WiFi nor 3G). Of course I set the bitrate and screen size to low so it
 is supposed to work at least in WiFi. I tried several combination
 codec/muxer with no luck.

 So anyone knows if it is ever possible to stream video over HTTP? if yes,
 any idea which codec/muxer is supposed to work?

 Or at least what is the most universal and/or recommanded way to stream
 video to android device??

 Thanks for any help,

 --
 Thierry.




-- 
Thierry.

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

2011-01-23 Thread Dianne Hackborn
If you aren't using WebView, this is most likely bitmaps.  I would suggest
looking in the dalvik heap info to see what bitmaps are being held.
 Unfortunately bitmap memory is not currently part of the Dalvik heap, so it
can be a little hard to track down.

On Sun, Jan 23, 2011 at 2:19 PM, Joan Pujol joanpu...@gmail.com wrote:

 Thanks Dianne,

 I've tried with the dumpsys memoryinfo and it says I have the same
 that is reported in running services.
 It seems you are right and that the memory is used in the native part:
  Native  Dalvik
 allocated:18259 4659  N/A22918

 But how can I get some detail of where is used the native memory.
 Because with only the number I haven't any clue.

 And also, if the native memory isn't displayed in the HEAD DUMP, it is
 really useful??

 Cheers,

 On Jan 23, 10:00 pm, Dianne Hackborn hack...@android.com wrote:
  You can use adb shell dumpsys memoryinfo to see more details
 information
  about app memory usage.
 
  Note that Running Services (especially starting with Gingerbread) is
 showing
  the aggregate of your process and any processes you are causing to keep
  around.  Look at the details to see if there are other processes
 involved,
  and it should say why they are needed.
 
  Or it could just be that you have allocations elsewhere -- for example I
  think DDMS only shows the Java heap in its main view.  If you have a lot
 of
  native allocations (bitmaps, web view, etc) then they may not show up
 there.
 
 
 
 
 
 
 
 
 
  On Sun, Jan 23, 2011 at 12:16 PM, Joan Pujol joanpu...@gmail.com
 wrote:
   I've seen that my background service is allocating 25Mbs according to
   the Running Services android window. As it is a lot of memory that I
   think I don't use I looked to ddms and also made a head dump of my
   process and then the memory usage is only 2.9Mb
 
   What's is the real memory usage? If it is the ddms one is there any
   way to let running services give the correct usage? Because I'm afraid
   that if some user look at the running services it will say that the
   application is wasting a lot of memory.
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   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.comandroid-developers%2Bunsubs
 cr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see
 and
  answer them.

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

2011-01-23 Thread H
I wonder now if maybe adding custom variables is not enough to trigger the 
dispatch... maybe it actually requires pageviews or events... however if 
that is the case, I'd consider it a bug.

Hi Brill. From what I could glean from the docs, custom vars are merely 
appended to a page view or click event. The custom vars do not trigger any 
data sent to analytics. The docs are unfortunately clear that custom vars 
accompany another request so I don't think you've found a bug, just a bad 
way of Google explaining what they are and how to use them.

However, I'm not impressed by the custom vars anyway. I did want to replace 
three click events my app used to do on startup that logged the phone 
model, the android release and the app release version. I swapped these into 
custom vars and although I can see the info coming out in the analytics, 
it's very hard to get the information out easily. You have to create a 
custom report for each combination of page event and specific custom 
variable. I want to be able to click on a page event and just see the custom 
vars that came in with it - but that requires more effort.

I'm thinking of moving over to Flurry as it looks like you can attach lots 
of information to an event which can be viewed for each individual event 
if need be.

HTH.

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

[android-developers] Exceptions in user libraries

2011-01-23 Thread Steve
Hi there,

I am developing for Android from Eclipse running on the Windows OS. As
I have multiple projects that share certain parts of code, I have made
said code into an Android library, and then reference said libraries
to the projects. I am doing this by using the 'Library' panel under
the 'Android' section (when you right click - Properties on a
project). The library projects have 'Is Library' ticked, and the main
projects add the library projects.

In terms of being able to build and run, this appears to work. However
I have run into two problems, one more serious than the other:

1. When I make a change to the source for a library, when I ask
Eclipse to run/debug it doesn't pick up the change. I have to instead
refresh (F5) the main project - this appears to correctly pull in
dependencies (incidentally, I also have to do this if I make a change
to native code using the NDK and rebuild the resulting .so file). Is
there a way to force these sorts of dependency checks to automatically
be taken into consideration when I debug run? I have got reasonably
used to refreshing when running, but it is somewhat easy to loose
track of what source file you are editing, and forgetting it is one in
a library that means a refresh is required. It can result in wasted
debug sessions when you are running unexpected code!

2. My more serious problem is: when an unhandled exception is thrown
in library code, it doesn't tell me about the exception in an easy
way. For example, today I had an exception raised, and it reported to
me that it was coming from the GLThread.run method, from
GLSurfaceView.java - so I went through the various hoops for getting
the source code for Android onto my PC, so I could view
GLSurfaceView.java, and saw the exception was coming from
'guardedRun', which in turn was calling 'onDrawFrame', which in turn
called out to my native render + update function (using the NDK),
which in turn called back into my Java code to load some music, and
*that* code then went onto attempt to access an array with an invalid
index. None of this was shown in the callstack (only GLThread.run
appeared there), instead I had to make my own version of GLSurfaceView
that had some try/catch statements that caught the exception, and gave
me a callstack of where the problem lies by using e.printStackTrace().
Once I had the callstack, I was able to fix up the offending code. I
don't remember having this problem before I made my code into a
library - I thought previously exceptions were getting caught much
earlier on. I am simply not remembering correctly? Or is there some
limitation when using libraries? If I am not remembering correctly,
clearly I just need to wrap my Java code that is being called from my
native code with try/catch/print exception blocks so I can avoid this
problem again.

I look forward to your responses,

Steve

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


[android-developers] custom widgets in animation

2011-01-23 Thread sunny
Hi

I am struggling trying to render to custom widget as part of ViewFlipper.
when I try to access my widget from the layout file, it gives me a null
pointer exception. However putting them all into the java code is not very
clean. I am wondering if someone can share few example on how render the
ViewFlipper that would flip between two FrameLayout both identitcal
containing a custom widget .

Also, even with the ViewFlipper, I am unable to access the ViewFlipper
object from resource file. It gives me a null pointer exception. Two frame
layouts stored a resource files as frame1 and frame2.  all the viewFlipper
does is to flip between two views.



//main.xml file


?xml version=*1.0* encoding=*utf-8*?

LinearLayout xmlns:android=*http://schemas.android.com/apk/res/android;
*

android:layout_width=*fill_parent
*

android:layout_height=*fill_parent* 

ViewFlipper

android:id=*@+id/flipper
*

android:layout_width=*fill_parent
*

android:layout_height=*fill_parent* android:layout_marginBottom=*20dp*

include android:id=*@+id/first* layout=*@layout/first_view* /

include android:id=*@+id/second* layout=*@layout/second_view* /

/ViewFlipper

/LinearLayout



//code...

setContentView(R.layout.*main*);

ViewFlipper *vp* = (ViewFlipper)this.findViewById(R.id.flipper);

/the above gives me error..first view and second view contains custom
widget.



//first view..

?xml version=*1.0* encoding=*utf-8*?

FrameLayout

xmlns:android=*http://schemas.android.com/apk/res/android;
*

android:layout_width=*match_parent
*

android:layout_height=*match_parent
*

android:id=*@+id/main_layout
*



Button

android:id=*@+id/Button01*

android:layout_width=*wrap_content*

android:layout_height=*wrap_content* android:paddingBottom=*5dp*

/Button

/FrameLayout

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

2011-01-23 Thread DanH
That sounds like a problem related to native methods (or, more likely,
a feechur).  When the exception percolated to the native method
boundary it was converted into a return code.  Some systems do this
more elegantly than others.

On Jan 23, 7:05 pm, Steve rockthesm...@gmail.com wrote:
 Hi there,

 I am developing for Android from Eclipse running on the Windows OS. As
 I have multiple projects that share certain parts of code, I have made
 said code into an Android library, and then reference said libraries
 to the projects. I am doing this by using the 'Library' panel under
 the 'Android' section (when you right click - Properties on a
 project). The library projects have 'Is Library' ticked, and the main
 projects add the library projects.

 In terms of being able to build and run, this appears to work. However
 I have run into two problems, one more serious than the other:

 1. When I make a change to the source for a library, when I ask
 Eclipse to run/debug it doesn't pick up the change. I have to instead
 refresh (F5) the main project - this appears to correctly pull in
 dependencies (incidentally, I also have to do this if I make a change
 to native code using the NDK and rebuild the resulting .so file). Is
 there a way to force these sorts of dependency checks to automatically
 be taken into consideration when I debug run? I have got reasonably
 used to refreshing when running, but it is somewhat easy to loose
 track of what source file you are editing, and forgetting it is one in
 a library that means a refresh is required. It can result in wasted
 debug sessions when you are running unexpected code!

 2. My more serious problem is: when an unhandled exception is thrown
 in library code, it doesn't tell me about the exception in an easy
 way. For example, today I had an exception raised, and it reported to
 me that it was coming from the GLThread.run method, from
 GLSurfaceView.java - so I went through the various hoops for getting
 the source code for Android onto my PC, so I could view
 GLSurfaceView.java, and saw the exception was coming from
 'guardedRun', which in turn was calling 'onDrawFrame', which in turn
 called out to my native render + update function (using the NDK),
 which in turn called back into my Java code to load some music, and
 *that* code then went onto attempt to access an array with an invalid
 index. None of this was shown in the callstack (only GLThread.run
 appeared there), instead I had to make my own version of GLSurfaceView
 that had some try/catch statements that caught the exception, and gave
 me a callstack of where the problem lies by using e.printStackTrace().
 Once I had the callstack, I was able to fix up the offending code. I
 don't remember having this problem before I made my code into a
 library - I thought previously exceptions were getting caught much
 earlier on. I am simply not remembering correctly? Or is there some
 limitation when using libraries? If I am not remembering correctly,
 clearly I just need to wrap my Java code that is being called from my
 native code with try/catch/print exception blocks so I can avoid this
 problem again.

 I look forward to your responses,

 Steve

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


[android-developers] Re: LVL and 2.3 Emulator

2011-01-23 Thread Paul
Same issue here.  I didn't see an existing error so I created a new on
in the bug list:  http://code.google.com/p/android/issues/detail?id=14252

On Jan 14, 12:35 am, CedarF cedric.dar...@gmail.com wrote:
 Still not works and no answer from Google?

 On 8 déc 2010, 03:58, Nick nick1...@gmail.com wrote:







  I have LVL working with my app and am able to test it with the 2.2
  Google API emulator. I updated to2.3and created a2.3Google API
  emulator. I signed in with you dev account on the emulator just like
  before, but now I am getting:

  12-07 21:42:57.879: INFO/LicenseChecker(760): Binding tolicensing
  service.
  12-07 21:42:57.899: WARN/ActivityManager(61): Unable to start service
  Intent { act=com.android.vending.licensing.ILicensingService }: not
  found
  12-07 21:42:57.899: ERROR/LicenseChecker(760): Could not bind to
  service.

  I haven't changed anything in the code and it still works on 2.2. I
  have read the2.3release docs and haven't found any documented
  changes to LVL? Obviously I don't have a real phone with2.3to test
  on :)

  Does2.3w/ Google API SDK support LVL?
  Any ideas?

  Thanks,
  Nick

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


[android-developers] Can I sign my app after it is built with platform

2011-01-23 Thread xeagle
Hi,

I read in SDK doc, Note that you can sign an .apk multiple times with
different keys.
I build my app with Android platform (not using SDK), and then sign
the result apk with my private certificate. I'd like know that whether
my apk contains right certificate. Is there any problem with my apk?
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: Pretty sure Google Analytics for Android not working

2011-01-23 Thread Brill Pappin
That would explain why I wasn't getting any data back.

I've already moved to Flurry though, so not going to switch back now :)

Yes, you can attach a lot of data to a Flurry event but i don't like how 
its tabulated. the params are buried a bit.
What I ended up doing was constructing my event string with 
the recurring values that would give me useful information.
That sounds a lot like what you would need to do with the GAnalytics library 
as well.

I did think Flurry was dead simply to use and I'm getting that data I was 
looking for.
So far it doesn't seem to be slowing down my users at all, so in general I'm 
happy enough.

What I recommend is that you pick some free app that you use for 
experimenting on (I tell my users that if i'm going to do any experimenting, 
i'm going to do it on the free version) and plug it in to see how you like 
it before switching everything over.

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

[android-developers] How to set a dynamic View size

2011-01-23 Thread Brill Pappin
Ok, I'm working on a custom view and having trouble with setting its size so 
it scales properly across devices.

In particular i want its fixed height to be relative to its width (of 
match_parent).

Something like this sudo code:

   View myview = new View(..);

myview.setLayoutParams(new LayoutParams(

  LayoutParams.MATCH_PARENT, (MATCH_PARENT / 4) * 3));


The goal would be to make the component height be 3/4's of the width.


This doesn't have to be done from outside. i.e. it could be done from inside 
the view, but I'm unsure what I need to override inside my 
view implementation to set the height. Set it too early and i may not yet 
have my width, set it to late and I may just end up on a resize race loop :)


So, my question is, what is the proper way to make a View dynamically sized 
at runtime in at least one of the dimensions?


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

[android-developers] Re: managing the apps in Android market

2011-01-23 Thread Brill Pappin
We have the same issue.

I actually set up a special account that is tied to the Company rather than 
an individual and using the company credit card.
Unfortunately you can't move your apps around, so hopefully you haven't 
already published :)

Our team is smaller, but for your team I think you should designate two 
people that can pair up to publish. If you have people specifically for QA, 
it would be those people who have the right to publish (as its their goal 
and responsibility to make sure the product works right).

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

[android-developers] Edit Bitmap Pixels in Native Code?

2011-01-23 Thread John Oliver
I've been able to edit bitmaps in the NDK with Bitmap_lockPixels(),
but that function only works on systems with 2.2 and above.

I've been trying desperately to get other solutions working for 2.1
and lower systems, but nothing has worked. I tried passing an
IntBuffer, but any attempts to edit the individual color integers
result in a crash (memory fault).

Can someone post a simple code example that can extract the ARGB
values for editing from a bitmap in the NDK?

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

2011-01-23 Thread Zsolt Vasvari
I've found the Russian users the most demanding, not that there is
really anything really wrong with that, it's just you really have to
earn your 5 stars with some of the Russian guys.

I mean I had one guy start out with 2-stars on my app and slowely
worked his way up to 5 as I added some of his requests.  I guess it's
a viable strategy to get the product features you want...

On Jan 23, 10:46 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Getting a little futher OT - I sometimes get comments from users of custom
 firmware, in fact, at this point, issues are typically caused by
 Frankenstein-like firmware (kernel from here, apps from there, WiFi and
 radio drivers extracted from standard firmware, well, you get the idea).

 I would really love to see a way to respond to comments to address this.

 And something good - recently someone posted an ignorant 1-star comment for
 my app, that was full of swear words (in Russian). After a few days, the
 comment disappeared - so it looks Google has an algorithm that searches for
 certain words in comments and removes them.

 -- Kostya

 2011/1/23 Jonas Petersson jonas.peters...@xms.se



  On 01/23/2011 03:08 PM, kernelpanic wrote:

  thanks - I found several other sites that disagree with the
  manufacturer's site and state 320x480 as well.

  The app was tested and works fine (according to a few other users) on
  a Samsung Transform which is 320x455, so not sure why the claim that
  it doesn't work.

  The person never bothered to contact me directly or ask for a refund,
  so it may just be someone that wanted pay so they could vote 1 star,
  who knows.

  Getting somewhat OT here, but I wouldn't be surprised if it is in fact
  someone with a competing product that will flat out spread lies. I've seen
  such things in the past: someone kept updating a comment (about once a week)
  which claimed that my (free) phone number lookup app had deleted everything
  in his phonebook - which is technically absurd since the only write
  operation performed is an add and even if it was true, why would he then
  keep the app installed for several months to update that comment? Also, it's
  not like it is hard to send me an email so that I could look into that claim
  if it had any truth at all in it.

  I'm afraid it's a dog-eat-dog world out there for some people - very sad.
  Having any way at all to respond to Market comments would be excellent...

                         Best / Jonas

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  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
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en- Hide quoted text -

 - Show quoted text -

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


[android-developers] Re: supports-screens question

2011-01-23 Thread Zsolt Vasvari
On Jan 23, 10:46 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Getting a little futher OT - I sometimes get comments from users of custom
 firmware, in fact, at this point, issues are typically caused by
 Frankenstein-like firmware (kernel from here, apps from there, WiFi and
 radio drivers extracted from standard firmware, well, you get the idea).

I can attest to this also.  I had a user with an alpha Cyanogen
firmware that even crashed when creating the private database folder
(whichi is done by SQLite).  I spent hours debugging his stuff and
then finally he updated his FW and it started working.  So now every
time I get a weird problem like that, my first question is if they are
using a custom ROM.

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


[android-developers] Re: Can I sign my app after it is built with platform

2011-01-23 Thread FrankG
IMHO this is out of scope for this group, go to android-platform.

On 24 Jan., 04:57, xeagle xeagle...@gmail.com wrote:
 Hi,

 I read in SDK doc, Note that you can sign an .apk multiple times with
 different keys.
 I build my app with Android platform (not using SDK), and then sign
 the result apk with my private certificate. I'd like know that whether
 my apk contains right certificate. Is there any problem with my apk?
 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] How to set a dynamic View size

2011-01-23 Thread Kostya Vasilyev

Brill,

Views specify their preferred size by overriding onMeasure.

You've got to deal with special values representing wrap_content and 
fill_parent (that's the MeasureSpec stuff):


Here is an example, it's a view that's placed inside a ScrollView and 
makes itself tall, even in landscape orientation:


@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
if (heightMeasureSpec != 0) {
int sizeWidth = MeasureSpec.getSize(widthMeasureSpec);
int sizeHeight = MeasureSpec.getSize(heightMeasureSpec);

if (sizeHeight  sizeWidth) {
sizeHeight = sizeWidth * 3 / 2;

heightMeasureSpec = MeasureSpec.makeMeasureSpec(MeasureSpec
.getMode(heightMeasureSpec), sizeHeight);
}
}

super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}

-- Kostya

24.01.2011 7:45, Brill Pappin ?:
Ok, I'm working on a custom view and having trouble with setting its 
size so it scales properly across devices.


In particular i want its fixed height to be relative to its width (of 
match_parent).


Something like this sudo code:

View myview = new View(..);

myview.setLayoutParams(new LayoutParams(

LayoutParams.MATCH_PARENT, (MATCH_PARENT / 4) * 3));


The goal would be to make the component height be 3/4's of the width.


This doesn't have to be done from outside. i.e. it could be done from 
inside the view, but I'm unsure what I need to override inside my 
view implementation to set the height. Set it too early and i may not 
yet have my width, set it to late and I may just end up on a resize 
race loop :)



So, my question is, what is the proper way to make a 
View dynamically sized at runtime in at least one of the dimensions?



- 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.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] Re: supports-screens question

2011-01-23 Thread Jonas Petersson

On 01/24/2011 08:31 AM, Zsolt Vasvari wrote:

On Jan 23, 10:46 pm, Kostya Vasilyevkmans...@gmail.com  wrote:

Getting a little futher OT - I sometimes get comments from users of custom
firmware, in fact, at this point, issues are typically caused by
Frankenstein-like firmware (kernel from here, apps from there, WiFi and
radio drivers extracted from standard firmware, well, you get the idea).


I can attest to this also.  I had a user with an alpha Cyanogen
firmware that even crashed when creating the private database folder
(whichi is done by SQLite).  I spent hours debugging his stuff and
then finally he updated his FW and it started working.  So now every
time I get a weird problem like that, my first question is if they are
using a custom ROM.


Been there too. Camera not returning images, Barcode scanner going nuts, 
etc. When I see something wierd I typically ask then to download my 
help-page - the http headers will often (but not always) hint when you 
have the Frankenstein syndrome.


I've also seen what appears to be developer boards being used with my 
Market-only apps - obviously stolen (but then again, they are free 
soo...). Those beasts are mighty weird it seems. IP addresses in 
Russia/Asia BTW.


Best / Jonas

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