[android-developers] Re: NullPointerException at MyService.onStartCommand ?

2011-12-20 Thread Terry
Thanks, Kostya, for the additional info.
It was interesting - and informative - reading.

Terry


On 19 Des, 13:51, Kostya Vasilyev kmans...@gmail.com wrote:
 And speaking of firmware updates - please see this old thread:

 https://groups.google.com/forum/#!topic/android-developers/2H-zkME9FB0

 The original 2.3 had a bug affecting service lifecycle callbacks. The
 effects described in the thread are somewhat different, but... it
 looks pretty close.

 -- Kostya

 19 декабря 2011 г. 16:37 пользователь Kostya Vasilyev
 kmans...@gmail.com написал:







  Um, I can't reproduce this with my devices at this time -- but
  remember seeing this on one of them for a service that returned 0
  (i.e. START_STICKY_COMPATIBILITY).

  That was a few months, and a few firmware updates ago.

  I'd just put an if in your code and be done with it.

  -- Kostya

  19 декабря 2011 г. 16:19 пользователь Terry terb...@gmail.com написал:
  Thank you, Kostya - for sending me in the right direction.

  I now understand that the NullPointer Exception (I asked about) should
  be expected by any Service, as the Android system may restart it with
  a null intent - on purpose. However, after I have done some debugging
  using DDMS, I am unable to reproduce this behavior. when I stop a
  process, the service (in the process) always seems to be restarted by
  redelivering the originally used intent, regardless of whether
  START_STICKY, START_STICKY_COMPATIBILITY or START_REDELIVER_INTENT was
  returned from onStartCommand().

  Interested developers should also read
 http://android-developers.blogspot.com/2010/02/service-api-changes-st...

  Terry.

  On 15 Des, 18:05, Terry terb...@gmail.com wrote:
  I followed your advice, and used DDMS to stop the process of an app in
  question.
  Interestingly, it did not crash, but the Service was restarted
  properly, without any error messages shown to the user.
  The value START_STICKY is being (and has always been) returned from
  method onStartCommand().
  So the problem is caused by something else - I guess.

  Terry

  On Dec 15, 2:43 pm, Kostya Vasilyev kmans...@gmail.com wrote:

   Well, maybe you should return START_NOT_STICKY, or
   START_REDELIVER_INTENT, or add an if statement checking for null - it
   just depends on the service.

   Read the docs, run your own experiments with DDMS, then decide what is
   the right thing to do for your code.

   The DDMS Perspective in Eclipse is under Window / Open Perspective /
   Other... / DDMS. The Devices tab lets you terminate your own apps's
   processes.

   -- Kostya

   15 ÄÅËÁÂÒÑ 2011šÇ. 17:28 ÐÏÌØÚÏ×ÁÔÅÌØ Terry terb...@gmail.com ÎÁÐÉÓÁÌ:

And what is the DDMS tab in Eclipse?

Terry

On Dec 15, 2:00špm, Terry terb...@gmail.com wrote:
Thank, Kostya.

So, you mean that I should return START_STICKY_COMPATIBILITY to avoid
this problem?

But the actual problem then probably lies somewhere else, which may
cause the process to fail/stop in the first place.
It could be some Exception. Why are they not registered?

Terry

On 15 Des, 11:59, Kostya Vasilyev kmans...@gmail.com wrote:

http://developer.android.com/reference/android/app/Service.html#onSta...,
 int, int)
 http://developer.android.com/reference/android/app/Service.html#onSta...

 š
 intent šThe Intent supplied to|startService(Intent)
 http://developer.android.com/reference/android/content/Context.html#s...|,
 as given. *This may be null *if the service is being restarted 
 after its
 process has gone away, and it had previously returned anything
 except|START_STICKY_COMPATIBILITY
 http://developer.android.com/reference/android/app/Service.html#START...|.

 

 I believe the above statement is not quite correct about when the 
 intent
 may be null, please see this as well:

http://developer.android.com/reference/android/app/Service.html#START...

 You can try reproducing the issue on your development device by 
 using
 the DDMS tab in Eclipse in killing the service's process. When 
 Android
 restarts the service a bit later, check the intent.

 -- Kostya

 15.12.2011 14:36, Terry ?:

  Occationally users report a NullPointerException Error at
  MyService.onStartCommand() for some of my apps.
  I never see this error when I try to debug the apps, and I 
  wonder why
  this happens.
  I have studied the code both for the methods onStartCommand() and
  onCreate() for the services in question, but I seem unable to 
  find the
  cause of the problem. I suspect that the actual reason for the 
  crash
  lies elsewhere.

  Here is the stack trace, which seems to be identical for all 
  crashes
  on ALL of the apps in question:

  java.lang.RuntimeException: Unable to start service
  ...MyService@405274c8 with null:
  java.lang.NullPointerException
  at 
  

Re: [android-developers] How to build ICS for HTC Wildfire?

2011-12-20 Thread mingzhou zhuang
So, where can i get help, please?

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

[android-developers] Re: One process, two live Application objects?

2011-12-20 Thread Doug


On Dec 19, 8:18 pm, Y2i yur...@gmail.com wrote:
  Hm, so when do you need to just have code start running in your process
  first thing?  Generally it needs to run for something else -- and that
  something else needs to make a call somewhere to get what it wants.  Having
  that call Singleton.getInstance(context) (at which point you can do init
  for the first call) isn't any harder that
  ((Singleton)context.getApplication()), and it has some significant benefits:

 When some activity makes a first call to Singleton.getInstance(context),
 the singleton presumably will keep a reference to the context, directly or
 transitively; otherwise there would be no need to pass the context.

No, Diane is saying that you can say
Singleton.getInstance(context.getApplication()) to pass the
Application reference to the singleton and it will be used to
initialize the singleton if not already.

The situation where all of Diane's suggestions don't work is the case
where you want said singleton to be accessible from an object that
doesn't have access to any kind of Context.  If the getter for the
singleton requires an Application, then you have to have ensure that
the singleton was created ahead of time and instead pass null or
provide another getter that doesn't take an Application.

Specifically, the case for me where Application.onCreate() is
necessary is initializing singletons in this way.  I have a lot of non-
Android java code that hide the details of being run inside or outside
of Android, and singletons are no exception.  If running in Android, I
want a version of my singleton to use a context.  If not Android, a
version with no context (something else).  I need the
Application.onCreate() entry point to establish this configuration for
me or be forced to put that line of init code into every component's
onCreate, which is horrible.

Also, I like Application.onCreate to set up background threads to kick
off work that need not impede the user's progress through the app.
Again, horrible to do that in every component.

Doug


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

2011-12-20 Thread Ali Chousein
I would suggest you to think twice about your if statement if(a ==
b). If 'a' and 'b' are not primitive data types but objects, it's
highly probable that you need to change it into if(a.equals(b)) or
if(b.equals(a)). This is a common mistake most of the people do when
they are experienced in C++ but new in Java (I can tell this also
based on personal experience ;-) )

-
Ali Chousein
Weather-Buddy
http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy
Geo-Filtered Assistant
http://geo-filtered-assistant.blogspot.com
https://marketplace.cisco.com/apphq/products/994

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

2011-12-20 Thread Ali Chousein
Develop in Eclipse and use the debugger. I doubt that you'll find a
breathing debugger, member to this forum (and if you find one, my
respects to him/her).

-
Ali Chousein
Weather-Buddy
http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy
Geo-Filtered Assistant
http://geo-filtered-assistant.blogspot.com
https://marketplace.cisco.com/apphq/products/994

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

2011-12-20 Thread David Setiawan
I'm actually looking for an example or maybe step by step tutorial on how
to make a mobile product catalog for android device. If you dont know what
i mean with mobile product catalog, maybe you can look at samsung mobile
catalog from android market. And that's the one that i want to make or at
least something similar like that. I've trying to search it on google but
it seems that i still can't find it...

Do you have any example or tutorial about how to make a mobile catalog like
that?

Thanks and best regards...^^

On Mon, Dec 19, 2011 at 9:15 AM, TreKing treking...@gmail.com wrote:

 On Fri, Dec 16, 2011 at 2:02 AM, Squallionz 
 david.android1...@gmail.comwrote:

 i got an order from my boss to make a mobile catalog for our company
 product for android devices. Does anyone can help me or maybe have an
 example that i can try and learn from?


 An example for what? What are you looking for that you can't find on your
 own using Google?
 http://www.catb.org/~esr/faqs/smart-questions.html


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

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

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

[android-developers] Re: NFC at Digital Protocol Layer

2011-12-20 Thread ikki_fenix
hello!

If i right, you said me that i need to root my phone, didn't you?
If i don't, i can't access to libnfc-nxp resources, didn't I?

Best Regards,



On 20 dic, 02:52, Alex Che alexey.tchervin...@gmail.com wrote:
 Hello,

 You are right, I had to ask you more details to avoid confusion.

 In your case the only choice is libnfc-nxp. Its code is located in
 droid/external/libnfc-nxp. (droid is the root of android source code).

 I think (not sure though) the function needed for DEP are placed in
 droid/external/libnfc-nxp/src/phHciNfc.h and phHciNfc.c, namely
 *_Select_Target and *_Exchange_Data.

 Please share your experience,
 Best Regards,
 Alexei

 On Dec 15, 11:13 am,ikki_fenixpiltzin1...@gmail.com wrote:







  Hello,

  I'm looking for information about it's possible stablish a P2P
  connection between Android phone and NFC card at NFC-DEP level
  (digital protocol layer) without the higher layers.
  I know that Android 4.0 it's possible to stablish a P2P connection
  using SNEP or NPP protocols but if i can I'll do it at digital
  protocol layer.
  is it possible?

  Thanks for your replay.

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

2011-12-20 Thread Kloze
hi, I find following comment in source code

  // NOTE: Currently, we have to turn off the support for NEON
explicitly.
  // Since the ARMCodeEmitter.cpp is not ready for JITing NEON
  // instructions.

it seem's that ICS not always support NEON right now. At least in part
of JIT .

hope that be useful

On 10月30日, 下午5時20分, B.Arunkumar awsnetworkrecor...@gmail.com
wrote:
 Hi,

    I tried to run hello-neon app in 2.3.3 Emulator and I got the
 following output

 FIR Filter benchmark:
 C version: 2104.32 ms
 Neon Version : Not an ArmV7 CPU!

 I saw this posting that the latest SDK emulator could have support for
 Neon and I downloaded the SDK 4.0 (API 14). I ran the hello-neon app
 on the 4.0 emulator and I get the following message:

 FIR filter benchmark:
 C version : 2102.33 ms
 Neon Version : Program not compiled with Armv7 support

 Does the 4.0 emulator have Neon support? If yes, why wasn't the app
 compiled with Neon support? Could somebody let me know how to compile
 the app with Neon support?

 Thank you,
 B.Arunkumar

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

2011-12-20 Thread Ali Chousein
I think you are a bit confused about design concepts. My humble
suggestion to you is, your server should provide only the data. Your
app should be fully responsible for defining and implementing the UI
at the client side. What if you want to develop an app for iPhone/
iPad, Blackberry or Windows also (God forbid of course :-P )? Is your
server going to define UIs for these clients as well? I don't think
it's a good idea if you want to write native code.

Unless of course if you want to implement an HTML based application.

And what Kris wrote, makes absolute sense.

-
Ali Chousein
Weather-Buddy
http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy
Geo-Filtered Assistant
http://geo-filtered-assistant.blogspot.com
https://marketplace.cisco.com/apphq/products/994


On Dec 19, 11:24 am, Ganesh ganesh.som...@gmail.com wrote:
 I want to create a application for social networking where a user logs
 into his account by some remote server.
 I am confused how to show the user his profile which shows updates
 dynamically as they occur.
 Also where should the xml file required for this be saved, i mean
 should the server provide this file or the application itself should
 create it by taking data from server.

 I hope my question is clear.

 Thanks in advance

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


[android-developers] Re: find word in faster speed

2011-12-20 Thread martypantsROK
Don't forget there are more than data structures involved here.
The method searching could be improved. As Jim suggested, breaking
things down with an index (search for zulu beginning in the z section)
could be sped up even more.  Search for the last letter in the string
first. By searching for that 4th character u first you've
eliminated
3 other characters and can skip on to the next word. That way,
similar
words like zuch or zucchini won't slow you down matching the first two
characters. Works even better for longer words.

Marty

On Dec 20, 4:16 pm, Kristopher Micinski krismicin...@gmail.com
wrote:
 Right,

 but getting the huge thing in the right format, storing that
 statically, etc.., vs preloading the app with a database, which sounds
 easier?  I just think the database sounds like the better way to go on
 this one, and I'm biased to not reinventing the wheel, but the OP is
 obviously free to use whatever..

 kris

 On Tue, Dec 20, 2011 at 2:11 AM, Christopher Van Kirk







 christopher.vank...@gmail.com wrote:
  Then again a Trie isn't really that hard to write.

  On 12/20/2011 3:08 PM, Kristopher Micinski wrote:
  Right,

  But it does have the advantage that the technology on Android is
  already there, so he doesn't have to write the implementation himself,
  or grab one and learn to use it off the web.

  kris

  2011/12/20 Christopher Van Kirk christopher.vank...@gmail.com:
  A conventional database isn't going to do better than a Trie, I think.

  On 12/20/2011 2:46 PM, felix wrote:
  Thanks a lot! I think I'll give database a try!:)

  On 12月20日, 下午1时49分, Kristopher Micinski krismicin...@gmail.com
  wrote:
  OH!  Very sorry!  I didn't see the 500, thousand!!!

  Kris

  On Tue, Dec 20, 2011 at 12:49 AM, Kristopher Micinski

  krismicin...@gmail.com wrote:
   Ah, what a classic question in computer science :-)
  To really get the answer to this question, you're going to have to
  learn a little bit about data structures.  Wait... How is it taking
  you *20 seconds* to find the word!?  That's absurd!  Really?  You're
  doing string comparisons over 500 strings and it's taking you 20
  seconds!?
  Anyway, there are two solutions, you might just try using a database,
  (not a bad idea, actually), or you might use a hash table (lookup
  HashTable), if you want to check for bogus words before searching
  (okay so this is a bit of a stretch and probably not useful but I
  think it deserves a mention) you can look at using a bloom filter...
  Obviously there are tons of other data structures you can use too.
  Kris
  P.s., (did I mention that you should probably be using a database, as,
  for Android, it's probably going the best acceptable solution that is
  fairly extensible.  I'm sure somebody might bring up the possible
  badness of having it out on the SD card somewhere, but even this isn't
  so bad, especially compared to 20 seconds!)
  On Tue, Dec 20, 2011 at 12:26 AM, felix guofuchu...@gmail.com wrote:
  Hi!
  I'm working on a dict app on android,
  I need to search a list of words(about 500-600 thousand words) in file
  to find the word.
  It took me about 10-20 seconds to search the word. How can I improve
  the search speed?
  Thanks to all!
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to 
  android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

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

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


[android-developers] Re: Should i develop for android 2.1, 2,2 or 2.3?

2011-12-20 Thread Ali Chousein
If you don't need a feature which is supported starting from 2.2 or
2.3 etc choose 2.1. You'll be targetting more devices then. Check the
documentation. It tells which feature is supported starting from which
version.

-
Ali Chousein
Weather-Buddy
http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy
Geo-Filtered Assistant
http://geo-filtered-assistant.blogspot.com
https://marketplace.cisco.com/apphq/products/994

On Dec 19, 2:58 am, Bahamut bahamut.a...@gmail.com wrote:
 Hello there, im new arround here :)
 I hope you can answer my question:

 I am going to initiate a project with android 2.1 (there is still a 9% of
 dispositives using 2.1, and as i dont know if 2.2 worths it, i will just
 use 2.1 for compatibility issues). My project will be using in-app
 purchases, the other stuff is basic but maybe i will add notifications and
 curl downloads in the future. Is it a good idea to use 2.1?
 Is there anything nice in 2.2 or 2.3 you can not do with 2.1?

 In what version is in-app purchases supported?
 In what version is notifications supported?
 In what version is online file downloads to the dispositive silently
 supported? (for when you purchase something)

 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] Re: Should i develop for android 2.1, 2,2 or 2.3?

2011-12-20 Thread Kostya Vasilyev
This might be useful in deciding:

http://developer.android.com/resources/dashboard/platform-versions.html

I'd go with 2.0 at this time, unless you need something introduced in 2.1:

http://developer.android.com/sdk/android-2.1.html

-- Kostya

20 декабря 2011 г. 13:13 пользователь Ali Chousein
ali.chous...@gmail.com написал:
 If you don't need a feature which is supported starting from 2.2 or
 2.3 etc choose 2.1. You'll be targetting more devices then. Check the
 documentation. It tells which feature is supported starting from which
 version.

 -
 Ali Chousein
 Weather-Buddy
 http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy
 Geo-Filtered Assistant
 http://geo-filtered-assistant.blogspot.com
 https://marketplace.cisco.com/apphq/products/994

 On Dec 19, 2:58 am, Bahamut bahamut.a...@gmail.com wrote:
 Hello there, im new arround here :)
 I hope you can answer my question:

 I am going to initiate a project with android 2.1 (there is still a 9% of
 dispositives using 2.1, and as i dont know if 2.2 worths it, i will just
 use 2.1 for compatibility issues). My project will be using in-app
 purchases, the other stuff is basic but maybe i will add notifications and
 curl downloads in the future. Is it a good idea to use 2.1?
 Is there anything nice in 2.2 or 2.3 you can not do with 2.1?

 In what version is in-app purchases supported?
 In what version is notifications supported?
 In what version is online file downloads to the dispositive silently
 supported? (for when you purchase something)

 Thanks :)

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

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


[android-developers] HTC Hero API upgrade and root access?

2011-12-20 Thread andu
hello all!

I want to ask one question. I have HTC Hero (With API level-7).  The
API does not have org.w3c.dom.Text.getWholeText() function. Because of
these I want to either upgrade it to API level-8 (or more) or have
external library access to org.w3c.dom jar file. Is it possible to
upgrade? or use external API library instead of the internal one?

In addition, I want to have root access to my mobile phone. Is there
any possible and safe way to do that? Because I want to install new
fonts to the phone.

Thanks in advace,

Andu

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

2011-12-20 Thread Alex Cohn
Usually, the GL thread calls your override of 
android.opengl.GLSurfaceView.Renderer.onDrawFrame()http://android-developers.blogspot.com/2009/04/introducing-glsurfaceview.htmlmethod.
 You can add there 
SystemClock.sleep(millis)http://developer.android.com/reference/android/os/SystemClock.html#sleep%28long%29or
 something similar to slow down this thread.

But maybe you need the 
onPause()http://developer.android.com/reference/android/opengl/GLSurfaceView.html#onPause%28%29and
 
onResume()http://developer.android.com/reference/android/opengl/GLSurfaceView.html#onResume%28%29methods
 ofGLSurfaceView
.

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

2011-12-20 Thread Kostya Vasilyev

Do you have more info on when this happens?

20.12.2011 6:59, Richard Schilling пишет:
This topic seems to have become re-relevant with the 4.0 release. I'm 
seeing Application.onCreate being called multiple times. It looks like 
what Diane described above with multiple processes getting their own 
instance of Application is being more aggressively adhered to.




--
Kostya Vasilyev

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

2011-12-20 Thread Alex Cohn


On Thursday, August 18, 2011 10:46:11 AM UTC+3, Jeffrey wrote:


 public boolean onTouchEvent(final MotionEvent event) { 
 queueEvent(new Runnable(){ 
 public void run() { 
 mRenderer.setColor(event.getX() / getWidth(), 
 event.getY() / getHeight(), 1.0f); 
 }}); 
 return true; 
 } 

 does not not work. I get the following error The method 
 queueEvent(new Runnable(){}) is undefined for the type Main 


The method queueEvent() is defined for 
android.opengl.GLSurfaceViewhttp://developer.android.com/reference/android/opengl/GLSurfaceView.htmlclass.
 You are trying to call it from class Main which does not extend this 
view class.

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

2011-12-20 Thread Zsolt Vasvari
Ali, you are a saint...  For actually responding to this query.

On Dec 20, 4:49 pm, Ali Chousein ali.chous...@gmail.com wrote:
 Develop in Eclipse and use the debugger. I doubt that you'll find a
 breathing debugger, member to this forum (and if you find one, my
 respects to him/her).

 -
 Ali Chousein
 Weather-Buddyhttp://weatherbuddy.blogspot.com|http://twitter.com/weather_buddy
 Geo-Filtered 
 Assistanthttp://geo-filtered-assistant.blogspot.comhttps://marketplace.cisco.com/apphq/products/994

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


Re: [android-developers] Re: Using queueEvent for OpenGL

2011-12-20 Thread Christopher Van Kirk

Try GLSurfaceView.

On 12/20/2011 5:32 PM, Alex Cohn wrote:



On Thursday, August 18, 2011 10:46:11 AM UTC+3, Jeffrey wrote:


public boolean onTouchEvent(final MotionEvent event) {
queueEvent(new Runnable(){
public void run() {
mRenderer.setColor(event.getX() / getWidth(),
event.getY() / getHeight(), 1.0f);
}});
return true;
}

does not not work. I get the following error The method
queueEvent(new Runnable(){}) is undefined for the type Main 



The method queueEvent() is defined for android.opengl.GLSurfaceView 
http://developer.android.com/reference/android/opengl/GLSurfaceView.html 
class. You are trying to call it from class Main which does not extend 
this view class.

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

2011-12-20 Thread Solution 9420
Hi,
I'm the auther of 9420 Thai Keyboard which incorporates English word
suggestion feature as well.
I've around 200K words and can look up in average of 80 mSec.

Assuming the word DB is static, I've done the following...
1. pre-sorted your word in file.
2. pre-index your words.
3. Use binary search tree algorithm.

You'll have to a bit careful the size of the index file, and very
optimized on memory usage to avoid the delay from JAVA gabage
collection as well.

Cheers,
Solution 9420...

www.solution9420.com




On Dec 20, 12:26 am, felix guofuchu...@gmail.com wrote:
 Hi!
 I'm working on a dict app on android,
 I need to search a list of words(about 500-600 thousand words) in file
 to find the word.
 It took me about 10-20 seconds to search the word. How can I improve
 the search speed?

 Thanks to all!

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

2011-12-20 Thread Hera
Hello,

I’m trying to see if the assistance data is injected into the GPS by
examining the logcat but I’m not able to know where the problem is. As
I can see in logcat messages, Android fist tries to connect with the
SUPL server but it fails, whereas the NTP time injection is well done.
Finally, a xtra data download request is done (my devices has a
Qualcomm chip) but there is no message to see whether it is well done
or not.

Logcat messages:

// SUPL A-GPS
D/GpsLocationProvider(   96): set_capabilities_callback: 7 D/
lib_locapi(   96): loc_eng_init called, client id = 0 D/
lib_locapi(   96): loc_eng_set_default_agps_server, type = 1, hostname
= supl.google.com, port = 7276 D/lib_locapi(   96):
loc_eng_process_deferred_action started D/lib_locapi(   96): Setting
GPS privacy lock to RPC_LOC_LOCK_NONE D/lib_locapi(   96):
loc_eng_set_gps_lock mode, client = 0, lock_type = 1
D/lib_locapi(   96): loc_eng_set_gps_lock mode failed

// NTP
D/GpsLocationProvider(   96): NTP server returned: 1306739478749 (Mon
May 30 09:11:18 GMT+02:00 2011) reference: 38652 certainty: 73 system
time offset: 12419 D/lib_locapi(   96): loc_eng_inject_time,
uncertainty = 73

// XTRA DATA Qualcomm
D/lib_locapi(   96): loc_event_cb: xtra download requst

Is there any way to get more information related with the GPS
behavior?

I have made another simple test with other device (same model but
early android version and different applications running) and I am
able to see more information related with the xtra data injection:

D 96/GpsLocationProvider: calling native_inject_xtra_data
D 96/GpsLocationProvider: Acquiring wakelock
D 96/libgps: qct_gps_inject_xtra_data length: 39635 parts: 100

I do not understand the reason why the logcat is different and has
more information, any idea?

Any help will be appreciated

Thank you

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


Re: [android-developers] Re: find word in faster speed

2011-12-20 Thread Kristopher Micinski
On Tue, Dec 20, 2011 at 4:10 AM, martypantsROK martyg...@gmail.com wrote:
 Don't forget there are more than data structures involved here.
 The method searching could be improved. As Jim suggested, breaking
 things down with an index (search for zulu beginning in the z section)
 could be sped up even more.  Search for the last letter in the string
 first. By searching for that 4th character u first you've
 eliminated
 3 other characters and can skip on to the next word. That way,
 similar
 words like zuch or zucchini won't slow you down matching the first two
 characters. Works even better for longer words.

 Marty

I guess my point in all of this is that this searching is highly tied
to your data structure.  Good algorithms only work with good data
structures to back them.  And there are many indexing and optimization
techniques you can use to get more efficiency.  My point is, that
since you can argue all day over these things getting more and more
complicated data structures and searching algorithms (each becoming
more and more context dependent), most of the time for this
application using a database will suffice.  If you use a database,
whose indexing method is already going to be pretty good, and find it
doesn't suit your needs, *then* you can switch over to using something
fancier, though I highly doubt you'd need anything much fancier than a
trie in this case.

SQLite is using B+ trees for tables, while this isn't *amazing*
(especially compared to what you'll see with a trie), it's still going
to be massively better (where massively = logarithmic), than just
linear search.  Along with this, it looks like Solutin 9420 shared
his advice...  And don't forget about the bloom filter, (this won't
actually help you that much unless you're doing a bunch of queries in
a row, most of which might not be int he database, but I wanted to
bring it up again anyway..)

kris

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


[android-developers] Is it possible to use the UI controls while the ProgressDialog is on?

2011-12-20 Thread B.Arunkumar
Hi,

I have a progress dialog which shows up on a Button Click. Now I
want to change same the button as a cancel button to dismiss the
ProgressDialog. Can it be done?

Thank you,
B.Arunkumar

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Customize Android Source Code to run multiple Application on same Screen.

2011-12-20 Thread Varun Tewari
I have encountered similar situation.
The only difference is i don't want to preview different application
created by others.
I have multiple apks each one has one preview to show inside one base
application. All these previews in each apk, is a fragment of 2x2.
Can anybody help me with that?

Reg,
Varun



On Sat, Nov 12, 2011 at 6:51 AM, Lew lewbl...@gmail.com wrote:



 On Wednesday, November 9, 2011 5:15:30 AM UTC-8, Pawan wrote:

 You mean to say on wrong group,


 No, they meant wrong list, not wrong group.  If they'd meant wrong group,
 they wouldn't have said, wrong list.


 I have applied to those groups for membership.
 Since some people are common on all the groups,
 so trying luck here. I can't sit and wait for approval.


 Lists like this are not a personal, free help desk where you can demand
 instant service.  They are a volunteer-based community of people with
 shared interests.  You cannot demand quick answers, especially when you are
 on the wrong list.  This is neither good etiquette nor good sense.

 Post on the correct list, please.


 On Wed, Nov 9, 2011 at 6:31 PM, Kostya Vasilyev kman...@gmail.comwrote:

  First and foremost, you're on the wrong list.

 Find a more appropriate one here:

 http://source.android.com/**community/index.htmlhttp://source.android.com/community/index.html


 09.11.2011 16:58, Pawan Singh Rathore пишет:

 Am I in right direction?


 --
 Kostya Vasilyev

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

 To unsubscribe from this group, send email to
 android-develop...@**googlegroups.com

 For more options, visit this group at
 http://groups.google.com/**group/android-developers?hl=enhttp://groups.google.com/group/android-developers?hl=en


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

2011-12-20 Thread Christopher Van Kirk

Three points.

1) Building the searching functionality twice is far more expensive than 
building it once, no matter what approach you use. Be sure that the 
performance of the DB approach is acceptable before you go and build it 
that way.


2) It can be quite challenging to get decent performance out of a 
database for something like this, depending on the functionality 
required. If, for example, you need real-time narrowing down of words, a 
database is going to be very slow (e.g. as you type letters, you get an 
alphabetized list of what's in the db).


3) There's probably an open source Trie out there somewhere that you can 
just use.


Directed at the OP, of course.

Cheers...

On 12/20/2011 5:43 PM, Kristopher Micinski wrote:

On Tue, Dec 20, 2011 at 4:10 AM, martypantsROKmartyg...@gmail.com  wrote:

Don't forget there are more than data structures involved here.
The method searching could be improved. As Jim suggested, breaking
things down with an index (search for zulu beginning in the z section)
could be sped up even more.  Search for the last letter in the string
first. By searching for that 4th character u first you've
eliminated
3 other characters and can skip on to the next word. That way,
similar
words like zuch or zucchini won't slow you down matching the first two
characters. Works even better for longer words.

Marty

I guess my point in all of this is that this searching is highly tied
to your data structure.  Good algorithms only work with good data
structures to back them.  And there are many indexing and optimization
techniques you can use to get more efficiency.  My point is, that
since you can argue all day over these things getting more and more
complicated data structures and searching algorithms (each becoming
more and more context dependent), most of the time for this
application using a database will suffice.  If you use a database,
whose indexing method is already going to be pretty good, and find it
doesn't suit your needs, *then* you can switch over to using something
fancier, though I highly doubt you'd need anything much fancier than a
trie in this case.

SQLite is using B+ trees for tables, while this isn't *amazing*
(especially compared to what you'll see with a trie), it's still going
to be massively better (where massively = logarithmic), than just
linear search.  Along with this, it looks like Solutin 9420 shared
his advice...  And don't forget about the bloom filter, (this won't
actually help you that much unless you're doing a bunch of queries in
a row, most of which might not be int he database, but I wanted to
bring it up again anyway..)

kris



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


Re: [android-developers] Re: find word in faster speed

2011-12-20 Thread Kristopher Micinski
On Tue, Dec 20, 2011 at 4:59 AM, Christopher Van Kirk
christopher.vank...@gmail.com wrote:
 Three points.

 1) Building the searching functionality twice is far more expensive than
 building it once, no matter what approach you use. Be sure that the
 performance of the DB approach is acceptable before you go and build it that
 way.

Okay.

 2) It can be quite challenging to get decent performance out of a database
 for something like this, depending on the functionality required. If, for
 example, you need real-time narrowing down of words, a database is going to
 be very slow (e.g. as you type letters, you get an alphabetized list of
 what's in the db).

True..

 3) There's probably an open source Trie out there somewhere that you can
 just use.


Right, which is what I suggested in the first place if he goes this direction..

http://wikipedia-clustering.speedblue.org/trieJava.php

kris

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


[android-developers] TextView ellipsize marquee on Ice Cream Sandwich

2011-12-20 Thread YuviDroid
Hey there,

I found something strange about ellipsize=marquee on my Galaxy Nexus...or
better...it doesn't work. Instead of seeing nice fading edges at the end of
the word (when the word doesn't fit the view of course), you get the normal
dots (...).
After some digging through the ICS source code I found, in the
ViewConfiguration class, this (which enables/disables the fading edge for
marquee):

mFadingMarqueeEnabled =
res.getBoolean(com.android.internal.R.bool.config_ui_enableFadingMarquee);

For some reason on the Galaxy Nexus (Android 4.0.1) this is actually
false. Do you have any idea on why is that?
I also tried with Android 4.0.3 on the Nexus S, with the same results.

As a test, I tried using Reflection to force the value
of mFadingMarqueeEnabled to true. And while it does work in my own
Activities, in doesn't work on AppWidgets (and that's where I'm actually
using this).

Do you know if it's actually possible somehow to change the boolean value
of com.android.internal.R.bool.config_ui_enableFadingMarquee? (I believe
not... :( )

On the emulator (tested both with Android 4.0 and 4.0.3) this is actually
set to true.


If you have an ICS device could you check if fading edges work for you? (a
quick way to check this is to place on your homescreen an app with a long
name - e.g. News  Weather - and see if it shows .. at the end of the
name, or if it fades nicely).


Thank you,
Cheers,
Yuvi



-- 
YuviDroid
Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget
to quickly access your favorite apps and contacts!)
http://www.droidahead.com/apps/launchx/ http://android.yuvalsharon.net

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

[android-developers] Re: Is it possible to use the UI controls while the ProgressDialog is on?

2011-12-20 Thread srihari babu
build custom progress dialog, which is a combination of progress bar  and a 
button.

Regards,
Srihari

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Couldnt find full_maguro-userdebug in the lunch menu for Samsung Nexus S(2.3.4-r1 AOSP)

2011-12-20 Thread s.rawat
HI ,
I have not been able to find the full_maguro-userdebug option  while
issuing the the  lunch command while building for Samsung Nexus fom
2.3.4-r1?Plz assist.How to add this in the config file.
Rgds,
Softy
..pain is temporary.quitting lasts forever..

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Showing fragment of multiple apks in other apk's activity

2011-12-20 Thread Varun Tewari
Guys,

I have encountered a situation which i don't know how to proceed with.
I have multiple apks , each one has one preview to show inside one base
activity of other apk. All these previews in each apk, is a fragment of 2x2.
Is there a way i can do it on SDK level?
If yes can anybody help me with that?

Reg,
Varun

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

Re: [android-developers] android robot

2011-12-20 Thread Michael Banzon
+1

Thanks for sharing - it looks like a very cool project!!

I'm trying to get more time to experiment with NXT 2.0 + Android ;-)


On Tue, Dec 20, 2011 at 6:51 AM, Kristopher Micinski
krismicin...@gmail.com wrote:
 Arnaldo,

 Very cool, thanks for sharing!

 kris

 On Tue, Dec 20, 2011 at 12:07 AM, arnaldomac_gmail arnaldo...@gmail.com 
 wrote:
 My  android robot
 http://www.youtube.com/watch?v=QI78ZeLQ2H4list=UUqrSlSh9C2fHEEon_DFXvyAindex=1feature=plcp

 :)


 []s

 Best Regards

 Arnaldo




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



-- 
Michael Banzon
http://michaelbanzon.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: Is it possible to use the UI controls while the ProgressDialog is on?

2011-12-20 Thread B.Arunkumar
Hi,

   This can be done. What I want is a way to use the same button for
showing the progressdialog and later cancelling it. Probably I should
go in for some animated imagview instead of progressdialog for my
requirement, I guess.

Thank you,
B.Arunkumar

On Dec 20, 3:58 pm, srihari babu hisriharib...@gmail.com wrote:
 build custom progress dialog, which is a combination of progress bar  and a
 button.

 Regards,
 Srihari

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


[android-developers] How to resolve this error 'Failure [INSTALL_FAILED_DEXOPT]' during coping .apk to device

2011-12-20 Thread Abhishek Kumar Gupta
When I am trying to install .apk file to device, it is showing  'Failure 
[INSTALL_FAILED_DEXOPT]' . I have used the *./adb install -r ClockWidget.apk
* in the platform-tools of the Android SDK in terminal. This .*apk* with .*
odex* is generated(corresponging to the particular Application) after 
compiling ICS source.

Any help in this regard will be well 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: Is it possible to use the UI controls while the ProgressDialog is on?

2011-12-20 Thread Kostya Vasilyev
Um, unless I'm missing something...

You can't use the same button because presumably the button to launch
the long-running operation is not in the dialog, it's in the activity
- and dialogs prevent interaction with activity UI elements while
displayed.

What you can do is one of:

1) Build your own dialog with a cancel button;

2) Use Dialog.setOnCancelListener which gets called if the user
presses the Back key; here the dialog is dismissed automatically;

3) Set a key listener in the dialog and check for when the back key is
pressed, something like:

mProgressDialog = new ProgressDialog(mActivity);


mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
mProgressDialog.setMax(item.fetch_decoded_size / 1024);

mProgressDialog.setTitle(R.string.attachment_dialog_title);
mProgressDialog.setCancelable(false);
mProgressDialog.setOnKeyListener(new OnKeyListener() {
@Override
public boolean onKey(DialogInterface dialog, 
int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK  
event.getAction() ==
KeyEvent.ACTION_UP
 
event.getRepeatCount() == 0) {
cancelDownload();
return true;
}
return false;
}
});

In this code, canceling the operation can take some time, so I made
the dialog non-cancelable to be able display Canceling

-- Kostya

20 декабря 2011 г. 15:32 пользователь B.Arunkumar
awsnetworkrecor...@gmail.com написал:
 Hi,

   This can be done. What I want is a way to use the same button for
 showing the progressdialog and later cancelling it. Probably I should
 go in for some animated imagview instead of progressdialog for my
 requirement, I guess.

 Thank you,
 B.Arunkumar

 On Dec 20, 3:58 pm, srihari babu hisriharib...@gmail.com wrote:
 build custom progress dialog, which is a combination of progress bar  and a
 button.

 Regards,
 Srihari

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

2011-12-20 Thread Mathew Goldsborough
Is it possible to programmatically determine where a Toast
notification came from?  I'm thinking maybe register a
BroadcastReceiver or some kind?  Or are toast notitifications so
generic that it is impossible to determine?

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] Slow emulator, solutions ?

2011-12-20 Thread Michael Banzon
Get a real Android device. IMHO you'll be much happier testing a
snake sample program on a real device.

On Tue, Dec 20, 2011 at 7:35 AM, sl.laptop@maxis ecp_...@my-rialto.com wrote:
 I am still troubled by the slow emulator, which takes about 10 to 15 minutes
 to start an activity, eg snake sample program.

 My laptop: windowsxp sp2, Intel T2300 1.66 MHz, 2GB RAM, 100GB free space

 What solution ?

 1. Forget emulator, get an android phone, and do the testing on the phone.
 2. Increase RAM.
 3. Buy new computer.

 Please recomment, but please suggest the most economical and feasile
 solution first. Thanks

 --
 Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

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



-- 
Michael Banzon
http://michaelbanzon.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] Slow emulator, solutions ?

2011-12-20 Thread Michael Banzon
Oh - and to elaborate some more. AFAIK the reason it is so slow is
that it is not an emulator but a simulator.


On Tue, Dec 20, 2011 at 7:35 AM, sl.laptop@maxis ecp_...@my-rialto.com wrote:
 I am still troubled by the slow emulator, which takes about 10 to 15 minutes
 to start an activity, eg snake sample program.

 My laptop: windowsxp sp2, Intel T2300 1.66 MHz, 2GB RAM, 100GB free space

 What solution ?

 1. Forget emulator, get an android phone, and do the testing on the phone.
 2. Increase RAM.
 3. Buy new computer.

 Please recomment, but please suggest the most economical and feasile
 solution first. Thanks

 --
 Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

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



-- 
Michael Banzon
http://michaelbanzon.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: December 2011: Market downloads are dropping like crazy - why?

2011-12-20 Thread Terry
December 20 (afternoon): Suddenly it was fixed again!
Strange.

Terry


On 20 Des, 08:58, Zsolt Vasvari zvasv...@gmail.com wrote:
 I'd say this is just a slow week with Chirstmas and everything, but I
 am seeing the same thing.

 On Dec 20, 3:44 pm, Terry terb...@gmail.com wrote:







 December20: Now it has started again. The graphical display of the
  number of downloads (of ALL apps I have checked) is dropping
  significantly again. Even though the Market app no longer seems to
  show this graphical display, other browsers do, and it is disapointing
  that this should FAIL again !?

  Terry

  On 8 Des, 09:23, Nikolay Elenkov nikolay.elen...@gmail.com wrote:

   On Thu, Dec 8, 2011 at 5:15 PM, Terry terb...@gmail.com wrote:
The number of downloads seems to be picking up again.

   Same here.

At the same time, the Market team informs us that the install graphs
displayed in the web view of Android Market were not accurately
displaying the install activity data, and have removed them - for
now.
So, obbviously, SOMETHING has happened, and it seemed to affect most
of the apps (?).

   Pretty much all apps I looked at in the web Market had a huge drop
   in the graph, so I'm guessing it was/is global or at least wide spread.

I suspect that it wasn't the number of downloads that dropped, but the
registration of them.

   As usual, Admob impressions and/or Flurry events are way more accurate
   metrics. (Admob was broken for a while too, though).- Hide quoted text -

  - Show quoted text -

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


[android-developers] Re: Let device sleep while playing VideoView

2011-12-20 Thread lbendlin
What's the rationale behind playing the video when a) nobody is watching 
and b) when nobody can even see it? Just stop the video after your 
inactivity timer expires.

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

2011-12-20 Thread Mark Murphy
On Tue, Dec 20, 2011 at 6:58 AM, Mathew Goldsborough
mgoldsboro...@mg2innovations.com wrote:
 Is it possible to programmatically determine where a Toast
 notification came from?

Only if you build your own firmware.

 I'm thinking maybe register a
 BroadcastReceiver or some kind?

No.

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

Android App Developer Books: http://commonsware.com/books

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


Re: [android-developers] Fragment IPC : How could I instantiate a fragment that exists in another project's package?

2011-12-20 Thread Mark Murphy
On Tue, Dec 20, 2011 at 2:26 AM, Android Holder skybrea...@yahoo.cn wrote:
 Since fragment can be used in different activities,so I think it is
 reasonable that an activity of project A can use the fragment of
 project B.

Only if Project B is an Android library project, compiled into Project A.

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

Android App Developer Books: http://commonsware.com/books

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


Re: [android-developers] Need help on making mobile catalog

2011-12-20 Thread TreKing
On Tue, Dec 20, 2011 at 2:50 AM, David Setiawan david.android1...@gmail.com
 wrote:

 Do you have any example or tutorial about how to make a mobile catalog
 like that?


I don't and it'll probably be difficult to find an example of something
that specific. Design your app, figure out how you want it to work, then
break it down into its different parts. Instead of mobile app catalog,
maybe you'll have a Gallery View, a List View, or some such other UI
elements with certain behaviors. Read through the docs and find examples on
*those* independent parts then piece them together.

-
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] How to change the design size of the application for each and every mobiles

2011-12-20 Thread TreKing
On Mon, Dec 19, 2011 at 11:19 PM, mohana priya gpriyara...@gmail.comwrote:

 I have designed my phonegap android application using html and javascript.


If you have a question or problem on configuring your PhoneGap-developed
application, you should ask on a PhoneGap-related group or forum.

-
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: GPS information with logcat

2011-12-20 Thread lbendlin
this is totally depending on the GPS chipset implementation in each device. 
You will have to raise your question with the device manufacturers.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Accessing extra Call features like Hold, SWAP, Conference from Third party Application

2011-12-20 Thread Swapnil Dalal
Hi All,

I am developing an application where I need to provide functionality
of Hold Active call, Make conference call, Swap Calls and Mute the
call.

I tried to use ITelephony.aidl for Mute and it didn't work as
required. Also I didn't got any help in implementing other functions
too.

Can any one suggest/ found any solution to solve this problem
Please give some pointers if any one got any solution.


Thanks and regards,
Swapnil

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

2011-12-20 Thread TreKing
On Mon, Dec 19, 2011 at 11:47 PM, seema seema22...@gmail.com wrote:

 The wait is never been notified.


There are many facilities in the Android SDK to simplify threading. Review
them and see if there is a better option to what you're doing.


 I get force close after few minutes.


Debug your app.

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

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

[android-developers] Problem on button click

2011-12-20 Thread B.Arunkumar
Hi,

I have a very unique problem which is sort of difficult to
describe. We have developed an application where we connect to a
server on the first screen with a button click (call it button1 which
can also cancel)  using an asyncTask as given in this url:

http://vikaskanani.wordpress.com/2011/08/03/android-proper-way-to-cancel-asynctask/

Upon connection to the server, the first screen transitions into the
second screen through an intent call where we have a listview for
which we have written clicklisteners.

What happens is:

1. when we click button1 after the Async call is completed for
cancelling, cancelling does not happens and the first screen
transitions into the next screen.
2. And worse thing that happens is the uncancelled button click event
of the first screen causes the listview clicklistener of the second
screen to fire.

Why does this happen? And can somebody give me any pointers to atleast
stop the listview clicklistener from firing?

Thank you,
B.Arunkumar

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


Re: [android-developers] Problem on button click

2011-12-20 Thread TreKing
On Tue, Dec 20, 2011 at 8:32 AM, B.Arunkumar
awsnetworkrecor...@gmail.comwrote:

 Why does this happen?


You have a bug in your app.


 And can somebody give me any pointers to atleast stop the listview
 clicklistener from firing?


Debug your app. Step through the code with your debugger and / or place a
buttload of LogCat statements at each step of your code that things are
happening when they shouldn't be. There's just not enough here to tell you
this is exactly what is wrong, fix this one thing.

-
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] Animation effect from button?

2011-12-20 Thread Duygu Kahraman
 It can be basic but i didnt do before.

I have a button.And i add a window from button.But i want to this
window color lightening like a alarm effect(Means black window will
turn red smooth effect).

How can i do that? I must use animation or a can do it this way.

THX.

Duygu Kahraman

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

2011-12-20 Thread Md.Fazla Rabbi OPU
Actually your problem is in your * imageInSD String. *Because this string
takes the *id* of the image not the *path*. But the* *method
*decodeFile *takes
path of the image as a parameter that should be stored in sdcard.*
*So first store the image into sdcard then refer the path*.

Changeprivate final String imageInSD = R.drawable.honeycomb;*

   TO

*  private final String imageInSD = /sdcard/honeycomb.png;*

Hope this will work.

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

Re: [android-developers] Animation effect from button?

2011-12-20 Thread TreKing
On Tue, Dec 20, 2011 at 9:17 AM, Duygu Kahraman
duygu.kahram...@gmail.comwrote:

 How can i do that?


Your question is not very clear. Have you reviewed the documentation on
Animation? What have you tried?

-
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: pleasehelp me on below query

2011-12-20 Thread chowdary nani
Hi,
thanks for  reply.
I to do the same thing but image is not displaying.I can not understand how
the image in sdcard is taken in to the application.Please help on this.

On Tue, Dec 20, 2011 at 8:50 PM, Md.Fazla Rabbi OPU md.fazlara...@gmail.com
 wrote:

 Actually your problem is in your * imageInSD String. *Because this string
 takes the *id* of the image not the *path*. But the* *method *decodeFile 
 *takes
 path of the image as a parameter that should be stored in sdcard.*
 *So first store the image into sdcard then refer the path*.

 Changeprivate final String imageInSD = R.drawable.honeycomb;*

TO

 *  private final String imageInSD = /sdcard/honeycomb.png;*

 Hope this will work.

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


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

2011-12-20 Thread Md.Fazla Rabbi OPU
If you are using eclipse then it is very easy. Click* DDMS *then u
will see*File Explorer
*. If *File Explorer* is not displayed click
*Window-Show View-File Explorer* .In File Explorer u can see 3 folders
click on *mnt *folder then u can see *sdcard*. Select *sdcard* . Right side
of the *File Explorer* u can see two icons with arrow. This two are used to
push a file into or delete a file from the *sdcard*. Hope u can use this to
insert a image.

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

[android-developers] Re: question about lockscreens

2011-12-20 Thread kalzenith
well that was a very well considered response, thanks.

you are probably right, undertaking a lockscreen right off the bat is
probably not a good idea. you see, the reason why i wanted to develop
one was so that i could make a passworded lockscreen, but the password
would have only been a backup. The primary unlock method would have
been whenever the application detects a specific RFID tag with NFC. i
monkeyed around with the intents in your widgetlocker app
(com.teslacoilsw.widgetlocker.UNLOCK) in an attempt to call that
intent from NFC task launcher, but i couldnt make the intent work, so
i figured i would just try to write my own, lol.

1. thanks, i will make learning how to run services my next task

2.yes, i meant my own activity, moveTaskToBack() will probably work
perfectly.

On Dec 18, 3:30 pm, Kevin TeslaCoil Software ke...@teslacoilsw.com
wrote:
  But does this mean that you guys are opposed to well known apps
  such as WidgetLocker, or Lockscreen Agenda?

 Well I'm the developer of WidgetLocker, so I'm not opposed to it at
 all :P. But this list is about developing apps that following the
 documentation, guidelines and restrictions of the SDK. WidgetLocker
 does not. I know it's hypocritical but I recommend other app devs,
 especially ones just starting, follow the SDK.  It's safer and easier,
 and (mostly) protects you from fragmentation (I test against ~20
 devices. I still need more). As you noticed, this list isn't very
 helpful if you chose to ignore the SDK rules. I imagine most devs that
 do, including myself, don't discuss it much. If you choose to ignore
 them, you're on your own.

  I wish to make an app that
  acts as a lockscreen. it would disable the home button, disable the
  back button, and then it would dismiss itself upon a successful entry
  of a password.

 Implementing security in an app, rather than at the system level, is a
 huge task and well beyond the scope of this list. There isn't even
 anyone to discuss it with, as it has not been done. Find an app that
 implements security (Note: WidgetLocker does not. There is good
 reason.) and if you can't bypassing it in less than 5 minutes, you
 aren't trying hard enough. Android is designed to disallow apps from
 blocking other apps.

 Even ignoring the Home and recent apps buttons, what about an incoming
 call? Or a phone reboot? Or a SMS popup? Or any notification in the
 notification bar for that matter? Or a malicious app? Or a task
 killer? Or the system task killer? Or out of memory? Or a bug causing
 a force close? It certainly is possible to display a screen that
 prompts for a password and when the password is enter the screen
 disappears. But implementing it in a manner that is more than just a
 false sense of security is very different. I theorize that with root
 and/or a device admin and a slightly-to-incredibly awkward user
 experience it's possible, but even if that's true it's a lot of work
 and a lot of testing and I guarantee you'd run into fragmentation
 issues of trying to support Sense vs Blur vs TouchWiz vs Stock. A
 custom rom, rather than an app, definitely could do this, but again
 this list is not the place to discuss that (There's a firmware
 building/modifying list for that kind of thing).

  1. how do i make an application launch when the screen is activated?

 ACTION_SCREEN_OFF and ACTION_SCREEN_ON broadcasts. You'll need a
 service running to receive them (not a manifest receiver). Also note
 that no app can start within 5 seconds of the Home button being
 pressed, so Home, screen off, screen on, and you're delayed.

  2. what method does one call to dismiss an application? (for example,
  when a password is entered successfully)

 Your own activity you mean? finish() or moveTaskToBack().

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

2011-12-20 Thread Hera
Thank you Ibendlin but both devices are Nexus One (differente ANDROID
versión) therefore I think that I am misleading something when I get
the logcat messages.

On 20 dic, 14:34, lbendlin l...@bendlin.us wrote:
 this is totally depending on the GPS chipset implementation in each device.
 You will have to raise your question with the device manufacturers.

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


[android-developers] Re: NFC at Digital Protocol Layer

2011-12-20 Thread Alex Che
Hello,

I do not know exactly about rooting for libnfc-nxp. I have no
experience with the phones. You should to try or to ask someone else.

Best regards,
Alexei

On Dec 20, 11:59 am, ikki_fenix piltzin1...@gmail.com wrote:
 hello!

 If i right, you said me that i need to root my phone, didn't you?
 If i don't, i can't access to libnfc-nxp resources, didn't I?

 Best Regards,

 On 20 dic, 02:52, Alex Che alexey.tchervin...@gmail.com wrote:







  Hello,

  You are right, I had to ask you more details to avoid confusion.

  In your case the only choice is libnfc-nxp. Its code is located in
  droid/external/libnfc-nxp. (droid is the root of android source code).

  I think (not sure though) the function needed for DEP are placed in
  droid/external/libnfc-nxp/src/phHciNfc.h and phHciNfc.c, namely
  *_Select_Target and *_Exchange_Data.

  Please share your experience,
  Best Regards,
  Alexei

  On Dec 15, 11:13 am,ikki_fenixpiltzin1...@gmail.com wrote:

   Hello,

   I'm looking for information about it's possible stablish a P2P
   connection between Android phone and NFC card at NFC-DEP level
   (digital protocol layer) without the higher layers.
   I know that Android 4.0 it's possible to stablish a P2P connection
   using SNEP or NPP protocols but if i can I'll do it at digital
   protocol layer.
   is it possible?

   Thanks for your replay.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Showing fragment of multiple apks in other apk's activity

2011-12-20 Thread Varun Tewari
I know we can share layouts from other apks. Have successfully did it.
But not able to inflate layouts with Fragments from others apk.
Do we need to specify anything special for it.

Reg,
Varun

On Tue, Dec 20, 2011 at 4:45 PM, Varun Tewari varuntewari2...@gmail.comwrote:

 Guys,

 I have encountered a situation which i don't know how to proceed with.
 I have multiple apks , each one has one preview to show inside one base
 activity of other apk. All these previews in each apk, is a fragment of 2x2.
 Is there a way i can do it on SDK level?
 If yes can anybody help me with that?

 Reg,
 Varun


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

2011-12-20 Thread Y2i


 No, Diane is saying that you can say
 Singleton.getInstance(context.getApplication()) to pass the
 Application reference to the singleton and it will be used to
 initialize the singleton if not already.

No, Diane was clearly saying Singleton.getInstance(context) to pass context 
(not the application) reference to the singleton (and it will be used to 
initialize the singleton if not initialized already).  And passing context 
of random activities to initialize a singleton will result in the problems 
described earlier.

Consistently calling Singleton.getInstance(context.getApplicationContext()) 
or Singleton.getInstance(context.getApplication()) will avoid memory leaks 
and dead context problems, but the signature of the 
Singleton.getInstance(Context) 
does not ensure that the method will always be called with the application 
context as the parameter, which is not the best choice from API design 
perspective.

Having a method Singleton.getInstance(Application) instead of 
Singleton.getInstance(Context) 
will ensure that no activity context will be used to initialize the 
Singleton object.  But from API design perspective this method signature is 
not the best one because the actual parameter will only be used once and 
ignored all other times.  Using new NormalObject(Application) instead of 
Singleton.getInstance(Application) is a cleaner API.
 

 Specifically, the case for me where Application.onCreate() is

 necessary is initializing singletons in this way.  I have a lot of non-
 Android java code that hide the details of being run inside or outside
 of Android, and singletons are no exception.  If running in Android, I
 want a version of my singleton to use a context.  If not Android, a
 version with no context (something else).  I need the
 Application.onCreate() entry point to establish this configuration for
 me or be forced to put that line of init code into every component's
 onCreate, which is horrible.

This is exactly what I meant when I said Application.onCreate() would be 
the best place to initialize singletons that require a 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

Re: [android-developers] Re: One process, two live Application objects?

2011-12-20 Thread Kostya Vasilyev
Um... Singleton.getInstance(Context) can call getApplicationContext on
the Context that's passed in, without requiring the caller to do that.

20 декабря 2011 г. 21:57 пользователь Y2i yur...@gmail.com написал:
 No, Diane is saying that you can say
 Singleton.getInstance(context.getApplication()) to pass the
 Application reference to the singleton and it will be used to
 initialize the singleton if not already.

 No, Diane was clearly saying Singleton.getInstance(context) to pass context
 (not the application) reference to the singleton (and it will be used to
 initialize the singleton if not initialized already).  And passing context
 of random activities to initialize a singleton will result in the problems
 described earlier.

 Consistently calling Singleton.getInstance(context.getApplicationContext())
 or Singleton.getInstance(context.getApplication()) will avoid memory leaks
 and dead context problems, but the signature of
 the Singleton.getInstance(Context) does not ensure that the method will
 always be called with the application context as the parameter, which is not
 the best choice from API design perspective.

 Having a method Singleton.getInstance(Application) instead
 of Singleton.getInstance(Context) will ensure that no activity context will
 be used to initialize the Singleton object.  But from API design perspective
 this method signature is not the best one because the actual parameter will
 only be used once and ignored all other times.  Using new
 NormalObject(Application) instead of Singleton.getInstance(Application) is a
 cleaner API.


 Specifically, the case for me where Application.onCreate() is

 necessary is initializing singletons in this way.  I have a lot of non-
 Android java code that hide the details of being run inside or outside
 of Android, and singletons are no exception.  If running in Android, I
 want a version of my singleton to use a context.  If not Android, a
 version with no context (something else).  I need the
 Application.onCreate() entry point to establish this configuration for
 me or be forced to put that line of init code into every component's
 onCreate, which is horrible.

 This is exactly what I meant when I said Application.onCreate() would be
 the best place to initialize singletons that require a 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

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

2011-12-20 Thread unionmoversuae
Welcome
Enjoy world-class moving services at local rates!

Union Mover Dubai is the moving company created to make your moving
experience a stress free one. Our focus is on top notch customer
service, and fast, professional moving services. We aim to offer our
customers the quality of service they expect from the industry's
biggest names in removals, but at affordable prices.

Whether you're moving house or office locally, relocating
internationally, or just a few large items around Dubai, Abu Dhabi or
across the UAE, Union Mover removals promise to handle every detail
with speed, care and professionalism so you can relax and take it
easy.

To get your moving quote underway, simply click Get Your Easy Quote,
and we'll prepare your quote immediately.   Only pay for the services
you need.

When you move with Union Mover, you only pay for the removal services
you need. Our prices are based on the space you use in our trucks, the
items you need packed and boxed, bubble wrapped or dismantled. No
matter what your budget is you can tailor your move accordingly.

If you need a removal truck today... no problem. We have good network
of removal trucks, moving vans  packing crew across the country ready
to handle any job you throw their way.

So let's get started shall we? Please click on the Get Your Union
Quote button on the right, fill in the quote form and we'll get right
back to you with a great price today!

Our friendly team of highly trained packers will have you comfortably
set up in your new home, same day guaranteed!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Is it possible to use the UI controls while the ProgressDialog is on?

2011-12-20 Thread TreKing
2011/12/20 Kostya Vasilyev kmans...@gmail.com

 1) Build your own dialog with a cancel button;

 2) Use Dialog.setOnCancelListener which gets called if the user
 presses the Back key; here the dialog is dismissed automatically;

 3) Set a key listener in the dialog and check for when the back key is
 pressed


4) Instead of a Dialog, use a
ProgressBarhttp://developer.android.com/reference/android/widget/ProgressBar.html
embedded in
the same layout as the button.

-
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] Power button

2011-12-20 Thread Jeffrey Dunbar
I am developing an app, I would like to use the power button as a
panic button. Is there a way to hook into and catch globally from a
service. I know that android fires the intent.action SCREEN_ON and
_OFF but this causes issues. I have a service that monitors for screen
on/off sets an alarm on first press to expire and reset a setting if
not hit 3 times in 1.5 seconds. There are times that this condition
can be met just by the normal power down of the screen. e.g. market is
downloading an app and screen goes to sleep, you wake up to check and
turn off the screen after checking

Any help greatly appreciated.

Jeff

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

2011-12-20 Thread José
Hello all,

I have been searching for a way to use the new feature of indoor
maping, that came with Google Maps 6.0.
As developer I'm eager to know how to adapt the new feature to my
applications.

- Is it possible to retrieve the user location, when he is inside a
registered building (IKEA)?

- What is the precision of this feature?

Regards,
José.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Couldnt find full_maguro-userdebug in the lunch menu for Samsung Nexus S(2.3.4-r1 AOSP)

2011-12-20 Thread bradgog
you are in the wrong group, try Android-building

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

Re: [android-developers] How to build ICS for HTC Wildfire?

2011-12-20 Thread bradgog
but no one is going to be able to tell you how to build that port in a 
group like these, that is way to specific and complicated (not to mention 
you are working from the wrong repo, you will need to start with CM9)

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

2011-12-20 Thread Mandeep Singh
In latest ICS Release Bengali, Tamil and Hindi are properly rendered. But 
some languages like Punjabi have problems rendering certain glyphs.

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

Re: [android-developers] How to build ICS for HTC Wildfire?

2011-12-20 Thread bradgog
android-porting

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

2011-12-20 Thread GJTorikian
Bump, as I also would like to know this. Sync is still broken on a
4.0.3 emulator.

On Nov 23, 7:44 am, Flávio Ramalho f.ramal...@gmail.com wrote:
 Hello,

 I want to test an application that retrive Events from google calendar, for 
 that I have to sync the android emulator with my google account.

 I can add my google account on Settings  Accounts  Sync, however the sync 
 is off and i can't turn in on.

 Screenshot:http://f.cl.ly/items/1K3L3w0X3d1X2O1I0l2i/Captura%20de%20Tela%202011-...

 Can anyone tell me what I'm missing?

 --
 []'s
 Flávio Ramalho

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


[android-developers] Unable to Create a File in System Local Driver from Android Project/Junit Test

2011-12-20 Thread propovip
Hi All,

How do i create a simple txt file in local drive(C:\tmp.txt) from
an android project or from android junit test.

I am getting Error for Write Permission ,  if  i use like

   new File(C:\\tmp.txt).CreateNewFile();


Thanks,
Muhil

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

2011-12-20 Thread silvan_liu
Hi,

I found a bug in APN editor of settings

Duplicate procedure is below,

1.Settings -Wirelessnetworks-Mobile networks-Access Point Names
2.Press menu on top-right-New APN
3.Edit access pointdialog show up
4.Press Home button to go to home page
5.Do step 1 again
6.Error message appears

Log msg is below:

02-01 08:28:54.710: ERROR/AndroidRuntime(1640):
java.lang.RuntimeException: Unable to resume activity
{com.android.settings/com.android.settings.ApnSettings}:
java.lang.IllegalStateException: trying to requery an already closed
cursor  android.content.ContentResolver$CursorWrapperInner@4055d470
02-01 08:28:54.710: ERROR/AndroidRuntime(1640): at
android.app.ActivityThread.performResumeActivity(ActivityThread.java:
2288)
02-01 08:28:54.710: ERROR/AndroidRuntime(1640): at
android.app.ActivityThread.handleResumeActivity(ActivityThread.java:
2316)
02-01 08:28:54.710: ERROR/AndroidRuntime(1640): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1050)
02-01 08:28:54.710: ERROR/AndroidRuntime(1640): at
android.os.Handler.dispatchMessage(Handler.java:99)
02-01 08:28:54.710: ERROR/AndroidRuntime(1640): at
android.os.Looper.loop(Looper.java:132)
02-01 08:28:54.710: ERROR/AndroidRuntime(1640): at
android.app.ActivityThread.main(ActivityThread.java:4123)
02-01 08:28:54.710: ERROR/AndroidRuntime(1640): at
java.lang.reflect.Method.invokeNative(Native Method)
02-01 08:28:54.710: ERROR/AndroidRuntime(1640): at
java.lang.reflect.Method.invoke(Method.java:491)
02-01 08:28:54.710: ERROR/AndroidRuntime(1640): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:841)
02-01 08:28:54.710: ERROR/AndroidRuntime(1640): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
02-01 08:28:54.710: ERROR/AndroidRuntime(1640): at
dalvik.system.NativeStart.main(Native Method)
02-01 08:28:54.710: ERROR/AndroidRuntime(1640): Caused by:
java.lang.IllegalStateException: trying to requery an already closed
cursor  android.content.ContentResolver$CursorWrapperInner@4055d470
02-01 08:28:54.710: ERROR/AndroidRuntime(1640): at
android.app.Activity.performRestart(Activity.java:4438)
02-01 08:28:54.710: ERROR/AndroidRuntime(1640): at
android.app.Activity.performResume(Activity.java:4460)
02-01 08:28:54.710: ERROR/AndroidRuntime(1640): at
android.app.ActivityThread.performResumeActivity(ActivityThread.java:
2278)
02-01 08:28:54.710: ERROR/AndroidRuntime(1640): ... 10 more
02-01 08:28:54.720: WARN/ActivityManager(244):   Force finishing
activity com.android.settings/.ApnSettings
02-01 08:28:54.730: WARN/ActivityManager(244):   Force finishing
activity com.android.phone/.Settings

Could you tell me the solution?

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


[android-developers] Re: 4.0 Action Bar - remove app title.

2011-12-20 Thread Andrew
hmm, can't you just do SetTitle() on the ActionBar?

On Dec 19, 1:56 pm, Nathan critter...@crittermap.com wrote:
 I looked here, but I didn't find it. I could have missed it:

 http://developer.android.com/intl/de/guide/topics/ui/actionbar.html

 In ICS, they can't display my entire app name anyway.

 I'd like to leave the logo, but not display the app title, in order to
 fit more Action buttons.

 What's the best way to do that?

 Nathan

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


[android-developers] Help with Displaying Overlay

2011-12-20 Thread Francesca Trinidad
I'm a beginner at Android programming. I want to display to GeoPoints
that I've hardcoded in my app. But I still don't see them when I run
the app on my emulator. Help is appreciated.

Main.java
package com.rcm.mflwa;

import java.util.List;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.MyLocationOverlay;
import com.google.android.maps.Overlay;
import com.google.android.maps.OverlayItem;

import android.app.AlertDialog;
import android.content.DialogInterface;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.MotionEvent;

public class Main extends MapActivity {

/**private MyOverlay myOverlay;
private MapView mapView;
private ListOverlay mapOverlays;

@Override
public void onCreate(Bundle sis){
super.onCreate(sis);
setContentView(R.layout.main); // in my main.xml I defined a
MapView
mapView = (MapView) findViewById(R.id.mvMain);
mapOverlays = mapView.getOverlays();
myOverlay = new MyOverlay(mapView);
mapOverlays.add(myOverlay);
}

@Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}*/
/** Called when the activity is first created. */
MapView map;
long start;
long stop;
GeoPoint touchedPoint;
MyLocationOverlay compass;
MapController controller;
Drawable d;
 ListOverlay overlayList;
ListOverlay mapOverlays;
MyOverlay myOverlay;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
map = (MapView)findViewById(R.id.mvMain);
map.setBuiltInZoomControls(true);
mapOverlays = map.getOverlays();
myOverlay = new MyOverlay(map);
mapOverlays.add(myOverlay);

overlayList = map.getOverlays();
compass = new MyLocationOverlay(Main.this, map);
overlayList.add(compass);
controller = map.getController();
int lat = (int) (14*1E6);
int lon = (int) (121*1E6);
GeoPoint point = new GeoPoint(lat, lon);
controller.animateTo(point);
controller.setZoom(6);
d = getResources().getDrawable(R.drawable.ic_launcher);
}

@Override
protected void onPause() {
// TODO Auto-generated method stub
compass.disableCompass();
super.onPause();
}

@Override
protected void onResume() {
// TODO Auto-generated method stub
compass.enableCompass();
super.onResume();
}

@Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}

}

MyOverlay.java

package com.rcm.mflwa;

import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Point;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.Projection;

public class MyOverlay extends Overlay {
private GeoPoint geoPoint1;
private GeoPoint geoPoint2;
private Point point1;
private Point point2;
private Projection projection;
private Paint paint;
private Path path;

public MyOverlay(MapView mapView){
projection = mapView.getProjection();
}

public void draw(Canvas canvas, MapView mapView, boolean shadow){
super.draw(canvas, mapView, shadow);
paint = new Paint();
paint.setDither(true);
paint.setColor(Color.BLUE);
paint.setStyle(Paint.Style.FILL_AND_STROKE);
paint.setStrokeJoin(Paint.Join.ROUND);
paint.setStrokeCap(Paint.Cap.ROUND);
paint.setStrokeWidth(2);

point1 = new Point();
point2 = new Point();
path = new Path();

int lat1 = (int) (14*1E6);
int lon1 = (int) (121*1E6);
int lat2 = (int) (20*1E6);
int lon2 = (int) (130*1E6);

geoPoint1 = new GeoPoint(lat1, lon1);
geoPoint2 = new GeoPoint(lat2, lon2);

projection.toPixels(geoPoint1, point1);
projection.toPixels(geoPoint2, point2);

path.moveTo(point2.x, point2.y);
path.moveTo(point1.x, point1.y);

canvas.drawPath(path, paint);
}
}

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

[android-developers] Crash when opening Option Menu

2011-12-20 Thread Warlock
I have ordinary activity with Option Menu, which I created by this
code:

@Override
public boolean onCreateOptionsMenu(Menu menu) {
  menu.add(0, 1, 0, A);
  menu.add(0, 2, 0, B);
  menu.add(0, 3, 0, C);
  return true;
}

On Android 2.3 and older (2.2, 2.1) is everything fine. But when I run
this app on Android 4.0 (ICS - emulator, Galaxy Nexus, Nexus S) when I
press menu button the app crashdown with this exception:

W/ResourceType(9263): Failure getting entry for 0x01090044 (t=8 e=68)
in package 0 (error -75)
D/AndroidRuntime(9263): Shutting down VM
W/dalvikvm(9263): threadid=1: thread exiting with uncaught exception
(group=0x40a4a1f8)
FATAL EXCEPTION: main
android.content.res.Resources$NotFoundException: Resource ID
#0x1090044
E/AndroidRuntime(9263):
at android.content.res.Resources.getValue(Resources.java:1019)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:
2107)
at android.content.res.Resources.getLayout(Resources.java:858)
at android.view.LayoutInflater.inflate(LayoutInflater.java:394)
at
com.android.internal.view.menu.BaseMenuPresenter.getMenuView(BaseMenuPresenter.java:
70)
at com.android.internal.policy.impl.PhoneWindow
$PanelFeatureState.getIconMenuView(PhoneWindow.java:3298)
at
com.android.internal.policy.impl.PhoneWindow.initializePanelContent(PhoneWindow.java:
1096)
at
com.android.internal.policy.impl.PhoneWindow.openPanel(PhoneWindow.java:
559)
at
com.android.internal.policy.impl.PhoneWindow.onKeyUpPanel(PhoneWindow.java:
817)
at
com.android.internal.policy.impl.PhoneWindow.onKeyUp(PhoneWindow.java:
1486)
at com.android.internal.policy.impl.PhoneWindow
$DecorView.dispatchKeyEvent(PhoneWindow.java:1813)
at android.view.ViewRootImpl.deliverKeyEventPostIme(ViewRootImpl.java:
3300)
at android.view.ViewRootImpl.handleFinishedEvent(ViewRootImpl.java:
3273)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2436)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4340)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)

I can't localize resource with ID #0x1090044 (it's not in my R.java or
any other files) and I don't know what it should be. Maybe some
internal menu layout? I already also tried to clean the project. I
know that there are new desing rules for Android 4.0 ICS and using
Action Bar instead older menu, but I need this code get working even
on ICS for many different reasons. Should I some how edit this code to
work even on ICS? I also already tried creating menu from XML file
using this code with same exception.

MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu, menu); //have different Res ID than
#0x1090044

Thank you for any advice!

Same topic on: 
http://stackoverflow.com/questions/8576484/crash-when-opening-option-menu

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

2011-12-20 Thread aisha hr

How can i add button in the default call screen and how to activate
the back button during the call??

http://www.talkandroid.com/android-forums/attachments/android-development-answers-tutorials-code-snippets/604d1266560652-custom-call-screen-caller.jpg

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


[android-developers] How to start learning to code for augmented reality

2011-12-20 Thread Balraj Singh
Hi,
  I am beginner in Android and had developed couple of applications
only can you tell me that I need to start learning to code for
augmented reality in android. So where to start from? What are
material should i read?

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

2011-12-20 Thread Dinosaur
I just installed Eclipse Helios, the latest Android SDK, and AdMob.
I'm trying to incorporate AdMob into my app, and it seems to be
working fine when I export the apk to my OG Droid (or run a 2.2 AVD),
but the ad banner isn't showing up at all on either my tablet (3.1) or
my tablet AVD. I'm trying to get the banner to appear on my start-up
screen.

My manifest includes this:
uses-sdk android:minSdkVersion=8
android:targetSdkVersion=13/

I have this code in my startup screen java file:
AdRequest adRequest = new AdRequest();
 
adRequest.addTestDevice(AdRequest.TEST_EMULATOR);   //
Emulator
 
adRequest.addTestDevice(TEST_DEVICE_ID);  //
Test Android Device

And this is in my startup screen xml:

com.google.ads.AdView android:id=@+id/adView
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 ads:adUnitId=xxx (omitted)
 ads:adSize=BANNER
 ads:loadAdOnCreate=true/

Any thoughts? (And to go live, do I just delete the two
addTestDevice lines?)

Thx.

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

2011-12-20 Thread Avinash
The early versions of android had a way by which Exchange account
could be automatically configured through an app - by feeding in the
email and password.

The android 4.0 email application had changed a lot. Any reference as
to how it can be done on the latest version?

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

2011-12-20 Thread Andrew
I've got a split action bar working in my app. There are several
action items and an overflow menu for the extra ones. However, when I
rotate the device to landscape, the overflow (menu) button appears at
the top action bar, and all the other action items disappear. All
these menu items have always set for showAsAction.

Is this the expected behavior?

I was expecting all the actions on the split action bar to appear at
the top action bar when in landscape mode.

Thanks,
Andrew

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


[android-developers] Re: Access denied error while trying to install new API

2011-12-20 Thread mattbrand
I am having a similar issue. I only have the Tools, Android 4.0.3 (API
15) and the Google USB Driver package installed through the Android
SDK Manager.

Anytime I try to install any other versions (I've tried 2.2, 2.3.3 and
1.5), I get this error:

Downloading SDK Platform Android 2.3.3, API 10, revision 2
File not found: C:\Program Files (x86)\Android\android-sdk\temp
\android-2.3.3_r02-linux.zip (Access is denied)
Downloading Samples for SDK API 10, revision 1
File not found: C:\Program Files (x86)\Android\android-sdk\temp
\samples-2.3.3_r01-linux.zip (Access is denied)

Anyone have any ideas?

On Dec 14, 4:26 pm, Uday (Dave) uday...@gmail.com wrote:
 Hi, I have installed the android sdk 16 on my Windows7 machine I have
 installed the Android2.1 API initially without any glitch. But then
 again when I try to install the other APIs using the SDK manager, it
 gives me:

 Downloading SDK Platform Android 2.3.3, API 10, revision 2

 File not found: C:\Program Files (x86)\Android\android-sdk\temp
 \android-2.3.3_r02-linux.zip (Accessisdenied)

 Downloading Samples for SDK API 10, revision 1

 File not found: C:\Program Files (x86)\Android\android-sdk\temp
 \samples-2.3.3_r01-linux.zip (Accessisdenied)

 Skipping 'Google APIs by Google Inc., Android API 10, revision 2'; it
 depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was
 not installed.

 Done. Nothing was installed

 Thanks,

 Dave

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


[android-developers] Edit boxes in OpenGL?

2011-12-20 Thread Jeresam515
Is there a way to put Edit Boxes into an OpenGL rendered program, such
as putting the GL view into the main.xml somehow?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Image rotation is not uniform across devices. ExifInterface.TAG_ORIENTATION returns 1 for all orientation on some pictures

2011-12-20 Thread Tolga Ekmen
This seems to be related to a bug I found on android issue database;
http://code.google.com/p/android/issues/detail?id=19268

The above bug is that when taking pictures with intent
ACTION_IMAGE_CAPTURE, it saves the image in the location specified in
Extras bundle but it also saves the image in the gallery.. It seems
that as a side effect of this bug, the image that's saved in the user
specifed location is missing the orientation information while the one
in the gallery is saved properly.

This makes for a messy user experience since they can only take
pictures in the sideways orientation or they need to take the picture
then select it from the gallery on these devices..

I opened another issue regarding this here;
http://code.google.com/p/android/issues/detail?id=22822

Also I have started a stackOverflow ticket that got no response
(despite the fact that I put up some delicious bounty on it). The
question has detailed info;

http://stackoverflow.com/questions/8450539

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

2011-12-20 Thread kumar varma
I've created an application which uses around 40 small audio files.
Right now I'm using mp3 files and each is around 250KB. These files
are stored in my res/raw directory.
I'm using SoundPool class to play the files in my application.

Can one of you suggest what is the best way to store so many audio
files? Will my application be scalable?
Is wav or ogg format better approach instead of mp3? Please let me
know. and one more doubt every time I wanna play  3 audio files one by
one using SoundPool class can you
 please any one suggest me  to do this

Thanks ,
Kumar.

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

2011-12-20 Thread Marcos Milohanich
Hi people

I have a samsung  galaxy ACE  with android 2.3.4 and i want to use an
L2TP VPN connection, but if I connect the wireless , vpn does nothing
never connected to the server. Can i use the vpn over wifi or only
over 3G?

there is some third-party application that does not require root
access I can use?

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

2011-12-20 Thread Venigalla Ranga rao
I want example programs of list view

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


[android-developers] error creating grid view

2011-12-20 Thread Vick
I have problem, friends.
i had the application about grid view.
but error and can't view data.

+ main.xml 


?xml version=1.0 encoding=utf-8?
LinearLayout
  xmlns:android=http://schemas.android.com/apk/res/android;
  android:orientation=vertical
  android:layout_width=fill_parent
  android:layout_height=fill_parent
  
  TextView
 android:id=@+id/selection
 android:layout_width=fill_parent
 android:layout_height=wrap_content
 /
  GridView
 android:id=@+id/grid
 android:layout_width=fill_parent
 android:layout_height=fill_parent
 android:verticalSpacing=35px
 android:horizontalSpacing=5px
 android:numColumns=auto_fit
 android:columnWidth=100px
 android:stretchMode=columnWidth
 android:gravity=center
 /
/LinearLayout


+ row.xml +++

?xml version=1.0 encoding=utf-8?
LinearLayout
android:id=@+id/widget0
android:orientation=horizontal
android:layout_toRightOf=@android:id/icon
android:layout_width=fill_parent
android:layout_height=fill_parent
android:background=#ff
xmlns:android=http://schemas.android.com/apk/res/android;

com.DataGrid.ListItemView
android:id=@+id/title
android:layout_height=wrap_content
android:layout_width=150px
android:text=Title
android:textSize=10sp
android:textStyle=bold
android:textColor=#ff00
/


+ book.java +

package qi.com.DataGrid;

public class Book {
String title;
String author;

public Book(String title, String author) {
this.title = title;
this.author = author;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}

}


++ ListView.java ++


package qi.com.DataGrid;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.widget.TextView;

public class ListItemView extends TextView {
private boolean isHeader = false;
private Paint linePaint;

public ListItemView(Context context, AttributeSet attrs, int
defStyle) {
super(context, attrs, defStyle);
init();
}

public ListItemView(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}

public ListItemView(Context context) {
super(context);
init();
}

public void init(){
linePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
linePaint.setColor(Color.parseColor(#00));
}
public boolean isHeader() {
return isHeader;
}

public void setHeader(boolean isHeader) {
this.isHeader = isHeader;
}

@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
if(isHeader){
canvas.drawColor(Color.parseColor(#AA99));
}
canvas.drawLine(0, 0, getMeasuredWidth(), 0,linePaint);
canvas.drawLine(0, getMeasuredHeight(), getMeasuredWidth(),
getMeasuredHeight(),linePaint);
canvas.drawLine(0,0, 0, getMeasuredHeight(),linePaint);
}
}


 DataGrid.java ++

package qi.com.DataGrid;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListView;


public class DataGridActivity extends Activity {
Context mContext;
Book[] books = {new Book(Title,Author),new Book(Clean
Code,Uncle Bob),new Book(Face 2.0,Allen Cooper)};
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mContext = this;
setContentView(R.layout.main);
ListView bookListView
=(ListView)findViewById(R.id.bookListView);

/* ERROR IN THIS LINE : row can't be resolved  */
LitemItemAdapter mcqListAdapter = new
LitemItemAdapter(this,R.layout.row,books);


bookListView.setAdapter(mcqListAdapter);
}
class LitemItemAdapter extends ArrayAdapterBook{

public LitemItemAdapter(Context context, int
textViewResourceId,
Book[] objects) {
super(context, textViewResourceId, objects);
}
public View getView(int position, View convertView, ViewGroup
parent) {
View v = convertView;
if (v == null) {

LayoutInflater vi = (LayoutInflater)
mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

 /* ERROR IN THIS LINE : row can't be resolved  */
v = vi.inflate(R.layout.row, null);

}
Book item = books[position];

[android-developers] Fragments with respect to activity

2011-12-20 Thread Geet
Hi,
I am starting a Listview fragment in an activity.Once the user clicks
on list itel, i am showing another listview in the same fragment(with
fragment replace).Now if i turn my device, I am shown with first
listview as the activity is getting re-started.
I want my secong listview to be shown.
How can I achieve this.

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


[android-developers] how to see/ work on 2 emulator same time

2011-12-20 Thread manjunath shirageri
hello

 'm developing sms transfer between two android emulator . i want to
no wat are setting to made two see two emulator same time

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

2011-12-20 Thread mos_bek
 i'm beginner  developer in android and i want to use tabs for my
layout. i have tried to drag and drop from the graphics layout but it
doesn't work. i also tried by upgrading the android version to 4.0 but
it displays this message
Could not create tab content because could not find view with id -1
Exception details are logged in Window  Show View  Error Log

plz tell me smtng asap
tnx

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


[android-developers] Help: getting illegal argument exception in glcolorpointer

2011-12-20 Thread Raghav Dwivedi
Hello all,

I'm getting  illegal argument exception in my Renderer class, here is the
code, see if some one can help me out, i have attached the code and the
exception log:

code:

public class VortexRenderer implements GLSurfaceView.Renderer{
 @SuppressWarnings(unused)
private static final String LOG_TAG = VortexRenderer.class.getSimpleName();
 private ShortBuffer _indexBuffer;
private FloatBuffer _vertexBuffer;
 private FloatBuffer _colorBuffer;
 private short[] _indicessArray = {0,1,2};
 private int _nr0fvertices = 3;
 private float _red   = 0f;
 private float _green = 0f;
private float _blue  = 0f;
 private float _angle;
 @SuppressWarnings(static-access)
 @Override
public void onSurfaceCreated(GL10 gl, EGLConfig config){
gl.glEnableClientState(gl.GL_VERTEX_ARRAY);
 gl.glEnableClientState(gl.GL_COLOR_ARRAY);
initTriangle();
}
 @Override
public void onSurfaceChanged(GL10 gl, int w, int h) {
 gl.glViewport(0, 0, w, h);
}
 public void setColor(float r, float g, float b){
_red = r;
_green = g;
 _blue = b;
}
 public void setAngle(float angle){
_angle = angle;
}
 @Override
public void onDrawFrame(GL10 gl) {
 // define the color we want to be displayed as the clipping wall
gl.glClearColor(_red, _green, _blue, 1.0f);
 //reset the matrix - good to fix the rotation to a specific angle
gl.glLoadIdentity();
 // clear the color buffer to show the ClearColor we called above...
gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
 //set rotation
gl.glRotatef(_angle, 0f, 1f, 0f);
 //Drawing the Triangle
//define the vertices we wanth to draw
 gl.glVertexPointer(3, GL10.GL_FLOAT, 0, _vertexBuffer);
//Setting the color pointer
 gl.glColorPointer(4, GL10.GL_FLOAT, 0, _colorBuffer);
//finally draw the vertices
 gl.glDrawElements(GL10.GL_TRIANGLES, _nr0fvertices,
GL10.GL_UNSIGNED_SHORT, _indexBuffer);
}
 private void initTriangle(){
//Float has 4 Bytes
 ByteBuffer vbb = ByteBuffer.allocateDirect(_nr0fvertices *3 *4);
vbb.order(ByteOrder.nativeOrder());
 _vertexBuffer = vbb.asFloatBuffer();
 //Short has 4 Bytes
 ByteBuffer ibb = ByteBuffer.allocateDirect(_nr0fvertices * 2);
ibb.order(ByteOrder.nativeOrder());
 _indexBuffer = ibb.asShortBuffer();
 //Float has 4 Bytes, 4 Colors (RGBA)*no of vertices*4 Bytes
 ByteBuffer cbb = ByteBuffer.allocate(4*_nr0fvertices*4);
cbb.order(ByteOrder.nativeOrder());
 _colorBuffer = cbb.asFloatBuffer();
 float[] coords = {
 -0.5f, -0.5f, 0f, //(x1, y1, z1)
 0.5f, -0.5f, 0f, //(x2, y2, z2)
   0f,  0.5f, 0f //(x3, y3, z3)
};
 float[] colors={
1f, 0f, 0f, 1f, //Point 1
 0f, 1f, 0f, 1f, //Point 2
0f, 0f, 1f, 1f //point 3
 };
 _vertexBuffer.put(coords);
 _indexBuffer.put(_indicessArray);
_colorBuffer.put(colors);
 _vertexBuffer.position(0);
_indexBuffer.position(0);
_colorBuffer.position(0);
 }
}

exception log:

12-19 08:11:44.691: ERROR/AndroidRuntime(3769):
java.lang.IllegalArgumentException: Must use a native order direct Buffer
12-19 08:11:44.691: ERROR/AndroidRuntime(3769): at
com.google.android.gles_jni.GLImpl.glColorPointerBounds(Native Method)
12-19 08:11:44.691: ERROR/AndroidRuntime(3769): at
com.google.android.gles_jni.GLImpl.glColorPointer(GLImpl.java:211)
12-19 08:11:44.691: ERROR/AndroidRuntime(3769): at
example.Vortex.VortexRenderer.onDrawFrame(VortexRenderer.java:86)
12-19 08:11:44.691: ERROR/AndroidRuntime(3769): at
android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1332)
12-19 08:11:44.691: ERROR/AndroidRuntime(3769): at
android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)


-- 
Thanks  Regards
 Raghav Dwivedi
 http://about.me/raghavdwivedi

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

2011-12-20 Thread Geet
Hi, I have a main.xml layout in which I am adding one fragment.when
the activity is started I am displaying a listview in fragment.When
the user clicks on the itme in the list view, I am replacing the
current listview with another listview, with the same fragment.

Now if I turn my device, I should be seeing the second listView but I
am shown the FirstListview.

How will I solve this problem??there has to be some way where I can
save the current reference t the fragment associated with activity and
restore the same.

Please help.

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


[android-developers] How can i terminate message, after sending it

2011-12-20 Thread surabhi jain
Hi to all.

Pls send me the source code
or send the souce code link...

Thanks you all.

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

Re: [android-developers] How to move Object in android?

2011-12-20 Thread karthees waran
Which image you want?Copy that image and paste to drawable folder.

On Mon, Dec 19, 2011 at 10:44 AM, android developer 
android.developer4...@gmail.com wrote:

 Hi i want small car game, in that let me know how to move object(car
 image).

 can anyone send me sample code for that..

 Thank you all.

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

2011-12-20 Thread karthees waran
developer.android.com Here you get some sample code

On Mon, Dec 19, 2011 at 11:32 AM, android developer 
android.developer4...@gmail.com wrote:

 where can get the  Android sample source codes?

 send me the site links

 Thanks you all...

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

2011-12-20 Thread JohnOR
Hi,

I updated Nexus S to ICS and for some reason onPreviewFrame() is not
now being called in our application.  Any idea why this might be the
case?

Thanks,
John

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

2011-12-20 Thread manjunath M
Hello Sir,

   Currently im using samsung mobile(model no:GT-I5801) with
android 2.2, now i need to communicate with my PC through USB cable.
The text which i type from my phone should simultaneously be visible
in PC. How to go through this problem ?? Apart from android is there
any alternative ? Please help me with this query because it is very
much essential to my project.

Thank You

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


[android-developers] Re: Pls send me android souce code....

2011-12-20 Thread Sangeeth Krishnan
http://source.android.com/source/download.html

On Dec 20, 9:00 am, android developer
android.developer4...@gmail.com wrote:
 Hi to all.

 Pls send me android source code files(Sample Projects)
 or else send the souce code links...

 Thanks you all.

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

2011-12-20 Thread shyama
I know this question has been asked over and over again in these
forums. But the reason I am posting it again is because I have nt
received a clear answer to it. It would be great if someone could help
me with this.

I am current using opencv + android to make some simple app that will
do image manipulation like edge, blur etc and display it using an
imagebutton. The images are being loaded through the gallery. There
are 3 buttons to blur, edge, and reset to original which will display
the modified image on the image button. given below is my code.

package com.example;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.Buffer;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.channels.FileChannel.MapMode;

import android.app.Activity;
import android.content.Intent;
import android.graphics.*;
import android.graphics.Bitmap.Config;
import android.net.Uri;
import android.os.Bundle;
import android.os.Debug;
import android.provider.MediaStore;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;

import org.opencv.core.*;
import org.opencv.imgproc.*;
import org.opencv.android.*;
import org.opencv.highgui.*;

import dalvik.system.VMRuntime;


import android.graphics.Color;

public class ImageProcessing extends Activity implements
View.OnClickListener{

private ImageButton choice;
private Button Blur;
private Button Canny;
private Button Reset;
Uri photoUri;
static private Bitmap bitmap;
static private Bitmap mutBitmap;

private static String TAG = ImageProcessing;
private static int TAKE_GALLERY_REQUEST = 2;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.img);

choice = (ImageButton) findViewById(R.id.imagechoice);

Blur = (Button) findViewById(R.id.Blur);
Canny = (Button) findViewById(R.id.edge);
Reset = (Button) findViewById(R.id.reset);

choice.setOnClickListener(this);
Blur.setOnClickListener(this);
Canny.setOnClickListener(this);
Reset.setOnClickListener(this);

}
@Override
public void onClick(View v) {

if(v.getId() == R.id.imagechoice)
{
 Intent pickPhoto = new Intent(Intent.ACTION_PICK);
 pickPhoto.setType(image/*);
 startActivityForResult(pickPhoto, TAKE_GALLERY_REQUEST);
}
if(v.getId() == R.id.Blur)
{

  if(mutBitmap != null)
mutBitmap.recycle();
  mutBitmap = bitmap.copy(Config.ARGB_, true);
  choice.setImageBitmap(mutBitmap);
  Mat mImg = Utils.bitmapToMat(mutBitmap);
  Size ksize = new Size(15,15);
  Imgproc.blur(mImg, mImg, ksize);
  mutBitmap.recycle();
  mutBitmap = Bitmap.createBitmap(mImg.cols(), mImg.rows(),
Bitmap.Config.ARGB_);
  Utils.matToBitmap(mImg, mutBitmap);
  choice.setImageBitmap(mutBitmap);
}
if(v.getId() == R.id.edge)
{
  if(mutBitmap != null)
mutBitmap.recycle();
  mutBitmap = bitmap.copy(Config.ARGB_, true);
  choice.setImageBitmap(mutBitmap);
  Mat mImg = new Mat();
  mImg = Utils.bitmapToMat(mutBitmap);

  /**Converting to grayscale**/
  Mat mGray = new Mat(mImg.rows(), mImg.cols(), CvType.CV_8UC1,
new Scalar(0));
  Imgproc.cvtColor(mImg , mGray, Imgproc.COLOR_BGRA2GRAY, 4);
  /**Applying Canny**/
  Imgproc.Canny(mGray, mGray, 80, 90);

  //Converting back to 4 channel image
  Imgproc.cvtColor(mGray , mImg, Imgproc.COLOR_GRAY2RGBA, 4);
  mutBitmap.recycle();
  mutBitmap = Bitmap.createBitmap(mImg.cols(), mImg.rows(),
Bitmap.Config.ARGB_);
  Utils.matToBitmap(mImg, mutBitmap);
  choice.setImageBitmap(mutBitmap);
}
if(v.getId() == R.id.reset)
{
  choice.setImageBitmap(bitmap);
}
}
@Override
protected void onPause() {
super.onPause();
Log.v(TAG,on pause called);


Log.v(TAG,Allocated memoryin on pause before recycle done:
+Debug.getNativeHeapAllocatedSize());
choice.setImageBitmap(null);
if(bitmap != null)
{
Log.v(TAG,bitmap is not null);
bitmap.recycle();
if(bitmap.isRecycled())
Log.v(TAG,bitmap is recycled);
bitmap = null;
}


if(mutBitmap != null)
{
mutBitmap.recycle();
if(mutBitmap.isRecycled())
Log.v(TAG,mutBitmap is recycled);
mutBitmap = null;
}
Log.v(TAG,Allocated memory on pause after recycle done:  
+Debug.getNativeHeapAllocatedSize());

}
@Override

[android-developers] Did Intent.FLAG_ACTIVITY_SINGLE_TASK disappear ?

2011-12-20 Thread Apple92
I have just noticed that parameter FLAG_ACTIVITY_SINGLE_TASK is no
more available in the Android developer documentation:

I am just trying to do this (removeCard in an Intent)

removeCard.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TASK);
startActivity(removeCard);

I have already seen such a parameter in code found in Google but the
Java compiler just tells me it does not exist.

I am only able to start the main activity with this parameter but I
have to configure the manifest file to perform this:

android:launchMode = singleTask

And this does not work for activities other than main activities
launched upon app start.

Does someone know why this parameter disappeared for Intent ?

Regards, Apple92

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

2011-12-20 Thread Angus Pang
hi everyone,
i want to develop an android application
the idea is:
when the user click on the app icon, it will prompt the list of
launcher they already save in the android system.
the image like this: http://files.dotblogs.com.tw/neil/1108/201181303222527.png
they click the name of the launcher and it will change it directly.

Can any one give some suggestion to me??

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


[android-developers] adding button to the default call screen

2011-12-20 Thread aisha hr
How can i add button in the default call screen and how to activate
the back button during the call??

http://www.talkandroid.com/android-forums/attachments/android-development-answers-tutorials-code-snippets/604d1266560652-custom-call-screen-caller.jpg

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

2011-12-20 Thread Madhu
Hello All,
I am  writing a sync service using Sync Adapter framework in android. It 
works great, but I want to validate  code with some automation testing. 
Right now, every time i need to test the sync code, I have to go to 
Emulator - Development Tools - Sync Tester and explicitly start sync 
service.

I have gone through instrumentation tests of android framework but it did 
not seem to be helpful. What I ideally want to test is following

- Register an observer with sync service
- Fireup sync service 
- Once completed, validate the data in the database

any help in this regard is greatly appreciated

thanks,
madhu

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