Re: [android-developers] Finding Specific Installed Applications at Run Time

2011-02-25 Thread Marcin Orlowski
On 25 February 2011 08:44, argongold argongol...@gmail.com wrote:

 Is there a better way , which is not  language dependent to get the
 specific applications . I haven't tried using the full package name.

Package name is better but see the below note.

 Do you have better suggestion for it?

Let user pick up which application is i.e. Calendar one on their
device. There's so many replacements around and poeople are really
using them so you are quite not able to know them all. Your test will
fail for a group users no matter of how you test its presence or you
detect the wrong one than user really uses.

-- 
Regards,
Marcin

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

2011-02-25 Thread Dianne Hackborn
Basically you can't do this in a way that will consistently work.

On Thu, Feb 24, 2011 at 11:44 PM, argongold argongol...@gmail.com wrote:

 Hi,

 I am working on an application, for which I have to display icons of
 specific applications such as Email , Browser and Alarm Clock .
 Currently I have defined a String Array with the Title names of these
 applications as shown below.

  private final String[] firstAppNames = new String[] {
 Phone,
 Messaging,
 Contacts,
 Browser,
 Email,
 Music,
 Camera,
 Gallery,
 Alarm Clock,
 Settings
 };

 At run time I get a full list of installed application on the device
 and compare the Title of each installed application with strings
 defined in string array above and if the result of comparison is true
 then I collect the icon information for display from corresponding
 installed application.

 This works fine as long as device is using English language. But when
 the device's Language is set to other language such as Chinese  the
 run time title string comparison fails for all the strings defined
 above in string array.

 Is there a better way , which is not  language dependent to get the
 specific applications . I haven't tried using the full package name.

 Do you have better suggestion for it?

 Thanks in advance
 argongold

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




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

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

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

Re: [android-developers] Re: Activity without UI

2011-02-25 Thread Dianne Hackborn
In activity that doesn't UI should finish itself by the time it returns from
onResume().  Leaving an activity running without UI will result in various
kinds of undesirable behavior.  Basically they should only be used to
immediately return a result, or immediately launch another activity.

On Thu, Feb 24, 2011 at 10:35 PM, Justin Anderson magouyaw...@gmail.comwrote:

 There are useful cases to having an Activity without a UI... I have two
 apps on the Android Market and both of them have an activity without a UI.
 In my case the activity does some processing to determine another activity
 to be launched.

 But in any case, the occurrence of it is common enough that Google provided
 a custom theme you can use for activities that don't display a UI:
 http://developer.android.com/reference/android/R.style.html#Theme_NoDisplay

 However, in my experience I get the best results using this theme:

 http://developer.android.com/reference/android/R.style.html#Theme_Translucent_NoTitleBar


 On Thu, Feb 24, 2011 at 5:56 AM, Dudero sinfanh...@googlemail.com wrote:

 thank you marcin!

 On 24 Feb., 12:37, Marcin Orlowski webnet.andr...@gmail.com wrote:
  On 24 February 2011 11:53, Dudero sinfanh...@googlemail.com wrote:
 
   But Dan Morrill sad on the Google IO 2008 presentation that an
   Activity is an encapsulation of a particular operation and
   optionally associated with a window (UI)
 
  People talk various things and it shall rarely be taken literally
  especially when someone is taking about technical things using
  marketing buzzwords :)
 
   So my question is, which particular operations Mr. Morrill meant that
   make more sense to use for this an Activity rather than a Service?
 
  You won't use service if you want user interaction and you won't use
  activity if you need background processing.
  Service is designed for different tasks than Activity so i am afraid
  this is quite academic question which leads nowhere.
 
  --
  Regards,
  Marcin

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


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




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

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

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

Re: [android-developers] phone keypad intent?

2011-02-25 Thread Marcin Orlowski
On 23 February 2011 17:38, Kirk A kirk...@gmail.com wrote:
 In a fashion similar to IMAGE_CAPTURE returning an image from the
 camera, I would like to discover an intent to utilize the phone
 application's pleasant keypad and *return* the number entered (without
 dialing). I haven't found such an intent yet... It seems that this
 would be a  natural fit for the factory phone app.

There's no intent for every action needed. Some need to be implemented
by yourself. This one too. You may want to try to use Phone's source:
http://android.git.kernel.org/?p=platform/packages/apps/Phone.git;a=tree

-- 
Regards,
Marcin

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Honeycomb + landscape + Mac = will not stay in landscape

2011-02-25 Thread Marcin Orlowski
On 23 February 2011 19:07, Stacy Young styoung.li...@gmail.com wrote:
 Hmm first post didn't hit the list ...

It did. But this group sucks in terms of how it works.

-- 
Regards,
Marcin

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

2011-02-25 Thread oldskool73


On Feb 25, 2:59 am, TreKing treking...@gmail.com wrote:
 On Thu, Feb 24, 2011 at 8:56 PM, SEWilco sewi...@gmail.com wrote:
  Can my app access GeoPoint data and change it?

 What data?


Well seeing as a geopoint only contains a latlong what data do you
think?

  I'm not finding a way to access data which has been added to a Google Maps
  Overlay.

 What data?

Why be a dick, if you cant help him just move on to the next thread.


    I only see ways to trigger actions on existing data, but not access the
  data for the points.

not as far as I'm aware, but I dont see why you'd need to, the map is
just a display, you must have created the geopoints and added them to
the map so surely you already have this info?

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

2011-02-25 Thread argongold
Hi,

I am working on an application, for which I have to display icons of
specific applications such as Email , Browser and Alarm Clock .
Currently I have defined a String Array with the Title names of these
applications as shown below.

 private final String[] firstAppNames = new String[] {
 Phone,
 Messaging,
 Contacts,
 Browser,
 Email,
 Music,
 Camera,
 Gallery,
 Alarm Clock,
 Settings
 };

At run time I get a full list of installed application on the device
and compare the Title of each installed application with strings
defined in string array above and if the result of comparison is true
then I collect the icon information for display from corresponding
installed application.

This works fine as long as device is using English language. But when
the device's Language is set to other language such as Chinese  the
run time title string comparison fails for all the strings defined
above in string array.

Is there a better way , which is not  language dependent to get the
specific applications . I haven't tried using the full package name.

Do you have better suggestion for it?

Thanks in advance
argongold

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


Re: [android-developers] Re: Why I get wrong hardware screen resolution.

2011-02-25 Thread xhui
It works, thanks very much!
Is this a SDK bug in old version? It's quite strange.

2011/2/25 Kostya Vasilyev kmans...@gmail.com

 Set minSdkVersion to 4 or greater in the Manifest.
 25.02.2011 10:31 пользователь xhui shirosh...@gmail.com написал:

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

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


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

[android-developers] Re: Eclipse 3.6.1 ADT Plugin install stuck half way

2011-02-25 Thread snpe
I suppose that you have a problem with some Eclipse mirrors. Try to
start with Eclipse IDE for Java EE Developers (http://www.eclipse.org/
downloads/) instead of Eclipse classic.
Eclipse IDE for Java EE Developers includes all ADT requirements and
you wouldn't access to mirrors.

Peco

On Feb 24, 3:08 pm, slugger teu...@gmail.com wrote:
 I forgot to mention I don't think it is a firewall/proxy issue, because I
 can go to my internet browser, plug in the URL that is listed when it gets
 stuck, and it will download the XML into my internet browser just fine.

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


[android-developers] Calculating list view item height

2011-02-25 Thread Manish Garg
Hi,

I want to set listview height in such a way that it doesn't display
scrollbar. for it i am trying to find out listview items height, sum
all of the list view items and set them as the height of the listView.

My list is like accordian. It will be visible when i will click on a
button and will go when clicked at second time.

I have put my code to set height in button click listener.

But i dont know why first time when i try to calculate listview
height, everytime list item size is coming as 191. from second time
onward it caluclates it correctly.

I have keep my code in button listener because it wasn't giving me
correct height. when tried in btn listener, it gives wrong height at
first time and after that correct.

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

2011-02-25 Thread giovanni
I'm having the same 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

Re: [android-developers] Database Issue

2011-02-25 Thread Brad Stintson
Yes. But none dealing with multiple tables was provided.

On Fri, Feb 25, 2011 at 11:56 AM, Justin Anderson magouyaw...@gmail.comwrote:

 Have you looked at any of the documentation or samples for databases in
 Android?

 On Thu, Feb 24, 2011 at 8:31 AM, Brad Stintson geek.bin...@gmail.comwrote:

 Hi,
 I am developing an android application whose SQLite database comprises of
 around 5 tables and these tables would have entries prior to being rendered
 and would even be updated once deployed. How to achieve such a database?

 regards,
 Brad

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


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

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

[android-developers] Re: adding search option

2011-02-25 Thread Indicator Veritatis
Please take the hint. No one is going to do your homework for you. And
speaking of homework, in addition to everything Treking has
recommended to you, you really need to read: 
http://www.catb.org/~esr/faqs/smart-questions.html

On Feb 24, 7:02 pm, nischal nischal.gm...@gmail.com wrote:
 i have successfully displayed google map in my android application.

 now i wish to add search box to that application

 so that user can enter any place in that box and map has to display
 that location

 how can i achieve this ?

 can anyone plz help me.

 if you have the code plz post it .

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


[android-developers] Re: adding search option

2011-02-25 Thread Indicator Veritatis
What happened to let me google that for you??

On Feb 24, 7:59 pm, TreKing treking...@gmail.com wrote:
 On Thu, Feb 24, 2011 at 9:02 PM, nischal nischal.gm...@gmail.com wrote:
  i have successfully displayed google map in my android application.

  now i wish to add search box to that application

  so that user can enter any place in that box and map has to display
  that location

  how can i achieve this ?

  can anyone plz help me.

  if you have the code plz post it .

 Dude, 
 WTFhttp://groups.google.com/group/android-developers/browse_thread/threa...

 --- 
 --
 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] BluetoothSettings Force close problem

2011-02-25 Thread Suresh Pal
Hi Guys,

Due to some issue, I am getting some exceptions which force closes
BluetoothSettings screen.
In the log dump I could not find any exceptions but the following
stack trace is present there:




DALVIK THREADS:
main prio=5 tid=1 NATIVE
  | group=main sCount=1 dsCount=0 s=N obj=0x400208b8 self=0xcde0
  | sysTid=563 nice=0 sched=0/0 cgrp=unknown handle=-1345026000
  at android.os.BinderProxy.transact(Native Method)
  at android.bluetooth.IBluetooth$Stub
$Proxy.getBondState(IBluetooth.java:789)
  at
android.bluetooth.BluetoothDevice.getBondState(BluetoothDevice.java:
541)
  at
com.android.settings.bluetooth.CachedBluetoothDevice.getBondState(CachedBluetoothDevice.java:
770)
  at
com.android.settings.bluetooth.CachedBluetoothDevice.compareTo(CachedBluetoothDevice.java:
1357)
  at
com.android.settings.bluetooth.BluetoothDevicePreference.compareTo(BluetoothDevicePreference.java:
180)
  at
com.android.settings.bluetooth.BluetoothDevicePreference.compareTo(BluetoothDevicePreference.java:
40)
  at java.util.Collections.binarySearch(Collections.java:1513)
  at
android.preference.PreferenceGroup.addPreference(PreferenceGroup.java:
143)
  at
com.android.settings.bluetooth.BluetoothSettings.createDevicePreference(BluetoothSettings.java:
758)
  at
com.android.settings.bluetooth.BluetoothSettings.onDeviceAdded(BluetoothSettings.java:
667)
  at
com.android.settings.bluetooth.BluetoothSettings.addDevices(BluetoothSettings.java:
533)
  at
com.android.settings.bluetooth.BluetoothSettings.onResume(BluetoothSettings.java:
458)
  at
android.app.Instrumentation.callActivityOnResume(Instrumentation.java:
1149)
  at android.app.Activity.performResume(Activity.java:3823)
  at
android.app.ActivityThread.performResumeActivity(ActivityThread.java:
3124)
  at
android.app.ActivityThread.handleResumeActivity(ActivityThread.java:
3149)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
2064)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:123)
  at android.app.ActivityThread.main(ActivityThread.java:4633)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:521)
  at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:858)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
  at dalvik.system.NativeStart.main(Native Method)



I have not any idea about Binder concepts. So I could not find out
exact reason for the issue.
Since I need to resolve this issue urgently, I have delved more and
find out, the exception is in this method:

frameworks\base\core\java\android\bluetooth\BluetoothDevice.java -

public int getBondState() {
try {
return sService.getBondState(mAddress);
} catch (RemoteException e) {Log.e(TAG, , e);}
return BOND_NONE;
  }

Here this method catches the remote exception, but in catch statement
just prints the exception, but does not return anything.
I understand if I return something from catch statement then this
problem will be solved.

But the point is what to return at that statement?
I understand this class is used at many places, and returning anything
will impact other aspects also.

So please suggest me what should I return from here.
If you have any other solution for this problem, please suggest that
also.

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


[android-developers] Re: SDK 11 is the slowest yet

2011-02-25 Thread Indicator Veritatis
H-m-m-m. Interesting point. Emulating a 1Ghz CPU on a 2Ghz CPU is
bound to be slow. But given that, I would be still be happy if the
emulator were only 1/25th the speed of the emulated system (I have
dealt with worse). It is still, after all, faster than waiting for a
developer version;)

On Feb 24, 8:33 pm, Zsolt Vasvari zvasv...@gmail.com wrote:
 I second this.  The emulator is unusable for Xoom and I wouldn't hold
 ny breath for any significant improvements in the speed of the
 emulated machine, no matter what Romain is saying.  Even if they
 manage to double the speed of the emulator, it would still be pretty
 much unusable.  You will never be able to satisfactorily emulate a
 1GHz processor on a 2GHz processor of a completely different
 architecture.

 What Google should do is sell a developer version of Xoom, like they
 do with Nexus One, perhaphs a 16GB WI-FI only version.  Until then, I
 doubt too many indy devs would make a Honeycomb version of their apps.

 In the last 6 months, Google has made thousands of dollars off my app
 -- I think it would be in their best interest to help successful
 developers get their hands of their latest platform.

 On Feb 25, 9:25 am, Arron arro...@gmail.com wrote:







  I bought the Xoom cuz I was unable to program and test my code
  effectively on the emulator.  I wish we can get one for a discounted
  rate or one that's not tied to Verizon for developers.

  On Feb 24, 4:09 pm, Indicator Veritatis mej1...@yahoo.com wrote:

   Nice though that fix would be, to date, there has been a reasonable
   workaround for the emulator slowness: launch once at the beginning of
   your work session and don't kill it.

   As long as the emulator can be set back to a last-known-good-state,
   such a workaround is livable. What is not livable is ADT failing to
   return from a Clean operation. And since I find it really, really hard
   to believe that the cause of this problem is just String's own cockpit
   error, I will not be loading the latest SDK because of that report.

   I am sure lots of other people will be having a similar reaction.
   Google has got to respond by either explaining what String did wrong,
   or fixing the problem in the latest SDK release. That is clearly more
   important than fixing emulator slowness, which is sure to be a slow
   and major project.

   On Feb 24, 11:03 am, Romain Guy romain...@android.com wrote:

The problem is that the emulator is an emulator, not a simulator, nor 
does
it virtualize your computer's CPU. Tools like VMWare or VirtualBox 
achieve
great performance thanks to virtualization, apps in the guest OS run
directly on your hardware CPU. In the case of Android's emulator, a
completely different architecture (ARM) is emulated entirely in 
software. We
are aware of the pain caused by the emulator and we are thinking of 
ways to
fix it.

On Thu, Feb 24, 2011 at 10:58 AM, sblantipodi
perini.dav...@dpsoftware.orgwrote:

 I would like to have more respect about your work but the answer from
 Romain Guy doesn't respect our patience.

 This SDK is simply UNUSEFUL, google save your time if you need to
 write a simulator like this,
 no one can use it because is too slow also for a fart app, it's
 unusable.
 If you can't do a simulator that can run at an acceptable speed,
 simply save your time, don't do it.

 Romain Guy, simulator is slow because its a crappy product, if you can
 run native android 2.3 on a 600MHz qualcomm processor for mobile
 phone,
 you can run android simulator on an I7 3.8GHz with 4 core and 8
 threads.
 Today a modern CPU can simulate three PC OS with excellent performance
 at the same time, one modern CPU isn't able to simulate android.
 please, no kidding.

 On Feb 24, 7:19 pm, Reuben Scratton reuben.scrat...@gmail.com wrote:
  That does surprises me, considering the triangular tearing seen on 
  the
  Honeycomb emulator. I guess that was just framebuffer composition.

  Thanks for the clarification.

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

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

Note: please don't send private questions to me, as I don't have time to
provide private support.  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 

Re: [android-developers] Re: adding search option

2011-02-25 Thread Marcin Orlowski
On 25 February 2011 09:55, Indicator Veritatis mej1...@yahoo.com wrote:
 What happened to let me google that for you??

http://tinyurl.com/6fpm7st

-- 
Regards,
Marcin

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: what does WIN DEATH mean when running kill?

2011-02-25 Thread Kostya Vasilyev

Hiko,

As far as I can tell, it's just an information message. The process that 
manages windows notices that a window disappeared (with the killed 
process), and cleans its data structures.


Kind of like when a TCP/IP program notices that the connection is lost 
and cleans up.


-- Kostya

25.02.2011 5:35, Hiko пишет:

Dear Kostya,

Thank you very much for your information.

I have additional question.

so, this output log does not mean ERROR, just a
information(notification), does it?

Best Regards,

On 2月24日, 午後9:30, Kostya Vasilyevkmans...@gmail.com  wrote:

It means the active UI window of the application was killed together
with the process.

-- Kostya

24.02.2011 14:12, Hiko пишет:


Hi,
I have one question concerning output logs.
When I run to kill the specified package with forceStopPackage(),
WIN DEATH is always output.
what does WIN DEATH mean?
Is WIN DEATH related with the behavior when the package is killed?
I am very sorry that it might be difficult for you to understand what
I want to explain my situation because I am poor at English...
Please answer for my question if you figure out.

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



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

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


[android-developers] Re: AVD disk performance problems

2011-02-25 Thread Linux777
I'm using AVD r10. But this problem reproduces on EVERY
computer where Android SDK is using.

It's because of error in QEMU, and this could be easily fixed. But in
AVD this problem is not fixed and it's not clear how to fix it.

Do you have this problem in your installation? If not - I do not
believe...

P.S.
Problem is serious and ought to be fixed as soon as possible!

I can reproduce problem in 32 and 64-bit Linux host PC. Just look at
hard disk indicator, it's sound, look at iotop command, which show
disk usage...

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

2011-02-25 Thread ThaMe90
Maybe a little side question: what are the available backends to use
on Windows?

On 24 feb, 11:03, ThaMe90 theprophes...@gmail.com wrote:
 Hello all, I wonder how to turn on the sound in the Android Emulator?
 I've 2 headsets connected to my pc, but I can't seem to get sound on
 either of them (One is connected through USB, the other through a
 3.5mm Jack). I've set the AVD I use to enable Audio Input  Output,
 and I have set the start-up option -audio winaudio. But I still
 can't hear anything...

 I am working with Eclipse, and I'm running Windows7 32bit OS.

 I've searched all over the internet, but all threads (as cryptic and
 short they may be) all address to this issue on Linux systems...
 Haven't been able to find anything on Windows systems though.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Reflection API:List all classes in a package that extend a specific super class

2011-02-25 Thread donV
Hi!

Did you ever solve this?  I desperately need to list all classes in a 
package.

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

2011-02-25 Thread Suresh Chandra Pal
Can you share that forum's link.

On Fri, Feb 25, 2011 at 6:34 PM, Zsolt Vasvari zvasv...@gmail.com wrote:


  So please suggest me what should I return from here.
  If you have any other solution for this problem, please suggest that
  also.

 I suggest you go to the forum and post where Android porting is
 discussed.  This forum is for SDK issues.

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




-- 

Best Wishes,



Suresh Pal



*Skype:   *suresh.pal

*Gtalk:*sapient.suresh

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

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

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

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

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

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

[android-developers] Re: BluetoothSettings Force close problem

2011-02-25 Thread Zsolt Vasvari

 So please suggest me what should I return from here.
 If you have any other solution for this problem, please suggest that
 also.

I suggest you go to the forum and post where Android porting is
discussed.  This forum is for SDK issues.

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


[android-developers] Re: java.lang.NullPointerException encountered while running Android Pre Compiler.

2011-02-25 Thread Ajay

!ENTRY org.eclipse.core.resources 4 2 2011-02-25 15:07:29.445
!MESSAGE Problems occurred when invoking code from plug-in:
org.eclipse.core.resources.
!STACK 0
java.lang.NullPointerException
at
com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.build(PreCompilerBuilder.java:
198)
at org.eclipse.core.internal.events.BuildManager
$2.run(BuildManager.java:629)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
172)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
203)
at org.eclipse.core.internal.events.BuildManager
$1.run(BuildManager.java:255)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
258)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
220)
at
org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
362)
at org.eclipse.core.internal.resources.Project$1.run(Project.java:
545)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:
1975)
at
org.eclipse.core.internal.resources.Project.internalBuild(Project.java:
524)
at org.eclipse.core.internal.resources.Project.build(Project.java:
115)
at
org.eclipse.ui.actions.BuildAction.invokeOperation(BuildAction.java:
222)
at
org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:
162)
at org.eclipse.ui.actions.WorkspaceAction
$2.runInWorkspace(WorkspaceAction.java:483)
at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:
38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY org.eclipse.ui.ide 4 4 2011-02-25 15:07:39.406
!MESSAGE Problems occurred building the selected resources.
!SUBENTRY 1 com.android.ide.eclipse.adt 4 75 2011-02-25 15:07:39.406
!MESSAGE Errors running builder 'Android Pre Compiler' on project
'P2L'.
!STACK 0
java.lang.NullPointerException
at
com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.build(PreCompilerBuilder.java:
198)
at org.eclipse.core.internal.events.BuildManager
$2.run(BuildManager.java:629)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
172)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
203)
at org.eclipse.core.internal.events.BuildManager
$1.run(BuildManager.java:255)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
258)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
220)
at
org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
362)
at org.eclipse.core.internal.resources.Project$1.run(Project.java:
545)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:
1975)
at
org.eclipse.core.internal.resources.Project.internalBuild(Project.java:
524)
at org.eclipse.core.internal.resources.Project.build(Project.java:
115)
at
org.eclipse.ui.actions.BuildAction.invokeOperation(BuildAction.java:
222)
at
org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:
162)
at org.eclipse.ui.actions.WorkspaceAction
$2.runInWorkspace(WorkspaceAction.java:483)
at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:
38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

This errors came recently after eclipse update..
Roolback to previous version fails :(..

On Feb 25, 3:40 am, Xavier Ducrohet x...@android.com wrote:
 This is extremely strange.
 Can you send me the log of your workspace?









 On Wed, Feb 23, 2011 at 9:52 PM, Chopcsu st...@kilsby.com.au wrote:
  Hi All,

  I have just installed ADT 10 with SDK 3.0. Eclipse has been working
  ok, but now all of a sudden my project has broken down with eclipse
  either complaining there is something wrong with xml files where there
  is nothing wrong (tested on a non adt10 eclipse and works fine) or
  giving errors

  Errors running builder 'Android Pre Compiler' on project ''.
  java.lang.NullPointerException encountered while running Android Pre
  Compiler.

  Or giving errors

  Problems occurred when invoking code from plug-in:
  org.eclipse.core.resources.

  java.lang.NullPointerException
         at
  com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.buil 
  d(PreCompilerBuilder.java:
  198)
         at org.eclipse.core.internal.events.BuildManager
  $2.run(BuildManager.java:633)
         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
         

Re: [android-developers] Re: Reflection API:List all classes in a package that extend a specific super class

2011-02-25 Thread Kostya Vasilyev
What for? Perhaps there is another solution?
25.02.2011 12:38 пользователь donV don...@gmail.com написал:
 Hi!

 Did you ever solve this? I desperately need to list all classes in a
 package.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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: how can i develop a mobile ticketing application?

2011-02-25 Thread zeynel
you got it wrong.i didnt want source code or anything like this.i want
to know where i should start. is there any book,pdf,tutorial,anything
're referring source for these apps.i think i told wrong. i already
know that noone give this to me if they had it. :) thanks Albert
Einstein :)

On 25 Şubat, 07:51, TreKing treking...@gmail.com wrote:
 On Thu, Feb 24, 2011 at 1:35 PM, zeynel zeynelcos...@gmail.com wrote:
  hi,i' m jr android developer.i want to develop business applications for
  android like mobile ticketing,mobile commerce,mobile
  banking applications..how can i,is there any source for this...any help?

 Dude, seriously ... !?

 Why would code for a mobile banking or commerce application just be lying
 around?
 Why would anyone give this to you even if they had it?
 Why are you, as jr android developer, trying to make something of this
 scope?

 Man, sometimes I just don't understand the logic that goes into some of
 these posts ...

 -
 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: Reflection API:List all classes in a package that extend a specific super class

2011-02-25 Thread donV
Thank you for your reply!

Very possibly there is another solution.

The problem to be solved is that I want to run some test scripts stored as 
assets to test multiple activities.

The test scripts need access to the activity to be tested.  This is normally 
done by subclassing ActivityInstrumentationTestCase2, so my plan was to 
generate subclass of ActivityInstrumentationTestCase2 for each activity to 
be tested, and let this class scan the assets directory for related test 
scripts and run them.

Using junit.framework, I would like to define one TestCase per script, or 
multiple TestCase instances per script.  If the suite() method of the 
ActivityInstrumentationTestCase2 
subclass could scan the assets directory, I would not need to scan for 
classes.  Is this possible?  How can I scan assets in a static context?

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

[android-developers] Getting IllegalArgumentException exception when surface view get destroyed!!!

2011-02-25 Thread Pink
Hi,

   I have one surface view in one activity.

   I am using the surface of the srface view in my native code.

   But some times while moving out of the activity i am getting
IllegalArgumentException.

  By the time surface view is getting destroyed, SufaceViewHolder call
back is getting called.


  What needs to be done to prevent the exception?

  The logcat stack trace is as follows.

02-21 18:34:26.472 E/Surface (  941): surface (identity=234) is
invalid, err=-19 (No such device)
02-21 18:34:26.472 E/Surface (  941): queueBuffer (idx=0) failed (No
such device)
02-21 18:34:26.472 D/AndroidRuntime(  941): Shutting down VM
02-21 18:34:26.472 E/AndroidRuntime(  941): FATAL EXCEPTION: main
02-21 18:34:26.472 E/AndroidRuntime(  941):
java.lang.IllegalArgumentException
02-21 18:34:26.472 E/AndroidRuntime(  941): at
android.view.Surface.unlockCanvasAndPost(Native Method)
02-21 18:34:26.472 E/AndroidRuntime(  941): at
android.view.ViewRoot.draw(ViewRoot.java:1551)
02-21 18:34:26.472 E/AndroidRuntime(  941): at
android.view.ViewRoot.performTraversals(ViewRoot.java:1263)
02-21 18:34:26.472 E/AndroidRuntime(  941): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1865)
02-21 18:34:26.472 E/AndroidRuntime(  941): at
android.os.Handler.dispatchMessage(Handler.java:99)
02-21 18:34:26.472 E/AndroidRuntime(  941): at
android.os.Looper.loop(Looper.java:123)
02-21 18:34:26.472 E/AndroidRuntime(  941): at
android.app.ActivityThread.main(ActivityThread.java:3661)
02-21 18:34:26.472 E/AndroidRuntime(  941): at
java.lang.reflect.Method.invokeNative(Native Method)
02-21 18:34:26.472 E/AndroidRuntime(  941): at
java.lang.reflect.Method.invoke(Method.java:507)
02-21 18:34:26.472 E/AndroidRuntime(  941): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:842)
02-21 18:34:26.472 E/AndroidRuntime(  941): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
02-21 18:34:26.472 E/AndroidRuntime(  941): at
dalvik.system.NativeStart.main(Native Method)



Thanks in advance.

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


Re: [android-developers] Re: SQLite and Collate UNICODE

2011-02-25 Thread Philip Warner
That's kind of sad; my reading of the 'Collate UNICODE' stuff suggested
it was designed specifically to deal with this issue.

Is this a bug, or WAI?


On 25/02/2011 6:11 PM, Zsolt Vasvari wrote:
 If you want to do case insensirtive search you should perhaphs rewrite
 your statement as:

 select * from authors a where UPPER(a.family_name) = 'LE GUIN'
 Collate
 UNICODE

 That will be better, but it will work for only characters in the 0-255
 range.  I have the same issue in my app, with no workaround, for my
 Russian users where this doesn't work for Cyrillic text.




 On Feb 25, 9:55 am, Grunthos p...@rhyme.com.au wrote:
 Hi,

 In SQLite under Android 2.1 and 2.2 I have been using 'Collate
 UNICODE' to sort and compare values; for sorting it does what I expect
 -- it is case-insensitive, and handles the expanded character set
 well.

 But for comparisons, eg. f = 'something' where f is a text field, it
 seems to NOT do case-blind comparions.

 Specifically:

 On table authors(..., family_name text,...);

 I searched for

select * from authors a where a.family_name = 'Le Guin' Collate
 UNICODE

 and it returned 0 rows even though there was an entry with family_name
 = 'le Guin'.

 Am I missing something here? Should I be wrapping both sides of the
 '=' in a call to 'Upper()'. I thought that the UNICODE collator for
 SQLite was case-insensitive.

 If I do wrap both sides in calls to 'Upper()', am I correct in
 assuming indexes will not be used?

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

2011-02-25 Thread RyanMcNally
I've not much to add, but at any rate:

1) As has been noted, GC is the enemy. String manipulation, boxing/
unboxing, using most collections other than ArrayList,
Collections.sort(), Arrays.sort() - they all create garbage and you
simply cannot use them on a per-frame basis.
Happily the GC pauses are so noticeable that you'll quickly turn to
the (excellent) allocation tracking tools to root out the problem.

2) Everyone doing OpenGL work, and hence working with FloatBuffers,
should be aware of
http://code.google.com/p/android/issues/detail?id=11078

Ryan

On Feb 25, 7:04 am, oldskool73 oldskoo...@gmail.com wrote:
 It's good of you put some suggestions out there to help others, and
 I'm not trying to have a dig, but none of those tips have anything to
 do with opengl(es) specifically. If you really want some indepth
 opengles tips and insight you can't go far wrong with reading through
 the posts on the badlogic blog:
  http://www.badlogicgames.com/wordpress/

 RE 1- this depends rather on what you are making, I'm currently
 building a fast shooter and have specifically chosen not to do this,
 if a frame takes longer to render I'd prefer the game to slow down and
 still be playable than have the enemies suddenly 'jump' because the
 time elapsed is greater than average, your point 5 may help this
 though I guess.

 2  3 - agreed, the GC is not your friend (although its a lot better
 in gingerbread than previously), and surprisingly few people seem to
 know about or use some of the cool tools hidden in the ddms view.

 4's not really practical when testing real world situations, you can't
 ask your users to switch to airplane mode to use your app.

 sorry to be so pedantic :)

 A

 On Feb 24, 4:21 pm, Tom Cowan tttco...@googlemail.com wrote:







  I'm sure anybody who's used openGL will of come across a situation
  where the animation or movement isn't smooth so here are some tips in
  the hope of people posting some more.

  1. Make sure you animate/move using a timer to maintain a constant
  rate of movement regardless of processing speed. So,

  x = now
  draw 1st frame
  y = now
  movementFactor = y - x;
  draw 2nd frame
  repeat

  That sorts some problems.

  2. Stop the GC firing. If you're getting the gc firing message in the
  logcat whilst movement or animation is taking place your likely to be
  allocating ram. You can check this in ddms, goto the allocation
  tracker, hit start tracking then get allocation and you'll see what
  methods have been allocating ram.

  3. Stop allocations even if the GC isn't firing! This helped me a
  bundle, I was allocating a lot of Strings and once I sorted this out I
  found the frame rate to fluctuate less.
  4. Put the phone in airplane mode when doing performance testing and
  kill all tasks prior to running your app.

  5. (Not tried this one yet) Apparently you're eye is very good at
  seeing jerks in animations.movement so it's actually better to reduce
  your frame rate artificially as explained by Mario Zechner below,

  Average your delta times, it's the only way you can smooth
  things out. I use a window of 5 frames per second for which i sum up
  the delta times and divide by the number of frames.

  An example,
  15ms, 15ms, 33ms, 15ms, 15ms will give you an average delta time of
  18.6ms for frame 6. The 33ms will also influence the delta time of the
  next 4 frames after it. To avoid that effect you could use weighted
  averaging: frame delta times that are newer receive a higher weight
  (just an example, haven't boughtered using it)

  Does anyone have any other ideas concerning this topic?

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

2011-02-25 Thread focode
hi, I have to show neck-less view for my menu in android and on the
movement of finger from left to right it should move to left to right
and vice verse, to implement this i have used this tutorial http://
www.codeshogun.com/blog/2009/04/16/how-to-implement-swipe-action-in-android/
but the problem is the movement of  icons is in straight lines  path
not circular and also i m not able to show multiple icons in same
screen , i m only able to show one icon at a time .pls some one
help me

thanks and regards
focode

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

2011-02-25 Thread Marcin Orlowski
On 25 February 2011 10:56, zeynel zeynelcos...@gmail.com wrote:
 you got it wrong

read your post again then.

.i didnt want source code or anything like this.i want
 to know where i should start. is there any book,pdf,tutorial,anything
 're referring source for these apps.i think i told wrong. i already

like this: http://tinyurl.com/6ztvtlu ?

-- 
Regards,
Marcin

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] charset-problem?: some phonetic signs will not be displayed.

2011-02-25 Thread Ulrich Althöfer
I want to display some phonetic signs on the touchscreen-display.
Some signs are displayed succesfully, e.g.:
- [ә] = U+0259 or
- [œ] = U+00E6

But some signs are not displayed, e.g.:
- [ʃ] = U+0283 and
- [ɔ] = U+0254

The problem appear with the emulator as well as with the original
smartphone.
I copied the signs (with the clipboard) from the URL:
http://de.wikipedia.org/wiki/Liste_der_IPA-Zeichen

I also tried to substitute the signs with the Unicode character
sequence, e.g.:

myCanvas.drawText(\u0283, ...);

But it doesn't work too.

I tried to change the Eclipse-default-charset:
Eclipse 3.6.1 / Window / Preferences / Workspace / Default (CP1252)
to 'UTF16' but eclipse told me problems with assigning the 'R'-
Resources!

Please, what's the right way to solve the problem?

Greetings from Germany

Ulrich Althoefer

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: charset-problem?: some phonetic signs will not be displayed.

2011-02-25 Thread Alessandro Pellizzari
Il Fri, 25 Feb 2011 02:53:30 -0800, Ulrich Althöfer ha scritto:

 I want to display some phonetic signs on the touchscreen-display. Some
 signs are displayed succesfully, e.g.: - [ә] = U+0259 or
 - [œ] = U+00E6
 
 But some signs are not displayed, e.g.: - [ʃ] = U+0283 and
 - [ɔ] = U+0254
 
 The problem appear with the emulator as well as with the original
 smartphone.

Maybe they are simply missing from the font.
Download the droid fonts from the emulator image and inspect them to find 
what symbols are defined.

The one you are looking for is droid-common or something like that, not 
droid-sans or droid-serif.

Bye.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] AdapterView.OnItemSelectedListener.onItemSelected called with out of date position argument!

2011-02-25 Thread Thierry Legras
Hi,

I have a strange behavior in a very specific case and wonder if the issue
comes from my code or not.

I have a TabActivity A with 2 tabs:
- Tab 1 content is created as a view with a spinner in it
- Tab 2 content is an activity B.

I want at some point when Tab2 is selected to switch to Tab 1 and update
spinner selection in it.

Case 1)
Tab 2 is selected, from Activity B context:

activityA.updateSpinnerSelection(newposition);
activityA.getTabHost().setCurrentTabByTag(tab1tag);

later AdapterView.OnItemSelectedListener.onItemSelected is called with my
newposition

= so this *usually *works fine:

Case 2)
Tab 2 is selected, from Activity B context, but before doing the same
things, if the users for some reason *first open a new acticity C on top of
B (like preference screen) and close this activity C*, (so A and B are
paused then resumed), then if I later try again the same things:

activityA.updateSpinnerSelection(newposition);
activityA.getTabHost().setCurrentTabByTag(tab1tag);

so far so goog, but later
AdapterView.OnItemSelectedListener.onItemSelected is called not with
newposition as argument *but with the older position value*.


I hope the description is clear.

Did I missed something? or could this behavior dues to some bug in Android?

Thanks for any help,
-- 
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

[android-developers] Re: How to turn on the sound in the Android Emulator?

2011-02-25 Thread blindfold
You should be getting sound from the emulator by default on Windows 7,
but maybe issue 14953 http://code.google.com/p/android/issues/detail?id=14953
affects you too?

On Feb 24, 11:03 am, ThaMe90 theprophes...@gmail.com wrote:
 Hello all, I wonder how to turn on the sound in the Android Emulator?
 I've 2 headsets connected to my pc, but I can't seem to get sound on
 either of them (One is connected through USB, the other through a
 3.5mm Jack). I've set the AVD I use to enable Audio Input  Output,
 and I have set the start-up option -audio winaudio. But I still
 can't hear anything...

 I am working with Eclipse, and I'm running Windows7 32bit OS.

 I've searched all over the internet, but all threads (as cryptic and
 short they may be) all address to this issue on Linux systems...
 Haven't been able to find anything on Windows systems though.

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

2011-02-25 Thread ale
Hi,

I am trying to achieve something like a controlled or 'staged' boot
process, where I can make sure that a specific program or script is
executed first in the init process and then the remainnig services are
started.

I was able to start my own services from the init script (init.rc) in
Android, following the guides found at:
http://www.androidenea.com/2009/08/init-process-and-initrc.html or
with the official documentation found at
http://android.git.kernel.org/?p=platform/system/core.git;a=blob;f=init/readme.txt;hb=HEAD

There is a trigger called on service-exit-name where 'name' is the
name of the service which has to exit before the actions of this
trigger are executed.
However, this trigger does not seem to work. I started a small shell
script as a service and created the trigger accordingly to start all
remaining services afterwards. The init process seems to be stuck
after the execution of my script and does not continue with the
remaining services.

Example layout:

on boot
#default entries

# changed from start of default services to class initialize
class_start initialize

#service section for my own app to be started first before anything
else
service runfirst /system/bin/logwrapper /sbin/myapp
class initialize
oneshot

on service-exited-runfirst
#start remaining services
class_start default

# further service descriptions, e.g.
service zygote
...
etc.

Any help on that subject is very much appreciated.

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


Re: [android-developers] Re: BluetoothSettings Force close problem

2011-02-25 Thread Gergely Juhász
http://source.android.com/community/index.html
Choose the porting or the platform list maybe.

On 25 February 2011 10:38, Suresh Chandra Pal
sureshchandra...@gmail.com wrote:
 Can you share that forum's link.

 On Fri, Feb 25, 2011 at 6:34 PM, Zsolt Vasvari zvasv...@gmail.com wrote:

  So please suggest me what should I return from here.
  If you have any other solution for this problem, please suggest that
  also.

 I suggest you go to the forum and post where Android porting is
 discussed.  This forum is for SDK issues.

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


 --

 Best Wishes,



 Suresh Pal



 Skype:   suresh.pal

 Gtalk:    sapient.suresh

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

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

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

 Twitter: http://twitter.com/sapientsuresh

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

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

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Reflection API:List all classes in a package that extend a specific super class

2011-02-25 Thread Kostya Vasilyev

Don,

ActivityInstrumentationTestCase2 has a method, getInstrumentation(), 
which gives you an Instrumentation object instance that's used in the test.


Instrumentation has getContext() which gives you your test package's 
context object, now you can access its resources (as opposed to 
resources of the target application - those are under getTargetContext()).


http://developer.android.com/reference/android/app/Instrumentation.html#getContext()

Now you can call getResources() on your test package's context, and the 
rest should be easy:


- Either call getAssets() to get AssertManager and then list() to get 
the list of script files;


- Define a integer-array's within your test package resources, with 
references to individual XML entries, one array per test case. Load the 
array with res.getIntArray(), then call res.getXml() to open individual 
scripts.


I'd do the latter, to separate the scripts for individual tests from one 
another.


Hope this helps.

-- Kostya

25.02.2011 12:58, donV ?:

Thank you for your reply!

Very possibly there is another solution.

The problem to be solved is that I want to run some test scripts 
stored as assets to test multiple activities.


The test scripts need access to the activity to be tested.  This is 
normally done by subclassing ActivityInstrumentationTestCase2, so my 
plan was to generate subclass of ActivityInstrumentationTestCase2 for 
each activity to be tested, and let this class scan the assets 
directory for related test scripts and run them.


Using junit.framework, I would like to define one TestCase per script, 
or multiple TestCase instances per script.  If the suite() method of 
the ActivityInstrumentationTestCase2 subclass could scan the assets 
directory, I would not need to scan for classes.  Is this possible? 
 How can I scan assets in a static context?


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

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

[android-developers] Re: SQLite and Collate UNICODE

2011-02-25 Thread DanH
That page says nothing about UNICODE doing case folding.  I would
interpret it as simply doing correct ordering for UTF8.

On Feb 25, 12:56 am, Philip Warner p...@rhyme.com.au wrote:
 Yes, but Android have worked around this problem by doing what the
 SQLite people suggest. Namely making the Unicode collator available:

 http://developer.android.com/reference/android/database/sqlite/SQLite...

 (just search the page for UNICODE).

 it's just it does not seem to be working quite right for me.

 On 25/02/2011 4:23 PM, DanH wrote:

 http://www.sqlite.org/faq.html#q18

  On Feb 24, 7:55 pm, Grunthos p...@rhyme.com.au wrote:
  Hi,

  In SQLite under Android 2.1 and 2.2 I have been using 'Collate
  UNICODE' to sort and compare values; for sorting it does what I expect
  -- it is case-insensitive, and handles the expanded character set
  well.

  But for comparisons, eg. f = 'something' where f is a text field, it
  seems to NOT do case-blind comparions.

  Specifically:

  On table authors(..., family_name text,...);

  I searched for

     select * from authors a where a.family_name = 'Le Guin' Collate
  UNICODE

  and it returned 0 rows even though there was an entry with family_name
  = 'le Guin'.

  Am I missing something here? Should I be wrapping both sides of the
  '=' in a call to 'Upper()'. I thought that the UNICODE collator for
  SQLite was case-insensitive.

  If I do wrap both sides in calls to 'Upper()', am I correct in
  assuming indexes will not be used?

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

2011-02-25 Thread Tom Cowan
Yeah perhaps I could of named the topic something else... But these
tips/ideas are aimed specifically at game devs who will clearly be
using OpenGL ES. Anyway

RE 1, that's a very interesting take on it and yeah I definatley think
that slowing the physics down if the frame rate drops sounds like a
great idea in your case... The point was however though that you
should always be using time not processing power as a reference point.
Games should have an optimum speed they try to run at which is not
dependant on the hardware.

RE 4, I think you've missed the point. I mean when checking for
smoothness you should use airplane mode and kill everything. You
need to know any glitches you see aren't related to what's going on in
the background. I didn't mean you should tune your game so it only
runs in airplane mode.

Thanks for the link to the openGL stuff by the way!

On Feb 25, 2:04 am, oldskool73 oldskoo...@gmail.com wrote:
 It's good of you put some suggestions out there to help others, and
 I'm not trying to have a dig, but none of those tips have anything to
 do with opengl(es) specifically. If you really want some indepth
 opengles tips and insight you can't go far wrong with reading through
 the posts on the badlogic blog:
  http://www.badlogicgames.com/wordpress/

 RE 1- this depends rather on what you are making, I'm currently
 building a fast shooter and have specifically chosen not to do this,
 if a frame takes longer to render I'd prefer the game to slow down and
 still be playable than have the enemies suddenly 'jump' because the
 time elapsed is greater than average, your point 5 may help this
 though I guess.

 2  3 - agreed, the GC is not your friend (although its a lot better
 in gingerbread than previously), and surprisingly few people seem to
 know about or use some of the cool tools hidden in the ddms view.

 4's not really practical when testing real world situations, you can't
 ask your users to switch to airplane mode to use your app.

 sorry to be so pedantic :)

 A

 On Feb 24, 4:21 pm, Tom Cowan tttco...@googlemail.com wrote:



  I'm sure anybody who's used openGL will of come across a situation
  where the animation or movement isn't smooth so here are some tips in
  the hope of people posting some more.

  1. Make sure you animate/move using a timer to maintain a constant
  rate of movement regardless of processing speed. So,

  x = now
  draw 1st frame
  y = now
  movementFactor = y - x;
  draw 2nd frame
  repeat

  That sorts some problems.

  2. Stop the GC firing. If you're getting the gc firing message in the
  logcat whilst movement or animation is taking place your likely to be
  allocating ram. You can check this in ddms, goto the allocation
  tracker, hit start tracking then get allocation and you'll see what
  methods have been allocating ram.

  3. Stop allocations even if the GC isn't firing! This helped me a
  bundle, I was allocating a lot of Strings and once I sorted this out I
  found the frame rate to fluctuate less.
  4. Put the phone in airplane mode when doing performance testing and
  kill all tasks prior to running your app.

  5. (Not tried this one yet) Apparently you're eye is very good at
  seeing jerks in animations.movement so it's actually better to reduce
  your frame rate artificially as explained by Mario Zechner below,

  Average your delta times, it's the only way you can smooth
  things out. I use a window of 5 frames per second for which i sum up
  the delta times and divide by the number of frames.

  An example,
  15ms, 15ms, 33ms, 15ms, 15ms will give you an average delta time of
  18.6ms for frame 6. The 33ms will also influence the delta time of the
  next 4 frames after it. To avoid that effect you could use weighted
  averaging: frame delta times that are newer receive a higher weight
  (just an example, haven't boughtered using it)

  Does anyone have any other ideas concerning this topic?- Hide quoted text -

 - Show quoted text -

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


Re: [android-developers] Problems with Calendar Provider queries

2011-02-25 Thread Marcin Orlowski
On 22 February 2011 23:59, Mark Murphy mmur...@commonsware.com wrote:

 I got problems dealing with Calendar Provider.
 There is no Calendar Provider in the Android SDK.

Sorry Mark, but so what? If it's not part of SDK it does not exists?
Like it or not calendar is used widely and like it or not people will
try to access it, especially there's no other, official way of doing
so (which sucks, as at least read access to google calendar shall be
officially exposed and documented to avoid situations like this one).
If someone asks for undocumented things i believe it's more beneficial
to give him constructive answer like I know you can and warn about the
potential risk of doing so instead of throwing it's not a part of
sdk, die.

-- 
Regards,
Marcin

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

2011-02-25 Thread ThaMe90
I don't think so... I use API level 8 to develop... So I doubt this is
the issue...

On 25 feb, 12:15, blindfold seeingwithso...@gmail.com wrote:
 You should be getting sound from the emulator by default on Windows 7,
 but maybe issue 14953http://code.google.com/p/android/issues/detail?id=14953
 affects you too?

 On Feb 24, 11:03 am, ThaMe90 theprophes...@gmail.com wrote:

  Hello all, I wonder how to turn on the sound in the Android Emulator?
  I've 2 headsets connected to my pc, but I can't seem to get sound on
  either of them (One is connected through USB, the other through a
  3.5mm Jack). I've set the AVD I use to enable Audio Input  Output,
  and I have set the start-up option -audio winaudio. But I still
  can't hear anything...

  I am working with Eclipse, and I'm running Windows7 32bit OS.

  I've searched all over the internet, but all threads (as cryptic and
  short they may be) all address to this issue on Linux systems...
  Haven't been able to find anything on Windows systems though.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: SDK or some tool to develop a VERY simple Android game?

2011-02-25 Thread Ryan S
My idea is mostly educational games with simple UIs.
Will check out the three links on the page you sent me... any other tips and
advise is also most welcome!

Thanks!
Ryan

On Fri, Feb 25, 2011 at 8:32 AM, oldskool73 oldskoo...@gmail.com wrote:

 you probably won't be using the ui stuff much if you're making a game
 so I wouldn't worry about that.

 I did a blog post about 3 of the popular Android games libs a while
 back, one of these should help...


 http://www.dustypixels.com/blog/2010/11/17/native-android-ogl-game-libraries-3-of-the-best/

 Adam

 On Feb 24, 10:16 pm, Ryan Stonn ryanst...@ryanstonn.com wrote:
  Oops!
  This got buried in my Inbox, sorry for my late reply.
 
  Can you give me some links that you think would help since I am coming
 from
  a plain java background?
 
  Thanks!
  Ryan
 
  On Thu, Feb 17, 2011 at 1:22 AM, Justin Anderson magouyaw...@gmail.com
 wrote:
 
 
 
   Well, you can't create the game in plain java because Android has its
 own
   UI classes... Really it depends on the type of game you are trying to
   create.
 
   On Wed, Feb 16, 2011 at 9:13 AM, musicgu7 music...@gmail.com wrote:
 
   Hey!
 
   I am decent in Java and now I want to make a very simple android game,
   would you recommend I do it in plain Java (I have never made a game in
   java) or is there a tool like what these guys are promoting :
  http://game-editor.com/Main_Page
 
   that you can recommend?
 
   Thanks!
   Ryan
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
--
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

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


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

Re: [android-developers] SDK or some tool to develop a VERY simple Android game?

2011-02-25 Thread Ryan S
Thanks for replying!
I have no knowledge of Python ;(
Java or PHP yes... infact I started using Java again just to get into
Android :((

On Fri, Feb 25, 2011 at 8:37 AM, Harsh J qwertyman...@gmail.com wrote:

 If Java isn't a strict requirement, perhaps you may want to try out
 the new Kivy MT libraries for Android (with Python): http://kivy.org

 On Fri, Feb 25, 2011 at 3:46 AM, Ryan Stonn ryanst...@ryanstonn.com
 wrote:
  Oops!
  This got buried in my Inbox, sorry for my late reply.
 
  Can you give me some links that you think would help since I am coming
 from
  a plain java background?
 
  Thanks!
  Ryan
 
  On Thu, Feb 17, 2011 at 1:22 AM, Justin Anderson magouyaw...@gmail.com
  wrote:
 
  Well, you can't create the game in plain java because Android has its
  own UI classes... Really it depends on the type of game you are trying
 to
  create.
 
  On Wed, Feb 16, 2011 at 9:13 AM, musicgu7 music...@gmail.com wrote:
 
  Hey!
 
  I am decent in Java and now I want to make a very simple android game,
  would you recommend I do it in plain Java (I have never made a game in
  java) or is there a tool like what these guys are promoting :
  http://game-editor.com/Main_Page
 
  that you can recommend?
 
  Thanks!
  Ryan
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to
 android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to
 android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en



 --
 Harsh J
 www.harshj.com

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


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

Re: [android-developers] Problems with Calendar Provider queries

2011-02-25 Thread Marcin Orlowski
On 23 February 2011 15:21, KT krzychu2...@gmail.com wrote:
 [Moderator, please try to shorten your lag. I am trying to post this
 message since 20th Feb]

You posted it 4 times already.

 I got problems dealing with Calendar Provider. If I try to count  number of
 events at given day, the value I get is incorrect.

Take a look at the Agenda view code of stock Calendar:
http://android.git.kernel.org/?p=platform/packages/apps/Calendar.git;a=blob;f=src/com/android/calendar/AgendaActivity.java;h=f6ee7ca51bcb0783e83805022fe85dd4f3135b9a;hb=HEAD

 Calendar car = Calendar.getInstance();

It looks you are working with your local timezone while I believe
stock calendar keeps all the timestamps in UTC

-- 
Regards,
Marcin

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


[android-developers] Re: java.lang.NullPointerException encountered while running Android Pre Compiler.

2011-02-25 Thread Ajay
please any updates.. its critical :((

On Feb 25, 2:39 pm, Ajay a.aja...@gmail.com wrote:
 !ENTRY org.eclipse.core.resources 4 2 2011-02-25 15:07:29.445
 !MESSAGE Problems occurred when invoking code from plug-in:
 org.eclipse.core.resources.
 !STACK 0
 java.lang.NullPointerException
         at
 com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.buil 
 d(PreCompilerBuilder.java:
 198)
         at org.eclipse.core.internal.events.BuildManager
 $2.run(BuildManager.java:629)
         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
         at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 172)
         at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 203)
         at org.eclipse.core.internal.events.BuildManager
 $1.run(BuildManager.java:255)
         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
         at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 258)
         at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 220)
         at
 org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
 362)
         at org.eclipse.core.internal.resources.Project$1.run(Project.java:
 545)
         at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:
 1975)
         at
 org.eclipse.core.internal.resources.Project.internalBuild(Project.java:
 524)
         at org.eclipse.core.internal.resources.Project.build(Project.java:
 115)
         at
 org.eclipse.ui.actions.BuildAction.invokeOperation(BuildAction.java:
 222)
         at
 org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:
 162)
         at org.eclipse.ui.actions.WorkspaceAction
 $2.runInWorkspace(WorkspaceAction.java:483)
         at
 org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorksp 
 aceJob.java:
 38)
         at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

 !ENTRY org.eclipse.ui.ide 4 4 2011-02-25 15:07:39.406
 !MESSAGE Problems occurred building the selected resources.
 !SUBENTRY 1 com.android.ide.eclipse.adt 4 75 2011-02-25 15:07:39.406
 !MESSAGE Errors running builder 'Android Pre Compiler' on project
 'P2L'.
 !STACK 0
 java.lang.NullPointerException
         at
 com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.buil 
 d(PreCompilerBuilder.java:
 198)
         at org.eclipse.core.internal.events.BuildManager
 $2.run(BuildManager.java:629)
         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
         at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 172)
         at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 203)
         at org.eclipse.core.internal.events.BuildManager
 $1.run(BuildManager.java:255)
         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
         at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 258)
         at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 220)
         at
 org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
 362)
         at org.eclipse.core.internal.resources.Project$1.run(Project.java:
 545)
         at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:
 1975)
         at
 org.eclipse.core.internal.resources.Project.internalBuild(Project.java:
 524)
         at org.eclipse.core.internal.resources.Project.build(Project.java:
 115)
         at
 org.eclipse.ui.actions.BuildAction.invokeOperation(BuildAction.java:
 222)
         at
 org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:
 162)
         at org.eclipse.ui.actions.WorkspaceAction
 $2.runInWorkspace(WorkspaceAction.java:483)
         at
 org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorksp 
 aceJob.java:
 38)
         at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

 This errors came recently after eclipse update..
 Roolback to previous version fails :(..

 On Feb 25, 3:40 am, Xavier Ducrohet x...@android.com wrote:







  This is extremely strange.
  Can you send me the log of your workspace?

  On Wed, Feb 23, 2011 at 9:52 PM, Chopcsu st...@kilsby.com.au wrote:
   Hi All,

   I have just installed ADT 10 with SDK 3.0. Eclipse has been working
   ok, but now all of a sudden my project has broken down with eclipse
   either complaining there is something wrong with xml files where there
   is nothing wrong (tested on a non adt10 eclipse and works fine) or
   giving errors

   Errors running builder 'Android Pre Compiler' on project ''.
   java.lang.NullPointerException encountered while running Android Pre
   Compiler.

   Or giving errors

   Problems occurred when invoking code from plug-in:
   org.eclipse.core.resources.

   java.lang.NullPointerException
          at
   

[android-developers] OT: IO ticket

2011-02-25 Thread Marcin Orlowski
Hi

In case anyone of you lucky baigle eaters changed their mind and is
not going to attend IO - let me know if you want to trade you ticket
;)

-- 
Regards,
Marcin

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


[android-developers] Re: java.lang.NullPointerException encountered while running Android Pre Compiler.

2011-02-25 Thread Ajay
deleted project... added again into workspace...
repeated 3-4 times and issue resolved..

On Feb 25, 2:39 pm, Ajay a.aja...@gmail.com wrote:
 !ENTRY org.eclipse.core.resources 4 2 2011-02-25 15:07:29.445
 !MESSAGE Problems occurred when invoking code from plug-in:
 org.eclipse.core.resources.
 !STACK 0
 java.lang.NullPointerException
         at
 com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.buil 
 d(PreCompilerBuilder.java:
 198)
         at org.eclipse.core.internal.events.BuildManager
 $2.run(BuildManager.java:629)
         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
         at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 172)
         at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 203)
         at org.eclipse.core.internal.events.BuildManager
 $1.run(BuildManager.java:255)
         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
         at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 258)
         at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 220)
         at
 org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
 362)
         at org.eclipse.core.internal.resources.Project$1.run(Project.java:
 545)
         at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:
 1975)
         at
 org.eclipse.core.internal.resources.Project.internalBuild(Project.java:
 524)
         at org.eclipse.core.internal.resources.Project.build(Project.java:
 115)
         at
 org.eclipse.ui.actions.BuildAction.invokeOperation(BuildAction.java:
 222)
         at
 org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:
 162)
         at org.eclipse.ui.actions.WorkspaceAction
 $2.runInWorkspace(WorkspaceAction.java:483)
         at
 org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorksp 
 aceJob.java:
 38)
         at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

 !ENTRY org.eclipse.ui.ide 4 4 2011-02-25 15:07:39.406
 !MESSAGE Problems occurred building the selected resources.
 !SUBENTRY 1 com.android.ide.eclipse.adt 4 75 2011-02-25 15:07:39.406
 !MESSAGE Errors running builder 'Android Pre Compiler' on project
 'P2L'.
 !STACK 0
 java.lang.NullPointerException
         at
 com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.buil 
 d(PreCompilerBuilder.java:
 198)
         at org.eclipse.core.internal.events.BuildManager
 $2.run(BuildManager.java:629)
         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
         at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 172)
         at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 203)
         at org.eclipse.core.internal.events.BuildManager
 $1.run(BuildManager.java:255)
         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
         at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 258)
         at
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
 220)
         at
 org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
 362)
         at org.eclipse.core.internal.resources.Project$1.run(Project.java:
 545)
         at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:
 1975)
         at
 org.eclipse.core.internal.resources.Project.internalBuild(Project.java:
 524)
         at org.eclipse.core.internal.resources.Project.build(Project.java:
 115)
         at
 org.eclipse.ui.actions.BuildAction.invokeOperation(BuildAction.java:
 222)
         at
 org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:
 162)
         at org.eclipse.ui.actions.WorkspaceAction
 $2.runInWorkspace(WorkspaceAction.java:483)
         at
 org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorksp 
 aceJob.java:
 38)
         at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

 This errors came recently after eclipse update..
 Roolback to previous version fails :(..

 On Feb 25, 3:40 am, Xavier Ducrohet x...@android.com wrote:







  This is extremely strange.
  Can you send me the log of your workspace?

  On Wed, Feb 23, 2011 at 9:52 PM, Chopcsu st...@kilsby.com.au wrote:
   Hi All,

   I have just installed ADT 10 with SDK 3.0. Eclipse has been working
   ok, but now all of a sudden my project has broken down with eclipse
   either complaining there is something wrong with xml files where there
   is nothing wrong (tested on a non adt10 eclipse and works fine) or
   giving errors

   Errors running builder 'Android Pre Compiler' on project ''.
   java.lang.NullPointerException encountered while running Android Pre
   Compiler.

   Or giving errors

   Problems occurred when invoking code from plug-in:
   org.eclipse.core.resources.

   java.lang.NullPointerException
          at
   

[android-developers] Differnce between Page Switcher and Page Flipper

2011-02-25 Thread yogendra G
Hi,

Let me know the difference between  Page Switcher and Page Flipper..?? Which
is better one use in both of them..

Regards,
Yogendra G

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

2011-02-25 Thread Grunthos
Read some other pages maybe ;-)

But thanks for the comments. Elsewhere in the  Android docs it says
the unicode collator is case-insensitive by default. the c source
seems to be trying to setup a level 1 collatorbut...

and as I said in my original post, the unicode collation *sorts* in a
case-insensitive way. it just does not test equality in the same way
it sorts.

which seems very odd.

Maybe I just don't understand unicode collation.

On Feb 25, 10:36 pm, DanH danhi...@ieee.org wrote:
 That page says nothing about UNICODE doing case folding.  I would
 interpret it as simply doing correct ordering for UTF8.

 On Feb 25, 12:56 am, Philip Warner p...@rhyme.com.au wrote:



  Yes, but Android have worked around this problem by doing what the
  SQLite people suggest. Namely making the Unicode collator available:

 http://developer.android.com/reference/android/database/sqlite/SQLite...

  (just search the page for UNICODE).

  it's just it does not seem to be working quite right for me.

  On 25/02/2011 4:23 PM, DanH wrote:

  http://www.sqlite.org/faq.html#q18

   On Feb 24, 7:55 pm, Grunthos p...@rhyme.com.au wrote:
   Hi,

   In SQLite under Android 2.1 and 2.2 I have been using 'Collate
   UNICODE' to sort and compare values; for sorting it does what I expect
   -- it is case-insensitive, and handles the expanded character set
   well.

   But for comparisons, eg. f = 'something' where f is a text field, it
   seems to NOT do case-blind comparions.

   Specifically:

   On table authors(..., family_name text,...);

   I searched for

      select * from authors a where a.family_name = 'Le Guin' Collate
   UNICODE

   and it returned 0 rows even though there was an entry with family_name
   = 'le Guin'.

   Am I missing something here? Should I be wrapping both sides of the
   '=' in a call to 'Upper()'. I thought that the UNICODE collator for
   SQLite was case-insensitive.

   If I do wrap both sides in calls to 'Upper()', am I correct in
   assuming indexes will not be used?

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

2011-02-25 Thread Mark Murphy
There is no PageSwitcher or PageFlipper class in Android. Hence, you
will want to ask your question of whoever wrote those classes, in
whatever third party package you are referring to.

If you are really referring to ViewSwitcher and ViewFlipper,
ViewSwitcher has only two children, while ViewFlipper can have as many
as is needed.

On Fri, Feb 25, 2011 at 8:03 AM, yogendra G yogi2...@gmail.com wrote:
 Hi,

 Let me know the difference between  Page Switcher and Page Flipper..?? Which
 is better one use in both of them..

 Regards,
 Yogendra G

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



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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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] Differnce between Page Switcher and Page Flipper

2011-02-25 Thread yogendra G
hi,
Thanx for the reply i was lukn for tht view thing oly...And i believe
function wise both il do same thing right...

Regards,
Yogendra.G

On Fri, Feb 25, 2011 at 6:43 PM, Mark Murphy mmur...@commonsware.comwrote:

 There is no PageSwitcher or PageFlipper class in Android. Hence, you
 will want to ask your question of whoever wrote those classes, in
 whatever third party package you are referring to.

 If you are really referring to ViewSwitcher and ViewFlipper,
 ViewSwitcher has only two children, while ViewFlipper can have as many
 as is needed.

 On Fri, Feb 25, 2011 at 8:03 AM, yogendra G yogi2...@gmail.com wrote:
  Hi,
 
  Let me know the difference between  Page Switcher and Page Flipper..??
 Which
  is better one use in both of them..
 
  Regards,
  Yogendra G
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en



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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
 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

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

2011-02-25 Thread Robert
Ok so there is no option to get there?? That's really strange.
So is there any option to see SQLite database file of my application??

On Feb 24, 3:50 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Feb 24, 2011 at 1:56 AM, Robert rmsz...@gmail.com wrote:
  can someone help me. I can't access to data folder in Google Nexus
  S, any idea how I can do it?

 You can't. On production hardware, the /data partition is not readable
 except with superuser privileges.

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

 Warescription: Three Android Books, Plus Updates, One Low Price!

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


Re: [android-developers] SDK or some tool to develop a VERY simple Android game?

2011-02-25 Thread Greg Donald
On Thu, Feb 24, 2011 at 4:16 PM, Ryan Stonn ryanst...@ryanstonn.com wrote:
 Oops!
 This got buried in my Inbox, sorry for my late reply.

 Can you give me some links that you think would help since I am coming from
 a plain java background?

I use http://www.andengine.org/ for OpenGL stuff.


-- 
Greg Donald
destiney.com | gregdonald.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] Problems with Calendar Provider queries

2011-02-25 Thread Mark Murphy
On Fri, Feb 25, 2011 at 6:42 AM, Marcin Orlowski
webnet.andr...@gmail.com wrote:
 On 22 February 2011 23:59, Mark Murphy mmur...@commonsware.com wrote:

 I got problems dealing with Calendar Provider.
 There is no Calendar Provider in the Android SDK.

 Sorry Mark, but so what? If it's not part of SDK it does not exists?

Anyone needing to ask questions about an undocumented, unsupported API
should not be using it.

Conversely, anyone who thinks it is safe to use an undocumented,
unsupported API damn well better be able to read and understand the
AOSP code behind that undocumented, unsupported API.

 Like it or not calendar is used widely and like it or not people will
 try to access it, especially there's no other, official way of doing
 so (which sucks, as at least read access to google calendar shall be
 officially exposed and documented to avoid situations like this one).

Search for Google Calendar GData API.

 If someone asks for undocumented things i believe it's more beneficial
 to give him constructive answer like I know you can and warn about the
 potential risk of doing so instead of throwing it's not a part of
 sdk, die.

You are cordially invited to add me to your email filters, then, so
that you don't have to read any more of my messages.

Somebody with the itch to scratch should be creating their own
compatibility layer atop such undocumented, unsupported APIs. In the
case of the Calendar, such a compatibility layer:

-- would insulate all developers from some degree of change in the
undocumented, unsupported API, such as the provider name change in the
Calendar provider

-- would provide an avenue for supporting other calendars besides the
AOSP Calendar app

-- would have documentation

-- would have support

The same holds true for just about any other undocumented, unsupported
API in Android. I haven't had the itch, so I have not scratched it. If
somebody comes up with such a compatibility layer, I will be happy to
point people in that direction.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

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


Re: [android-developers] Re: Access to data folder on Google Nexus S

2011-02-25 Thread Mark Murphy
On Fri, Feb 25, 2011 at 8:22 AM, Robert rmsz...@gmail.com wrote:
 Ok so there is no option to get there?? That's really strange.

It is there for security reasons.

 So is there any option to see SQLite database file of my application??

On the emulator, you can access the /data partition through DDMS.

Beyond that, implement a backup/restore feature in your app that
copies your database file to external storage, then access it via
mounting external storage on your development machine. Make sure your
SQLiteDatabase and SQLiteOpenHelper objects are closed first.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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] Getting Application Installation Status

2011-02-25 Thread Mark Murphy
On Wed, Feb 23, 2011 at 5:02 PM, sathya singaravelu
sathyasingarav...@gmail.com wrote:
 Thanks for the reply.  But using this Package_added broadcast receiver, i
 can get only the successful install status for an app. If i want to get
 failure install status or want to know whether user selects Install or
 Cancel after reading the permission, then is there anyway to find it out?

No, other than by checking PackageManager to see if it is there.

 Is it possible to use startActivityForResult api in this case?

No, sorry.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

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


Re: [android-developers] Re: How to detect tablet devices

2011-02-25 Thread Mark Murphy
On Wed, Feb 23, 2011 at 12:47 PM, Carlo Codega sazi...@gmail.com wrote:
 Is there any numeric size about XLARGE screens? AFAIK there could be
 smartphone devices with xlarge screens, or not? I don't see any
 documentation which says that XLARGE screens are  6 inches

 Does xlarge refer to the phisical size? or resolution?

Neither, though physical size is more relevant.

Screen size, in terms of small/normal/large/xlarge, will be determined
by device manufacturers based upon physical screen size and the
distance that screen will be from the user. A phone is held closer to
the user's eyes than is a tablet, and both are held closer to the
user's eyes than is an LCD TV.

At best, Google might come up with a size guideline per form factor --
10 tablets are xlarge, for example. However, in the end, the device
manufacturer will choose the value for the device. How the device
manufacturer makes that choice, AFAIK, is up to the device
manufacturer.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

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


[android-developers] Android 2.3.3 on N1 - Slow bitmap blitting?

2011-02-25 Thread Ralf Schneider
Hi,

I have updated my Nexus One (not rooted) to stock 2.3.3.
Everything looks fresh and nice!

But my app runs only half as fast as before!

It is a fluid simulation (
https://market.android.com/details?id=com.gestaltgeber.hyperspacejellylite).
The simulation and rendering is done in native code with the NDK. I pass a
bitmap to native code (an Android 2.2 feature) and blitt the final bitmap in
Java.
It works exactly like the plasma example from the NDK.

But my frame rate has dropped from approx. 30FPS to approx. 15FPS after the
update. I will probably measure more exactly over the weekend.
I think the native code is probably running as fast as before. So the slow
down is probably caused by a slower blitt function or the screen composition
has become slower.

Does someone else see similar problems with Android 2.3?
Any slow downs in other apps?

My regards,
Ralf

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

[android-developers] Android 2.3: Music content providers for artists, albums and songs

2011-02-25 Thread Daniel
The activities ArtistAlbumBrowserActivity, AlbumBrowserActivity and
TrackBrowserActivity cannot be started anymore by an Intent (e.g.
using action.PICK and vnd.android.cursor.dir/album) since the
attribute android:exported is set to false for those activities
since Android 2.3 (see
http://android.git.kernel.org/?p=platform/packages/apps/Music.git;a=blob;f=AndroidManifest.xml;h=90e0c5b9b81371a1b64940e432cd6917a530b2f4;hb=HEAD).
That is really annoying because the Intent stuff was once one of
Android's strength's and now you are not allowed to use this stuff any
more. That's a shame...

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

2011-02-25 Thread Jake Colman

In my particular situation, I was using onCreate() to initialize state
variables to their initial values.  My expectation was that onCreate()
is called just once for the lifetime of my app.  Now that I know that
Android can destroy my service if needed and cause it to be recreated,
that form of initialization won't work for me.  That being the case, I
moved that logic to onHandleIntent() where it initializes the state
variables from persisted storage.

Incidentally, onStart() is deprecated and onStartCommand() is not
recommended for override according to the docs; it specifically states
that you should override onHandleIntent() instead.

 IV == Indicator Veritatis mej1...@yahoo.com writes:

   IV Well, I hope this doesn't turn out to be an irrelevant
   IV distraction, but did you really have to move the code from
   IV onCreate and onStart?  Not every IntentService can implement only
   IV onHandleIntent the way Google's sample does in
   IV 
http://developer.android.com/guide/topics/fundamentals/services.html#ExtendingIntentService

   IV The same doc does, after all, specifically address this need in
   IV If you decide to also override other callback methods, such as
   IV onCreate(), onStartCommand(), or onDestroy(), be sure to call the
   IV super implementation, so that the IntentService can properly
   IV handle the life of the worker thread.

   IV But in what you described, what was happening only when the
   IV Service was created is now happening every time you get an
   IV Intent. Maybe for your Service it makes no difference, but in
   IV general, that is quite a change.

   IV On Feb 23, 2:54 pm, Jake Colman col...@ppllc.com wrote:
 KV == Kostya Vasilyev kmans...@gmail.com writes:

   KV Based on your code - is your service class in a different package
from the
   KV widget class?

No.  Everything is in the same package.  Everything about this
package was working and I was able to update the widget.  The only
change I made was recode ZMUpdateService to extend IntentService
instead of Service and to move code from the onCreate and onStart
methods to the onHandleIntent method.  That's why am I asking all
these questions about differences between using a Service and an
IntentService - although based on all the answers there isn't any!

--
Jake Colman -- Android Tinkerer

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

-- 
Jake Colman -- Android Tinkerer

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


[android-developers] EditText behaving weirdly

2011-02-25 Thread Richard Marsh
I have a pretty weird situation. I have an expandable listview. When you 
click on the child item, a dialog opens up and you can edit some text to 
save. The dialog is created with a xml layout and using an inflater at 
runtime. I also populate the edit text field with a value.

For some reason, the following happens when the dialog opens.

1st time: The cursor is posistioned after the text in the edit text. The 
getSelectionStart value is 0.

2nd time: the cursor is correctly at the start. getSelectionStart returns a 
random value, but never 0.

3rd time: Everything works as it should. Cursor at start and 
getSelectionStart returns 0.

Not sure if this matters, but I build the dialog in the onCreateDialog and 
set the values of the title and textbox in the onPrepareDialog.

I'm completely stumped. Any advice welcome.

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

2011-02-25 Thread Jake Colman

So what would you recommend as a way to persist a number of primitives
such as integers and booleans?  I agree that this is not a preference
but it is data that needs to be persisted and shared across activities
and services within the app.

 IV == Indicator Veritatis mej1...@yahoo.com writes:

   IV Although I will not pretend to carry the well-deserved air of
   IV authority on such issues that Mark does, I will add one small
   IV point: in general, just as you can use a screwdriver as a hammer
   IV in a pinch, but it is not a good idea, so with any tool, it
   IV should be used for the purpose it was designed for. Now in this
   IV case, even the very name of the class 'Shared Preferences', tells
   IV us what it was designed for: shared preferences. Using it for
   IV anything else should be expected to be sub-optimal, even if you
   IV have been able to get away with it so far.

   IV Likewise, similar to Mark's warning about it becoming an
   IV 'albatross', in a future version, SharedPreferences might work as
   IV expected ONLY for data that is truly preference data, and work
   IV well only if it is shared. By giving it this name Google is
   IV making a commitment that it will always work well for shared
   IV preferences. No such commitment is made for using
   IV SharedPreferences for generic data persistence.

   IV On Feb 24, 12:36 am, String sterling.ud...@googlemail.com wrote:
On Wednesday, February 23, 2011 11:30:53 PM UTC, Mark Murphy (a Commons
Guy)
wrote:

So, it's mostly paranoia, with a side order of data model ick. For the
OP's roster of three booleans, as with your one-off data items, it's
 probably OK.

Thanks for sharing that insight, Mark. I think I see where your paranoia 
is
heading, and I'll try to keep it in mind as I use SharedPrefs moving
forward.

We now return you to your originally scheduled topic... Jake, since it
seems
like your code works in 2.2 but not 1.6, are you familiar with the Service
changes that occurred in 2.0? Not sure if there's anything to it which
affects your code, but you can read more

here:http://android-developers.blogspot.com/2010/02/service-api-changes-st...

String

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

-- 
Jake Colman -- Android Tinkerer

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


[android-developers] Re: Android 2.3.3 on N1 - Slow bitmap blitting?

2011-02-25 Thread Zsolt Vasvari
The Quadrant score has dropped by about 200 in 2.3.3 vs. 2.2

On Feb 25, 9:37 pm, Ralf Schneider li...@gestaltgeber.com wrote:
 Hi,

 I have updated my Nexus One (not rooted) to stock 2.3.3.
 Everything looks fresh and nice!

 But my app runs only half as fast as before!

 It is a fluid simulation 
 (https://market.android.com/details?id=com.gestaltgeber.hyperspacejell...).
 The simulation and rendering is done in native code with the NDK. I pass a
 bitmap to native code (an Android 2.2 feature) and blitt the final bitmap in
 Java.
 It works exactly like the plasma example from the NDK.

 But my frame rate has dropped from approx. 30FPS to approx. 15FPS after the
 update. I will probably measure more exactly over the weekend.
 I think the native code is probably running as fast as before. So the slow
 down is probably caused by a slower blitt function or the screen composition
 has become slower.

 Does someone else see similar problems with Android 2.3?
 Any slow downs in other apps?

 My regards,
 Ralf

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

2011-02-25 Thread Manish Garg
Hi,

In my application, I have created a tabactivity which contains
slidingDrawer to display some dynamic messages. I am using listview
for it.

now focus is on my child activity when I am clicking on slidingDrawer,
it is getting opened but focus is not coming on the list.

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

2011-02-25 Thread Ralf Schneider
Ok, thanks for the info.

But I recognized I have an even worse problem:

The Market App is gone!!! If I click on the Market icon it tells me: Not
installed on the device!

Uhh! Thank you google! There are some other apps I can not start anymore.
But the Market App is the biggest problem.

I followed these instructions:
http://www.androidpolice.com/2011/02/24/google-releases-android-2-3-3-update-zip-for-nexus-one-and-nexus-s/
The update process was smooth without any problems.

So, be careful N1 owners. There might be others with similar problems!

Can I download the Market App manually and reinstall it? I guess I have
to google for it...

Regards,
Ralf


2011/2/25 Zsolt Vasvari zvasv...@gmail.com

 The Quadrant score has dropped by about 200 in 2.3.3 vs. 2.2

 On Feb 25, 9:37 pm, Ralf Schneider li...@gestaltgeber.com wrote:
  Hi,
 
  I have updated my Nexus One (not rooted) to stock 2.3.3.
  Everything looks fresh and nice!
 
  But my app runs only half as fast as before!
 
  It is a fluid simulation (
 https://market.android.com/details?id=com.gestaltgeber.hyperspacejell...).
  The simulation and rendering is done in native code with the NDK. I pass
 a
  bitmap to native code (an Android 2.2 feature) and blitt the final bitmap
 in
  Java.
  It works exactly like the plasma example from the NDK.
 
  But my frame rate has dropped from approx. 30FPS to approx. 15FPS after
 the
  update. I will probably measure more exactly over the weekend.
  I think the native code is probably running as fast as before. So the
 slow
  down is probably caused by a slower blitt function or the screen
 composition
  has become slower.
 
  Does someone else see similar problems with Android 2.3?
  Any slow downs in other apps?
 
  My regards,
  Ralf

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


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

Re: [android-developers] Re: adding search option

2011-02-25 Thread TreKing
On Fri, Feb 25, 2011 at 2:55 AM, Indicator Veritatis mej1...@yahoo.com
 wrote:

 What happened to let me google that for you??


I thought pointing him to the first post where I responded to the exact same
question was more appropriate, in this case.

On Fri, Feb 25, 2011 at 3:16 AM, Marcin Orlowski
webnet.andr...@gmail.comwrote:

 On 25 February 2011 09:55, Indicator Veritatis mej1...@yahoo.com wrote:
  What happened to let me google that for you??

 http://tinyurl.com/6fpm7st


LOL

-
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: Adobe Air for Andoid App - Trouble Bringing App to Foreground (actionscript 3)

2011-02-25 Thread RJM
Point taken.

I'm not using NDK I'm using Adobe Flash Builder 4 to create an Air app
which is then being packaged as an apk. The reason I've not been
debugging on my phone is that I've been debugging on the PC through
Flash Builder and up until now there has been no discrepancies between
running on the PC and mobile.

I've been trying and failing all day to connect my phone to the flash
debugger but I'll keep trying and get back to you when I have an error
message.

On Feb 25, 5:31 am, TreKing treking...@gmail.com wrote:
 On Thu, Feb 24, 2011 at 2:26 PM, RJM mccormack2...@googlemail.com wrote:
  I don't actually know what the error is, I wasn't debugging on the phone at
  the time (not sure how to do that),

 Please learn to debug your app. There's not much anyone can do for you
 without so much as an error message to from.
 Also, since you're using NativeApplication I'm assuming you're using the
 NDK, in which case you probably want to direct your query to that group.

  all I know is that the method stopped and the code after the call to
  nativeWindow.activate didn't get called.

 And all I know is that that is not enough information to help you.

 ---­--
 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: AppWidget Not Surviving a Reboot

2011-02-25 Thread Jake Colman

Thanks but I'm good now.  I added a BOOT_COMPLETED intent to the
appwidget's intent filter and check for that event in onRecieve.  All is
good!

 ND == Nguyen Dat nguyenda...@gmail.com writes:

   ND Dear Jake
   ND ★I have 2 point concern so could you please give me some information:
   ND 1. SDK version you used for widget
   ND 2. Please share xml manafiest file for your widget

   ND ★I successful receive Broadcat messsage BOOT_COMPLETED from system, so
   ND currently i had 3 solution: Declare BroadcastReceiver in manifest file,
   ND register BroadcastReceiver in implement of widget and try other trigger 
to
   ND known timing to wake-up your implement. Could you please try implement 
above
   ND and tell me result.
   ND *
   ND *Here is detail implement for earch solution:
   ND *❶. Solution 1: Register BroadcastReceiver in Manifest:*
   ND *●XML definition:*
   NDapplication
   ND...
   ND receiver
   ND android:name=.YourWidget
   ND android:label=WidgetName
   ND intent-filter
   ND -- Declare list Intent you want to receive --
   ND action
   ND android:name=android.intent.action.BOOT_COMPLETED /
   ND /intent-filter

   ND  meta-data
   ND  android:name=android.appwidget.provider
   ND  android:resource=@xml/your_layout_of_widget
   ND  /meta-data
   ND /receiver
   ND  .
   ND  /application
   ND  uses-permission
   ND android:name=android.permission.RECEIVE_BOOT_COMPLETED /
   ND   .

   ND *● *Ensure you had declare permission to receive BOOT_COMPLETED message:
   ND (Ref.3)
   ND   RECEIVE_BOOT_COMPLETED

   ND *●Disadvantage:*
   ND Adroid docs said: some Broadcast receiver must register explicit in 
source
   ND code:
   ND Example: TIME_TICK, SCREEN_ON (Ref.2)

   ND *●*I had try and successful receiver message from system on Android SDK
   ND *2.3,
   ND And not sure this solution can work well on other SDK version.

   ND *❷. Solution 2: Register BroadcastReceiver in implement of widget:* 
(Ref.1)
   ND *●*Please refer my answer at this thread:
   ND 
http://groups.google.com/group/android-developers/browse_thread/thread/790da1a655f4a227/0b8d6aad1dc2d371?hl=enlnk=gstq=Broadcast+Receiver+From+Widget#0b8d6aad1dc2d371

   ND As you can see from the link above, i had successful register
   ND BroadcastReceiver (ACTION_TIME_TICK), I use SDK 2.3.

   ND *●*Advantage:
   ND This solution is solver problem of Solution 1, explicit register
   ND BroadcastReceiver

   ND *●*Disadvantage:
   ND Refer my note in provider link above

   ND *❸. Solution3: Try other BroadcastReceiver to wake-up your implement 
like:*
   ND ACTION_SCREEN_ON, ACTION_USER_PRESENT

   ND *●Flow to receive message in boot process is:*
   ND Boot completed - [ACTION_BOOT_COMPLETED] - Go to Keyguard screen -
   ND [ACTION_SCREEN_ON] - Go to Home screen - [ACTION_USER_PRESENT]

   ND *●*So we still have at least 2 trigger which indicate timing need to 
update
   ND your widget (I not sure except 3 message i list above, may be lack some
   ND message, If you know have better BroadcastReceiver message plese let me
   ND known

   ND ★Above is 3 solution i think can solver your problem. I had successful 
with
   ND solution *❶* and* **❷* with Android SDK 2.3
   ND Please try and give your feedback. If have any concern feel free to let 
me
   ND known.

   ND ★References:
   ND (1)
   ND 
http://groups.google.com/group/android-developers/browse_thread/thread/790da1a655f4a227/0b8d6aad1dc2d371?hl=enlnk=gstq=Broadcast+Receiver+From+Widget#0b8d6aad1dc2d371
   ND (2)
   ND 
http://developer.android.com/reference/android/content/Intent.html#ACTION_TIME_TICK
   ND (3)
   ND 
http://developer.android.com/reference/android/content/Intent.html#ACTION_BOOT_COMPLETED

   ND Regards,
   ND DatNQ

   ND On Fri, Feb 25, 2011 at 4:57 AM, Kostya Vasilyev kmans...@gmail.com 
wrote:

25.02.2011 0:42, Jake Colman пишет:

Hmmm.  In Eclipse I am always doing Run/Run from the menu.  I'd guess
that is what you are telling me NOT to do.  So what do I do instead?


The first time (to install the app) do that.

Then shut down the emulator.

The second time, bring up the SDK/AVD manager by clicking its toolbar icon
(Android hiding in a box with an arrow pointing down, top left of the
screen, in the menu bar), or from the Start menu, select your emulator,
click Start.


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

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

Re: [android-developers] Re: Android 2.3.3 on N1 - Slow bitmap blitting?

2011-02-25 Thread Ralf Schneider
It's like windows! A reboot solved the market problem! - But not the slow
down...

2011/2/25 Ralf Schneider li...@gestaltgeber.com

 Ok, thanks for the info.

 But I recognized I have an even worse problem:

 The Market App is gone!!! If I click on the Market icon it tells me: Not
 installed on the device!

 Uhh! Thank you google! There are some other apps I can not start anymore.
 But the Market App is the biggest problem.

 I followed these instructions:
 http://www.androidpolice.com/2011/02/24/google-releases-android-2-3-3-update-zip-for-nexus-one-and-nexus-s/
 The update process was smooth without any problems.

 So, be careful N1 owners. There might be others with similar problems!

 Can I download the Market App manually and reinstall it? I guess I have
 to google for it...

 Regards,
 Ralf


 2011/2/25 Zsolt Vasvari zvasv...@gmail.com

 The Quadrant score has dropped by about 200 in 2.3.3 vs. 2.2

 On Feb 25, 9:37 pm, Ralf Schneider li...@gestaltgeber.com wrote:
  Hi,
 
  I have updated my Nexus One (not rooted) to stock 2.3.3.
  Everything looks fresh and nice!
 
  But my app runs only half as fast as before!
 
  It is a fluid simulation (
 https://market.android.com/details?id=com.gestaltgeber.hyperspacejell...
 ).
  The simulation and rendering is done in native code with the NDK. I pass
 a
  bitmap to native code (an Android 2.2 feature) and blitt the final
 bitmap in
  Java.
  It works exactly like the plasma example from the NDK.
 
  But my frame rate has dropped from approx. 30FPS to approx. 15FPS after
 the
  update. I will probably measure more exactly over the weekend.
  I think the native code is probably running as fast as before. So the
 slow
  down is probably caused by a slower blitt function or the screen
 composition
  has become slower.
 
  Does someone else see similar problems with Android 2.3?
  Any slow downs in other apps?
 
  My regards,
  Ralf

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

2011-02-25 Thread Jake Colman

No, I am not asking how to send location updates to the emulator.

Can I simulate conditions such as:

1) GPS and Network not available to provide location
2) GPS powered on/off
3) Network connection on/off
4) Providers are active but cannot return a fix

I am also finding that my emulator often ignores location updates sent
to it via adb or DDMS.  Is there a known problem or something that I
need to do to make that work reliably?  My emulator is Android 1.6 with
the Google APIs.

-- 
Jake Colman -- Android Tinkerer

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


Re: [android-developers] Re: Reflection API:List all classes in a package that extend a specific super class

2011-02-25 Thread donV
Thanks!  This was very helpful!

I have it running now.

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

Re: [android-developers] Re: SDK or some tool to develop a VERY simple Android game?

2011-02-25 Thread Justin Giles
On Fri, Feb 25, 2011 at 5:53 AM, Ryan S music...@gmail.com wrote:

 My idea is mostly educational games with simple UIs.
 Will check out the three links on the page you sent me... any other tips
 and advise is also most welcome!


If it is educational games with simple UIs, I'd recommend attempting it with
the standard UI stuff with custom graphics.  You'd be surprised at how much
you can accomplish with the standard UI stuff, especially if the UIs are
fairly simple.  A lot less overhead in regards to learning a specific game
engine.  It will also allow you to get a better understanding of how Android
works.

If you are coming from a standard Java background, you already know the
language, all you need to do is get a full understanding of the Activity
process and the various UI elements.

Make sure you understand this:
http://developer.android.com/guide/topics/fundamentals/activities.html

It basically outlines from beginning to end of the application process from
load to destroying it.

My 2 cents.

Justin

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

2011-02-25 Thread Marcin Orlowski
 Anyone needing to ask questions about an undocumented, unsupported API should 
 not be using it.

Calendar is not part of SDK as such situation lets Google change
whatever they want and to not bother the others, but I dare to point
that there significiant difference between undocumented and
private (restricted). Calendar Provider is undocumented.

 Search for Google Calendar GData API.

Which besides being more official than Calendar Provider requires data
connection.

 You are cordially invited to add me to your email filters, then, so
 that you don't have to read any more of my messages.

It seems you took it too personally, for no reason.

 Somebody with the itch to scratch should be creating their own
 compatibility layer atop such undocumented, unsupported APIs. In the
 case of the Calendar, such a compatibility layer:
[...]
 The same holds true for just about any other undocumented, unsupported
 API in Android. I haven't had the itch, so I have not scratched it. If
 somebody comes up with such a compatibility layer, I will be happy to
 point people in that direction.

Do agree, but to my knowledge no such layer exists and if TK or anyone
else is going to write such, he still may need the answers, isn't it?
We are now falling into academic debate, which imho is of no real
benefit. If I remember correctly we got 44k devs here so definitely
one knows the answers.

-- 
Regards,
Marcin

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

2011-02-25 Thread Mark Nuetzmann
Hi,

I have an app that has default drawables in the drawable folder.  I
have both a drawable-hdpi and a drawable-xhdpi folder set up.  When I
launch my app on the XOOM the device seems to be picking up the
default drawables and NOT the ones in the xhdpi folder.  Has anyone
come across this?  My manifest is set up with,

uses-sdk
android:minSdkVersion=4
android:targetSdkVersion=9 /

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

I know that xhdpi was available as of sdk version 8...

Regards,
Mark

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

2011-02-25 Thread Kostya Vasilyev

This is correct, as the XOOM is not xhdpi.

It's an -xlarge, -mdpi device.

-- Kostya

25.02.2011 17:53, Mark Nuetzmann пишет:

Hi,

I have an app that has default drawables in the drawable folder.  I
have both a drawable-hdpi and a drawable-xhdpi folder set up.  When I
launch my app on the XOOM the device seems to be picking up the
default drawables and NOT the ones in the xhdpi folder.  Has anyone
come across this?  My manifest is set up with,

 uses-sdk
 android:minSdkVersion=4
 android:targetSdkVersion=9 /

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

I know that xhdpi was available as of sdk version 8...

Regards,
Mark




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

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


[android-developers] Re: Moto XOOM not loading xhdpi drawables

2011-02-25 Thread Mark Nuetzmann
wow.  ok, that explains it.

I cannot believe the flagship device for Moto would not be at least a
hires device.

thank you.

On Feb 25, 8:59 am, Kostya Vasilyev kmans...@gmail.com wrote:
 This is correct, as the XOOM is not xhdpi.

 It's an -xlarge, -mdpi device.

 -- Kostya

 25.02.2011 17:53, Mark Nuetzmann пишет:









  Hi,

  I have an app that has default drawables in the drawable folder.  I
  have both a drawable-hdpi and a drawable-xhdpi folder set up.  When I
  launch my app on the XOOM the device seems to be picking up the
  default drawables and NOT the ones in the xhdpi folder.  Has anyone
  come across this?  My manifest is set up with,

       uses-sdk
           android:minSdkVersion=4
           android:targetSdkVersion=9 /

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

  I know that xhdpi was available as of sdk version 8...

  Regards,
  Mark

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

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


Re: [android-developers] Re: Moto XOOM not loading xhdpi drawables

2011-02-25 Thread Kostya Vasilyev
Xoom's 160 dpi is still much higher than the typical desktop computer 
monitor (96 dpi).


Keep in mind that display density (pixels / inch) is not the same as 
resolution (number of pixels) or screen size (number of inches).


This might be useful:

http://developer.motorola.com/docstools/library/motorola-xoom-tablet-programming-tips/

-- Kostya

25.02.2011 18:19, Mark Nuetzmann пишет:

wow.  ok, that explains it.

I cannot believe the flagship device for Moto would not be at least a
hires device.

thank you.

On Feb 25, 8:59 am, Kostya Vasilyevkmans...@gmail.com  wrote:

This is correct, as the XOOM is not xhdpi.

It's an -xlarge, -mdpi device.

-- Kostya

25.02.2011 17:53, Mark Nuetzmann пишет:










Hi,
I have an app that has default drawables in the drawable folder.  I
have both a drawable-hdpi and a drawable-xhdpi folder set up.  When I
launch my app on the XOOM the device seems to be picking up the
default drawables and NOT the ones in the xhdpi folder.  Has anyone
come across this?  My manifest is set up with,
  uses-sdk
  android:minSdkVersion=4
  android:targetSdkVersion=9 /
  supports-screens
  android:smallScreens=true
  android:normalScreens=true
  android:largeScreens=true
  android:xlargeScreens=true
  anyDensity=true /
I know that xhdpi was available as of sdk version 8...
Regards,
Mark

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



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

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


Re: [android-developers] Re: Moto XOOM not loading xhdpi drawables

2011-02-25 Thread Mark Murphy
On Fri, Feb 25, 2011 at 10:19 AM, Mark Nuetzmann
mark.nuetzm...@gmail.com wrote:
 wow.  ok, that explains it.

 I cannot believe the flagship device for Moto would not be at least a
 hires device.

Why? The flagship tablet for Apple would be -mdpi in Android terminology.

Now, there's a chance that'll change with the iPad 2 -- we'll find out
next week.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

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


Re: [android-developers] Re: Maps GeoPoint: Accessing and changing data?

2011-02-25 Thread TreKing
On Fri, Feb 25, 2011 at 2:18 AM, oldskool73 oldskoo...@gmail.com wrote:

 On Feb 25, 2:59 am, TreKing treking...@gmail.com wrote:
  On Thu, Feb 24, 2011 at 8:56 PM, SEWilco sewi...@gmail.com wrote:
   Can my app access GeoPoint data and change it?
 
  What data?
 

 Well seeing as a geopoint only contains a latlong what data do you think?


IMO, the OP's question was not very clear. And given the nature of many of
the posts that come through here, it's a very real possibility that the
data was something other than the GeoPoint lat / lon values, seeing as
nowhere did he specify that that's specifically what he was talking about.
For example, he mentions accessing the data once it's been added to a
Google Maps Overlay - GeoPoints are not, in and of themselves, added to
Google Maps Overlays.


   I'm not finding a way to access data which has been added to a Google
 Maps
   Overlay.
 
  What data?

 Why be a dick, if you cant help him just move on to the next thread.


I fail to see how asking him what data he's talking about makes me a dick.
Calling someone a dick on a public forum though ...
You are of course entitled to your opinion. And lord knows I've been called
worse.

-
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: Moto XOOM not loading xhdpi drawables

2011-02-25 Thread Mark Nuetzmann
Good point.  I guess I have just been working with so many hires phone
devices and the fact that the Samsung Galaxy tab is a hires device I
just assumed the XOOM would be as well...  but since the screen is
so much larger it is not needed.  My bad.

On Feb 25, 9:27 am, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Feb 25, 2011 at 10:19 AM, Mark Nuetzmann

 mark.nuetzm...@gmail.com wrote:
  wow.  ok, that explains it.

  I cannot believe the flagship device for Moto would not be at least a
  hires device.

 Why? The flagship tablet for Apple would be -mdpi in Android terminology.

 Now, there's a chance that'll change with the iPad 2 -- we'll find out
 next week.

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
 Available!

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


Re: [android-developers] Re: Moto XOOM not loading xhdpi drawables

2011-02-25 Thread Marcin Orlowski
On 25 February 2011 16:19, Mark Nuetzmann mark.nuetzm...@gmail.com wrote:

 I cannot believe the flagship device for Moto would not be at least a
 hires device.

Well, you thought you watch xhdpi, so it works :) Note density is
not resolution and there's not point to artificially pump dpi up
beyond certain point for display with certain phisicial dimensions as
it simply costs in many aspects.

-- 
Regards,
Marcin

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

2011-02-25 Thread DanH
If the fields you're needing this attribute for aren't too large, the
simplest approach is to write each field twice, once normally and
once folded to upper case, using an algorithm you trust.  Then search
on the upper-case field.

On Feb 25, 7:10 am, Grunthos p...@rhyme.com.au wrote:
 Read some other pages maybe ;-)

 But thanks for the comments. Elsewhere in the  Android docs it says
 the unicode collator is case-insensitive by default. the c source
 seems to be trying to setup a level 1 collatorbut...

 and as I said in my original post, the unicode collation *sorts* in a
 case-insensitive way. it just does not test equality in the same way
 it sorts.

 which seems very odd.

 Maybe I just don't understand unicode collation.

 On Feb 25, 10:36 pm, DanH danhi...@ieee.org wrote:

  That page says nothing about UNICODE doing case folding.  I would
  interpret it as simply doing correct ordering for UTF8.

  On Feb 25, 12:56 am, Philip Warner p...@rhyme.com.au wrote:

   Yes, but Android have worked around this problem by doing what the
   SQLite people suggest. Namely making the Unicode collator available:

  http://developer.android.com/reference/android/database/sqlite/SQLite...

   (just search the page for UNICODE).

   it's just it does not seem to be working quite right for me.

   On 25/02/2011 4:23 PM, DanH wrote:

   http://www.sqlite.org/faq.html#q18

On Feb 24, 7:55 pm, Grunthos p...@rhyme.com.au wrote:
Hi,

In SQLite under Android 2.1 and 2.2 I have been using 'Collate
UNICODE' to sort and compare values; for sorting it does what I expect
-- it is case-insensitive, and handles the expanded character set
well.

But for comparisons, eg. f = 'something' where f is a text field, it
seems to NOT do case-blind comparions.

Specifically:

On table authors(..., family_name text,...);

I searched for

   select * from authors a where a.family_name = 'Le Guin' Collate
UNICODE

and it returned 0 rows even though there was an entry with family_name
= 'le Guin'.

Am I missing something here? Should I be wrapping both sides of the
'=' in a call to 'Upper()'. I thought that the UNICODE collator for
SQLite was case-insensitive.

If I do wrap both sides in calls to 'Upper()', am I correct in
assuming indexes will not be used?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Out of memory - despite being way under 16mb

2011-02-25 Thread android777
Can you post your code? It is easier to find what's happening in that
way.

On Feb 24, 2:42 pm, Sheado chad...@gmail.com wrote:
 Hello. I tried posting this earlier, but it didn't seem to stick (so
 sorry if it double posts).

 My app occasionally runs out of memory when loading bitmaps. I call
 recycle() on every bitmap I'm done with and even set them to null.

 As far as diagnostics:
 * I ran ddms and never saw the heap go over 5.5mb. The largest image I
 load is 480x320, so there's no way that pushing it over the 16mb
 limit.
 * I dumped the event log and noticed this at one point:
 I/dvm_gc_info( 6655):
 [7290888427799873005,-9036888781628737488,-3939943202692585437,9505022]
 According to somebody else's post this could be bad (sorry I lost the
 link to that post). (gdb) print (0xtop12  0x1ff)  ((0xbottom12 
 9) * 4)  == resulting in greater than 17mb
 * to confirm this, I dump hprof and analyzed it with Eclipse Mat, but
 all I saw was a peak usage of 2.1mb and a suspected leak of 700k
 * Scouring the forums, I found 
 this:http://groups.google.com/group/android-developers/browse_thread/threa...
 Could my problem really be due to memory fragmentation? My app does
 load and unload(recycle) bitmaps often.

 I don't know which of these to believe and what to do to prevent these
 out of memory exceptions from ever happening again - or at the very
 least I'd like to properly interpret the data I'm getting from these
 logs and profilers.

 any advice would be awesome!
 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] Java code limited to ~24Mb memory and NDK code has no limit?

2011-02-25 Thread spaceraiders
After writing Java apps for a while and being mindful of the heap
memory limit (typically 16Mb or 24Mb), I was surprised to discover
recently that NDK apps have no limit on how much memory they can
allocate. I have a few queries:

1. Why was the decision made to not enforce the same limitations on
NDK code?

2. What are the implications of rewriting apps that use the NDK to
allocate, say, double the regular Java heap limit? I've done some
experiments and e.g. using 40Mb on a phone with 256Mb RAM and a Java
heap limit of 24Mb doesn't seem to cause any noticeable problems.
Background apps start getting killed when you use a lot more memory
though.

3. Are there any plans to increase the Java heap limit? Seeing as
phones are now getting =512Mb RAM, giving less than 10% of this to
the foreground app seems an odd limitation.

I've noticed apps on the market that say they require 256Mb RAM to run
(!) so other developers are definitely taking advantage of the NDK in
this way. I much prefer coding in Java but the memory limit makes
certain apps very tough to write so sticking to Java makes it hard to
compete with developers that use 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] Do Alarms Trigger Upon Creation

2011-02-25 Thread Jake Colman

If I create an alarm on a repeat interval of, say, 60 minutes, will it
trigger upon creation and then every 60 minutes thereafter or only
trigger when the interval has elapsed?

-- 
Jake Colman -- Android Tinkerer

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


[android-developers] Re: Bug in Honeycomb solves Bitmaps with XRGB_8888

2011-02-25 Thread webmonkey
I see the 'bug' is still there in the final HC SDK. It is not by
design is it?

On Jan 31, 5:39 pm, webmonkey webmonke...@gmail.com wrote:
 Just as I suspected there is a bug in Honeycomb that allows me to work
 around not having a setHasAlpha function.

 Using the new inMutable option in BitmapFactory.Options I can decode a
 dummy JPG and because it is a JPG the opaque hint is set. Now whatever
 set function you call on the bitmap, the opaque flag is never cleared
 and so it optimizes the drawing. It is rather silly though that I have
 to do it this way.

 I also wonder how the Android team is going to fix the actual bug in
 Honeycomb. There are four ways as I see it:

 1) When inMutable is set it always clears the opaque hint.  This would
 be dumb because it assumes the worst case scenario.
 2) For every set function check if it has transparent values so it can
 clear the opaque flag.  Lots of work and not very fast
 3) Add a XRGB_ Config.  Not sure what kind of work is involved
 here.
 4) Make the setHasAlpha public.  This would be the easiest
 solution :-)

 On Jan 25, 10:57 pm,webmonkeywebmonke...@gmail.com wrote:

  Hi Romain

  Looking further into the Android source code when you create a 32-bit
  color bitmap the system always assumes you have alpha and there is no
  way to turn it off. Only when you load a JPEG or something does the
  system set the flag to ignore it.

  That is an unnecessary performance penalty that can easily be avoided.
  For Honeycomb could you please make the setHasAlpha public or provide
  an XRGB_ config. For the upcoming tablets we are going to draw
  even more and bigger bitmaps.

  On Jan 24, 10:01 pm,webmonkeywebmonke...@gmail.com wrote:

   But that seems to be the only way to tell the system that it can
   ignore the alpha channel. Bitmap.hasAlpha() just returns the flag.

   I am updating the bitmap a lot with copyPixelsFromBuffer so how do I
   tell the system that it can ignore the alpha channel?

   On Jan 24, 9:49 pm, Romain Guy romain...@android.com wrote:

No you cannot. Methods marked @hide are not part of the public API. 
They are
not present in ADT's android.jar so you cannot compile against it. We 
also
might rename or remove such APIs at any point in the future.

On Mon, Jan 24, 2011 at 12:42 PM,webmonkeywebmonke...@gmail.com wrote:
 Ah thanks, I just checked the Android source and there is the
 following function

 public void setHasAlpha(boolean hasAlpha) {
    nativeSetHasAlpha(mNativeBitmap, hasAlpha);
 }

 But it is set to @hide so it is not in the docs, can we use this
 function?

 On Jan 24, 6:14 pm, Romain Guy romain...@android.com wrote:
  The system can detect when a ARGB_ bitmap is opaque (see
  Bitmap.hasAlpha()).

  On Mon, Jan 24, 2011 at 8:26 AM,webmonkeywebmonke...@gmail.com
 wrote:
   Now that Gingerbread has moved to 32-bit windows is there a way to
   create a 32-bit bitmap without alpha to improve drawing 
   performance of
   opaque bitmaps?

   Something like Bitmap.createBitmap( 512, 512,
   Bitmap.Config.XRGB_  )

   Or does the system somehow detect that the bitmap is opaque?

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

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

  Note: please don't send private questions to me, as I don't have 
  time to
  provide private support.  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%2Bunsubs
  cr...@googlegroups.com
 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

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

Note: please don't send private questions to me, as I don't have time to
provide private support.  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 

Re: [android-developers] how to make sure that devices is connected after rebooting

2011-02-25 Thread TreKing
On Wed, Feb 23, 2011 at 11:32 PM, Abdul abdulbaquie...@gmail.com wrote:

 How to make sure that devices is connect after rebooting we are using two
 devices.


Connected to what?


 one devics is working or taking command and seond device we are rebooting.


What?

-
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] MediaPlayer issues in certain devices

2011-02-25 Thread DanielleM
Hello all:

I've searched around and have not been able to find an answer to this
problem: My application plays mp3 files and mp4 files in a variety of
ways. The first way is that I have an mp3 stream that I'm streaming
through a MediaPlayer object...the second way is that I'm navigating
to either mp3 or mobile mp4 files on a website and using the device's
native media player and/or downloaded 3rd party media players to play
some podcasts.

My issues come from the fact that I've tested my app on two different
devices...(a Droid2 non-global Android 2.2 system version 2.3.20.a955,
and an HTC EVO with Android 2.2). The issues I'm having is that the
streaming mp3 audio plays totally fine on the HTC device, but will not
play at all on the Droid2, and then the opposite issue is happening
with the podcast audio...it will play fine on the Droid2 using both
Winamp and doubletwist...but the HTC device will not open and play
these files even in the native music player. The HTC user says that a
browser begins to open and then closes and no audio ever plays...he
didn't say anything about an error message either.

The Droid2 user gets no error message for the streams...they simply
don't play...he also says he's not been able to get streaming audio
from other apps as well so he figures it's his device. However with
the podcasts, it will open a browser and then ask him which
application he wants to use to play the media...then it opens just
fine and plays.

Has anyone else experienced this or knows of something I might be able
to do in my app to fix this? Is this strictly a device issue? Both the
streams and the podcast audio and video play perfectly fine in the
Emulator (not that that is any indicator that everything is going to
work on a device) and I'm getting no error messages or anything in the
logcat.

I'm working on getting a third device to test on to see what, if any
issues occur. The rest of the app seems to work totally fine on both
devices.

Thanks for any help you can provide,
DanielleM

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

2011-02-25 Thread Mark Murphy
It will trigger at the time you specify, then every period thereafter.

On Fri, Feb 25, 2011 at 11:37 AM, Jake Colman col...@ppllc.com wrote:

 If I create an alarm on a repeat interval of, say, 60 minutes, will it
 trigger upon creation and then every 60 minutes thereafter or only
 trigger when the interval has elapsed?

 --
 Jake Colman -- Android Tinkerer

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




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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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] Do existing scheduled items on the AlarmManager get cancelled after an application update from the Marketplace?

2011-02-25 Thread Matt Quigley
Hi all.  I was wondering what would happen in the following scenario:

Your application schedules a service or any type of pending event on
the AlarmManager.  Let's say it repeats every 24 hours at noon.  If an
application update is available, and the user updates the application
at 10 AM through the Marketplace app, does that update remove all
scheduled events from the AlarmManager?  Or will the service still
start at noon?

I understand that there could be complications if the pending events
aren't removed: the application update could have completely removed
the service that would have been started.  But in that case, the
AlarmManager would just catch an exception when it tries to start the
service and ignore it.

On the other hand, if the AlarmManager DOES remove all the scheduled
events, how is your application supposed to restart the services?
1. You can't tell on the application startup whether or not your
previous services have been cancelled, because there is no way for
your application to query AlarmManager to see if your services are
still scheduled or not.
2. You can't blindly start your service at app startup, because you
don't want a service that is supposed to run every 24 hours to run 5
times a day if the user starts your app 5 times that day.
3. Even if you persist a flag to disk indicating that your service is
running, your application doesn't receive an event that the service
was stopped (that I know of), so you can't turn that flag off if the
service is cancelled during an application update.

Does anyone have any advice on how to reliably keep a service
scheduled consistently after an application update?
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] Action Menu

2011-02-25 Thread David Williams
Thanks for the input.  The signature and icon is not huge on my screen 
(only take up about 1/4 of the width).  Also, the font looks perfectly 
normal to me, so not sure what you mean by more normal. Can you elaborate?



David Williams
Check out our WebOS mobile phone app for the Palm Pre and Pixi:
http://www.dtw-consulting.com/GolfCaddie Golf Caddie 
http://www.dtw-consulting.com/GolfCaddie | Golf Caddie Forum 
http://www.dtw-consulting.com/GolfCaddie/forum | Golf Caddie FAQ 
http://www.dtw-consulting.com/GolfCaddie/faq.html by DTW-Consulting, Inc.




On 2/24/2011 11:43 PM, TreKing wrote:
On Thu, Feb 24, 2011 at 4:24 PM, David Williams 
dwilli...@dtw-consulting.com mailto:dwilli...@dtw-consulting.com 
wrote:


Not having much luck on this forum so far.


Sorry, I do not have info on your current issue or your tab issue, 
however, may I suggest you change your posting font to something more 
normal and reduce the size of your signature (particularly the huge 
icon). It makes your posts difficult to read.


Also, posts sometimes take a while to come through. I don't know if 
they're in moderation or Google Groups just sucks (possibly both) but 
you generally have to be very patient when posting here as they may 
not show up for days.


-
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 


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

[android-developers] Re: Do Alarms Trigger Upon Creation

2011-02-25 Thread Matt Quigley
The AlarmManager setRepeating() methods include parameters for 1. when
it starts, and 2. how often it repeats.

http://developer.android.com/reference/android/app/AlarmManager.html

On Feb 25, 11:37 am, Jake Colman col...@ppllc.com wrote:
 If I create an alarm on a repeat interval of, say, 60 minutes, will it
 trigger upon creation and then every 60 minutes thereafter or only
 trigger when the interval has elapsed?

 --
 Jake Colman -- Android Tinkerer

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


Re: [android-developers] Java code limited to ~24Mb memory and NDK code has no limit?

2011-02-25 Thread Dianne Hackborn
On Fri, Feb 25, 2011 at 8:31 AM, spaceraiders spaceraid...@gmail.comwrote:

 1. Why was the decision made to not enforce the same limitations on
 NDK code?


It is much harder to enforce on native code.


 2. What are the implications of rewriting apps that use the NDK to
 allocate, say, double the regular Java heap limit? I've done some
 experiments and e.g. using 40Mb on a phone with 256Mb RAM and a Java
 heap limit of 24Mb doesn't seem to cause any noticeable problems.
 Background apps start getting killed when you use a lot more memory
 though.


If you aren't careful in native code, your app will simply be silently
killed on you.


 3. Are there any plans to increase the Java heap limit? Seeing as
 phones are now getting =512Mb RAM, giving less than 10% of this to
 the foreground app seems an odd limitation.


The heap size is larger in HC.


 I've noticed apps on the market that say they require 256Mb RAM to run
 (!) so other developers are definitely taking advantage of the NDK in
 this way. I much prefer coding in Java but the memory limit makes
 certain apps very tough to write so sticking to Java makes it hard to
 compete with developers that use the NDK.


It's up to you whether you want to stay within the limit or risk issues like
your app suddenly disappearing on the user.

You can use the onLowMemory() callback to help you determine when you are
starting to allocate too much memory.  The browser uses this for example to
know when it really needs to flush its caches.  HOWEVER, you should NOT be
relying on that as the only way to control your allocations, since it
happens when the device is really getting low on memory to the point of not
being able to keep any background processes running, so things like app
switching are already being impacted by your memory use.

-- 
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: Moto XOOM not loading xhdpi drawables

2011-02-25 Thread Dianne Hackborn
The Xoom is quite a bit higher resolution than the Samsung Galaxy Tab or any
other current Android phone.

It is not higher density, because the screen itself is physically a lot
larger.

On Fri, Feb 25, 2011 at 7:41 AM, Mark Nuetzmann mark.nuetzm...@gmail.comwrote:

 Good point.  I guess I have just been working with so many hires phone
 devices and the fact that the Samsung Galaxy tab is a hires device I
 just assumed the XOOM would be as well...  but since the screen is
 so much larger it is not needed.  My bad.

 On Feb 25, 9:27 am, Mark Murphy mmur...@commonsware.com wrote:
  On Fri, Feb 25, 2011 at 10:19 AM, Mark Nuetzmann
 
  mark.nuetzm...@gmail.com wrote:
   wow.  ok, that explains it.
 
   I cannot believe the flagship device for Moto would not be at least a
   hires device.
 
  Why? The flagship tablet for Apple would be -mdpi in Android
 terminology.
 
  Now, there's a chance that'll change with the iPad 2 -- we'll find out
  next week.
 
  --
  Mark Murphy (a Commons Guy)http://commonsware.com|
 http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
 
  _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
  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




-- 
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] Out of memory - despite being way under 16mb

2011-02-25 Thread Dianne Hackborn
Memory fragmentation does not cause this; the Dalvik heap limit is enforced
based on the actual active allocations.

Note that bitmaps are NOT include in the Dalvik heap based on what ddms
reports, but they are included in the heap limit, so most likely you have a
lot of bitmap data.

(In HC this is changed and bitmap data is now allocated directly on the
Dalvik heap.)

On Thu, Feb 24, 2011 at 12:42 PM, Sheado chad...@gmail.com wrote:

 Hello. I tried posting this earlier, but it didn't seem to stick (so
 sorry if it double posts).

 My app occasionally runs out of memory when loading bitmaps. I call
 recycle() on every bitmap I'm done with and even set them to null.

 As far as diagnostics:
 * I ran ddms and never saw the heap go over 5.5mb. The largest image I
 load is 480x320, so there's no way that pushing it over the 16mb
 limit.
 * I dumped the event log and noticed this at one point:
 I/dvm_gc_info( 6655):
 [7290888427799873005,-9036888781628737488,-3939943202692585437,9505022]
 According to somebody else's post this could be bad (sorry I lost the
 link to that post). (gdb) print (0xtop12  0x1ff)  ((0xbottom12 
 9) * 4)  == resulting in greater than 17mb
 * to confirm this, I dump hprof and analyzed it with Eclipse Mat, but
 all I saw was a peak usage of 2.1mb and a suspected leak of 700k
 * Scouring the forums, I found this:

 http://groups.google.com/group/android-developers/browse_thread/thread/45720ebd657b49fa/9a8b87f65990e8a2?lnk=gstq=out+of+memory+16mb#9a8b87f65990e8a2
 Could my problem really be due to memory fragmentation? My app does
 load and unload(recycle) bitmaps often.

 I don't know which of these to believe and what to do to prevent these
 out of memory exceptions from ever happening again - or at the very
 least I'd like to properly interpret the data I'm getting from these
 logs and profilers.

 any advice would be awesome!
 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




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

2011-02-25 Thread b_t
Hi,

I get the following exceptions (from my users) when I try to open a
fileoutputstream:

phone model: GT-I5800, android version: 2.1-update1, exception:
java.io.FileNotFoundException: /sdcard/MYPATH/FILENAME
   at
org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java:
244)
   at java.io.FileOutputStream.init(FileOutputStream.java:97)
   at java.io.FileOutputStream.init(FileOutputStream.java:69)


phone model: PC36100, android version: 2.2, exception:
java.io.FileNotFoundException: /mnt/sdcard/MYPATH/FILENAME  (Invalid
argument)
   at
org.apache.harmony.luni.platform.OSFileSystem.openImpl(Native Method)
   at
org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java:
152)
   at java.io.FileOutputStream.init(FileOutputStream.java:97)

MYPATH and FILENAME are variables and they looks good. For example:
widgets for MYPATH and 4x1_Standart for FILENAME

My code is the following:

String state = Environment.getExternalStorageState();

if (Environment.MEDIA_MOUNTED.equals(state)) {
File folder = new 
File(Environment.getExternalStorageDirectory(),
folderName);

if (!folder.exists()) {
folder.mkdirs();
}

FileOutputStream fos = new FileOutputStream(file); // I get 
this
exception here
}


What is wrong? Should I check something else?

It works well on my phone, so I don't know why these errors occur.

Thanks,
Tamás

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


Re: [android-developers] Problems with Calendar Provider queries

2011-02-25 Thread Dianne Hackborn
The calendar provider has and will change, often significantly, between
platform releases.  And I would be willing to bet that some device
manufacturers have changed it for their own use.  You just can't on whatever
you figure out to work on one device to work on other devices.

Re: undocumented and private -- if something is not documented, it is
not part of the SDK, and NOT FOR APPS TO USE.  There is no need to play
terminology games about this, we have been very clear from day one that this
is how we do things on Android.

Further, I will ask that you move this discussion off android-developers,
since android-developers is for discussions about using the SDK, and the
calendar provider is not part of the SDK.

On Fri, Feb 25, 2011 at 6:51 AM, Marcin Orlowski
webnet.andr...@gmail.comwrote:

  Anyone needing to ask questions about an undocumented, unsupported API
 should not be using it.

 Calendar is not part of SDK as such situation lets Google change
 whatever they want and to not bother the others, but I dare to point
 that there significiant difference between undocumented and
 private (restricted). Calendar Provider is undocumented.

  Search for Google Calendar GData API.

 Which besides being more official than Calendar Provider requires data
 connection.

  You are cordially invited to add me to your email filters, then, so
  that you don't have to read any more of my messages.

 It seems you took it too personally, for no reason.

  Somebody with the itch to scratch should be creating their own
  compatibility layer atop such undocumented, unsupported APIs. In the
  case of the Calendar, such a compatibility layer:
 [...]
  The same holds true for just about any other undocumented, unsupported
  API in Android. I haven't had the itch, so I have not scratched it. If
  somebody comes up with such a compatibility layer, I will be happy to
  point people in that direction.

 Do agree, but to my knowledge no such layer exists and if TK or anyone
 else is going to write such, he still may need the answers, isn't it?
 We are now falling into academic debate, which imho is of no real
 benefit. If I remember correctly we got 44k devs here so definitely
 one knows the answers.

 --
 Regards,
 Marcin

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




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

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

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

[android-developers] NFC question: card emulation is not supported in the Android SDK yet, right?

2011-02-25 Thread davemac
I'm no NFC guru, but from what I can tell of the docs and the samples,
there's no way to do card emulation on an Android device at this time,
using the SDK. Is that correct?

I see the published classes/methods for reading/writing tags, and for
the Ndef push using P2P and the mysterious com.android.npp package
(anyone know where there's more information on that?). But that
doesn't get me to turning the Android device into whatever tag I want
it to be read as by some other NFC reader, at least I'm pretty sure it
doesn't. Unless the NFC sensor reads and writes my device's tag if
there happens to be one on the device. Is that how it's supposed to
work? If that last part is true, is there some sort of convention on
how I recognize my tag as compared to any other tag I come into
contactless with?

I saw posts describing how to do this from the NDK level but I'm
asking about from the SDK level. I also saw source code with
unpublished methods for card emulation, which leads me to believe that
it's just not possible, yet.

Thanks for any help on this.

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


  1   2   3   >