Re: [android-developers] Bringing an Activity to front

2010-08-30 Thread Dianne Hackborn
On Sun, Aug 29, 2010 at 12:52 PM, Teo teomina...@gmail.com wrote:

 Will the process/activity be killed if it has a Handler running in it?


There being a Handler with pending (or running) messages has no influence on
when a process will be killed.  The only things that matter for this are the
state of any activities, receivers, services, or content providers in the
process, as described for the process lifecycle.


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

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

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

Re: [android-developers] Re: Android libraries

2010-08-30 Thread Xavier Ducrohet
Hmm this should be handled by the plugin indeed.

To be honest, the way the current plug-in create the linked folder is
not great. We've made it much more robust in the next version (coming
soon). Hopefully that'll fix your problem.

On Sun, Aug 29, 2010 at 5:37 AM, Günther gru...@googlemail.com wrote:
 Xavier,

 yes, I'm referencing it through the Android settings, as the R files
 and resources seem to be handled correctly.

 However, I found a work-around last night, which is adding a linked
 source to the app project, which is pointing to the library source
 directory. I didn't not think this was necessary, because I assumed
 this would be done by the plugin automatically. Seems the plugin is
 forgetting to add this linked source, at least in my case. Maybe you
 can have a look and fix this in one of the next versions. For now it
 seems to work for me. Thanks anyway!

 Cheers,
 Günther


 On 28 Aug., 02:26, Xavier Ducrohet x...@android.com wrote:
 Are you sure you're referencing it through the library system and not
 in the standard JDT build-path?





 On Wed, Aug 25, 2010 at 1:54 AM, Günther gru...@googlemail.com wrote:
  Xavier,

  sorry to intrude here after a month, but I'm having the problem
  described above that the class files from the library project are not
  included in the apk-file at all. Compiling seems to be working, but I
  cannot run the application of course, since the classes are missing. I
  have a single library project (no external JARs), and an application
  project referencing it.

  Since deg seems to have had problems more related to auto-refresh,
  what could cause my kind of behavior?

  Thanks,
  Günther

  On 13 Jul., 18:58, Xavier Ducrohet x...@android.com wrote:
  On Tue, Jul 13, 2010 at 1:33 AM, deg d...@degel.com wrote:
   A related question, too: I'm stuck with a few warning messages in one
   of my library files. This is bad enough on it's own (my dev style is
   generally a zero warnings tolerated) but it's worse because Eclipse
   shows multiple copies of each warning; one for each open app that is
   using the library. Is there any way to educate Eclipse to treat all
   mentions of the library as the same?

  Not with the current implementation (linked folders). I haven't found
  anything (yet?) that allows me to do what I want without creating a
  linked folder in the main project. JDT is not flexible enough for
  this.

   Re shipping in binary form... that's really a pity. It defeats one of
   the major reasons to uselibraries. Any plans to fix this in the
   future?

  We don't have any plan at this time, but I hope to look into it later 
  this year.

   I'll reply to Mark's message in a moment. Perhaps some merge between
  Androidlibrariesand his parcels would work well for everyone?

  This is a possibility.

  Xav
  --
  Xavier DucrohetAndroidSDK Tech Lead
  Google Inc.

  Please do not send me questions directly. Thanks!

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

 --
 Xavier DucrohetAndroidSDK Tech Lead
 Google Inc.

 Please do not send me questions directly. 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




-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

Please do not send me questions directly. 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] Debugging power management - how to determine cpu state?

2010-08-30 Thread Dianne Hackborn
It is difficult, because attaching to USB keeps a wake lock held.

You can use adb shell dumpsys batteryinfo to see the current stats about
your app, which includes the time spent holding each wake lock.  (You'll
probably want the last section of output, which is the time since last
unplugged.)  Note that the wake lock times are weighted, so if two wake
locks are being held at the same time they will be accounted as using 50% of
the overall time.

Also, of course, you could log when you acquire and release the wake lock
and then look at the log after plugging in again.  adb logcat -v time
gives logs with time stamps.

H...  that said, if you just care about what you are doing with your own
wake locks, it doesn't matter if the device is kept awake while plugged in
to USB, and you can use adb shell dumpsys power to see what wake locks (if
any) you are currently holding at that point in time.

On Sun, Aug 29, 2010 at 3:01 PM, Tom orei...@mbari.org wrote:

 My application acquires and releases WakeLocks. What is the best way
 to test the app - i.e. is there a standard way to determine when the
 cpu is running (e.g. through a debug cable)?

 Thanks,
 Tom


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




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

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

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

Re: [android-developers] Re: Android libraries

2010-08-30 Thread Xavier Ducrohet
On Sun, Aug 29, 2010 at 7:04 AM, Mark Carter mjc1...@googlemail.com wrote:
 It would be great if both the following ways of including shared
 Android code/resources were possible:

 1. Adding a library .apk file to the build path (in the same way you
 would add a .jar file)

There are way too many technical issues for that too happen. One of
the biggest one being that the code of the library must be compiled
wit the R class representing all the resources (main project +
libraries).

 2. Adding an Android Library Project to the build path as a Project
 dependency (in the same way you would add a Java project dependency).

 This would be very clear to devs...

The problem with this is that it's an Eclipse mechanism. Our current
mechanism (declaring the dependency in default.properties) means that
the project setup is done in a way that's supported by Eclipse and
Ant.

This means you don't have to do two different things when using
Eclipse for your daily work and when using Ant for your automated
builds (or if you have team members who prefer to use a different IDE
or text editor).

While Eclipse is our preferred development way, we must stay
compatible with Ant.

 Unfortunately, I've had too many issues with the current Android
 Library Project feature to be able to continue using it.

I hear you. We've made is much more reliable/robust in the next
version. Hopefully this will help you/solve your problems.

Xav
-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

Please do not send me questions directly. 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: Bug in Android 2.2 with move to sdcard home screen shortcuts?

2010-08-30 Thread Dianne Hackborn
Unfortunately the exception could only happen in Home when it ultimately
tries to persist itself, which is long after the app is involved, so any
exception would result in home crashing.

Fwiw, the API to turn an Intent into a URI string (which is the only form
that is safe to put in persistent storage) is this:
http://developer.android.com/reference/android/content/Intent.html#toUri(int)

http://developer.android.com/reference/android/content/Intent.html#toUri(int)It
certainly should explain more about the limitations on the extras that are
supported. :}

For now, here is the source code where you can see the types it handles:

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/content/Intent.java;h=2acc4a05792ae50f5c03c92749bcf35072ccea64;hb=master#l5379
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/content/Intent.java;h=2acc4a05792ae50f5c03c92749bcf35072ccea64;hb=master#l5379
On Sun, Aug 29, 2010 at 12:44 PM, Bob Kerns r...@acm.org wrote:

 Thanks for the heads-up.

 This strikes me as an unnecessary inconsistency making the API more
 complex and hard to understand.

 But it strikes me as a more serious flaw that it does not cause a
 visible exception at the point of creating the shortcut. Rather than
 logging it and ignoring it, and creating a BOGUS shortcut without the
 data -- it should fail, visibly, without persisting anything.

 Yes, I realize it will be the Launcher that reports this rather than
 the faulty app. An unfortunate consequence of using intents for this
 task.

 Visibly, because the failure is important to the end user, but it also
 helps developers get it right, too. You may want to log a more
 detailed explanation than you'd want to put in an end-user message.

 On Aug 27, 11:49 pm, Romain Guy romain...@android.com wrote:
  I should have been clearer: extras of type array are not supported by
  Launcher. Bundles/Parcelables are used for IPCs but not for long term
  persistence (this would cause tons of compatibility issues across
  versions.) Therefore, Home does not save intents (therefore shortcuts)
  as binaries, but as URIs. The URI form of intents does not support
  arrays.

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




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

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

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

[android-developers] Significance of ... in doInBackground(Params...) of AsyncTask

2010-08-30 Thread nikki
Hi Group,

I was just going through the document over AsyncTask and came across
the notation ... in the methods of Asynctask (For eg.
doInBackground(Params...)).

I was a bit excited to know whats the significance of ... in this
notation.

Please help

Regards
Nihkilesh

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

2010-08-30 Thread Romain Guy
It's a notation called varargs. See explanations here:
http://download-llnw.oracle.com/javase/1.5.0/docs/guide/language/varargs.html

On Sun, Aug 29, 2010 at 11:12 PM, nikki nikhileshsingh...@gmail.com wrote:
 Hi Group,

 I was just going through the document over AsyncTask and came across
 the notation ... in the methods of Asynctask (For eg.
 doInBackground(Params...)).

 I was a bit excited to know whats the significance of ... in this
 notation.

 Please help

 Regards
 Nihkilesh

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




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

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

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

2010-08-30 Thread tina lincon
hi greg,i dint get wat u meant by dis asychronous thng here in ds
context??

On Aug 30, 10:45 am, tina lincon tina.theresalin...@wipro.com wrote:
 hii frank,flickering is on the device.

 On Aug 27, 7:58 pm, Frank Weiss fewe...@gmail.com wrote:



  First a question: Is the flickering on the emulator or a device?
  Emulator is much slower than a device.- Hide quoted text -

 - Show quoted text -

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


Re: [android-developers] Re: ADT causing CDT to build all C projects on Android app launch??

2010-08-30 Thread Xavier Ducrohet
I'm glad there's an option to fix it.

From the look of things our Launch configuration requires a workspace
build before launch. I think at the time we expected that it would
only build the launching project, not the whole workspace. We should
probably change it to not require a full workspace build. I'll have to
check if the launching project is rebuilt no matter what.

Xav

On Sat, Aug 28, 2010 at 12:35 PM, Robert Green rbgrn@gmail.com wrote:
 Jason,

 Perfect!  I don't know how I missed that.  I'm glad a configurable
 option was able to fix it.  I just tested and things seem to be
 working correctly again.

 Thanks for figuring it out!

 On Aug 28, 5:33 am, Jason jason.poli...@gmail.com wrote:
 Hi,

 I am one of the elusive few running this exact setup, and I too have
 been a bit annoyed by this feature.

 I did just find this:

 Window-Preferences-C/C++

 There is a checkbox option entitled:

 Build configurations only when there are Eclipse resource changes
 within the project and its references

 I tried checking this at it seemed to eliminate these extra builds.

 I also tried making a small change to a C++ source file in my project
 and it picked up the change when I ran the app.. so seems to work.

 On Aug 28, 12:29 pm, Robert Green rbgrn@gmail.com wrote:



  Hey guys,

  I doubt there are too many people who run CDT in eclipse for native
  apps also with ADT installed for Android, but in the off-chance that
  someone here knows anything about this, my problem is that any time I
  run any android app, my C builder kicks in for projects totally
  unrelated.  I have no idea why and have been digging through settings
  on everything, unable to find out why.  All I can think is that the
  ADT pre-launch process triggers it via a refresh or some kind of catch-
  all type call in eclipse API land that I'm unaware of.

  Does anyone know anything about this?  It's very annoying to have a C
  builder run for a different project than the one you're working on
  every time you launch the app.

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




-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

Please do not send me questions directly. Thanks!

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


[android-developers] Re: Is anyone's active install % dropping like a rock lately?

2010-08-30 Thread Tomáš Hubálek

 Well, I'm not sure about this statement because if active install % is
 an (important) factor in app rankings, then I should very much be

I don't think that number of installs has influence on ranking. There
are apps with worse rating and less downloads than mine ahead of me.

And I don't think that Google will explain how ranking is calculated.
I believe that don't want advise spammers.

Tom

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 anyone's active install % dropping like a rock lately?

2010-08-30 Thread Tomáš Hubálek
On 15 srp, 02:28, TreKing treking...@gmail.com wrote:

 I think you are - the developer console is useless for pretty much anything
 besides actually uploading an app (and even that it has trouble with
 sometimes). That install percent in particular fluctuates so often and so
 randomly it's hard to imagine it's based on anything legitimate.

+1

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 anyone's active install % dropping like a rock lately?

2010-08-30 Thread Tomáš Hubálek
On 26 srp, 16:47, Fabrizio Giudici fabrizio.giud...@tidalwave.it
wrote:
 I've spotted this thread only now. It's happening to me too - in a
 week it dropped from a _steady_ 45% (held since several weeks) to 36%,
 with a single new active install out of regularly increasing new
 downloads. I even posted that on my blog - a commenter pointed out
 that when people upgrade an app the download counter might increase,
 while the active install doesn't (actually, I've released two updates
 in this month). Can you confirm?

I can confirm the same last week.

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

2010-08-30 Thread Ajay
Thanks a lot. This worked!!

I had to change my implementation to use HttpsURLConnection, and could
not keep my earlier implementation using DefaultHttpClient. Well, I
think as long as it works, it should not make any difference I guess.

Thank you,
AJ

On Aug 25, 6:02 pm, gcstang gcst...@gmail.com wrote:
 See my post here :

 http://groups.google.com/group/android-developers/browse_thread/threa...

 On Aug 24, 2:48 am,Ajayaja...@gmail.com wrote:

  Hi,

  Since my app is going to access our own servers, I think I can use the
  hack of trusting all certificates. I tried the following  still
  fails :-(

  SchemeRegistry schemeRegistry = new SchemeRegistry();
  SSLSocketFactory sslSocketFactory =
  SSLSocketFactory.getSocketFactory();

  sslSocketFactory.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
  schemeRegistry.register(new Scheme(https, sslSocketFactory, 443));

  ClientConnectionManager manager = new
  ThreadSafeClientConnManager(httpParam, schemeRegistry);
  DefaultHttpClient client = new DefaultHttpClient(manager, httpParam);

  Thank you,
  AJ

  On Aug 22, 12:10 am, Bob Kerns r...@acm.org wrote:

   The CA root certificates have very long expiration dates, so this is
   much less of a problem than you may assume.

   It's still an issue -- CA certs could possibly be revoked in the event
   of a vulnerability or theft. But those are relatively remote
   possibilities, beyond what most phone apps would need to consider.

   On Aug 21, 9:16 am, DanH danhi...@ieee.org wrote:

The current cert may only be good for another 6-12 months.  And if the
site isn't directly under the control of the app developer, the cert
may change at any time, and may even be changed to use a different
root.

There's probably no good solution to this problem, but the best I can
think of is to embed another app in your app that simply installs the
necessary cert(s), then have a way for that app to be updated as
needed.

On Aug 21, 7:09šam, Kostya Vasilyev kmans...@gmail.com wrote:

 Right, it does. If the site in question is part of the phone 
 application's
 infrastructure, I personally would find it acceptable.

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

 21.08.2010 16:06 ÐÏÌØÚÏ×ÁÔÅÌØ DanH danhi...@ieee.org ÎÁÐÉÓÁÌ:

 That assumes that the web site's cert won't change for the life of the
 app.

 On Aug 21, 3:18 am, Kostya Vasilyev kmans...@gmail.com wrote:

  šAjay,

  A more cryptographically correct solution would be to install the
  missing Óertfiicate pieces wit...
   On Fri, Aug 20, 2010 at 8:46 PM, Kostya Vasilyev 
   kmans...@gmail.com
   mailto:kmans...@gmail
   š š You being able to open the site in desktop browser and on a
   š š Blackberry seems to impl...

http://groups.google.com/group/android-developers/browse_thread/threa...

   š š This is a hack to accept all certificates.

   š š -- Kostya

   š š 20.08.2010 16:07,...
   š š š š using the following 
   site:http://www.digicert.com/helpandittold
   š š š š that it was installed properly on the server.

   š š š š On Aug 20, 4:39 pm, Kostya V...
   š š š š mailto:kmans...@gmail.com šwrote:

   š š š š š š šAjay,

   š š š š š š This can happen because the certificate is not signed 
   by...
   š š mailto:android-developers@googlegroups.com
   š š To unsubscribe from this group, send email to
   š š android-developers+unsubscr...@googleg...
   š š 
   mailto:android-developers%2bunsubscr...@googlegroups.comandroid-developer
s%252bunsubscr...@googlegroups.com

   š š For more options, visit this group at
   š šhttp://groups.google.com/group/android-develope...



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

2010-08-30 Thread nikhilesh singh tak
Hey Romain Guy thanks a lot for quick response and help. :)


Regards
Nikhilesh Singh Tak

On Mon, Aug 30, 2010 at 11:44 AM, Romain Guy romain...@android.com wrote:
 It's a notation called varargs. See explanations here:
 http://download-llnw.oracle.com/javase/1.5.0/docs/guide/language/varargs.html

 On Sun, Aug 29, 2010 at 11:12 PM, nikki nikhileshsingh...@gmail.com wrote:
 Hi Group,

 I was just going through the document over AsyncTask and came across
 the notation ... in the methods of Asynctask (For eg.
 doInBackground(Params...)).

 I was a bit excited to know whats the significance of ... in this
 notation.

 Please help

 Regards
 Nihkilesh

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




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

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

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



-- 
Nikhilesh Singh Tak

+91-9630934374
+91-9929098279

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

2010-08-30 Thread pramod.deore
Hi,  In my application I am sending data to server if I had not
pressed back button when data is sending to server then data is
successfully saved on server and new screen (one created in layout
folder) is displayed which says data is stored.
 But at the time of sending data if i pressed back button
then also data  successfully saved on server but I can't see that new
screen that data is stored on server. How to handle this situation?

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

2010-08-30 Thread AJ
You must have written code for posting data to server in a thread.
So when you press the BACK key terminate that thread and show a screen
that Failure Data posting to server to user

Thanks,
AJ

On Aug 30, 12:00 pm, pramod.deore deore.pramo...@gmail.com wrote:
 Hi,  In my application I am sending data to server if I had not
 pressed back button when data is sending to server then data is
 successfully saved on server and new screen (one created in layout
 folder) is displayed which says data is stored.
              But at the time of sending data if i pressed back button
 then also data  successfully saved on server but I can't see that new
 screen that data is stored on server. How to handle this situation?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 there a way to request permissions from a user as you need them?

2010-08-30 Thread Kostya Vasilyev
 Separating some code into a separate .apk doesn't really improve 
security, it's only a way for the user to adjust his/her comfort level.


There is nothing preventing two separate .apks, one with read contacts 
and the other with internet permissions to do exactly the same as one 
malicious app, steal contact info. It might not be obvious to the user 
at all that the two apps are working together to do something bad.


The only way this is meaningful is if the application to pick a contact 
is well known and trusted, which probably means it should be part of 
Android itself.


I believe what would help is finer-grained access permissions, splitting 
a broad read contacts into smaller-scope permissions, based on 
user-driven scenarios.


Perhaps it should be done with other permissions, such as write 
external storage. There has not yet been a trojan that completely wipes 
the sdcard, but nothing preventing it from existing.


- Kostya

30.08.2010 9:55, Dianne Hackborn ?:
On Sun, Aug 29, 2010 at 5:17 PM, Bob Kerns r...@acm.org 
mailto:r...@acm.org wrote:


There is no reasonable way, that does not impose an unacceptable
burden on users, to distribute an app that makes use of third party
functionality like this that should live in its own .apk.


How is bump's functionality as a separate .apk an unacceptable burden? 
 It does mean the user would need to install a separate app if they 
want to use that functionality...  but it should be very easy for the 
original app to explain it needs this (when they want to use the 
functionality), clearly associates that functionality with the bump 
developer (who btw gets some nice branding there), and also allows 
bump to upgrade their client code without having to get all of their 
app authors to update each app.



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

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

[android-developers] Re: Is there a way to request permissions from a user as you need them?

2010-08-30 Thread William Ferguson
Interesting debate. And from a technical perspective I really like the
simplicity of delegating responsibility and permissions to separate
apks that have discretely defined scope. I'm just not sure how
practical it is.

If you look at the permissions that are most contentious in
combination : internet and read_contacts.
I have avoided several apps that appear outwardly to be perfecty ok
because I could see no good reason for the app to have this combo.
But internet is often required for one of these (legitimite) reasons:
1) to report use statistics (eg Flurry)
2) to request and present ads
3) to otherwise hit an external server

In an apps description if (3) is required you generally get told about
it.
But use of (1) or (2) is typically omitted because either its an
instant sale killer or the target audience won't understand.

The solution that you are proposing Dianne, would be for separate apks
for options (1) and (2) and to have an app be able to convince a user
that it is worthwhile the hassle of downloading (and dealing with
upgrades) of those apps just to let the current app run.
I know that if I was presented with that, then unless the app was a
real beauty I would probably bail about then.

The upside is that once the lbrary apk did get installed, the next app
that required it would not have the same drama.

However, while any of us could create an AdServer apk in the full
light of everyone else, only one person can upload it to market. That
person would then have the opportunity of warping the AdServer apk to
funnel whatever amount of that Ad revenue into their own account. So
if we were to collaborate on such a reusable component we would need a
trusted owner.

This one is close to my heart, because living in Australia, unless I
get a buddy in the states who is willing to collect any sale revenue
for me, my only real source of income from Android is via Ad revenue
or donates.
At the moment, innovation in some types of apps is being stifled
because a good portion of the world can't make any income from them.

William


On Aug 30, 3:55 pm, Dianne Hackborn hack...@android.com wrote:
 On Sun, Aug 29, 2010 at 5:17 PM, Bob Kerns r...@acm.org wrote:
  There is no reasonable way, that does not impose an unacceptable
  burden on users, to distribute an app that makes use of third party
  functionality like this that should live in its own .apk.

 How is bump's functionality as a separate .apk an unacceptable burden?  It
 does mean the user would need to install a separate app if they want to use
 that functionality...  but it should be very easy for the original app to
 explain it needs this (when they want to use the functionality), clearly
 associates that functionality with the bump developer (who btw gets some
 nice branding there), and also allows bump to upgrade their client code
 without having to get all of their app authors to update each app.

  And even if there were -- it does not solve the problem -- it just
  associates it with the third-party app. And that's bad, actually. It
  gives the user the option of not including that app, which makes
  things MORE complex for the user, and opens up the possibility of
  leading to broken situations.
  It also introduces the equivalent of DLL hell. Please tell me you
  don't want to go there!

 We have been avoiding standard general shared library support partly because
 we don't want to have DLL hell.  (Also because the security implications are
 nasty.)

 However, when you implement things as separate .apks, I think this is much
 less an issue. If you aren't doing something extremely loosely coupled like
 intent protocols, I think the interaction you will have between the two
 pieces of code will by nature be much less tightly bound than with shared
 libraries.  It just doesn't lend itself to a large surface area API with a
 lot of subtleties in interaction.  It's more like client/server interaction
 like APIs published by Facebook and other web services.  (A corollary is
 that this approach is not going to work for every case where you use shared
 libraries...  but what I have been observing is that in a lot of the cases
 where some third party is providing a piece of functionality that is not
 core to the app using it, this can work quite nicely.)

  I really do think that optional permissions, which are requested IN
  THE CONTEXT OF THE NEED are very much the way to go. They are simpler
  for users to understand. This is how Apple does it, and while it does
  have its drawbacks, it is far less mysterious.

 I'm curious, what is this example of how Apple does it?  Yes there is the
 location thing, which as I've said is probably an exception that should have
 per-app control for the user.  What else?  Having apps ask you to enter your
 password to log in as admin in MacOS X?

  But the current situation is not where we want to be!

 The current approach is I believe a strong improvement over what has gone
 before.  Things can always be improved 

[android-developers] Re: how to know data successfully saved on server

2010-08-30 Thread pramod.deore
HI, AJ Thanks for reply,
 But instead of terminating the process what I want is : If user press
back button then also data is sent to server in background and after
successfully sending set screen or alertbox to the user showing status
of data i.e successfully saved on server or not.

On Aug 30, 12:08 pm, AJ ajeet.invinci...@gmail.com wrote:
 You must have written code for posting data to server in a thread.
 So when you press the BACK key terminate that thread and show a screen
 that Failure Data posting to server to user

 Thanks,
 AJ

 On Aug 30, 12:00 pm, pramod.deore deore.pramo...@gmail.com wrote:

  Hi,  In my application I am sending data to server if I had not
  pressed back button when data is sending to server then data is
  successfully saved on server and new screen (one created in layout
  folder) is displayed which says data is stored.
               But at the time of sending data if i pressed back button
  then also data  successfully saved on server but I can't see that new
  screen that data is stored on server. How to handle this situation?

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

2010-08-30 Thread Andrey Panasyuk

 Thank you for the comment.

Unfortunately it's not the case since we also want to test interaction
of several applications at a time.

Now we're looking at a possibility to interact between applications and
testcases project via services and service connections.

You can make one test package that is capable of testing several
applications, but it can only test one app at a time. For each new app
you want to test, you have to update AndroidManifest.xml to point to
the new target app, re-build the test package, and re-install it.

What is your use case? Do you have a set of unit tests that you want
to apply to different apps? This is a bit unusual, but conceivable.
You could do this in a shell script. First install all your apps using
adb install, then use sed or awk to modify the
AndroidManifest.xml in the test project, build the test package, use
adb -r to install it, and then adb shell am instrument to run the
test and see the results. The last command is documented in the
Android 2.2 Developer's Guide, under Guide  Developing  Testing
Testing in Other IDEs.

The Elk.

On Aug 24, 12:36 am, Andrey Panasyuka.panas...@softteco.com  wrote:

Hello,

Is it possible to test several Android projects by having only one
test project?
I've tried various ways like specifying several instrumentation tags:

 instrumentation android:targetPackage=com.test1.test11
android:name=android.test.InstrumentationTestRunner /
 instrumentation android:targetPackage=com.test1.test12
android:name=android.test.InstrumentationTestRunner /

or played with the packages but finally I got only tests for one
application working correctly, tests for the other applications are
giving java.lang.VerifyError.

All of the applications are signed with the same key.

Does anyone know if it is possible?


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


Re: [android-developers] Re: Is there a way to request permissions from a user as you need them?

2010-08-30 Thread Mark Murphy
On Mon, Aug 30, 2010 at 3:11 AM, Kostya Vasilyev kmans...@gmail.com wrote:
 There is nothing preventing two separate .apks, one with read contacts and
 the other with internet permissions to do exactly the same as one
 malicious app, steal contact info. It might not be obvious to the user at
 all that the two apps are working together to do something bad.

Agreed. Developers have incentive to make their apps appear less
scary. Either we give them the tools to do that without compromising
security or they will find ways that make security worse (e.g., APKs
that intentionally leak secured data/services).

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

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

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


[android-developers] Re: Problem in encoding image

2010-08-30 Thread pramod.deore
Someone knows how to encode large image in Base64 format. Because I
had tried using creating byte array as large as image size but if
image it encode image if size of image is upto 800kb, if image is
greater than 800kb then it throws runtime exception as
OutofMemoryException. So I had decided use 1kb of byte array, in that
I encode 1kb of image write to a file after that again encode 1kb of
image and write to a file .  The code is like this

public void encodeImage()
{
try
{
out = new PrintWriter(c:/program1/zzz.txt);
InputStream inputStream =  new FileInputStream
(c:/program1/
tt.jpg);
OutputStream outputStream = new
FileOutputStream(c:/program1/
zzz.txt);

byte[] b = new byte[1024];

while((read= inputStream.read(b))0)
{
System.out.println (Inside while);
inputStream.mark(b.length);
String encoded = Base64.encode(b);
//System.out.println (encoded);
out.print(encoded);
out.flush();

//bas.write(b);
}

out.close();

}

catch (Exception e)
{
System.out.println (e);
}

}

But when I decode that image here 
http://www.opinionatedgeek.com/dotnet/tools/base64decode/
then it says that he input is not a valid Base-64 string.

Please help me to solve this issue.

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


Re: [android-developers] Re: how to know data successfully saved on server

2010-08-30 Thread Mark Murphy
On Mon, Aug 30, 2010 at 3:15 AM, pramod.deore deore.pramo...@gmail.com wrote:
  But instead of terminating the process what I want is : If user press
 back button then also data is sent to server in background and after
 successfully sending set screen or alertbox to the user showing status
 of data i.e successfully saved on server or not.

Step #1: Use an IntentService instead of a thread

Step #2: When the IntentService is done with the upload, it uses an
ordered broadcast to either update the on-screen activity or put a
Notification in the status bar

http://commonsware.com/blog/2010/08/11/activity-notification-ordered-broadcast.html

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

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

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


[android-developers] Re: how to know data successfully saved on server

2010-08-30 Thread pramod.deore
Thank you Sir,

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


[android-developers] Bitmap mutability dependent on location

2010-08-30 Thread Ed
Hi all,

Found a bit of a weird one which might be related to this post -
http://groups.google.com/group/android-developers/browse_thread/thread/b0e2048495d61e0c

I've check the public issue tracker for android and can't see anything
related to this.

Basically I'm setting an icon in a menu, getting a mutable copy of the
icon, drawing some text on it to create a menu item that reflects the
current state of the thing the menu item links to.

This works all well and good when I use a resource that is in /
drawble/ but if I put the same resource into /drawable/hdpi/ (with
relevant resizes in ldpi and mdpi) it blows up saying that it is not
mutable... even though it's using the same code and the same image
format (exactly the same file):

Drawable d = mi.getIcon().mutate();
Canvas c = new Canvas(((BitmapDrawable) d).getBitmap());
//draw on canvas
d.draw(c);

I wish to use the different dpi graphics as appropriate rather than
scaling at runtime or implementing my own dpi image selector. Is this
a known limitation? If so is there documentation about it?

Cheers,

Ed

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

2010-08-30 Thread Teo
Thanks for the answers.. I guess it would be better to use alarms then and
recreate the activity as needed.


On Mon, Aug 30, 2010 at 9:01 AM, Dianne Hackborn hack...@android.comwrote:

 On Sun, Aug 29, 2010 at 12:52 PM, Teo teomina...@gmail.com wrote:

 Will the process/activity be killed if it has a Handler running in it?


 There being a Handler with pending (or running) messages has no influence
 on when a process will be killed.  The only things that matter for this are
 the state of any activities, receivers, services, or content providers in
 the process, as described for the process lifecycle.


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

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

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




-- 
*Teo*
Site http://teodorfilimon.com | Blog http://teodorfilimon.blogspot.com/ |
Facebook http://www.facebook.com/teominator |
Twitterhttp://twitter.com/teominator
Romania, Europe (GMT +2)

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

[android-developers] Re: Application installation

2010-08-30 Thread Surfer
Tnx for the response Dianne.
As i mentioned above my app is a system app, it is registered under /
data/system/packages.xml with system=true.
Doesn't this mean it's part of the system and it has corresponding
rights.
Sry, still don't understand why the intent doesn't launch the
installer.

On Aug 28, 11:14 pm, Dianne Hackborn hack...@android.com wrote:
 You can do it if you are pre-installed on the phone as part of the system.
  Otherwise you can not.



 On Sat, Aug 28, 2010 at 8:17 AM, Surfer kalik...@yahoo.com wrote:
  Why not? Android Market does it..

  On Aug 26, 2:50 pm, { Devdroid } webnet.andr...@gmail.com wrote:
   On 26 August 2010 14:34, Surfer kalik...@yahoo.com wrote:

works. What i would like to do is perform asilentinstall,

   You should not be able to do so.

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

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

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

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


[android-developers] how to get contact detail from incoming number

2010-08-30 Thread A N K ! T
am trying to get contact detail from an incoming number

while calls come i get the number from phone state Receiver through that
number am trying to get detail of that number in contacts but not getting
anything
due to number format.
the number i get from phone statelistener is  like 99887
but number in contact is like 99-887-
how to do it...please someone help me out

-- 

 A N K ! T..

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

2010-08-30 Thread Kostya Vasilyev

 Pramod,

Base64 encoding has end-of-data markers.

http://en.wikipedia.org/wiki/Base64

Your code encodes each 1024-byte chunk of input image data into its own 
Base64 string. Each of those has its own end markers.


Because of this, the receiving side doesn't see one piece of data 
encoded with Base64, rather, it sees multiple pieces of data, which I 
guess is not what it expects.


There are several ways to fix this:

1 - Write your own code to encode partial data pieces, flushing the 
output at the very end. Base64 encoding is not difficult.


2 - Use a ready-made class, like this one:

http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Base64OutputStream.html

It's equivalent is available in Android starting with 2.2:

http://developer.android.com/reference/android/util/Base64OutputStream.html

3 - Change buffer size in your code to 1023 (a multiple of 3). This is a 
hack, but probably the easiest thing to do.


-- Kostya

30.08.2010 11:23, pramod.deore пишет:

Someone knows how to encode large image in Base64 format. Because I
had tried using creating byte array as large as image size but if
image it encode image if size of image is upto 800kb, if image is
greater than 800kb then it throws runtime exception as
OutofMemoryException. So I had decided use 1kb of byte array, in that
I encode 1kb of image write to a file after that again encode 1kb of
image and write to a file .  The code is like this

public void encodeImage()
 {
 try
 {
 out = new PrintWriter(c:/program1/zzz.txt);
 InputStream inputStream =  new FileInputStream
(c:/program1/
tt.jpg);
 OutputStream outputStream = new
FileOutputStream(c:/program1/
zzz.txt);

 byte[] b = new byte[1024];

 while((read= inputStream.read(b))0)
 {
 System.out.println (Inside while);
 inputStream.mark(b.length);
 String encoded = Base64.encode(b);
 //System.out.println (encoded);
 out.print(encoded);
 out.flush();

 //bas.write(b);
 }

 out.close();

 }

 catch (Exception e)
 {
 System.out.println (e);
 }

 }

But when I decode that image here 
http://www.opinionatedgeek.com/dotnet/tools/base64decode/
then it says that he input is not a valid Base-64 string.

Please help me to solve this issue.




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

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


[android-developers] How to watermark the camera picture?

2010-08-30 Thread Rootko
Hi fellow developers,

I'm searching the web for endless hours now and I cannot find it
anywhere. How can I add a watermark in the picture (.jpeg)? I have
this project in mind where I'd like to have such feature - to take a
picture using the camera (already developed this) and then make it
watermarked. So basically just take the .jpeg file and then blend it
with some .png file that is semi transparent.

But I could not find anything how to achieve this :( Can you please
help me? At least some principal points that would send me into right
direction - how can I do something like that in Android.

Thanks a lot,
Rudo

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


[android-developers] Calendar issue

2010-08-30 Thread mayank bisht
I am developing an app for android in which i have to initiate my app
whenever an entry will be done in calendar.How to get notification on
calendar entry ?

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

2010-08-30 Thread Mark Murphy
On Mon, Aug 30, 2010 at 4:28 AM, mayank bisht mayank.and...@gmail.com wrote:
 I am developing an app for android in which i have to initiate my app
 whenever an entry will be done in calendar.

There is no calendar in the Android SDK.

You are welcome to contact the developers of calendar applications to
see how best to integrate with them. Not all such applications will
have such integration options. For example, the Calendar application
in the Android open source project does not have any documented and
supported APIs for this sort of integration.

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

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

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


Re: [android-developers] Bitmap mutability dependent on location

2010-08-30 Thread Romain Guy
Mutating a drawable does not making the Bitmap it may contain mutable.
You have to check whether the Bitmap you get is mutable. Bitmaps
loaded from resources are never mutable, you must create a mutable
copy first (see the Bitmap.create/copy documentation.)

On Mon, Aug 30, 2010 at 12:53 AM, Ed edscha...@gmail.com wrote:
 Hi all,

 Found a bit of a weird one which might be related to this post -
 http://groups.google.com/group/android-developers/browse_thread/thread/b0e2048495d61e0c

 I've check the public issue tracker for android and can't see anything
 related to this.

 Basically I'm setting an icon in a menu, getting a mutable copy of the
 icon, drawing some text on it to create a menu item that reflects the
 current state of the thing the menu item links to.

 This works all well and good when I use a resource that is in /
 drawble/ but if I put the same resource into /drawable/hdpi/ (with
 relevant resizes in ldpi and mdpi) it blows up saying that it is not
 mutable... even though it's using the same code and the same image
 format (exactly the same file):

 Drawable d = mi.getIcon().mutate();
 Canvas c = new Canvas(((BitmapDrawable) d).getBitmap());
 //draw on canvas
 d.draw(c);

 I wish to use the different dpi graphics as appropriate rather than
 scaling at runtime or implementing my own dpi image selector. Is this
 a known limitation? If so is there documentation about it?

 Cheers,

 Ed

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




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

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

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


[android-developers] MediaRecorder buffers 1 second of video

2010-08-30 Thread Alexandre Ferrieux
Hello,

I'm using MediaRecorder.setOutputFile(FileDescriptor fd) over a UNIX
socket, so that local code on the device can see the encoded stream in
real time (for video streaming out).

What I observed is that the encoder doesn't write encoded frames
continuously, when they are produced, but by bursts, exactly one
second apart. I tried both containers (THREE_GPP and MPEG_4) and all
three available codecs (MPEG_4_SP, H263, H264), the behavior is always
the same. This one-second period is notably unrelated to framerate or
bitrate, so it is not flushing by size; rather, it seems to be
flushing by time (possibly to mask SD card write overheads ? Bummer, I
'm not using the SD here !). Is it a known limitation ? Is there a
known workaround ?

-Alex

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

2010-08-30 Thread pramod.deore
Hi, Kostya

I can't use second solutions because they are for API level8 and I am
developing this for APilevel4(1.6), But after changing byte array size
to 1023 it works perfectly fine, Thanks again Kostya I am working on
this from last 8 days and today I got the solution.

 But still I don't know how it works with 1023 and not with 1024?

On Aug 30, 1:04 pm, Kostya Vasilyev kmans...@gmail.com wrote:
   Pramod,

 Base64 encoding has end-of-data markers.

 http://en.wikipedia.org/wiki/Base64

 Your code encodes each 1024-byte chunk of input image data into its own
 Base64 string. Each of those has its own end markers.

 Because of this, the receiving side doesn't see one piece of data
 encoded with Base64, rather, it sees multiple pieces of data, which I
 guess is not what it expects.

 There are several ways to fix this:

 1 - Write your own code to encode partial data pieces, flushing the
 output at the very end. Base64 encoding is not difficult.

 2 - Use a ready-made class, like this one:

 http://commons.apache.org/codec/apidocs/org/apache/commons/codec/bina...

 It's equivalent is available in Android starting with 2.2:

 http://developer.android.com/reference/android/util/Base64OutputStrea...

 3 - Change buffer size in your code to 1023 (a multiple of 3). This is a
 hack, but probably the easiest thing to do.

 -- Kostya

 30.08.2010 11:23, pramod.deore пишет:



  Someone knows how to encode large image in Base64 format. Because I
  had tried using creating byte array as large as image size but if
  image it encode image if size of image is upto 800kb, if image is
  greater than 800kb then it throws runtime exception as
  OutofMemoryException. So I had decided use 1kb of byte array, in that
  I encode 1kb of image write to a file after that again encode 1kb of
  image and write to a file .  The code is like this

  public void encodeImage()
           {
                   try
                   {
                           out = new PrintWriter(c:/program1/zzz.txt);
                           InputStream inputStream =  new FileInputStream
  (c:/program1/
  tt.jpg);
                           OutputStream outputStream = new
  FileOutputStream(c:/program1/
  zzz.txt);

                           byte[] b = new byte[1024];

                           while((read= inputStream.read(b))0)
                           {
                                   System.out.println (Inside while);
                                   inputStream.mark(b.length);
                                   String encoded = Base64.encode(b);
                                   //System.out.println (encoded);
                                   out.print(encoded);
                                   out.flush();

                                   //bas.write(b);
                           }

                           out.close();

                   }

                   catch (Exception e)
                   {
                           System.out.println (e);
                   }

           }

  But when I decode that image 
  herehttp://www.opinionatedgeek.com/dotnet/tools/base64decode/
  then it says that he input is not a valid Base-64 string.

  Please help me to solve this issue.

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

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


[android-developers] Re: How to watermark the camera picture?

2010-08-30 Thread Yahel
to take a
 picture using the camera (already developed this) and then make it
 watermarked.

Look into Canvas.drawBitmap with alpha channel.

Good luck.

Yahel


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: onCellLocationChanged and updateNetworkNameExtension showing up in Log files. Where do these come from? and can I make them stop?

2010-08-30 Thread Vinay S
hi,

As I know you get the event onCellLocationChanged when there is change
in Cell Tower connectivity..

To stop this event you need to stop listing to this update. Look for
listen method in Telephonymanager (URL:
http://developer.android.com/reference/android/telephony/TelephonyManager.html).

I am not aware of the other event.


On Aug 29, 5:18 am, Greg Siano gregmsi...@gmail.com wrote:
 I'm making a game, but the game lags a bit every time
 onCellLocationChanged or updateNetworkNameExtension shows up in my Log
 file.  What is making these two run? Is there a way to make them not
 run?

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

2010-08-30 Thread pyleaf
Hi, guys!
Today, I discover PhoneGap.Unluckily, there is no enough docement about it.
How to you think about the future of PhoneGap?
Thank you!

-- 
Believing is Everything.

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

[android-developers] Enabling wifi tethering mode

2010-08-30 Thread guru
Hi All,

I am not seeing Wif tethering app in my phone. I enabled wifi in froyo
build. But it is not showing tethering app ?
What do i need to enable the app?

Thanks
Gururaja B O

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


[android-developers] Custom View orientation change

2010-08-30 Thread Vikram
I have a custom view A which extends RelativeLayout and internally
uses 3 instances of custom view B: B1, B2 and B3, which can be 'flung'
left or right to move to B4, B5 and B6.

I want to resize the whole view based on the orientation. I have
hardcoded the size of B based on the screen width of 320 (if the view
is initialized in potrait mode), or 480 (landscape mode), and then use
the screen density from getDisplayMetrics() to convert them into real
pixel values to draw my view. Is this is best way to do it?

I was trying to use onSizeChanged to look for orientation changes, but
this does not work because onMeasure() is called before
onSizeChanged() and the orientation change does not show up.

Any advice anyone?

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

2010-08-30 Thread Kostya Vasilyev


It's magic, man. Pure magic.

:)

Base 64 encoding converts every 3 bytes of input data to 4 bytes of 
output data. If input data size is not a multiple of 3, output is padded 
with = characters, which also means end of data.


Your original buffer size, 1024, is not a multiple of 3, so each output 
chunk ended with end-of-data marker.


On the other hand, 1023 *is* a multiple of 3, so no end-of-data padding 
is generated until the very end of data.


-- Kostya

30.08.2010 13:13, pramod.deore пишет:

Hi, Kostya

I can't use second solutions because they are for API level8 and I am
developing this for APilevel4(1.6), But after changing byte array size
to 1023 it works perfectly fine, Thanks again Kostya I am working on
this from last 8 days and today I got the solution.

  But still I don't know how it works with 1023 and not with 1024?

On Aug 30, 1:04 pm, Kostya Vasilyevkmans...@gmail.com  wrote:

   Pramod,

Base64 encoding has end-of-data markers.

http://en.wikipedia.org/wiki/Base64

Your code encodes each 1024-byte chunk of input image data into its own
Base64 string. Each of those has its own end markers.

Because of this, the receiving side doesn't see one piece of data
encoded with Base64, rather, it sees multiple pieces of data, which I
guess is not what it expects.

There are several ways to fix this:

1 - Write your own code to encode partial data pieces, flushing the
output at the very end. Base64 encoding is not difficult.

2 - Use a ready-made class, like this one:

http://commons.apache.org/codec/apidocs/org/apache/commons/codec/bina...

It's equivalent is available in Android starting with 2.2:

http://developer.android.com/reference/android/util/Base64OutputStrea...

3 - Change buffer size in your code to 1023 (a multiple of 3). This is a
hack, but probably the easiest thing to do.

-- Kostya

30.08.2010 11:23, pramod.deore пишет:




Someone knows how to encode large image in Base64 format. Because I
had tried using creating byte array as large as image size but if
image it encode image if size of image is upto 800kb, if image is
greater than 800kb then it throws runtime exception as
OutofMemoryException. So I had decided use 1kb of byte array, in that
I encode 1kb of image write to a file after that again encode 1kb of
image and write to a file .  The code is like this
public void encodeImage()
  {
  try
  {
  out = new PrintWriter(c:/program1/zzz.txt);
  InputStream inputStream =  new FileInputStream
(c:/program1/
tt.jpg);
  OutputStream outputStream = new
FileOutputStream(c:/program1/
zzz.txt);
  byte[] b = new byte[1024];
  while((read= inputStream.read(b))0)
  {
  System.out.println (Inside while);
  inputStream.mark(b.length);
  String encoded = Base64.encode(b);
  //System.out.println (encoded);
  out.print(encoded);
  out.flush();
  //bas.write(b);
  }
  out.close();
  }
  catch (Exception e)
  {
  System.out.println (e);
  }
  }
But when I decode that image 
herehttp://www.opinionatedgeek.com/dotnet/tools/base64decode/
then it says that he input is not a valid Base-64 string.
Please help me to solve this issue.

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



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

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


[android-developers] ListView ClassCastException

2010-08-30 Thread Alok Kulkarni
Hi all,in my application I have a class as:

   1. public class TouchInterceptor extends ListView

and my main activity class as:


   1. public class GUIEngine extends Activity


in this class i initialize my ListView variable as:


   1. lView = (ListView) findViewById(R.id.mainList);


now i want to set a listener on this lview object which is in my
TouchInterceptor class, i do that as:


   1. ((TouchInterceptor) lView).setDropListener(mDropListener);


but i get a ClassCastException at this line.
what am i doing wrong?

plzz can anyone help.. thank u

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: App breaks for some users after they update from the Market

2010-08-30 Thread Zsolt Vasvari
 I don't know. Every email I've gotten and all comments in the crash reports
 indicate it's a consistent crash occurring 100% of the time (and in the
 exact same location based on the ever-growing report count for the same
 stack trace).

 Clearing the data (or uninstalling / re-installing which clears the data as
 well) makes the problem go away each and every time.

I think what's happening then is that some kind of race condition
corrupts your app data, after which the crash will occur every time.
Of course, clearing the app data will ellivate the problem.  But I
still think that it's red herring:

- It started to happen after you introduced static maps.
- You admit using such maps in multiple threads
- java.util.TreeMap is not thread safe.

What I would do is wrap TreeMap around a
java.util.Collections.syncronizedMap (not 100% about the name) and
then release an updated app and see if the crashes go away.  I know it
makes your users the testers, but if you cannot duplicate it, there is
not much to lose.

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


[android-developers] onSingleTapConfirmed and different screen sizes

2010-08-30 Thread djauto23
I am developing a game in which there are a couple of on-screen
buttons
the user can press to do different things. These work by responding
to
onSingleTapConfirmed, and checking if the getX and getY of the event
are
within the coordinates of the buttons.

However, the getX and getY coordinates are different when the game is
played on other screen sizes than the game was developed on.

How is the best way to deal with that? Of course I could call
getWidth
and getHeight and do lots of if's on them, but it would be better to
have a more general way of doing it.

Does anyone know of such a way?

The game is implemented on a GLSurfaceView.

Thanks.

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


[android-developers] Re: Piracy Breakdown by Country

2010-08-30 Thread Zsolt Vasvari
In my app, which has an about 3% piracy rate (Pirate == Person who
uninstall is  20 mins).  None of whom are from Australia, even though
I have about 10 Australian paid users.  So by your stat, I'd expect to
see 9 of those guys (gals) to be pirates.

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

2010-08-30 Thread CMF
Hi , I have fixed the problem by myselft, thanks.
But I would like to know how to pass a variable from the android to
the php?

On Aug 28, 2:38 am, Yahel kaye...@gmail.com wrote:
 You need to tell us where the error is raised if any.

 In your php you might want to try to use the realpath function to get
 the true path to your upload folder :

 ?php
 $target_path  = realpath(uploads/);
 ...

 Yahel

 On 27 août, 17:42, CMF manf...@gmail.com wrote:

  Hi all, i have read through the internet and get some solutions on
  upload image to php server, but when i tried to use those codes, I
  cannot get the image uploaded to the server. Could anyone can help me
  to fix it?

  Android Code:
  i have added uses-permission
  android:name=android.permission.INTERNET /

  package com.test.upload;

  import java.io.DataInputStream;
  import java.io.DataOutputStream;
  import java.io.File;
  import java.io.FileInputStream;
  import java.io.IOException;
  import java.net.HttpURLConnection;
  import java.net.MalformedURLException;
  import java.net.URL;

  import android.app.Activity;
  import android.os.Bundle;
  import android.util.Log;

  public class testupload extends Activity {
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          doFileUpload();
      }

      private void doFileUpload()
      {
          HttpURLConnection connection = null;
          DataOutputStream outputStream = null;
          DataInputStream inputStream = null;

          String pathToOurFile = /sdcard/a.jpg;
          String urlServer = http://myserver/testupload.php;;
          String lineEnd = \r\n;
          String twoHyphens = --;
          String boundary =  *;

          int bytesRead, bytesAvailable, bufferSize;
          byte[] buffer;
          int maxBufferSize = 1*1024*1024;

          try
          {
          FileInputStream fileInputStream = new FileInputStream(new
  File(pathToOurFile) );

          URL url = new URL(urlServer);
          connection = (HttpURLConnection) url.openConnection();

          // Allow Inputs  Outputs
          connection.setDoInput(true);
          connection.setDoOutput(true);
          connection.setUseCaches(false);

          // Enable POST method
          connection.setRequestMethod(POST);

          connection.setRequestProperty(Connection, Keep-Alive);
          connection.setRequestProperty(Content-Type, multipart/form-
  data;boundary=+boundary);

          outputStream = new
  DataOutputStream( connection.getOutputStream() );
          outputStream.writeBytes(twoHyphens + boundary + lineEnd);
          outputStream.writeBytes(Content-Disposition: form-data; name=
  \uploadedfile\;filename=\ + pathToOurFile +\ + lineEnd);
          outputStream.writeBytes(lineEnd);

          bytesAvailable = fileInputStream.available();
          bufferSize = Math.min(bytesAvailable, maxBufferSize);
          buffer = new byte[bufferSize];

          // Read file
          bytesRead = fileInputStream.read(buffer, 0, bufferSize);

          while (bytesRead  0)
          {
          outputStream.write(buffer, 0, bufferSize);
          bytesAvailable = fileInputStream.available();
          bufferSize = Math.min(bytesAvailable, maxBufferSize);
          bytesRead = fileInputStream.read(buffer, 0, bufferSize);
          }

          outputStream.writeBytes(lineEnd);
          outputStream.writeBytes(twoHyphens + boundary + twoHyphens +
  lineEnd);

          // Responses from the server (code and message)
          int serverResponseCode = connection.getResponseCode();
          String serverResponseMessage = connection.getResponseMessage();

          fileInputStream.close();
          outputStream.flush();
          outputStream.close();
          }
          catch (Exception ex)
          {
          //Exception handling
          }
      }

  }

  /
  *** 
  **/
  server php code:
  i have make the permmision of uploads/ to 777
  and the upload.php to 755

  ?php
  $target_path  = uploads/;
  $target_path = $target_path . basename( $_FILES['uploadedfile']
  ['name']);
  if(move_uploaded_file($_FILES['uploadedfile']['name'], $target_path))
  {
   echo The file .  basename( $_FILES['uploadedfile']['name']).
    has been uploaded;} else{

   echo There was an error uploading the file, please try again!;}

  ?

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


Re: [android-developers] Custom Service Permission

2010-08-30 Thread Alvin Tsai
Hi KilicBeg,

Have you managed to figure it out? I have the same problem.

My problem simply is adding a custom permission like
android.permission.CAMERA to allow user use some custom
hardware feature. I've added one in platform.xml but failed in
checkCallingPermission(String16(android.permission.MY_PERMISSION))
when client connect to service.

So my question is
1. is it possible to add custom permission in android?
2. how to do it if it is feasible?

BTW, i know that my question may better post into android-post because it
derives from custom hardware,
but i post it here because i do not think this problem is
hardware-independent and hoping for more help.

Cheers,
- rookie

On Tue, Mar 9, 2010 at 6:55 AM, KilicBeg kilic...@gmail.com wrote:

 Hi,

 I am unable to access my custom service after setting permission.
 03-08 16:38:15.730: WARN/ActivityManager(53): Permission Denial:
 Accessing service ComponentInfo{com.kilic.service/
 com.kilic.service.AdditionService} from pid=235, uid=10026 requires
 com.kilic.service.permission.MY_FIRST_SERVICE
 03-08 16:41:53.141: INFO/System.out(314): Not allowed to bind to
 service Intent { act=com.kilic.service.IAdditionService }

 If I remove the permission everything works fine. Is there anything
 special I need to do in the client manifest other than uses-
 permission ?

 Here is my code snippet for the service:

 package com.kilic.service;

 import android.app.Service;
 import android.content.Intent;
 import android.content.pm.PackageManager;
 import android.os.IBinder;
 import android.util.Log;

 /**
  * This class exposes the remote service to the client
  */
 public class AdditionService extends Service {
  private static final String TAG = AdditionService;


  private final IAdditionService.Stub binder=new
 IAdditionService.Stub() {
public int add(int value1, int value2) {
  Log.d(TAG, String.format(AdditionService.add(%d,
 %d),value1, value2));
return toppla(value1, value2);
}
  };

  @Override
  public void onCreate() {
super.onCreate();
Log.d(TAG, onCreate());
  }

  @Override
  public IBinder onBind(Intent intent)
  {
  //if(intent.getAction() != null 
 intent.getAction().equals(ACTION_SERVICE_MANAGEMENT)) {
  // check permission
  System.out.println(intent.getAction() =  + intent.getAction());


 if(this.checkCallingPermission(com.kilic.service.permission.MY_FIRST_SERVICE)
 == PackageManager.PERMISSION_DENIED) {
 //  Log.d(TAG, Checked for permission:
  + PERMISSION_MANAGEMENT
 + \nresult:  + checkCallingPermission(PERMISSION_MANAGEMENT));
  Log.d(TAG, Checked for
 permission: \nresult:  +
 checkCallingPermission(com.kilic.service.permission.MY_FIRST_SERVICE));
  throw new SecurityException();
}
  // return management binder
//return (binder);
  //}

  Log.d(TAG, onBind finished);
  // call was not local so return public binder
  return (binder);
  }

  /*
  @Override
  public IBinder onBind(Intent intent) {

return (binder);

  } */

 /**
  * Implementation of the add() method
  */
  private int toppla(int value1, int value2) {
  Log.d(TAG, String.format(AdditionService.toppla(%d,
 %d),value1, value2));
  return value1 + value2;
  }


  @Override
  public void onDestroy() {
super.onDestroy();
Log.d(TAG, onDestroy());
  }
 }

 --
 ?xml version=1.0 encoding=utf-8?
 manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=com.kilic.service
  android:versionCode=1
  android:versionName=1.0
application android:icon=@drawable/icon android:label=@string/
 app_name
service android:name=.AdditionService

 android:permission=com.kilic.service.permission.MY_FIRST_SERVICE
 android:process=:remote
 android:enabled=true
 android:exported=true

intent-filter
action
 android:name=com.kilic.service.IAdditionService /
/intent-filter
/service
/application
uses-sdk android:minSdkVersion=4 /
 uses-permission
 android:name=com.kilic.service.permission.MY_FIRST_SERVICE/uses-
 permission

 /manifest

 ===
 And this is the client code:

 package com.kilic.service.client;

 import com.kilic.service.client.R;
 import android.app.Activity;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
 import android.content.ServiceConnection;
 import android.os.Bundle;
 import android.os.IBinder;
 import android.os.RemoteException;
 import 

[android-developers] How to dynamically modify xml file in android

2010-08-30 Thread saikiran n
Hi ,
 I want to modify an xml file which is in sdcard dynamically.
How can we acheive this in android. I have seen some java code as follows

try {   
File file = new File(connections.xml);

//Create instance of DocumentBuilderFactory
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();

//Get the DocumentBuilder
DocumentBuilder docBuilder = factory.newDocumentBuilder();

//Using existing XML Document
Document doc = docBuilder.parse(file);

//create the root element
Element root = doc.getDocumentElement();

//create child element
Element childElement = doc.createElement(number);

//Add the attribute to the child
childElement.setAttribute(id,3);
root.appendChild(childElement);

//set up a transformer
TransformerFactory transfac = TransformerFactory.newInstance();
Transformer trans = transfac.newTransformer();

//create string from xml tree
StringWriter sw = new StringWriter();
StreamResult result = new StreamResult(sw);
DOMSource source = new DOMSource(doc);
trans.transform(source, result);
String xmlString = sw.toString();

OutputStream f0;
byte buf[] = xmlString.getBytes();
f0 = new FileOutputStream(connections.xml);
for(int i=0;ibuf .length;i++) {
   f0.write(buf[i]);
}
f0.close();
buf = null;
 }
 catch(SAXException e) {
e.printStackTrace();
 }
 catch(IOException e) {
e.printStackTrace();
 }
 catch(ParserConfigurationException e) {
   e.printStackTrace(); 
 }
 catch(TransformerConfigurationException e) {
   e.printStackTrace(); 
 }
 catch(TransformerException e) {
   e.printStackTrace(); 
 }

But The TransformerFactory class is not avalible in android sdk.
How can we handle above code
Any help please,
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: Please help me on Android.

2010-08-30 Thread Dev Android
On Mon, Aug 30, 2010 at 4:53 PM, Dev Android devandroid1...@gmail.comwrote:


 Hi,

 I have written an application and i want to measure the performance of each
 module. Can you please suggest me the good approach to do this. Currently,
 i'm following traditional approach by calculating system's current time.


 --
 Dev



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

[android-developers] Re: Need Help.. File Explorer Working with Code

2010-08-30 Thread Navi
Hi TreKing
yes pvt means private and
other users may be any other than the owner of mobile.
folder lock is an application used to secure data, using which we can
password protect our data or we can lock a directory.
 i want to know the step by step working of folder lock. if possible
please do reply with code.
sorry for my poor English. :(

thanks and regards
navi

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

2010-08-30 Thread CMF
I can upload the image to the server now.
But what if I need to pass a variable to the php and upload the image
simultaneously ?

On Aug 28, 2:38 am, Yahel kaye...@gmail.com wrote:
 You need to tell us where the error is raised if any.

 In your php you might want to try to use the realpath function to get
 the true path to your upload folder :

 ?php
 $target_path  = realpath(uploads/);
 ...

 Yahel

 On 27 août, 17:42, CMF manf...@gmail.com wrote:

  Hi all, i have read through the internet and get some solutions on
  upload image to php server, but when i tried to use those codes, I
  cannot get the image uploaded to the server. Could anyone can help me
  to fix it?

  Android Code:
  i have added uses-permission
  android:name=android.permission.INTERNET /

  package com.test.upload;

  import java.io.DataInputStream;
  import java.io.DataOutputStream;
  import java.io.File;
  import java.io.FileInputStream;
  import java.io.IOException;
  import java.net.HttpURLConnection;
  import java.net.MalformedURLException;
  import java.net.URL;

  import android.app.Activity;
  import android.os.Bundle;
  import android.util.Log;

  public class testupload extends Activity {
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          doFileUpload();
      }

      private void doFileUpload()
      {
          HttpURLConnection connection = null;
          DataOutputStream outputStream = null;
          DataInputStream inputStream = null;

          String pathToOurFile = /sdcard/a.jpg;
          String urlServer = http://myserver/testupload.php;;
          String lineEnd = \r\n;
          String twoHyphens = --;
          String boundary =  *;

          int bytesRead, bytesAvailable, bufferSize;
          byte[] buffer;
          int maxBufferSize = 1*1024*1024;

          try
          {
          FileInputStream fileInputStream = new FileInputStream(new
  File(pathToOurFile) );

          URL url = new URL(urlServer);
          connection = (HttpURLConnection) url.openConnection();

          // Allow Inputs  Outputs
          connection.setDoInput(true);
          connection.setDoOutput(true);
          connection.setUseCaches(false);

          // Enable POST method
          connection.setRequestMethod(POST);

          connection.setRequestProperty(Connection, Keep-Alive);
          connection.setRequestProperty(Content-Type, multipart/form-
  data;boundary=+boundary);

          outputStream = new
  DataOutputStream( connection.getOutputStream() );
          outputStream.writeBytes(twoHyphens + boundary + lineEnd);
          outputStream.writeBytes(Content-Disposition: form-data; name=
  \uploadedfile\;filename=\ + pathToOurFile +\ + lineEnd);
          outputStream.writeBytes(lineEnd);

          bytesAvailable = fileInputStream.available();
          bufferSize = Math.min(bytesAvailable, maxBufferSize);
          buffer = new byte[bufferSize];

          // Read file
          bytesRead = fileInputStream.read(buffer, 0, bufferSize);

          while (bytesRead  0)
          {
          outputStream.write(buffer, 0, bufferSize);
          bytesAvailable = fileInputStream.available();
          bufferSize = Math.min(bytesAvailable, maxBufferSize);
          bytesRead = fileInputStream.read(buffer, 0, bufferSize);
          }

          outputStream.writeBytes(lineEnd);
          outputStream.writeBytes(twoHyphens + boundary + twoHyphens +
  lineEnd);

          // Responses from the server (code and message)
          int serverResponseCode = connection.getResponseCode();
          String serverResponseMessage = connection.getResponseMessage();

          fileInputStream.close();
          outputStream.flush();
          outputStream.close();
          }
          catch (Exception ex)
          {
          //Exception handling
          }
      }

  }

  /
  *** 
  **/
  server php code:
  i have make the permmision of uploads/ to 777
  and the upload.php to 755

  ?php
  $target_path  = uploads/;
  $target_path = $target_path . basename( $_FILES['uploadedfile']
  ['name']);
  if(move_uploaded_file($_FILES['uploadedfile']['name'], $target_path))
  {
   echo The file .  basename( $_FILES['uploadedfile']['name']).
    has been uploaded;} else{

   echo There was an error uploading the file, please try again!;}

  ?

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

2010-08-30 Thread Mark Murphy
On Mon, Aug 30, 2010 at 7:54 AM, Navi deep@gmail.com wrote:
 yes pvt means private and
 other users may be any other than the owner of mobile.
 folder lock is an application used to secure data, using which we can
 password protect our data or we can lock a directory.
  i want to know the step by step working of folder lock.

Application directories in the on-board flash are locked by default.
Directories on the SD card are unlockable by virtue of the file system
used by SD cards.

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

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

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


Re: [android-developers] Re: Please help me on Android.

2010-08-30 Thread Mark Murphy
On Mon, Aug 30, 2010 at 7:44 AM, Dev Android devandroid1...@gmail.com wrote:
 I have written an application and i want to measure the performance of
 each module. Can you please suggest me the good approach to do this.

Use traceview:

http://developer.android.com/guide/developing/tools/traceview.html

 Currently, i'm following traditional approach by calculating system's
 current time.

Use SystemClock and the uptimeMillis() method. Quoting the SystemClock
documentation:

This clock is guaranteed to be monotonic, and is the recommended
basis for the general purpose interval timing of user interface
events, performance measurements, and anything else that does not need
to measure elapsed time during device sleep.

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

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

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


[android-developers] Re: Is there a way to request permissions from a user as you need them?

2010-08-30 Thread Pent
 There is a fundamental problem that at the point you ask the
 permission, the user is wanting to accomplish some task at hand, and all you
 are doing is bugging them.

That's not always true.

My app requires around 30 permissions, which obviously is off-putting
to some/many people.

The average user will use functionality that requires maybe 5
permissions.

If there was a way to request permissions at runtime, I could ask for
the permissions
*while the user is configuring the app*, not while the app is actually
'doing it's thing'.

Then it's obvious to the user why that part of the functionality
requires that particular permission.
And it's less dangerous because if there's a bug in my program it has
vastly less potential for damage.

Pent

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


[android-developers] App inconsistencies

2010-08-30 Thread tony obrien
Hi,

I have an app that uses Runnables, GPS, Sensors, the AudioManager,
MapView, Shared Preference storage;  in effect ---all manner of the
phone's capabilities.

When I run this app on my Motorola DROID, it functions consistently
--- all activities operate as expected  -- all dialog popups POPUP
when they are supposed to, all sounds are delivered when they are
supposed etc etc etc.

When a beta tester I have (with a new LG Ally) downloads and runs the
App  -- the results are all over the map (PUN intended ;)

Most times, it just seems to die BUT without any this application has
terminated unexpectedly dialog.
The App will stop at various places inside my activities. Again,
without any indication it has done so.
And even stranger, the app will not do the things it supposed to be
doing even though it IS still running.

And ***worse yet***, sometimes, it seems to work fine ... Until maybe
the next time it is launched (in other words, it was NOT re-Installed
or anything so severe.)

I am loathe to start adding all kinds of log output turning this
into a bloatware science experiment (but will if forced.)

Has anyone else had this kind of experience?

I am developing on NETBEANS, targeting Android 2.x -- and the LG Ally
meets these requirements.

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

2010-08-30 Thread Kostya Vasilyev

 30.08.2010 16:48, tony obrien пишет:

I am loathe to start adding all kinds of log output turning this
into a bloatware science experiment (but will if forced.)
Before you start doing that, I'd ask the user to download and install 
one of the many applications that can display logcat output, run it, and 
email the log to you.


You might see something interesting that's worth fixing.

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


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


Re: [android-developers] Re: Application installation

2010-08-30 Thread { Devdroid }
On 30 August 2010 09:58, Surfer kalik...@yahoo.com wrote:

 As i mentioned above my app is a system app, it is registered under /
 data/system/packages.xml with system=true.

But you noticed that every other package is listed in that file too, right?

 Doesn't this mean it's part of the system and it has corresponding
 rights.

No. In general, if you are  regular developer (as most here is)
you won't be able to make any system app on non rooted devices
just because you wish so

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

2010-08-30 Thread Shashidhar
Hi,
  I am using a custom list adapter with a spinner in each item.
There is a strange problem with the value the spinner shows.
For some of the items the spinner always shows the first value in the
adapter set to the spinner but when I touch on spinner, on the pop up
selection list it shows the actual value which I have set before. I mean the
value shown in the spinner and the selected item that is shown in pop list
of the spinner are some times different.

Please help me and tell me why this happens.

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

2010-08-30 Thread tony obrien
I am familiar with using LOGCAT via my local TERMINAL Session..  But
you are suggesting that LOGCAT runs on the Device and can be
accessed?

Do I need to enable Logging in my app?

Will the LOGCAT show *all* activities from everything that's running
(i.e. not just MY app) ?


On Aug 30, 9:33 am, Kostya Vasilyev kmans...@gmail.com wrote:
   30.08.2010 16:48, tony obrien пишет: I am loathe to start adding all kinds 
 of log output turning this
  into a bloatware science experiment (but will if forced.)

 Before you start doing that, I'd ask the user to download and install
 one of the many applications that can display logcat output, run it, and
 email the log to you.

 You might see something interesting that's worth fixing.

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

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


Re: [android-developers] Changing from one dev machine to another, keystore question

2010-08-30 Thread { Devdroid }
On 27 August 2010 17:53, Chris Stewart cstewart...@gmail.com wrote:
 If I'm understanding your first sentence, I'm at work and cannot test it for
 myself right now.
 I'm not sure what you're saying beyond that point.

I am talking about asymmetric key cryptography which is also used to sign
apps. All you need is you private (secret) key. It's in your keystore
file (which simply can holds more private keys than one. If you (or
anyone) can have your private key and know the passphrase s/he
will be able to sign on behalf of you and nobody will catch the
difference. So you only need the key or keystore copied/moved
to other machine.

PS: that's why it's important to keep private secure and have strong
passphrase. Once both leak you're in trouble.

More on wikipedia if you are not familiar with cryptgraphy subjects:
http://en.wikipedia.org/wiki/Public-key_cryptography

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 there a way to request permissions from a user as you need them?

2010-08-30 Thread mort
On Aug 29, 9:11 pm, Dianne Hackborn hack...@android.com wrote:
 This is a flaw in their design (and in the design of current ad servers as
 well).  By having you link their code into your app, you are required to
 take responsibility for their permissions.  Yet it is their code, you don't
 have control over it, so why should you?

I agree in this case. But what about AdMob? Shouldn't Google do it
better?
However, there's another pitfall: What if AdMob/Bumb/whatever isn't
installed? Some might say no matter, I can do without, but others
certainly don't want to do without the ad income, or some external
library is vital to functionality...

Btw, AdMob is a good example for optional permissions itself. The
AdMob library makes usage of ACCESS_FINE_LOCATION optional for local
ads. Now, as a separate .apk, this would be mandatory, and I for one
wouldn't install it (like all those apps that require it). Every ad
supported app would drain my battery (GPS), not to mention privacy
concerns.

I also agree with niko20. I've got a simple music player that requires
Identify call state... to pause during a call and internet for
ads. I regulary get queries as to why my app wants to send identified
callers to some hideous server, and I don't know how many just don't
install it without comment.
While the internet permissin in my case could be removed if there'd
be a separate AdMob app, there are other players that need it for
other ends, like downloading covers, streaming, etc.

Also, in my experience, there are three kinds of users:
1. Permissions are technical stuff they don't understand and care
about, so they just ignore it.
2. Paranoids who wouldn't install a contact manager that requires
reading of their contacts.
3. Those who actually try to make sense of the required permissions.
But even they can't tell whether an app really needs those permissions
or will misuse them. My music player actually *could* collect the
phone numbers and send them to any server...

So the current permission system would only help the first two kinds
of users (type 1 aren't disturbed by them, type 2 can panic of will
read my contact data), while sensible people often are just confused.
Is Evernote potentially evil because it wants access to my contacts
and internet, or isn't it? I can't check why it wants those
permissions without installing and testing it. By then, the harm could
be done.
A solution like Mart Murphy proposed sure would help in some cases.
It's like if you allow me to do this, I can do that.
But also a simple explanation option in the Market would help: Look,
dear user, I need call state to pause during calls, and internet for
ads. In the end, it's all about transparency why the app wants which
permission.
Of course, one could still misuse granted permissions, but there's not
much that could be done about that, except for checking the code of
every uploaded app...

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


[android-developers] WebGL and O3D on DroidX

2010-08-30 Thread r2d2Proton
Does WebGL and/or O3D work on DroidX with Android 2.1?

If not, what do I need to do to make this happen?

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] Is there (or should there be), a generateId() method for dynamically generated Views?

2010-08-30 Thread Anil
Is there (or should there be), a generateId() method for dynamically
generated Views?
Take the RadioGroup example in APIDemos|App|Views. Radio buttons are
added dynamically.
For each button, you have to call setId().
To be notified when a radio button is selected, you register a
onCheckedChange listener on RadioGroup and the callback method is
oncheckedChange(RadioGroup, int checkedId).
Since we are notified only the id of the checked view, shouldn't there
be a way to uniquely generate the id? Say, a View.generateId()
method...
In the example, the ids are statically defined in ids.xml. However
this limits the number of  radio buttons.
I have a real world example too: a Radiogroup with each choice
representing a Wifi hotspot. So one cannot know in advance the number
of hotspots.
-
Anil

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


[android-developers] Froyo: MediaRecorder.setVideoFrameRate sets IDR ratio instead of frame rate

2010-08-30 Thread Alexandre Ferrieux
Hello,

I'm using the H264 encoder on a Froyo HTC Desire. Parsing the
generated 3GP stream allows to identify individual frames, and their
timing.

Now it turns out that:

 (1) MediaRecorder.setVideoFrameRate() doesn't affect the average
frame rate, which is always close to 17fps, regardless of the asked
rate from 4 to 30 fps.

 (2) In the logs I get contradictory messages (example for an asked
rate of 15 fps):

 08-30 16:07:48.198 E/VENC_ENC(   68): VENC_ERROR
update_param_port_def::1651 Frame rate is for input port (refer to OMX
IL spec)
but also:
 08-30 16:07:48.602 E/VENC_ENC(   68): ven_print_config::348 config
frame_numerator=15, fps_denominator=1, bitrate=42

 (3) By parsing the H264 NALU types, I do see the effect of varied
MediaRecorder.setVideoFrameRate() values: they affect the IDR relative
rate (~GOP size):

 - asked value  4:  one IDR frame for  3 non-IDR frames
 - asked value 15: one IDR frame for 14 non-IDR frames
 - asked value 30: one IDR frame for 29 non-IDR frames


All this smells like there is a bug while crossing all the API layers,
passing one parameter for another.
Of course I cannot say before Froyo, because in 2.1 the H264 encoder
on the Desire was broken/missing.

Any insight on this ? Workaround ?

-Alex

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


[android-developers] Anyone updating their app recently notice unexpected drop in install percentage?

2010-08-30 Thread pawpaw17
Guys,

This happened once before in December 2009. When I released an update
on Friday, my install percentage dropped about 6%.
My install percentage usually goes up when I release an update. Anyone
notice something similar? I'm wondering if it is a problem
with the market stats?

Thanks,

pawpaw17

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

2010-08-30 Thread tony obrien
So LOGCAT operate on the device as well??

Do I need to ENABLE anything in my app?
Does the LOGCAT have all of the device's activities in it, including
those NOT from my app?
Does the device automagically wrap the logcat (it can't grow
forever) ?


On Aug 30, 9:33 am, Kostya Vasilyev kmans...@gmail.com wrote:
   30.08.2010 16:48, tony obrien пишет: I am loathe to start adding all kinds 
 of log output turning this
  into a bloatware science experiment (but will if forced.)

 Before you start doing that, I'd ask the user to download and install
 one of the many applications that can display logcat output, run it, and
 email the log to you.

 You might see something interesting that's worth fixing.

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

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


Re: [android-developers] Is there (or should there be), a generateId() method for dynamically generated Views?

2010-08-30 Thread Mark Murphy
On Mon, Aug 30, 2010 at 10:18 AM, Anil anil.r...@gmail.com wrote:
 Is there (or should there be), a generateId() method for dynamically
 generated Views?

Addition seems to be sufficient.

 Since we are notified only the id of the checked view, shouldn't there
 be a way to uniquely generate the id? Say, a View.generateId()
 method...

Why not radioButtonId++?

 In the example, the ids are statically defined in ids.xml. However
 this limits the number of  radio buttons.

IMHO, if you are concerned about the number of radio buttons, you
should be using a ListView.

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

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

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


[android-developers] ListView listener problems

2010-08-30 Thread tatebn
I'm using a ListAction and I'm having some trouble with my listeners.
I'm using onListItemClick to catch any item clicks, which works fine
unless I add an OnLongClickListener to the list items.  In that case
the long click works but the short click doesn't register.  I've tried
adding an OnClickListener to the items individually as I had done with
the long click.  This works, but the regular click fires every time
the long click does.  How do I keep these things separate?

Thanks,
Brandon

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Is there (or should there be), a generateId() method for dynamically generated Views?

2010-08-30 Thread Kostya Vasilyev
 It's also not quite correct that a radio button is only identified by 
its viewId.


Using View.setTag (two versions), you can associate your own data item 
(s) with a view.


However, I agree with Mark that using a ListView is quite likely to be a 
better solution.


-- Kostya

30.08.2010 18:45, Mark Murphy пишет:

On Mon, Aug 30, 2010 at 10:18 AM, Anilanil.r...@gmail.com  wrote:

Is there (or should there be), a generateId() method for dynamically
generated Views?

Addition seems to be sufficient.


Since we are notified only the id of the checked view, shouldn't there
be a way to uniquely generate the id? Say, a View.generateId()
method...

Why not radioButtonId++?


In the example, the ids are statically defined in ids.xml. However
this limits the number of  radio buttons.

IMHO, if you are concerned about the number of radio buttons, you
should be using a ListView.




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

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


[android-developers] Retrieve Contact Photo type

2010-08-30 Thread sazilla
Hi guys,

is there any way to retrieve the data type of a contact's photo? (e.g.
image/png or image/jpeg)
Using the Contacts Provider I can read the photo byte array only. In
this case can we get the image type from the image stream?

Thanks in advance

Carlo

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

2010-08-30 Thread Rootko
Thanks for pointing me into the right direction, it worked :D
Rudo

On Aug 30, 11:16 am, Yahel kaye...@gmail.com wrote:
 to take a
  picture using the camera (already developed this) and then make it
  watermarked.

 Look into Canvas.drawBitmap with alpha channel.

 Good luck.

 Yahel

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 there a way to request permissions from a user as you need them?

2010-08-30 Thread Chris Stratton
I think its going to be very difficult to prevent applications without
network or sms permissions from leaking any data they can obtain to
the outside world by means of another application that does have those
permissions.

Its even possible for an application without network permissions to
infrequently upload quite a bit of data via the default web browser.
On install they can just send an intent to view a webpage containing
something innocent like a welcome, help, or changelog web page for
their app, while quietly shoving 100+ lines of whatever through extra
post data for older android releases or extra header data for newer
ones.

Its not immediately apparent how one would detect this,  unless it
happens on wifi and you log http traffic or your mobile provider is
inspecting packets.

On Aug 29, 8:19 pm, Indicator Veritatis mej1...@yahoo.com wrote:
 You rightly say, should be taken down
 from Market if it is discovered, but if that need exists, then what
 will Google do to reassure users that somebody is watching for such
 violations? A Service should not HAVE the ability of share that data
 with other Applications unless they too have the same permission. So
 this suggests a flaw in the design of Android permissions.

 On Aug 29, 12:11 pm, Dianne Hackborn hack...@android.com wrote:



  On Sun, Aug 29, 2010 at 5:31 AM, Zsolt Vasvari zvasv...@gmail.com wrote:
   On a somewhat related note, I decided I would try to integrate the
   Bump functionality into my app -- some users asked for ways to
   exchange transactions between phones in the family, and this seemed
   pretty good.

   But then I opened the docs and here it what it says:

   Add

   uses-permission
   android:name=android.permission.ACCESS_FINE_LOCATION /
   uses-permission
   android:name=android.permission.ACCESS_COARSE_LOCATION /
   uses-permission android:name=android.permission.INTERNET /
   uses-permission android:name=android.permission.VIBRATE /
   uses-permission android:name=android.permission.READ_PHONE_STATE /

   No freaking way I will pollute my permission requirements with that
   stuff.  If I saw a personal fianance app ask for those permissions,
   I'd hit cancel so fast, it wouldn't know what happened.

   I don't know what the solution is, but this is just wrong.

  This is a flaw in their design (and in the design of current ad servers as
  well).  By having you link their code into your app, you are required to
  take responsibility for their permissions.  Yet it is their code, you don't
  have control over it, so why should you?

  A solution is for the other party's code to be in its own .apk, which your
  app uses if it is there.  (And you can prompt the user, sending them to
  market, to make this functionality available.)  This way the permissions are
  clearly separated between apps, and the user can associate them with the
  responsible parties and decide who they want to trust.

  That said, there is an implicit responsibility of the app delivering
  functionality to other apps this way to not leak the permissions it is
  using.  (As there is for every app.)  An extreme example would be an app
  that use permission for GPS, and a service that lets others get the current
  location.  That kind of thing is a security hole, and should be taken down
  from Market if it is discovered.

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

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

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


Re: [android-developers] Re: App inconsistencies

2010-08-30 Thread Kostya Vasilyev

 30.08.2010 18:44, tony obrien пишет:

So LOGCAT operate on the device as well??

Do I need to ENABLE anything in my app?
Does the LOGCAT have all of the device's activities in it, including
those NOT from my app?


Logcat doesn't have to be specifically enabled. It does show info from 
every application, including the system, even if the phone is not 
connected to adb for debugging.



Does the device automagically wrap the logcat (it can't grow
forever) ?


It does, although I don't know the exact size. It is quite large, though.



On Aug 30, 9:33 am, Kostya Vasilyevkmans...@gmail.com  wrote:

   30.08.2010 16:48, tony obrien пишет:  I am loathe to start adding all kinds of 
log output turning this

into a bloatware science experiment (but will if forced.)

Before you start doing that, I'd ask the user to download and install
one of the many applications that can display logcat output, run it, and
email the log to you.

You might see something interesting that's worth fixing.

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



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

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


Re: [android-developers] Retrieve Contact Photo type

2010-08-30 Thread Kostya Vasilyev

 In case you don't find one, PNG files always start with:

\211 P N G \r \n \032 \n

http://www.libpng.org/pub/png/spec/1.2/PNG-Rationale.html#R.PNG-file-signature

-- Kostya

30.08.2010 18:58, sazilla пишет:

Hi guys,

is there any way to retrieve the data type of a contact's photo? (e.g.
image/png or image/jpeg)
Using the Contacts Provider I can read the photo byte array only. In
this case can we get the image type from the image stream?

Thanks in advance

Carlo




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

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


[android-developers] Re: Home button in Beagle board

2010-08-30 Thread Will
Install bar control and add a home button in the notification bar.

http://www.4shared.com/file/6QzHkKk-/Bar_Control__110_.html

On Aug 27, 4:15 am, SREEHARI sreehari.madhusooda...@wipro.com wrote:
 Hi All,

 I am testing some android apps in a beagle board with Android 2.1. But
 I came to know that there is no home button in the board. I have to
 test some home apps also. How will I get the Home Button pressed?? Is
 there any way to do this?

 Thanks,
 SREEHARI

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


[android-developers] Open-Source Repository

2010-08-30 Thread Shane Isbell
Guys,

I'm re-opening the JVending project, which has been inactive (publicly) for
a couple of years. There has been some chatter from individuals interested
in an open-source repository for Android so I think it will be a good start.
You can basically think of it as an Android delivery system where you can
filter and deliver content based on type of device. For example filtering
out Android 2.1+ content for Android 1.5 devices. Things like matching rules
and device profiles are configured through configurations files. You can
plugin specialized delivery adapters if you have specialized content to
deliver to the Android device.

It also handles localization, versioning of apps, variations, etc.

JVending is the building block for a larger system so this project is really
for developers who can dive in and customize the front-end and/or back-end
services that they need. If you want to donate some front-end web
functionality (or anything else), I'll add it to the core project. I'll also
be hosting a dev version for people to try out the latest build changes. I
can also see putting up a production server for open-source android apps at
some point.

Some changes in the project:

1) Moving the license from LGPL to ASL2.
2) I've refactored the code collapsing a number of modules
3) Significant performance optimizations in Hibernate
4) Android Events Database

In the upcoming commit, I'm also hemorrhaging a number of archaic aspects of
JVending like the provisioning archive and stocking api, which made sense 8
years ago but with the size of applications growing significantly (a 300KB
application at that time was considered huge, most were 50-60KB), these
things don't make sense. So I'll be moving away from the JSR-124 spec toward
something more appropriate to today's mobile environment.

I still need to add a module for the webservice itself, which will be out
shortly, but feel free to dive in.

http://github.com/sisbell/jvending

I've also opened up the* jam *project (JVending Application Manager), which
will be an open-source download and discovery manager. A lot of people have
been interested in this part of the project.

http://github.com/sisbell/jam

I'm not putting any code out there yet till things like the feeds go up in
the webservice. Once the community decides what the feeds to the mobile
client should look like, we can build out the client. For SlideME, I had a
simple, custom format for the feeds, but am thinking to use JSON or
something similar to standardize it.

Feel free to open any issues on github, submit patches, follow, make
comments, etc. After a few good patches, I usually offer people to become a
committer on the project.

-- 
Shane Isbell (Founder of ZappMarket)
http://apps.facebook.com/zappmarket/

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

2010-08-30 Thread Maps.Huge.Info (Maps API Guru)
A good log app is called (strangely enough) Sendlog  - it's fairly
lightweight and just asks the user to enter an e-mail address. Select
detailed logs for the best result.

As for adding logging statements all over the place. That's a very
good idea with one caveat. Add a logging variable like this to the top
of your source:

static final boolean DOLOG = false ;

Then preface all your logging statements with a test:

if ( DOLOG ) Log.v(Foo,Logging message) ;

When you create your beta, set DOLOG = true. That will include the
logging messages. When you create your production version, set it to
false. The compiler will exclude all those logging statements
because they will never execute. The compiler is smart enough to know
this, so your production code will be streamlined without physically
removing (yourself) the logging statements from the code. I believe
this is the preferred method of coding your logging statements.

-John Coryat

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Anyone updating their app recently notice unexpected drop in install percentage?

2010-08-30 Thread Maps.Huge.Info (Maps API Guru)
Did you see this thread?

http://groups.google.com/group/android-developers/browse_thread/thread/a5a7c4d6bed1af84/b0afd16bfb9962bb

-John Coryat

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 there (or should there be), a generateId() method for dynamically generated Views?

2010-08-30 Thread Bret Foreman
Is there a way to make a ListView mutually exclusive like a RadioGroup
so that selecting one item deselects the others?


 IMHO, if you are concerned about the number of radio buttons, you
 should be using a ListView.

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

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

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


[android-developers] Scrolling like a spreadsheet

2010-08-30 Thread Bret Foreman
I want to set up a table layout that scrolls like a spreadsheet. The
top row of column headings should scroll horizontally but be pinned
when scrolling vertically. The left-most column of row labels should
scroll vertically but be pinned when scrolling horizontally. The
number of rows and columns is not known in advance.

Does anyone know of an example of this? Are there settings in
TableLayout that can turn on this scroll behavior? Is there, perhaps,
a more advanced widget than TableLayout that can produce this type of
scrolling? Are there some tricks I can do with a ScrollView to get
this behavior?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: App breaks for some users after they update from the Market

2010-08-30 Thread TreKing
On Sun, Aug 29, 2010 at 8:24 PM, William Ferguson william.ferguson.au@
gmail.com wrote:

 What's the taskAffinity?


Whatever the default is - I've never touched this.

I suspect that clearing the data is changing the behaviour because this
 speed up / slows down one of the threads, thereby (generally) avoiding the
 race condition.


I have a feature that auto-backs up all user data to the SD and restores it
if the local data file is gone. So even if they clear the local data, it's
restored on the next app start up. So regardless, all user saved data is
there before and after they clear the app's local data storage to alleviate
the problem.

And the crash does not occur in the first activity, where data is usually
loaded. I say usually because it's lazy-loaded (so if the user navigates
away from the second activity and comes back much later, it's possible the
memory got wiped). But this occurs in onCreate in the main thread of the
second activity, and this activity does not try to do anything with the user
data until after the point at which the crash occurs.


 I'd be tempted to
 1) synchronize the method


Probably a good idea, I'll be doing that =)


  2) make the static instance an instance of your Application class.


I started using a custom Application class a while ago and quickly got tired
of having to cast up each time I needed to do something with it. I'll try a
better implementation of a Singleton first.

On Mon, Aug 30, 2010 at 6:16 AM, Zsolt Vasvari zvasv...@gmail.com wrote:

 I think what's happening then is that some kind of race condition corrupts
 your app data, after which the crash will occur every time.


But the main activity that starts up and loads the user data each and every
time does not crash, and the point at which the crash happens is NOT using
user data - it's using a hard-coded reference which is explicitly set in
code. That reference, somehow, ends up being null, even though previously it
was (probably) used in the user-data loading process. WTF!?


 - It started to happen after you introduced static maps.


Weird stuff after updating like this has happened before, though this time
it's much more widespread and consistent.
Also, note that the map itself is not static: there is a static instance of
the class that contains a map. Don't know if that makes a huge difference,
but it's worth pointing out.


 - You admit using such maps in multiple threads
 - java.util.TreeMap is not thread safe.


Yes, but the map is initialized ONCE in the main thread and never altered
again. I'm not adding or removing anything from it at any other point. It's
there strictly to get access to the pre-defined derived-type instances I
need to use depending on the user's selection. Also, no thread is started
until after this map is initialized.


 What I would do is wrap TreeMap around
 a java.util.Collections.syncronizedMap (not 100% about the name) and then
 release an updated app and see if the crashes go away.  I know it makes your
 users the testers, but if you cannot duplicate it, there is not much to
 lose.


 Indeed, anything is worth a shot at this point! I'll try that when I get a
chance and post back what I see.


IF YOU'RE REALLY BORED and want more context to the problem, you can check
out the free version of my app. From the main screen use the menu and select
Trek Tracker to open the second activity where the crash occurs. This
screen is series of drop downs for the user to drill down to the stop they
want bus predictions for.

The first option is the transit system - these are the hard-coded values in
the map: the strings the user sees are the keys, pulled directly from the
map, and they point to the derived type which handles the logic for getting
data for that system. All of these options are loaded in onCreate and pulled
directly from the map - if this part is working, that map should be
completely valid at this point.

Next the user selects a route, direction, and stop, each populated
dynamically based on the previous selection. Once the stop is selected,
that's all the data I need to get bus arrival predictions, so at this point
a thread is spawned with the users's selected data to load the predictions
every minute or so.

This is where the crash occurs. The background thread tries to use the
reference to the transit system it got from the very first selection, which
I swear should be valid at this point, and throws a NullPointerException. So
somehow, that reference which is EXPLICITLY set with map.put(Key, new
Derived()), ends up being null and then only in this activity.

Thanks for the continued help folks. This is a head-scratcher.

-
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, 

Re: [android-developers] Scrolling like a spreadsheet

2010-08-30 Thread Mark Murphy
On Mon, Aug 30, 2010 at 12:03 PM, Bret Foreman bret.fore...@gmail.com wrote:
 Are there settings in TableLayout that can turn on this scroll behavior?

No.

 Is there, perhaps,
 a more advanced widget than TableLayout that can produce this type of 
 scrolling?

Not in the SDK.

 Are there some tricks I can do with a ScrollView to get
 this behavior?

You would first need to get a ScrollView and a HorizontalScrollView to
nest properly. I have seen posts that suggests this works, but I have
not tried it.

You would then need your column headings to live outside of the
ScrollView and the row headings to live outside of the
HorizontalScrollView. Manually scrolling the headings based on scroll
events, and getting everything to line up properly, will be
challenging, I suspect.

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

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

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


Re: [android-developers] Re: App inconsistencies

2010-08-30 Thread Kostya Vasilyev
 Yes, Logcat appears to run independently of adb or your local 
debugging connection, and has logcat output from *all* applications that 
use Android log.* methods and the Android system itself.


Note that if you start logcat from the console of your development 
machine (adb logcat) it first scrolls, displaying the information that 
has already been accumulated before you typed the command.


I suggest starting with one of those apps, since it would be just so 
easy for you and your user to take first step.


+1 to what John Coryat is saying.

I actually do this in my app, have my own logging facility, controlled 
by a simple boolean static variable. This way it's easy to make a custom 
build for those users who are having problems.


-- Kostya

30.08.2010 17:48, tony obrien пишет:

I am familiar with using LOGCAT via my local TERMINAL Session..  But
you are suggesting that LOGCAT runs on the Device and can be
accessed?

Do I need to enable Logging in my app?

Will the LOGCAT show *all* activities from everything that's running
(i.e. not just MY app) ?


On Aug 30, 9:33 am, Kostya Vasilyevkmans...@gmail.com  wrote:

   30.08.2010 16:48, tony obrien пишет:  I am loathe to start adding all kinds of 
log output turning this

into a bloatware science experiment (but will if forced.)

Before you start doing that, I'd ask the user to download and install
one of the many applications that can display logcat output, run it, and
email the log to you.

You might see something interesting that's worth fixing.

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



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

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


[android-developers] Re: Black spinner in progressbar

2010-08-30 Thread fr4gus
Thanks! :)

On Aug 26, 12:28 pm, Gonçalo Ferreira monx...@gmail.com wrote:
 Check out here.

 http://developer.android.com/reference/android/R.attr.html#progressBa...

 Just change the style for one of those in that link.
 The attributes with the suffix Inverse are black spinners, usually for
 light backgrounds.

 On Aug 19, 7:15 pm, fr4gus fggar...@gmail.com wrote:



  Hi all,

  I want to use a small spinner for an indeterminate progress bar. So I
  added this to my screen:

                  ProgressBar
                          android:id=@+android:id/ConnectionProgress
                  style=?android:attr/progressBarStyleSmallTitle
                  android:layout_width=wrap_content
                  android:layout_height=wrap_content /

  But it shows a white spinner. I looked at SDK folder, and I saw there
  is also a black spinner. Is it possible to indicate to user the black
  spinner instead of white spinner?.

  I want an elegant form of using that spinner that already exists in
  Android, but looks I may have to copy the image to my proyect and
  create the animation, and set it in indeterminate drawable

  Any ideas?

  Thanks in advance for any 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] Re: Scrolling like a spreadsheet

2010-08-30 Thread Bret Foreman
What if I set up LinearLayout arranged horizontally with a set of
ListViews? The left-most ListView would be a list of row labels. The
whole works would be in a HorizontalScrollView. The column headings
would be set with ListView.addHeader. Then the only difficult task
would be synchronizing the scrolling of the ListViews. I'm guessing
that somewhere in the ListView object hierarchy is something like
onScrollListener that I can override and also something like
setScroll. What do you think?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Anyone updating their app recently notice unexpected drop in install percentage?

2010-08-30 Thread TreKing
On Mon, Aug 30, 2010 at 9:32 AM, pawpaw17 georgefraz...@yahoo.com wrote:

 Anyone notice something similar? I'm wondering if it is a problem with the
 market stats?


This should be a sticky at this point:
http://groups.google.com/group/android-discuss/browse_thread/thread/a80ba7870af28e90/35deddb143aa0d82

-
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] Setting focus programatically in ExpandableListView

2010-08-30 Thread TreKing
On Sat, Aug 28, 2010 at 9:21 AM, OldSkoolMark m...@sublimeslime.com wrote:

 My goal is to avoid having the user have to touch
 individual ExpandableListView entries to select them and to provide a couple
 of buttons to move the focus up and down inside the list.


Don't know about your problem, but why do you want to avoid having to touch
entries? This is arguably easier and what most people will be doing on their
touch-screen devices anyway.

Why add extra buttons (that the user has to touch anyway) to navigate when
they can (and probably will) just touch the item they want in one shot?


 I  want selection to be easy for  folks with no D-pad or with a phone
 that only presents the D-pad when in landscape mode (e.g. Droid) .


Touching the item you want seems easier than hitting a button to navigate up
and down a list, IMO ...

-
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: Application installation

2010-08-30 Thread Surfer

But you noticed that every other package is listed in that file too,
right?

Every other package is listed there - yes, every package is marked
with system=true - no

No. In general, if you are  regular developer (as most here is)
you won't be able to make any system app on non rooted devices
just because you wish so

The app will not be a third party application for the user to install,
it will be included
in the device OS, and i wish to simulate this, so far i managed
simulating system app
but not package install...

On Aug 30, 4:44 pm, { Devdroid } webnet.andr...@gmail.com wrote:
 On 30 August 2010 09:58, Surfer kalik...@yahoo.com wrote:

  As i mentioned above my app is a system app, it is registered under /
  data/system/packages.xml with system=true.

 But you noticed that every other package is listed in that file too, right?

  Doesn't this mean it's part of the system and it has corresponding
  rights.

 No. In general, if you are  regular developer (as most here is)
 you won't be able to make any system app on non rooted devices
 just because you wish so

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


[android-developers] Developemtn on LG Ally?

2010-08-30 Thread JavaMan
Hey everyone, I want to get a Android phone for development.
Unfortunately, the ADP2 is way out of my price range. Therefore, I'm
looking at phones on ebay. I do not want service, so I don't care if
it's unlocked or not. I was looking at an LG Ally on ebay. It is a
Verizon version of the phone. Can I use this phone for testing and
development?
Thanks,
Vance

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

2010-08-30 Thread Pedro Elvas
Hi Carlo,

Take a look in the source code of JPEGImageReaderSpi
http://www.docjar.org/html/api/com/sun/imageio/plugins/jpeg/JPEGImageReaderSpi.java.html
and PNGImageReaderSpi
http://www.docjar.org/html/api/com/sun/imageio/plugins/png/PNGImageReaderSpi.java.html
(j2se).

These classes have a method called canDecodeInput that checks if an
inputstream is a png or jpeg (respectively).

[]s

On Mon, Aug 30, 2010 at 11:58 AM, sazilla sazi...@gmail.com wrote:

 Hi guys,

 is there any way to retrieve the data type of a contact's photo? (e.g.
 image/png or image/jpeg)
 Using the Contacts Provider I can read the photo byte array only. In
 this case can we get the image type from the image stream?

 Thanks in advance

 Carlo

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

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

Re: [android-developers] ListView ClassCastException

2010-08-30 Thread Michael MacDonald
On 08/30/10 06:59, Alok Kulkarni wrote:
 Hi all,in my application I have a class as:

   1.
   public class TouchInterceptor extends ListView

 and my main activity class as:

   1.
   public class GUIEngine extends Activity


 in this class i initialize my ListView variable as:

   1.
   lView = (ListView) findViewById(R.id.mainList);


 now i want to set a listener on this lview object which is in my
 TouchInterceptor class, i do that as:

   1.
   ((TouchInterceptor) lView).setDropListener(mDropListener);


 but i get a ClassCastException at this line.
 what am i doing wrong?

 plzz can anyone help.. thank u


 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en 
How are you creating mainList?  If you are doing it with a layout, are
you declaring it as a TouchInterceptor in the layout?

You can't cast any old object to a derived class of its declared type;
you can only downcast if the object was created with the derived 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

Re: [android-developers] Developemtn on LG Ally?

2010-08-30 Thread Kostya Vasilyev


I think you might be better off getting a Motorola Droid. It's only a 
little more expensive on eBay than the LG, but runs pretty much stock 
Android with fewer manufacturer-specific customizations. This means that 
whatever compatibility testing you do is going to be more meaningful 
with the Droid.


Also, a Droid update to Froyo (Android 2.2) is already rolling out 
(waiting for my Milestone to be updated to 2.2 as well).


-- Kostya

30.08.2010 21:02, JavaMan пишет:

Hey everyone, I want to get a Android phone for development.
Unfortunately, the ADP2 is way out of my price range. Therefore, I'm
looking at phones on ebay. I do not want service, so I don't care if
it's unlocked or not. I was looking at an LG Ally on ebay. It is a
Verizon version of the phone. Can I use this phone for testing and
development?
Thanks,
Vance




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

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


Re: [android-developers] Re: Scrolling like a spreadsheet

2010-08-30 Thread Mark Murphy
On Mon, Aug 30, 2010 at 12:44 PM, Bret Foreman bret.fore...@gmail.com wrote:
 What if I set up LinearLayout arranged horizontally with a set of
 ListViews? The left-most ListView would be a list of row labels. The
 whole works would be in a HorizontalScrollView. The column headings
 would be set with ListView.addHeader. Then the only difficult task
 would be synchronizing the scrolling of the ListViews. I'm guessing
 that somewhere in the ListView object hierarchy is something like
 onScrollListener that I can override and also something like
 setScroll. What do you think?

I am uncertain that ListViews can go in a HorizontalScrollView, though
it is worth a try.

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

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

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


[android-developers] Re: Testing several projects with a single test project

2010-08-30 Thread A. Elk
The Android instrumentation-based testing framework focuses on unit
testing and component-level functional testing. It's not meant to be a
full multi-application test system. You can't test an activity and the
content provider it uses in the same test case, nor can you test what
happens when the user goes out of one application to change a global
setting and then returns to the same application.

To get around these limitations, you have to write your own test
system.

A.

For example, it's not possible to test two different components (or
their interaction in a single

On Aug 30, 12:19 am, Andrey Panasyuk a.panas...@softteco.com wrote:
   Thank you for the comment.

 Unfortunately it's not the case since we also want to test interaction
 of several applications at a time.

 Now we're looking at a possibility to interact between applications and
 testcases project via services and service connections.



  You can make one test package that is capable of testing several
  applications, but it can only test one app at a time. For each new app
  you want to test, you have to update AndroidManifest.xml to point to
  the new target app, re-build the test package, and re-install it.

  What is your use case? Do you have a set of unit tests that you want
  to apply to different apps? This is a bit unusual, but conceivable.
  You could do this in a shell script. First install all your apps using
  adb install, then use sed or awk to modify the
  AndroidManifest.xml in the test project, build the test package, use
  adb -r to install it, and then adb shell am instrument to run the
  test and see the results. The last command is documented in the
  Android 2.2 Developer's Guide, under Guide  Developing  Testing
  Testing in Other IDEs.

  The Elk.

  On Aug 24, 12:36 am, Andrey Panasyuka.panas...@softteco.com  wrote:
  Hello,

  Is it possible to test several Android projects by having only one
  test project?
  I've tried various ways like specifying several instrumentation tags:

       instrumentation android:targetPackage=com.test1.test11
  android:name=android.test.InstrumentationTestRunner /
       instrumentation android:targetPackage=com.test1.test12
  android:name=android.test.InstrumentationTestRunner /

  or played with the packages but finally I got only tests for one
  application working correctly, tests for the other applications are
  giving java.lang.VerifyError.

  All of the applications are signed with the same key.

  Does anyone know if it is possible?

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


[android-developers] Re: How to dynamically modify xml file in android

2010-08-30 Thread DanH
The Android docs list  javax.xml.transform.TransformerFactory as being
available, though I've never tried it on Android.

On Aug 30, 6:43 am, saikiran n saikiran@gmail.com wrote:
 Hi ,
  I want to modify an xml file which is in sdcard dynamically.
 How can we acheive this in android. I have seen some java code as follows

 try {  
         File file = new File(connections.xml);

         //Create instance of DocumentBuilderFactory
         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();

         //Get the DocumentBuilder
         DocumentBuilder docBuilder = factory.newDocumentBuilder();

         //Using existing XML Document
         Document doc = docBuilder.parse(file);

         //create the root element
         Element root = doc.getDocumentElement();

         //create child element
         Element childElement = doc.createElement(number);

         //Add the attribute to the child
         childElement.setAttribute(id,3);
         root.appendChild(childElement);

         //set up a transformer
         TransformerFactory transfac = TransformerFactory.newInstance();
         Transformer trans = transfac.newTransformer();

         //create string from xml tree
         StringWriter sw = new StringWriter();
         StreamResult result = new StreamResult(sw);
         DOMSource source = new DOMSource(doc);
         trans.transform(source, result);
         String xmlString = sw.toString();

         OutputStream f0;
         byte buf[] = xmlString.getBytes();
         f0 = new FileOutputStream(connections.xml);
         for(int i=0;ibuf .length;i++) {
            f0.write(buf[i]);
         }
         f0.close();
         buf = null;
      }
      catch(SAXException e) {
         e.printStackTrace();            
      }
      catch(IOException e) {
         e.printStackTrace();            
      }
      catch(ParserConfigurationException e) {
        e.printStackTrace();            
      }
      catch(TransformerConfigurationException e) {
        e.printStackTrace();            
      }
      catch(TransformerException e) {
        e.printStackTrace();            
      }

 But The TransformerFactory class is not avalible in android sdk.
 How can we handle above code
 Any help please,
 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] Calling all developers who are passionate about health care

2010-08-30 Thread Veronica Ho
 HealthTap, in collaboration with Health 2.0, is hosting the first
Developer Challenge Hackathon called Hacking for Health on September
11, 2010. The Hackathon is where developers of all skill sets will get
together, learn more about the new data sets that the US Government
has made
available recently, build innovative health applications, win prizes
and
prepare for the national challenge. The Hackathon is backed by HHS and
O'Reilly media.

To register, please go to http://h4h.healthtap.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] App Chooser not being shown when google browser is the default

2010-08-30 Thread James McMurray
I've seen a few other similar threads, but none that both matched my
problem and had answers, so sorry if this retreads familiar ground.

I've got a browser and I'm trying to catch the same intents as the
google browser. I've even gone so far as to copy and paste them
directly from Froyo's browser. They are listed down below for
reference. However, when I try to send an intent to create the chooser
so the user can select my browser as the default it does not always
appear. Here is the code for creating the intent:

Intent anIntent = new Intent(android.intent.action.VIEW, http://
www.google.com);
anIntent.addCategory(Intent.CATEGORY_BROWSABLE);
startActivity(anIntent);

and the logcat output:

08-26 14:53:25.698: INFO/ActivityManager(85): Starting activity:
Intent { act=android.intent.action.VIEW
cat=[android.intent.category.BROWSABLE] dat=http://www.google.com
cmp=com.android.browser/.BrowserActivity }

For some reason the intent is automatically resolving to Google's
browser unless one of the following is true:

1) I've cleared the defaults from the google browser via application
settings,
2) I've installed a third browser, or even just a HelloWorld app with
the intent-filters listed below, or
3) I'm running on a platform earlier than 2.2

What is really confusing is #2. It doesn't matter what that third app
is. I've used a default hello world with just the first intent-filter
and that's enough to trigger something behind the scenes that tells
Google it's no longer the only default browser. However, it's not
enough in my own app, and the only differences in the two manifests
are that mine has a sharedUserId, a couple of extra activities (none
of which have intent-filters) and permissions (none of which have
anything to do with browsing, in fact HelloWorld doesn't have any
permissions at all).

The program flow is: user opens browser, it sees that it's not fully
installed and opens another activity, that activity does some stuff
(none of which deals with intents) and then checks to see if my
browser is the default, if not it fires off the aforementioned intent
to create the chooser so the user can set the default.

Is there a change in froyo that would cause an application to not be
able to use startActivity with a generic intent that matches to its
own package? Or some other change to the way activities are resolved
or installed that broke the way preferred activities are defined? I
know that the PackageManager preferred activity functions have
changed, but I'm not using them at all.

- the intent-filters -
intent-filter
action android:name=android.intent.action.VIEW /
category android:name=android.intent.category.DEFAULT /
category android:name=android.intent.category.BROWSABLE /
data android:scheme=http /
data android:scheme=https /
data android:scheme=about /
data android:scheme=javascript /
/intent-filter
!--  For these schemes where any of these particular MIME types
  have been supplied, we are a good candidate. --
intent-filter
action android:name=android.intent.action.VIEW /
category android:name=android.intent.category.BROWSABLE /
category android:name=android.intent.category.DEFAULT /
data android:scheme=http /
data android:scheme=https /
data android:scheme=inline /
data android:mimeType=text/html/
data android:mimeType=text/plain/
data android:mimeType=application/xhtml+xml/
data android:mimeType=application/vnd.wap.xhtml+xml/
/intent-filter
!-- We are also the main entry point of the browser. --
intent-filter
action android:name=android.intent.action.MAIN /
category android:name=android.intent.category.DEFAULT /
category android:name=android.intent.category.LAUNCHER /
category android:name=android.intent.category.BROWSABLE /
/intent-filter

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


[android-developers] Google TV Developers

2010-08-30 Thread Chris Morris
Hey guys,

I'm sure some of you have heard about Google TV - I myself am excited
about the possibilities for Android apps in the living room. Being a
developer myself, I tried to find a community centered around Google
TV development and couldn't find one, so I started one. The site just
launched, but I think when the SDK is released, Android market is
opened, and the market for smart TVs grow, the developer community
will grow with it. Please join us at http://www.gtvconnection.com for
Google TV specific development.

- Chris

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


[android-developers] Sending SMS while phone is ringing

2010-08-30 Thread Jimband
Hi,

 I'm developing an application for Android 2.2 that should send an SMS
immediately when the phone starts ringing (under UMTS/GSM).  I'm using
the android.telephony.SmsManager.sendTextMessage for sending the SMS.

 The app is working fine under the emulator, i.e. when I call the
emulator phone from another emulator, the SMS is sent instantly.
However, when I'm testing the application on HTC Desire, the SMS
sending only succeeds after the phone has stopped ringing.

 Is there anything that could be done about this or is it just a
restriction of the HTC Desire device? Seems strange as it's working
fine under emulator and it shouldn't be a restriction of the network..

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


[android-developers] I registered a broadcast to detect sd card status, but it only works on the device below 2.1(include 2.1)

2010-08-30 Thread Ken Yang
I registered a broadcast  to detect sd card status, but it only works
on the device below 2.1(include 2.1)

it's doesn't work on nexus one or 2.2 emulator...

android os will kill my process on nexus one and 2.2 emulator, but it
won't do that on device below 2.1(include 2.1)

is there anything wrong?




public class serviceSDcard extends Service {

private static Context contextService   = null;
private static AppWidgetManager awmService  = null;
public static boolean bIsUnmount= false;
@Override
public IBinder onBind(Intent intent) {
return null;
}

@Override
public void onStart(Intent intent, int startId) {

IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(Intent.ACTION_MEDIA_MOUNTED);
intentFilter.addAction(Intent.ACTION_MEDIA_UNMOUNTED);
intentFilter.addDataScheme(file);
intentFilter.addDataAuthority(*, null);

registerReceiver(receiver, intentFilter);
super.onStart(intent, startId);
}
private BroadcastReceiver receiver = new BroadcastReceiver() {

@Override
public void onReceive(Context context, Intent intent) {
try {
bIsUnmount  = !bIsUnmount;
if 
(intent.getAction().equals(Intent.ACTION_MEDIA_UNMOUNTED)){
beauty_large_main.fos.close();

}else{

}

} catch (Exception e) {
Log.d(main, e.toString());
}

}
};
}

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


  1   2   3   >