[android-developers] Re: Any way to get some equivalent to the adb log while the device is not plugged into computer?

2010-04-07 Thread fadden
On Apr 6, 10:20 pm, patbenatar patbena...@gmail.com wrote:
 Does Android keep an internal log that is similar or identical to the
 log you can view with adb logcat via a Terminal window? It's difficult
 when my app crashes while I test it out in the field...

 Any help would be great! I'm hoping Android keeps a log and there's
 some way I can access it. Oh, I do have root on my test device.

The log is a 64KB buffer in the kernel.  When you initially logcat a
device it dumps the contents of the buffer and then just starts
reeling out whatever gets added.

You can use something like:

% adb shell
# logcat  /sdcard/log.txt 

and then retrieve the log at a later time.  (I think adb gets a little
weird about the background process; just disconnect the phone and go
about your day.)

If you have a term program you can examine /sdcard/log.txt from the
device.  You can't issue the logcat from the term program because your
app won't have permission, but if you have a rooted device you can
su and start it from there.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Why I get the permission alert?

2010-04-07 Thread Kumar Bibek
As far as I know, these are only warnings. In the newer versions of
the SDK, these permissions are required  by default. Even if you don't
mention it, while installing, implicit permisisions are added to your
package.

I don't think this should stop you from installing your apps.

Thanks and Regards,
Kumar Bibek

On Apr 7, 10:47 am, Kaijun Meng shiji...@gmail.com wrote:
 Hi,
    I compiled my app in Eclipse and export it as signed application package,
 when I install it on my G1, I got phone calls and storage permission
 alert, phone calls permission said: read phone state and identity,
 storage permission said :modify/delete SD card contents. but in my
 AndroidManifest.xml file, I never define these two permission, and my
 application never need  the two permissions. Does anybody know why I get the
 permission alert?
     I use ADT 0.9.6. is that possible ADT compiler or signed tools inject
 the two permission into my app?

   Thanks for you help in advance!

 Kevin

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Any way to get some equivalent to the adb log while the device is not plugged into computer?

2010-04-07 Thread Kumar Bibek
There are some apps which do this.

SendLog is one of them. You can try and figure out how they do it. And
this works on all the phones.

Thanks and Regards.
Kumar Bibek

On Apr 7, 11:26 am, fadden fad...@android.com wrote:
 On Apr 6, 10:20 pm, patbenatar patbena...@gmail.com wrote:

  Does Android keep an internal log that is similar or identical to the
  log you can view with adb logcat via a Terminal window? It's difficult
  when my app crashes while I test it out in the field...

  Any help would be great! I'm hoping Android keeps a log and there's
  some way I can access it. Oh, I do have root on my test device.

 The log is a 64KB buffer in the kernel.  When you initially logcat a
 device it dumps the contents of the buffer and then just starts
 reeling out whatever gets added.

 You can use something like:

 % adb shell
 # logcat  /sdcard/log.txt 

 and then retrieve the log at a later time.  (I think adb gets a little
 weird about the background process; just disconnect the phone and go
 about your day.)

 If you have a term program you can examine /sdcard/log.txt from the
 device.  You can't issue the logcat from the term program because your
 app won't have permission, but if you have a rooted device you can
 su and start it from there.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Going forever into /sys folder? Why?

2010-04-07 Thread fadden
On Apr 6, 4:21 pm, jfbaro jfba...@gmail.com wrote:
 If you use any file browser/manager and starting going into /sys/
 devices/w1 bus master/subsystem/devices/w1 bus master/subsystem it
 will go inner forever, repeating that pattern [b]devices/w1 bus master/
 subsystem/[/b] forever.

 So when I run a recursive search it keeps going deeper and deeper and
 seems never to finish.

Probably a symlink back to a higher level.

The file manager should be using lstat() before descending into a
directory.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Announcing RoboGuice 1.0

2010-04-07 Thread ko5tik


On Apr 6, 9:06 pm, Michael Burton m...@niskala.org wrote:
 Hi ko5tik,

 Good idea, I agree that injection is not as simple as it should be for 
 objects instantiated manually.  I've added your suggestion 
 here:http://code.google.com/p/roboguice/issues/detail?id=34

 When you say you're not happy with inheritance, could you be more specific?  
 Do you mean how Activities need to inherit from GuiceActivity instead of 
 Activity?

Composition is usually more flexible as inheritance (as there is no
multiple inheritance in java) -  but for rigigng up interface it
should be less problematic.
as there is not much of reuse of activities between projects.

It would be interesting  to put some business code under DI -
injecting  textviews to them , so they can update values (maybe not
real text views, but
proxy wrapped one,  to overcome problems with interface thread. )

My actual playground:   I have highscore service which sits behind the
scenes and pulls  highscore updates over http  ( asynch)  -
it could receive HTTP-Connector as DI,  could be configured  via DI
with some propeties out of manifest and and reference to some
interface obect
to push highscores there - with   as few knowledge of android
whereabouts as possible.

regards,

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: HeapWorker is wedged problem

2010-04-07 Thread fadden
On Apr 3, 2:52 am, Mr. Kakakuva Bird ashish531...@gmail.com wrote:
 I am using edtftpj-pro3.1 trial copy in my android app to make SFTP
 connection with the server.
 After few connections with the server with 5-6 file transfers, my app
 is crashing with following exception HeapWorker is wedged.
 I'm using Sqlite dbms. Is it causing the problem or what could be the
 problem??

The interesting part is:

 04-03 15:06:35.663: ERROR/dalvikvm(12526): HeapWorker is wedged: 13056ms 
 spent inside 
 Lcom/enterprisedt/net/j2ssh/sftp/SftpFileOutputStream;.finalize()V

It spent 13 seconds in a single finalizer function without making any
progress.  It appears to be waiting on some other thread:

 04-03 15:06:36.122: INFO/dalvikvm(12526): HeapWorker daemon prio=5
 tid=5 TIMED_WAIT
 04-03 15:06:36.122: INFO/dalvikvm(12526): | group=system sCount=1
 dsCount=0 s=Y obj=0x42e186d8 self=0x116928
 04-03 15:06:36.122: INFO/dalvikvm(12526): | sysTid=12527 nice=0
 sched=0/0 cgrp=default handle=1140944
 04-03 15:06:36.122: INFO/dalvikvm(12526): at
 java.lang.Object.wait(Native Method)
 04-03 15:06:36.122: INFO/dalvikvm(12526): at
 java.lang.Object.wait(Object.java:326)
 04-03 15:06:36.122: INFO/dalvikvm(12526): at
 com.enterprisedt.net.j2ssh.sftp.B.A((null):-1)
 04-03 15:06:36.122: INFO/dalvikvm(12526): at
 com.enterprisedt.net.j2ssh.sftp.SftpSubsystemClient.getOKRequestStatus((nul 
 l):-1)
 04-03 15:06:36.122: INFO/dalvikvm(12526): at
 com.enterprisedt.net.j2ssh.sftp.SftpFileOutputStream.A((null):-1)
 04-03 15:06:36.122: INFO/dalvikvm(12526): at
 com.enterprisedt.net.j2ssh.sftp.SftpFileOutputStream.close((null):-1)
 04-03 15:06:36.122: INFO/dalvikvm(12526): at
 com.enterprisedt.net.j2ssh.sftp.SftpFileOutputStream.finalize((null):-1)
 04-03 15:06:36.122: INFO/dalvikvm(12526): at
 dalvik.system.NativeStart.run(Native Method)

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: how to find out memory usage by pid?

2010-04-07 Thread fadden
On Apr 3, 1:05 am, ratson materem...@gmail.com wrote:
 is there an SDK way to find out the exact amount of memory consumed by
 a process identified by its pid?

If you have a development device, adb shell procrank will give you a
summary, and adb shell showmap pid will give you details.

I don't remember which builds procrank/showmap are a part of though.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Need Help for Storing the Values

2010-04-07 Thread patbenatar
For learning databases, the Notepad tutorial is a great one:
http://developer.android.com/intl/fr/resources/tutorials/notepad/index.html
.. There's probably also some code in the Samples section... Browse
around the Resources tab on the Developer site.

Here are the docs for the Application class:
http://developer.android.com/intl/fr/reference/android/app/Application.html
Once you're at the above link [for Application], you can easily search
or browse the docs for other classes.

For passing data around between Activities in the Intent bundle, check
out the docs for Activity [startActivity(), startActivityForResult()],
Intent [putExtra(), getExtra()]..

You will have to do your own research. I'm sorry I can't write code
for you--maybe someone else on the list has some time to do that...

There are loads of resources out there. Lots of great stuff provided
by Google and there are tons of great blogs and helpful message board
threads that you will uncover with some Googling.

Sorry I can't be of more help. I believe I have pushed you off in the
right direction...

-Nick





On Apr 6, 8:42 pm, nubh bhargava nubh.bharg...@gmail.com wrote:
 Thanks for the suggestion,
 but you have any code for it to explain and I need to store the phone
 numbers into this code so mailed twice.

 Thanks
 NUBH

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Getting Bitmap of all the Views in ViewFlipper?

2010-04-07 Thread javame_android
Hi,

solved it by setting the visibility of all the views to visible.


Regards
Sunil

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Unable to reject the incoming call

2010-04-07 Thread Abdul Qavi Paracha
Thank you so much for your prompt respnse.
Ok.. then i also try to forward calls to voice mail
Best regards,
Abdul Qavi

On Apr 6, 10:52 pm, Kumar Bibek coomar@gmail.com wrote:
 Ok, thats fine. I have never tried this app. But I suspect, it doesn't
 really block your calls. It simply forwards them to your voice mail.
 That's possible. But what you are asking is not possible at all due to
 security reasons.

 Calls are an important part of a phone. If anybody and everybody is
 given access to these features such as blocking a call, then any one
 can write an app that just drops any call without letting the user
 know. The user will never be able to figure out why everybody has
 stopped calling him :)

 He won't have the faintest idea about which app is responsible for
 doing this. This is basically  a security risk.

 This is like, you are asking permission for a desktop app, to change
 the way, it access the processor. It's the function of the OS and
 should not be tampered with.

 Again, Sorry, but you cannot achieve what you are looking for, but
 there can be workarounds, like GBlocker.

 Thanks and Regards,
 Kumar Bibek

 On Apr 6, 11:39 am, Abdul Qavi Paracha aqav...@gmail.com wrote:

  Thank you Bibek for your respnose
  Dear Bibek, I've already googled this issue so many times, and i came
  across some posts which say it is not possible yet. But i get confused
  when i see some applications which are already developed like
  GBlocker, which you can follow 
  athttp://bubiloop.com/android-communication-gblocker
  Hope you don't mind on my this question...
  What i want to do is to blockincomingcallPane, so that it does not
  appear onincomingcalls.
  Thanks and best regards.
  Abdul Qavi
  On Apr 3, 7:22 pm, Kumar Bibek coomar@gmail.com wrote:

   Not possible. Please do a search before posting any question. This has
   already been asked and answered so many times.

   Thanks and Regards,
   Kumar Bibek

   On Mar 31, 1:25 pm, Abdul Qavi Paracha aqav...@gmail.com wrote:

Hi
 I am creating an android application, and i want this app to handle
allincomingcall. How can i do that.
Best regards,
Abdul Qavi

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

To unsubscribe, reply using remove me as the subject.


[android-developers] JVM tool interface support? in android vm - I want to register get/set hooking callback function at my class

2010-04-07 Thread always19
I release a class.
In the class, there are public fields that can be written.

I want to register the callback function which will be called right
after my field is accessed.

I think I can do that by using JVM tool interface which is supposed to
be used for a debugger software.
JVM tool interface: http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/
http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/jvmti.html#fieldWatch

I'm not sure same interface is working on android.
or, They provide another form of interface to get a notification of a
field access.

Thanks in advance.
19.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Complains of shrinking font sizes

2010-04-07 Thread Ivan
Thank you so much, you saved me a lot of time. I used millimeters all
over my code previously, and suddenly it looks like you can't do that
anymore in 2.1

On Apr 5, 5:20 pm, polyclefsoftware dja...@gmail.com wrote:
 Okay, you just need to make sure you define yourfontsizes in scale-
 independent pixels (sip or sp) instead of whatever you were using
 before.

 For whatever reason, on the Droid pre-2.1 it would automatically scale
 text not defined in scale-independent pixels. Now it doesn't.

 On Apr 4, 10:01 am, polyclefsoftware dja...@gmail.com wrote:

  Yep, I'm experiencing the same thing, both personally after upgrading
  myDroidto 2.1 and from users who have just upgraded.

  I'm assuming there's an easy fix, but does anyone else know why the
  update had this effect?

  On Feb 10, 2:54 pm, Timothy DeWees whtdrgn...@gmail.com wrote:

   Hello,

   I have an application on the Android Market called My Collection Pro.
   I am getting complaints from my post Android 2.0 users (Droid, etc)
   that when the close and re-open the app, thefontkeeps getting
   smaller.

   I build my application in the 1.5 API to have the highest number of
   supported phones.  If the users rotate the phone to cause the app to
   restart it goes back to the originalfont.

   I am unable to reproduce this in the emulator and on my G1.

   Any ideas or suggestions?  My resource layouts are really straight-
   forward and I leavefontat system default (i.e., I don't specify
   anything)...



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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: how to find out memory usage by pid?

2010-04-07 Thread ratson
i have found cat /proc/pid/statm is a good way, but it is extensive
to open shells for every process i want to examine.
so is there no SDK way?

On Apr 7, 8:42 am, fadden fad...@android.com wrote:
 On Apr 3, 1:05 am, ratson materem...@gmail.com wrote:

  is there an SDK way to find out the exact amount of memory consumed by
  a process identified by its pid?

 If you have a development device, adb shell procrank will give you a
 summary, and adb shell showmap pid will give you details.

 I don't remember which builds procrank/showmap are a part of though.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: how to find out memory usage by pid?

2010-04-07 Thread ratson
i mean expensive... :)

On ápr. 7, 09:15, ratson materem...@gmail.com wrote:
 i have found cat /proc/pid/statm is a good way, but it is extensive
 to open shells for every process i want to examine.
 so is there no SDK way?

 On Apr 7, 8:42 am, fadden fad...@android.com wrote:

  On Apr 3, 1:05 am, ratson materem...@gmail.com wrote:

   is there an SDK way to find out the exact amount of memory consumed by
   a process identified by its pid?

  If you have a development device, adb shell procrank will give you a
  summary, and adb shell showmap pid will give you details.

  I don't remember which builds procrank/showmap are a part of though.



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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Flashing the android device

2010-04-07 Thread MobDev
HTC got a page for developers on which they also have some versions of
the Android OS... On that same page a whole procedure is explained
regarding the flashing of those Android OS versions... It might be
helpfull in your case ?
For example : http://developer.htc.com/google-io-device.html


On 6 apr, 17:58, emna zeddini zeddini.e...@gmail.com wrote:
 Hello everybody,
 After dowloading the source code of the android OS, I have made some
 modifications on it.
 Now I want to flash my device with the new system.
 How to proceed?
 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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: PackageStats : how to get application size ?

2010-04-07 Thread Kumar Bibek
As Dianne had mentioned in that post, as of now, you cannot do it.

No public API is available

Thanks and Regards,
Kumar Bibek

On Apr 6, 2:30 pm, arnouf arnaud.far...@gmail.com wrote:
 Hi all,

 I'm trying to know the application size (only the code size). I found
 some topics related, but nothing is working.
 The last class provided by Android, PackageStats seems to give
 information about size : code size, cache size...
 But I get always a 0.

 Some guys talked about this issue here 
 :http://groups.google.com/group/android-developers/browse_thread/threa...
 but no solution has been provided.

 Where is the problem ? What are concerned Android version ?

 Thanks by advance for your feedback.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Getting the url of an http response

2010-04-07 Thread jw
Hi all,

thanks for your time and sorry that I wasn't clear enough.

I'm making a http post request to a web page which redirects me to
different urls depending on the accuracy of my parameters sent in the
request. This means that if I do it correct, I'll get redirected to
for example www.google.com with a querystring that I need to get
(www.google.com?x=1y=2). Maybe that's not the response url, but I
don't now how to describe it. It's not the same as the request url
anyway.

I'm able to get the response status code from the repsonse object,
which is ok, and I'm also able to get the html (content) of the
response. I just need to know what url I was redirected to. Does this
help you? I'm very thankful for all help

/J

On Apr 7, 5:31 am, Kevin Duffey andjar...@gmail.com wrote:
 There isn't a response URL that is any different than the request URL. It's
 not as if the server appends a bunch of stuff to the URL you submit the
 request to unless it redirects/forwards to another URL.. in this case, the
 server would append to the URL you requested, redirecting you... but even if
 it did this, your response would indicate a 3xx redirect and the Location
 header, as Frank says above, would contain the new URL you should go to. If
 you did get a 301/2 back, you'd have to actually make another request
 yourself.

 So not sure as the other guys say, what URL you are talking about

 On Tue, Apr 6, 2010 at 7:59 PM, Frank Weiss fewe...@gmail.com wrote:
  I don't know what response URL means. The only URLs in an HTTP response
  that come to mind are: 1) the Location response header for a 301/302
  status code, 2) some string in the response data (such as an HTML anchor
  element) that you want to interpret as a URL.

  On Tue, Apr 6, 2010 at 1:59 PM, jw jwilner...@gmail.com wrote:

  Hi all,

  I have a problem. I'm doing a http post request to a URL like this;

  DefaultHttpClient httpclient = new DefaultHttpClient();
  HttpPost httppost = new HttpPost(url);
  HttpResponse response = httpclient.execute(httppost);

  I am able to get the response content (html in this case) but I would
  like to be able to get the url of the response. Is there a way? Or
  could i use some other technique to do the post request and retrieve
  the url?

  The repsonse url is lkewww.url.com?x=1y=2http://www.url.com/?x=1y=2and 
  would like to get the
  parameter values, I've tried to use the getParams().getParameter() on
  the HttpResponse object without any success. So if anyone has a
  solution to get the parameters without getting the url, that's ok :)

  Thanks in advance.

  /J

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

  To unsubscribe, reply using remove me as the subject.

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

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


[android-developers] Re: how to find out memory usage by pid?

2010-04-07 Thread AJ
Hi ratson,

thanks for sharing the command.
When I run that command 7 numbers in a row. They did not have any
column name.
Can you please tell us what exactly number is for?


Thanks,
AJ

On Apr 7, 10:21 am, ratson materem...@gmail.com wrote:
 i mean expensive... :)

 On ápr. 7, 09:15, ratson materem...@gmail.com wrote:

  i have found cat /proc/pid/statm is a good way, but it is extensive
  to open shells for every process i want to examine.
  so is there no SDK way?

  On Apr 7, 8:42 am, fadden fad...@android.com wrote:

   On Apr 3, 1:05 am, ratson materem...@gmail.com wrote:

is there an SDK way to find out the exact amount of memory consumed by
a process identified by its pid?

   If you have a development device, adb shell procrank will give you a
   summary, and adb shell showmap pid will give you details.

   I don't remember which builds procrank/showmap are a part of though.

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Re: how to find out memory usage by pid?

2010-04-07 Thread Rémiás Máté
2nd from right in kb

On Wed, Apr 7, 2010 at 9:45 AM, AJ ajeet.invinci...@gmail.com wrote:

 Hi ratson,

 thanks for sharing the command.
 When I run that command 7 numbers in a row. They did not have any
 column name.
 Can you please tell us what exactly number is for?


 Thanks,
 AJ

 On Apr 7, 10:21 am, ratson materem...@gmail.com wrote:
  i mean expensive... :)
 
  On ápr. 7, 09:15, ratson materem...@gmail.com wrote:
 
   i have found cat /proc/pid/statm is a good way, but it is extensive
   to open shells for every process i want to examine.
   so is there no SDK way?
 
   On Apr 7, 8:42 am, fadden fad...@android.com wrote:
 
On Apr 3, 1:05 am, ratson materem...@gmail.com wrote:
 
 is there an SDK way to find out the exact amount of memory consumed
 by
 a process identified by its pid?
 
If you have a development device, adb shell procrank will give you
 a
summary, and adb shell showmap pid will give you details.
 
I don't remember which builds procrank/showmap are a part of though.

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

 To unsubscribe, reply using remove me as the subject.


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

2010-04-07 Thread Dieng
Philip De Smedt philip.desmedt at gmail.com writes:
hello,
I have just the same exact problem
Please who could help me ?
thank you in advence...


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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Url to app example on Document is not valid

2010-04-07 Thread Kumar Bibek
This URI is not an http one. Only the Android Market app can open this
URL directly. The browser cannot.
And also, you cannot open this URL using any Http requests. Http
requests are only meant for http/https connections.

Thanks and Regards,
Kumar Bibek

On Apr 4, 7:35 pm, Churky chu...@gmail.com wrote:
 http://developer.android.com/guide/publishing/publishing.html#marketi...

 The documentation shows that you can directly link to your app on
 Android Market place. But every HTTP url I attempted, I am getting a
 page not found error. I am wondering if there is something wrong with
 the documentation or is there a rules change where we can directly
 link to apps we created. if that is the case, why is this
 documentation still exist pointing to incorrect information?

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Urgent : GPS timeout in android

2010-04-07 Thread Farha Ansari
but i am getting location in method onLocationChanged() and this is
where i want to check that if i dont get update say within 1 minute,
thn is hould end handler. So, how can i do it here?
Thanks

On Apr 7, 9:32 am, Maps.Huge.Info (Maps API Guru) cor...@gmail.com
wrote:
 One method you could use is to setup a progress handler to monitor the
 location fix. If after x seconds you have nothing then you can end the
 handler, shutdown the listeners and inform your users. Pretty straight
 forward, I'm sure there are better ways to do this as well. Basically,
 you have to construct your own location timeout.

 -John Coryat

 On Apr 6, 10:34 pm, Farha Ansari farha45ans...@gmail.com wrote:



  Hi,

  In blackberry, we use a timeout to get the location, so that if it
  doesnt retun location in that much time period, we get to know. But in
  Android, there is no concept of timeout, can anyone please tell the
  alternative, that we can find out that after this much time there is
  no location update from GPS.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Resuming View with about 200KB of drawable resources: android.view.InflateException and java.lang.OutOfMemoryError

2010-04-07 Thread patbenatar
Thanks Romain! Some great info in your articles on Optimization! A
quick question: how does the DDMS Allocation Manager help me out if it
doesn't tell me any stack traces in my package? It seems the whole
trace is from Android and Java stuff...

-Nick



On Apr 6, 9:59 pm, Romain Guy romain...@android.com wrote:
 It looks like your application is leaking memory somehow. You can
 check out the various articles on the subject available at
 android-developers.blogspot.com.



 On Tue, Apr 6, 2010 at 9:55 PM, patbenatar patbena...@gmail.com wrote:
  Romain- Thanks so much for your response! That helps me understand the
  memory usage amount... What I don't get is why would Android not be
  able to free up 4MB of RAM for me? Isn't memory Android's job? My
  drawable is only referenced once, in my XML, and that XML is only
  being loaded in one Activity's onCreate. That Activity may run
  multiple times in one run of the app, but it always finishes and
  should therefore be destroyed by the system, removing all pointers to
  the View and the Drawable in it, and on the next GC run it should be
  freed.. At least that's the theory Am I missing something?

  Android is surely capable of handling a 4MB drawable in RAM, is it
  not? Maybe there is a way I can compress this image? I hope to
  maintain full-resolution on the hi-dpi devices and it needs to fill
  the screen in both landscape and portrait. I could shrink it down to
  854x854 as the minimum dimension to make it fit perfectly on the
  Droid's pixel-packed screen...

  Thanks guys!
  Nick

  On Apr 6, 6:19 pm, Romain Guy romain...@android.com wrote:
  A 1000x1000 32 bits image takes 4 MB in RAM :)

  On Tue, Apr 6, 2010 at 6:10 PM, patbenatar patbena...@gmail.com wrote:
   Thanks for your support, Yahel. The 135KB image is 1000x1000 pixels
   [quite a large canvas], but this is to ensure it looks great on hi-dpi
   screens at both portrait and landscape and at any sort of aspect
   ratio.. I'm also using android:scaleType=centerCrop in my XML
   markup ... It's a PNG, as well. I saved it from Photoshop using Save
   As... not Save For Web  Devices... [should I be using the
   latter? .. either way its just a PNG file, I think Save For Web 
   Devices just compresses it more]...

   -Nick

   On Apr 6, 2:20 am, Yahel kaye...@gmail.com wrote:
   What are the type and size in pixels of your drawable ?

   As I understand it, Android uncompress jpegs to raw bytes when
   decoding images.

   Say if your Image is a big(huge ?) and highly compressed JPEG, then
   possibly you could run into an OOM.

   Just an hypothesis, Although exactly 450-byte sounds weird :s

   If this is the case, you can either reduce your drawable size or load
   it programmatically instead of via XML and then use
   BitmapFactory.Options.inSampleSize or inTempStorage 
   :http://developer.android.com/intl/de/reference/android/graphics/Bitma...

   Yahel

   On 6 avr, 07:47, patbenatar patbena...@gmail.com wrote:

Hey Androiders!

I'm running into a strange intermittent issue with my app.. Basically
every time the app resumes I check if its internal data [fetched from
a Web API] is outdated and if it is I push off to my Splash/Loader
activity while I fetch new data. This works great ALMOST all the
time... Then every once in a while the system gives me a
java.lang.RuntimeException  android.view.InflateException 
java.lang.reflect.InvocationTargetException 
java.lang.OutOfMemoryError [that's the simplified stack trace]..

Here is the whole stack trace:

E/dalvikvm-heap(12914): Heap Massage needed (450-byte external
allocation too big)
E/dalvikvm-heap(12914): Full GC (don't collect SoftReferences)
I/ActivityManager( 1078): Process com.amazon.mp3 (pid 12917) has died.
D/dalvikvm(12914): GC freed 188 objects / 10224 bytes in 54ms
E/dalvikvm-heap(12914): Full GC (collect SoftReferences)
D/dalvikvm(12914): GC freed 47 objects / 1968 bytes in 56ms
E/dalvikvm-heap(12914): Try and trim Heap Source
E/dalvikvm-heap(12914): Heap Massage was unsuccessful for 450-
bytes!
E/dalvikvm-heap(12914): Heap Massage has failed...
E/        (12914): VM won't let us allocate 450 bytes
D/AndroidRuntime(12914): Shutting down VM
W/dalvikvm(12914): threadid=3: thread exiting with uncaught exception
(group=0x4001b178)
E/AndroidRuntime(12914): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime(12914): java.lang.RuntimeException: Unable to start
activity ComponentInfo{com.apwit.grubtruck/
com.apwit.grubtruck.Splash}: android.view.InflateException: Binary XML
file line #8: Error inflating class unknown
E/AndroidRuntime(12914):        at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2496)
E/AndroidRuntime(12914):        at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2512)

[android-developers] Re: how to find out memory usage by pid?

2010-04-07 Thread AJ
I actually want the information regarding foe each column when you
issue this command

like
cat /proc/1976/statm
25930 4123 1825 1 0 2484 0



- AJ

On Apr 7, 10:46 am, Rémiás Máté materem...@gmail.com wrote:
 2nd from right in kb

 On Wed, Apr 7, 2010 at 9:45 AM, AJ ajeet.invinci...@gmail.com wrote:
  Hi ratson,

  thanks for sharing the command.
  When I run that command 7 numbers in a row. They did not have any
  column name.
  Can you please tell us what exactly number is for?

  Thanks,
  AJ

  On Apr 7, 10:21 am, ratson materem...@gmail.com wrote:
   i mean expensive... :)

   On ápr. 7, 09:15, ratson materem...@gmail.com wrote:

i have found cat /proc/pid/statm is a good way, but it is extensive
to open shells for every process i want to examine.
so is there no SDK way?

On Apr 7, 8:42 am, fadden fad...@android.com wrote:

 On Apr 3, 1:05 am, ratson materem...@gmail.com wrote:

  is there an SDK way to find out the exact amount of memory consumed
  by
  a process identified by its pid?

 If you have a development device, adb shell procrank will give you
  a
 summary, and adb shell showmap pid will give you details.

 I don't remember which builds procrank/showmap are a part of though.

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

  To unsubscribe, reply using remove me as the subject.

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

2010-04-07 Thread mike

On 04/07/2010 01:36 AM, Farha Ansari wrote:

but i am getting location in method onLocationChanged() and this is
where i want to check that if i dont get update say within 1 minute,
thn is hould end handler. So, how can i do it here?
Thanks
   


There are lots of ways to generate timeouts. If your timeout
action is something that just needs to change the display in
some way, you can use postDelayed with a Runnable with
your timeout action. Actually, it doesn't have to be just UI
affecting, but it can't block for a long period of time. If you need
to block, just fire up a thread to handle it using Thread.wait().

Mike


On Apr 7, 9:32 am, Maps.Huge.Info (Maps API Guru)cor...@gmail.com
wrote:
   

One method you could use is to setup a progress handler to monitor the
location fix. If after x seconds you have nothing then you can end the
handler, shutdown the listeners and inform your users. Pretty straight
forward, I'm sure there are better ways to do this as well. Basically,
you have to construct your own location timeout.

-John Coryat

On Apr 6, 10:34 pm, Farha Ansarifarha45ans...@gmail.com  wrote:



 

Hi,
   
 

In blackberry, we use a timeout to get the location, so that if it
doesnt retun location in that much time period, we get to know. But in
Android, there is no concept of timeout, can anyone please tell the
alternative, that we can find out that after this much time there is
no location update from GPS.
   
 

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

To unsubscribe, reply using remove me as the subject.


[android-developers] How to parse JSON in Java?

2010-04-07 Thread Maxood
I have the following JSON text that i need to parse to get pageName,
pagePic, post_id, etc. What is the required code?
pageInfo: {
pageName: abc
pagePic: http://profile.ak.fbcdn.net/object2/367/…
}
posts: [
{
post_id: 160119538822_302076968822
actor_id: 1183856639
picOfPersonWhoPosted: http://profile.ak.fbcdn.net/hprofile-ak-…
nameOfPersonWhoPosted: Andrea Raquel
message: Sounds cool. Can't wait to see it!
likesCount: 2
comments: [
]
timeOfPost: 1266036226
}

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


[android-developers] One view displays multiple canvas, back button doesn't work.

2010-04-07 Thread sblantipodi
Hi,
I have a views on the main class and many other class with an onDraw()
method to
draw a canvas.

Java:

public boolean onKeyDown(int kc, KeyEvent event) {

if (kc == KeyEvent.KEYCODE_BACK) {
  // Do something
}
// Ripitto
invalidate();
return false;
}


I have the same code also for menu button and DPAD button.
The strange thing is that canvas doesn't listen any keyboard command
before I tap the screen
and move a dpad button.

I'll try to explain me better, suppose that I'm on the main View, I
display the canvas on class X,
once displayed before keyboard start working I need to:
1) Tap the screen
2) Move a dpad button
3) Than I can use back button and menu button

If I don't execute the three steps as I described I can't use back and
menu button.
On the class used to display canvas I also put this in the constructor
but it doesn't help:


Java:

setFocusable(true);
setFocusableInTouchMode(true);


Have you got some idea?

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Re: Getting the url of an http response

2010-04-07 Thread mike

On 04/07/2010 12:40 AM, jw wrote:

Hi all,

thanks for your time and sorry that I wasn't clear enough.

I'm making a http post request to a web page which redirects me to
different urls depending on the accuracy of my parameters sent in the
request. This means that if I do it correct, I'll get redirected to
for example www.google.com with a querystring that I need to get
(www.google.com?x=1y=2). Maybe that's not the response url, but I
don't now how to describe it. It's not the same as the request url
anyway.

I'm able to get the response status code from the repsonse object,
which is ok, and I'm also able to get the html (content) of the
response. I just need to know what url I was redirected to. Does this
help you? I'm very thankful for all help
   


sounds like you want to use HttpResponse.getHeaders(Location)

Mike, it returns an array, but there should only be one if it redirected


/J

On Apr 7, 5:31 am, Kevin Duffeyandjar...@gmail.com  wrote:
   

There isn't a response URL that is any different than the request URL. It's
not as if the server appends a bunch of stuff to the URL you submit the
request to unless it redirects/forwards to another URL.. in this case, the
server would append to the URL you requested, redirecting you... but even if
it did this, your response would indicate a 3xx redirect and the Location
header, as Frank says above, would contain the new URL you should go to. If
you did get a 301/2 back, you'd have to actually make another request
yourself.

So not sure as the other guys say, what URL you are talking about

On Tue, Apr 6, 2010 at 7:59 PM, Frank Weissfewe...@gmail.com  wrote:
 

I don't know what response URL means. The only URLs in an HTTP response
that come to mind are: 1) the Location response header for a 301/302
status code, 2) some string in the response data (such as an HTML anchor
element) that you want to interpret as a URL.
   
 

On Tue, Apr 6, 2010 at 1:59 PM, jwjwilner...@gmail.com  wrote:
   
 

Hi all,
 
 

I have a problem. I'm doing a http post request to a URL like this;
 
 

DefaultHttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(url);
HttpResponse response = httpclient.execute(httppost);
 
 

I am able to get the response content (html in this case) but I would
like to be able to get the url of the response. Is there a way? Or
could i use some other technique to do the post request and retrieve
the url?
 
 

The repsonse url is lkewww.url.com?x=1y=2http://www.url.com/?x=1y=2and 
would like to get the
parameter values, I've tried to use the getParams().getParameter() on
the HttpResponse object without any success. So if anyone has a
solution to get the parameters without getting the url, that's ok :)
 
 

Thanks in advance.
 
 

/J
 
 

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

To unsubscribe, reply using remove me as the subject.
 
 

  --
You received this message because you are subscribed to the Google
Groups Android Developers group.
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] How to parse JSON in Java?

2010-04-07 Thread Agus
new JSONObject(YOUR_JSON_TEXT);

On Wed, Apr 7, 2010 at 2:05 AM, Maxood maqs...@salsoft.net wrote:

 I have the following JSON text that i need to parse to get pageName,
 pagePic, post_id, etc. What is the required code?
 pageInfo: {
 pageName: abc
 pagePic: http://profile.ak.fbcdn.net/object2/367/…
 }
 posts: [
 {
 post_id: 160119538822_302076968822
 actor_id: 1183856639
 picOfPersonWhoPosted: http://profile.ak.fbcdn.net/hprofile-ak-…
 nameOfPersonWhoPosted: Andrea Raquel
 message: Sounds cool. Can't wait to see it!
 likesCount: 2
 comments: [
 ]
 timeOfPost: 1266036226
 }

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Re: how to find out memory usage by pid?

2010-04-07 Thread Rémiás Máté
I don't know... please post if you find it...

On Apr 7, 2010 10:51 AM, AJ ajeet.invinci...@gmail.com wrote:

I actually want the information regarding foe each column when you
issue this command

like
cat /proc/1976/statm
25930 4123 1825 1 0 2484 0



- AJ


On Apr 7, 10:46 am, Rémiás Máté materem...@gmail.com wrote:
 2nd from right in kb


 On Wed, Apr 7, 2010 at 9:45 AM, AJ ajeet.invinci...@gmail.com wrote:
  Hi ratson,

  thanks...
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com


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

You received this message because you are subscribed to the Google
Groups Android Developers group...

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Getting the url of an http response

2010-04-07 Thread jw
Hi, thanks for the idea, but it didn't help.

response.getHeaders(Location)[0] gives me null. I've also tried to
print all header keys and vaules, and none of them are Location.

Any other ideas?

/J

On Apr 7, 11:12 am, mike enervat...@gmail.com wrote:
 On 04/07/2010 12:40 AM, jw wrote:



  Hi all,

  thanks for your time and sorry that I wasn't clear enough.

  I'm making a http post request to a web page which redirects me to
  different urls depending on the accuracy of my parameters sent in the
  request. This means that if I do it correct, I'll get redirected to
  for examplewww.google.comwith a querystring that I need to get
  (www.google.com?x=1y=2). Maybe that's not the response url, but I
  don't now how to describe it. It's not the same as the request url
  anyway.

  I'm able to get the response status code from the repsonse object,
  which is ok, and I'm also able to get the html (content) of the
  response. I just need to know what url I was redirected to. Does this
  help you? I'm very thankful for all help

 sounds like you want to use HttpResponse.getHeaders(Location)

 Mike, it returns an array, but there should only be one if it redirected

  /J

  On Apr 7, 5:31 am, Kevin Duffeyandjar...@gmail.com  wrote:

  There isn't a response URL that is any different than the request URL. It's
  not as if the server appends a bunch of stuff to the URL you submit the
  request to unless it redirects/forwards to another URL.. in this case, the
  server would append to the URL you requested, redirecting you... but even 
  if
  it did this, your response would indicate a 3xx redirect and the Location
  header, as Frank says above, would contain the new URL you should go to. If
  you did get a 301/2 back, you'd have to actually make another request
  yourself.

  So not sure as the other guys say, what URL you are talking about

  On Tue, Apr 6, 2010 at 7:59 PM, Frank Weissfewe...@gmail.com  wrote:

  I don't know what response URL means. The only URLs in an HTTP response
  that come to mind are: 1) the Location response header for a 301/302
  status code, 2) some string in the response data (such as an HTML anchor
  element) that you want to interpret as a URL.

  On Tue, Apr 6, 2010 at 1:59 PM, jwjwilner...@gmail.com  wrote:

  Hi all,

  I have a problem. I'm doing a http post request to a URL like this;

  DefaultHttpClient httpclient = new DefaultHttpClient();
  HttpPost httppost = new HttpPost(url);
  HttpResponse response = httpclient.execute(httppost);

  I am able to get the response content (html in this case) but I would
  like to be able to get the url of the response. Is there a way? Or
  could i use some other technique to do the post request and retrieve
  the url?

  The repsonse url is 
  lkewww.url.com?x=1y=2http://www.url.com/?x=1y=2and would like to get 
  the
  parameter values, I've tried to use the getParams().getParameter() on
  the HttpResponse object without any success. So if anyone has a
  solution to get the parameters without getting the url, that's ok :)

  Thanks in advance.

  /J

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

  To unsubscribe, reply using remove me as the subject.

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

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


Re: [android-developers] Re: Getting the url of an http response

2010-04-07 Thread mike

On 04/07/2010 02:30 AM, jw wrote:

Hi, thanks for the idea, but it didn't help.

response.getHeaders(Location)[0] gives me null. I've also tried to
print all header keys and vaules, and none of them are Location.
   


Are you sure you're actually getting a 3xx code back from the
http response? A 301 without a Location header would be bogus.

You might try using a network sniffer like ethereal to see the
actual network traffic going by too.

Mike


Any other ideas?

/J

On Apr 7, 11:12 am, mikeenervat...@gmail.com  wrote:
   

On 04/07/2010 12:40 AM, jw wrote:



 

Hi all,
   
 

thanks for your time and sorry that I wasn't clear enough.
   
 

I'm making a http post request to a web page which redirects me to
different urls depending on the accuracy of my parameters sent in the
request. This means that if I do it correct, I'll get redirected to
for examplewww.google.comwith a querystring that I need to get
(www.google.com?x=1y=2). Maybe that's not the response url, but I
don't now how to describe it. It's not the same as the request url
anyway.
   
 

I'm able to get the response status code from the repsonse object,
which is ok, and I'm also able to get the html (content) of the
response. I just need to know what url I was redirected to. Does this
help you? I'm very thankful for all help
   

sounds like you want to use HttpResponse.getHeaders(Location)

Mike, it returns an array, but there should only be one if it redirected

 

/J
   
 

On Apr 7, 5:31 am, Kevin Duffeyandjar...@gmail.comwrote:
   
 

There isn't a response URL that is any different than the request URL. It's
not as if the server appends a bunch of stuff to the URL you submit the
request to unless it redirects/forwards to another URL.. in this case, the
server would append to the URL you requested, redirecting you... but even if
it did this, your response would indicate a 3xx redirect and the Location
header, as Frank says above, would contain the new URL you should go to. If
you did get a 301/2 back, you'd have to actually make another request
yourself.
 
 

So not sure as the other guys say, what URL you are talking about
 
 

On Tue, Apr 6, 2010 at 7:59 PM, Frank Weissfewe...@gmail.comwrote:
 
 

I don't know what response URL means. The only URLs in an HTTP response
that come to mind are: 1) the Location response header for a 301/302
status code, 2) some string in the response data (such as an HTML anchor
element) that you want to interpret as a URL.
   
 

On Tue, Apr 6, 2010 at 1:59 PM, jwjwilner...@gmail.comwrote:
   
 

Hi all,
 
 

I have a problem. I'm doing a http post request to a URL like this;
 
 

DefaultHttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(url);
HttpResponse response = httpclient.execute(httppost);
 
 

I am able to get the response content (html in this case) but I would
like to be able to get the url of the response. Is there a way? Or
could i use some other technique to do the post request and retrieve
the url?
 
 

The repsonse url is lkewww.url.com?x=1y=2http://www.url.com/?x=1y=2and 
would like to get the
parameter values, I've tried to use the getParams().getParameter() on
the HttpResponse object without any success. So if anyone has a
solution to get the parameters without getting the url, that's ok :)
 
 

Thanks in advance.
 
 

/J
 
 

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

To unsubscribe, reply using remove me as the subject.
 
 

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


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


[android-developers] Re: Google Analytics for Android: Dispatcher thinks it finished, but there were 65 failed events

2010-04-07 Thread Skeniver
Hey Stefan

I was wondering if you have found a solution for this yet? I have
tried tracker = null; from stack overflow, but that hasn't fixed the
problem.

Thanks in advance,
Neil

On 19 Mar, 12:27, Stefan Klumpp stefan.klu...@gmail.com wrote:
 There is also a discussion going on 
 here:http://stackoverflow.com/questions/1607822/android-what-does-this-goo...

 Unfortunately with no solution so far.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-04-07 Thread JDS
Called brightpoint in sweden and they have not any phones from google
and does not even have any productnumber for the Nexus One in their
system so Google is not using brightpoint when it comes to delivering
the phones to us here in sweden.

I sen't them a mail asking how they send them to us but they have not
answered yet.

On 30 mar, 22:52, chipin chipi...@gmail.com wrote:
 I got the confirmation on March 5 as well.  But still waiting for my
 new Android Device..

 On Mar 30, 1:34 pm, Esteem enjoiit...@gmail.com wrote:

  Did not compete in ADC2.
  Droid arrived here in AZ today through FedEx. Got the sending info to
  shipper confirmation email March 5th.

  On Mar 19, 3:59 am, Richard rtaylor...@googlemail.com wrote:

   I wasn't a registered developer when ADC2 was around, and I have one
   (on the way)

   On Mar 17, 11:40 pm, olivier.bo...@gmail.com

   olivier.bo...@gmail.com wrote:
Hi,

Has anyone received one and is not in the ADC2 top 200?
I mean has anyone received one just because he has an application in
the market matching the criteria?
Everyone I see receiving the phone are people who were candidates for
both ADC2 and Market seeding programs.

On Mar 17, 10:50 pm, Thomas Riley tomrile...@googlemail.com wrote:

 Doesn't matter how you got it, both channels are part of the same
 device seeding program.

 Enjoy ;)

 On Mar 17, 8:56 pm, huberuto huberuto...@gmail.com wrote:

  I got it yesterday, but can't tell if this one is cause of ADC2 or 
  top
  developers program. I'm from Poland.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] .apk and system.img

2010-04-07 Thread elham
Hi All!

I know how to push a 3rd party app into system.img given the source
code but is it possible to push a 3rd party app into system.img with
only .apk file . If so please let me know the steps for doing it .

Thank you,

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

To unsubscribe, reply using remove me as the subject.


[android-developers] How to save both Image and Text with SQLiteDatabase? And how to binding this images to a simpleCursorAdapter?

2010-04-07 Thread David
Dear All,

 

 I want get both Image and Text from the sqLite database and show
them on the ListView,  at present, I can save the text with sqLite well, but
failed to save the imges.

 

 Any sample code will be grateful.

 

Best Regards,

D.Y

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: how to find out memory usage by pid?

2010-04-07 Thread AJ

yeah i got the info of each column

•   size total program size
•   resident resident set size
•   share shared pages
•   trs text (code)
•   drs data/stack
•   lrs library
•   dt dirty pages


thanks,
AJ

On Apr 7, 12:25 pm, Rémiás Máté materem...@gmail.com wrote:
 I don't know... please post if you find it...

 On Apr 7, 2010 10:51 AM, AJ ajeet.invinci...@gmail.com wrote:

 I actually want the information regarding foe each column when you
 issue this command

 like
 cat /proc/1976/statm
 25930 4123 1825 1 0 2484 0

 - AJ

 On Apr 7, 10:46 am, Rémiás Máté materem...@gmail.com wrote:

  2nd from right in kb

  On Wed, Apr 7, 2010 at 9:45 AM, AJ ajeet.invinci...@gmail.com wrote:
   Hi ratson,

   thanks...
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com

 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com



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

 --

 You received this message because you are subscribed to the Google
 Groups Android Developers group...

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-04-07 Thread Arnon
I called Brightpoint Netherlands, which stated before here that sent
phones to Germany for ADC.
The guy was very nice, he asked me to send him a personal email and
said he will check and reply. I will update here if any useful
information comes up.

On Apr 7, 1:08 pm, JDS jesper.d.svens...@gmail.com wrote:
 Called brightpoint in sweden and they have not any phones from google
 and does not even have any productnumber for the Nexus One in their
 system so Google is not using brightpoint when it comes to delivering
 the phones to us here in sweden.

 I sen't them a mail asking how they send them to us but they have not
 answered yet.

 On 30 mar, 22:52, chipin chipi...@gmail.com wrote:



  I got the confirmation on March 5 as well.  But still waiting for my
  new Android Device..

  On Mar 30, 1:34 pm, Esteem enjoiit...@gmail.com wrote:

   Did not compete in ADC2.
   Droid arrived here in AZ today through FedEx. Got the sending info to
   shipper confirmation email March 5th.

   On Mar 19, 3:59 am, Richard rtaylor...@googlemail.com wrote:

I wasn't a registered developer when ADC2 was around, and I have one
(on the way)

On Mar 17, 11:40 pm, olivier.bo...@gmail.com

olivier.bo...@gmail.com wrote:
 Hi,

 Has anyone received one and is not in the ADC2 top 200?
 I mean has anyone received one just because he has an application in
 the market matching the criteria?
 Everyone I see receiving the phone are people who were candidates for
 both ADC2 and Market seeding programs.

 On Mar 17, 10:50 pm, Thomas Riley tomrile...@googlemail.com wrote:

  Doesn't matter how you got it, both channels are part of the same
  device seeding program.

  Enjoy ;)

  On Mar 17, 8:56 pm, huberuto huberuto...@gmail.com wrote:

   I got it yesterday, but can't tell if this one is cause of ADC2 
   or top
   developers program. I'm from Poland.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 save both Image and Text with SQLiteDatabase? And how to binding this images to a simpleCursorAdapter?

2010-04-07 Thread AJ
Hi David
There in Bookmarks [Android Browser] same thing has been done. You can
refer that.  You can find the code as well.

Thanks,
AJ

On Apr 7, 1:13 pm, David android.and...@gmail.com wrote:
 Dear All,

          I want get both Image and Text from the sqLite database and show
 them on the ListView,  at present, I can save the text with sqLite well, but
 failed to save the imges.

          Any sample code will be grateful.

 Best Regards,

 D.Y

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Re: How to save both Image and Text with SQLiteDatabase? And how to binding this images to a simpleCursorAdapter?

2010-04-07 Thread David
Hi AJ,

I just development the project with SDK 2.1, and I found the bookmark 
in android browser can match my requirement, but is there any source project 
can run on the emulator?

The other question, if user click the item on the listview, the app 
will create a new Activity to show the details of this item, I hope user can 
use finger to slip right/left to review next/previous item page?

Thanks in advance.

Best Regards,
D.Y

-邮件原件-
发件人: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] 代表 AJ
发送时间: 2010年4月7日 18:34
收件人: Android Developers
主题: [android-developers] Re: How to save both Image and Text with 
SQLiteDatabase? And how to binding this images to a simpleCursorAdapter?

Hi David
There in Bookmarks [Android Browser] same thing has been done. You can
refer that.  You can find the code as well.

Thanks,
AJ

On Apr 7, 1:13 pm, David android.and...@gmail.com wrote:
 Dear All,

  I want get both Image and Text from the sqLite database and show
 them on the ListView,  at present, I can save the text with sqLite well, but
 failed to save the imges.

  Any sample code will be grateful.

 Best Regards,

 D.Y

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

To unsubscribe, reply using remove me as the subject.

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

2010-04-07 Thread Eurig Jones
Have a look at XMPP, this is what you'd probably need to look into
first.

On Apr 6, 9:12 pm, aspekt9 aspe...@gmail.com wrote:
 I'm starting to get into networking on android and I was wondering
 what the requirements are to setup a simple messaging application. Do
 I need to host a central server somewhere to have two people connect
 to in order to receive messages? Are there any examples on how to go
 about doing this?

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Getting the url of an http response

2010-04-07 Thread jw
Well, I'm able to set the response url in the web service, but it's
the parameters I'm interested in... For now I've just set the response
URL to www.google.com and the web service adds my parameter which
gives www.google.com/?x=1y=2... Since this page is not available, I
get the 404 status code, not 3xx...

Any help?

/J

On Apr 7, 11:41 am, mike enervat...@gmail.com wrote:
 On 04/07/2010 02:30 AM, jw wrote:

  Hi, thanks for the idea, but it didn't help.

  response.getHeaders(Location)[0] gives me null. I've also tried to
  print all header keys and vaules, and none of them are Location.

 Are you sure you're actually getting a 3xx code back from the
 http response? A 301 without a Location header would be bogus.

 You might try using a network sniffer like ethereal to see the
 actual network traffic going by too.

 Mike

  Any other ideas?

  /J

  On Apr 7, 11:12 am, mikeenervat...@gmail.com  wrote:

  On 04/07/2010 12:40 AM, jw wrote:

  Hi all,

  thanks for your time and sorry that I wasn't clear enough.

  I'm making a http post request to a web page which redirects me to
  different urls depending on the accuracy of my parameters sent in the
  request. This means that if I do it correct, I'll get redirected to
  for examplewww.google.comwitha querystring that I need to get
  (www.google.com?x=1y=2). Maybe that's not the response url, but I
  don't now how to describe it. It's not the same as the request url
  anyway.

  I'm able to get the response status code from the repsonse object,
  which is ok, and I'm also able to get the html (content) of the
  response. I just need to know what url I was redirected to. Does this
  help you? I'm very thankful for all help

  sounds like you want to use HttpResponse.getHeaders(Location)

  Mike, it returns an array, but there should only be one if it redirected

  /J

  On Apr 7, 5:31 am, Kevin Duffeyandjar...@gmail.com    wrote:

  There isn't a response URL that is any different than the request URL. 
  It's
  not as if the server appends a bunch of stuff to the URL you submit the
  request to unless it redirects/forwards to another URL.. in this case, 
  the
  server would append to the URL you requested, redirecting you... but 
  even if
  it did this, your response would indicate a 3xx redirect and the Location
  header, as Frank says above, would contain the new URL you should go to. 
  If
  you did get a 301/2 back, you'd have to actually make another request
  yourself.

  So not sure as the other guys say, what URL you are talking about

  On Tue, Apr 6, 2010 at 7:59 PM, Frank Weissfewe...@gmail.com    wrote:

  I don't know what response URL means. The only URLs in an HTTP 
  response
  that come to mind are: 1) the Location response header for a 301/302
  status code, 2) some string in the response data (such as an HTML anchor
  element) that you want to interpret as a URL.

  On Tue, Apr 6, 2010 at 1:59 PM, jwjwilner...@gmail.com    wrote:

  Hi all,

  I have a problem. I'm doing a http post request to a URL like this;

  DefaultHttpClient httpclient = new DefaultHttpClient();
  HttpPost httppost = new HttpPost(url);
  HttpResponse response = httpclient.execute(httppost);

  I am able to get the response content (html in this case) but I would
  like to be able to get the url of the response. Is there a way? Or
  could i use some other technique to do the post request and retrieve
  the url?

  The repsonse url is 
  lkewww.url.com?x=1y=2http://www.url.com/?x=1y=2and would like to 
  get the
  parameter values, I've tried to use the getParams().getParameter() on
  the HttpResponse object without any success. So if anyone has a
  solution to get the parameters without getting the url, that's ok :)

  Thanks in advance.

  /J

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

  To unsubscribe, reply using remove me as the subject.

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

[android-developers] How can I test ACTION_POWER_CONNECTED event?

2010-04-07 Thread javame_android
Hi,

I would like to do certain action on the Broadcast Receiver for
ACTION_POWER_CONNECTED. Can someone let me know the way of testing
this on emulator.




Thanks  Regards
Sunil

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] How can I test ACTION_POWER_CONNECTED event?

2010-04-07 Thread Mark Murphy
 I would like to do certain action on the Broadcast Receiver for
 ACTION_POWER_CONNECTED. Can someone let me know the way of testing
 this on emulator.

http://developer.android.com/guide/developing/tools/emulator.html#limitations

The emulator does not emulate determining battery charge level and AC
charging state. Hence, I believe you will need to test this on your
device.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: How can I test ACTION_POWER_CONNECTED event?

2010-04-07 Thread javame_android
Hi,

Thanks a lot for your quick response Mark.

Well, this broadcast will let me know when the Power Adapter is
attached to it. Correct me if I am wrong?

Moreover, Can we start Bluetooth automatically?


Thanks  Regards
Sunil

On Apr 7, 4:13 pm, Mark Murphy mmur...@commonsware.com wrote:
  I would like to do certain action on the Broadcast Receiver for
  ACTION_POWER_CONNECTED. Can someone let me know the way of testing
  this on emulator.

 http://developer.android.com/guide/developing/tools/emulator.html#lim...

 The emulator does not emulate determining battery charge level and AC
 charging state. Hence, I believe you will need to test this on your
 device.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Android App Developer Books:http://commonsware.com/books.html

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Re: How can I test ACTION_POWER_CONNECTED event?

2010-04-07 Thread Mark Murphy
 Well, this broadcast will let me know when the Power Adapter is
 attached to it. Correct me if I am wrong?

It should be broadcast when the device is connected to external power.
That could be an AC adapter or just USB power from a connected desktop or
notebook.

 Moreover, Can we start Bluetooth automatically?

I have no idea, sorry.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: BluetoothServerSocket: how to close correctly?

2010-04-07 Thread VovaN
Possible workaround: you can use accept with timeout as parameter.

On Apr 5, 4:25 pm, Reason reason...@gmail.com wrote:
 I hv the same problem, can anyone 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

To unsubscribe, reply using remove me as the subject.


[android-developers] How to add activity rotation animation in 2.1 when orientation changed

2010-04-07 Thread James Wang
Hi,
I wonder whether developer can customize activity rotation animation
in 2.1 when orientation changed.
Can SDK do such thing?

Best Regards

James

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Animations problem/suggestion needed

2010-04-07 Thread satish bhoyar
Hi all,
I am having a little problem with animation. I need to perform two animation
one after the other. this is for like one view is going  another is coming
in. but how i should start the other one . like after some times of the
first one started i want to start the second.

 if the user does gestures fast i m unable to control the animations 
result is very bad ..

can u guys suggest something on this..

please
help thanks
satish

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Read Vcard

2010-04-07 Thread pramod.deore
Is it possible to read data from vard in android 1.6?
If yes then how can it is possible please help me.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] EditText functionality

2010-04-07 Thread dan
Hello,I have a login view on an application with an EditText for entering a username. I can't seem to restrict the EditText to be a single line. I don't want the user to be able to press "return" on the soft keyboard and get a second line. I tried setting maxLines to 1, but that appears to control only the number of lines visible. Is there a way to limit the EditText to a single line?I am also wondering if there is a way to set the soft keyboard's "return" key to a "done" key. I am basically trying to have the user touch the username EditText, enter a username, press "done", and do the same with the password field. Here is the snippet of layout xml that has not been working for me:EditTextandroid:id="@+id/usernameVal"android:layout_width="120px"android:layout_height="wrap_content"android:textSize="18sp"android:layout_x="90px"android:layout_y="175px"android:maxLines="1"/EditText Any guidance would be appreciated!Thank you very much!Dan



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

To unsubscribe, reply using remove me as the subject.


[android-developers] Connect two emulator instances through the network

2010-04-07 Thread Yuri Morais
Hello developers,
I'm doing a distributed system using Android for my research project.
In order to test it, I have connected two emulator instances in the
same host machine.
However, I need to put these two instances in separate host machines
and make them connect through the local network (Wi-fi).

I have seen that the emulator runs behind a virtual router, so it
seems that I would have to somehow configure such virtual router, in
order to forward my requests.

Any ideas?

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] EditText functionality

2010-04-07 Thread Mark Murphy
 I have a login view on an application with an EditText for entering a
 username.  I can't seem to restrict the EditText to be a single line.  I
 don't want the user to be able to press return on the soft keyboard and
 get a second line.  I tried setting maxLines to 1, but that appears to
 control only the number of lines visible. Is there a way to limit the
 EditText to a single line?

Look at android:inputType.

 I am also wondering if there is a way to set the soft keyboard's return
 key to a done key.  I am basically trying to have the user touch the
 username EditText, enter a username, press done, and do the same with
 the password field.  Here is the snippet of layout xml that has not been
 working for me:

Your XML did not make it into the email.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Animations problem/suggestion needed

2010-04-07 Thread Mark Murphy

 Hi all,
 I am having a little problem with animation. I need to perform two
 animation
 one after the other. this is for like one view is going  another is
 coming
 in. but how i should start the other one .

Set up an AnimationListener on the first one, and start the second one in
onAnimationEnd().

 like after some times of the
 first one started i want to start the second.

Use android:startOffset or setStartOffset() for your deleay.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Read Vcard

2010-04-07 Thread Mark Murphy

 Is it possible to read data from vard in android 1.6?

Using some vCard parsing Java library, perhaps.

This program works for me, so perhaps you can extract its vCard logic:

http://code.google.com/p/vcardio/

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Send email in background

2010-04-07 Thread RMD
Thanks for all the responses.  I was just getting the phone to email
me gps data about were my phone has been.  It might be easier to have
it go to a web server and just log in to look at it.  I figured as
much about the spam possibilities I suppose it was mostly,  I wonder
if I can..., knowing that I will burn up a few hours trying it see it
work.

thanks again,
Robert

On Apr 5, 9:39 am, RMD rmdel...@gmail.com wrote:
 Is there and accepted way to send an email in the background?

 RMD

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

To unsubscribe, reply using remove me as the subject.


[android-developers] urgent-not able to display remote images in gallery

2010-04-07 Thread anushree
i am storing the imagesurl in an arrayadapter. i want to display all
the images that i get from the server in a gallery.
i am pasting my code here can anyone tell me what i am doing wrong??

public class HelloAndroid extends Activity {
/** Called when the activity is first created. */

ImageView imView;
public NodeList n_thumbnail;
public NodeList n_gphoto_id;
public NodeList n_album_id;
public ArrayListString imgurl = new ArrayListString();
public ArrayListString photoid = new ArrayListString();
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
r= new Random();
((Gallery) findViewById(R.id.gallery))
.setAdapter(new ImageAdapter(this));
try {
String s=makeHttpRequest(userid, password);
System.out.println(s);
getPhotos(s,5435451056290802193);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}

private void getPhotos(String auth,String albumid)throws IOException
{
try
{

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
System.out.println(Inside fn);
String s=http://picasaweb.google.com/data/feed/api/user/userid/
albumid/+albumid+?
fields=entry(media:group(media:thumbna...@width='72']),gphoto:id,gphoto:albumid);
URL url = new URL(s);
HttpURLConnection httpConnection = (HttpURLConnection)
url.openConnection();
httpConnection.setRequestProperty(AUTH_HEADER_KEY,
String.format(AUTH_HEADER_VALUE_TEMPLATE, auth));
Document doc = db.parse(httpConnection.getInputStream());
n_thumbnail=doc.getElementsByTagName(media:thumbnail);
n_gphoto_id=doc.getElementsByTagName(gphoto:id);
n_album_id=doc.getElementsByTagName(gphoto:albumid);
int i=0;
while(in_gphoto_id.getLength())
{
Element element = (Element)n_thumbnail.item(i);
imgurl.add(element.getAttribute(url));
//imgurl.addAll(collection)
System.out.println(element.getAttribute(url));
photoid.add(n_gphoto_id.item(i).getFirstChild().getNodeValue());
System.out.println(n_gphoto_id.item(i).getFirstChild().getNodeValue());
System.out.println(n_album_id.item(i).getFirstChild().getNodeValue());
i++;

}


BufferedReader reader = new BufferedReader(new
InputStreamReader(httpConnection.getInputStream()));
String line;
System.out.println(Inside fn);
while ((line = reader.readLine()) != null) {
System.out.println(line);
}
reader.close();





}catch(Exception e){
e.printStackTrace();

}
}

public class ImageAdapter extends BaseAdapter {
/** The parent context */
private Context myContext;
//int i=0;


/** Simple Constructor saving the 'parent' context. */
public ImageAdapter(Context c) { this.myContext = c; }

/** Returns the amount of images we have defined. */
public int getCount() { return imgurl.size();}

/* Use the array-Positions as unique IDs */
public Object getItem(int position) { return position; }
public long getItemId(int position) { return position; }

/** Returns a new ImageView to
* be displayed, depending on
* the position passed. */
public View getView(int position, View convertView, ViewGroup parent)
{
ImageView i = new ImageView(this.myContext);

try {
System.out.println(Inside image adapter );
/* Open a new URL and get the InputStream to load data from it. */
for(int j =0;jimgurl.size();j++){

URL url2= (URL) new URL(imgurl.get(0).toString());
System.out.println(url2.toString());
//HttpURLConnection httpConnection1 =
(HttpURLConnection)url2.openConnection();
URLConnection conn = url2.openConnection();
conn.connect();
InputStream is = conn.getInputStream();
BufferedInputStream bis =new BufferedInputStream(is);
Bitmap b = BitmapFactory.decodeStream(bis);
bis.close();
is.close();
imView.setImageBitmap(b);
}
} catch (IOException e) {
//i.setImageResource(R.drawable.error);
Log.e(DEBUGTAG, Remtoe Image Exception, e);
}

/* Image should be scaled as width/height are set. */
i.setScaleType(ImageView.ScaleType.FIT_CENTER);
/* Set the Width/Height of the ImageView. */
i.setLayoutParams(new Gallery.LayoutParams(150, 150));
return i;
}
}


i can see the image url's in the logcat portion however i cannot see
anything on the emulator screen.that is the gallery code isn't
working.
can anyone please help me out here.its urgent as i need to submit my
project at the earliest
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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] EditText functionality

2010-04-07 Thread Nandan .
yaa you can do this using coding in java

EditText1.setSingleLine(true);

Regards**

Bhavesh kumar
**

On Wed, Apr 7, 2010 at 5:55 PM, Mark Murphy mmur...@commonsware.com wrote:

  I have a login view on an application with an EditText for entering a
  username.  I can't seem to restrict the EditText to be a single line.  I
  don't want the user to be able to press return on the soft keyboard and
  get a second line.  I tried setting maxLines to 1, but that appears to
  control only the number of lines visible. Is there a way to limit the
  EditText to a single line?

 Look at android:inputType.

  I am also wondering if there is a way to set the soft keyboard's return
  key to a done key.  I am basically trying to have the user touch the
  username EditText, enter a username, press done, and do the same with
  the password field.  Here is the snippet of layout xml that has not been
  working for me:

 Your XML did not make it into the email.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com
 Android App Developer Books: http://commonsware.com/books.html


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

 To unsubscribe, reply using remove me as the subject.




-- 
B!-!/-\\/!=$!-!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 save both Image and Text with SQLiteDatabase? And how to binding this images to a simpleCursorAdapter?

2010-04-07 Thread AJ
Hi David,
Sorry I don't have any such project/source.
You can check the following link. It may help you.

http://groups.google.com/group/android-developers/browse_thread/thread/0ecad32a314c/8f17cf4ea95964e0?lnk=raot

Thanks,
AJ

On Apr 7, 1:54 pm, David android.and...@gmail.com wrote:
 Hi AJ,

 I just development the project with SDK 2.1, and I found the bookmark 
 in android browser can match my requirement, but is there any source project 
 can run on the emulator?

 The other question, if user click the item on the listview, the app 
 will create a new Activity to show the details of this item, I hope user can 
 use finger to slip right/left to review next/previous item page?

 Thanks in advance.

 Best Regards,
 D.Y

 -邮件原件-
 发件人: android-developers@googlegroups.com 
 [mailto:android-develop...@googlegroups.com] 代表 AJ
 发送时间: 2010年4月7日 18:34
 收件人: Android Developers
 主题: [android-developers] Re: How to save both Image and Text with 
 SQLiteDatabase? And how to binding this images to a simpleCursorAdapter?

 Hi David
 There in Bookmarks [Android Browser] same thing has been done. You can
 refer that.  You can find the code as well.

 Thanks,
 AJ

 On Apr 7, 1:13 pm, David android.and...@gmail.com wrote:

  Dear All,

   I want get both Image and Text from the sqLite database and show
  them on the ListView,  at present, I can save the text with sqLite well, but
  failed to save the imges.

   Any sample code will be grateful.

  Best Regards,

  D.Y

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

 To unsubscribe, reply using remove me as the subject.

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

2010-04-07 Thread Brill Pappin
Thanks. I may try and use it or rewrite it for branding.

Actually, I bet if you branded it like the Android Market, google
would notice :)
They would ask you to take it down but at least you'd get their
attention!

- Brill

On Apr 6, 11:59 am, Rob r...@hobbyistsoftware.com wrote:
 you can link to an app with my new web-service

 -I know, crazy that I have to build such a thing, but until google fix  
 this, you are welcome to use it.

 http://and-download.hobbyistsoftware.com

 this is an example 
 linkhttp://and-download.hobbyistsoftware.com/android/download?name=VLC 
 Remoteid=com.hobbyistsoftware.android.vlcremote

 if you click from your device, it works like a market:// link. If you  
 click from the desktop - the site offers to send an email to your device.

 cheers,

 Rob



 On Mon, 05 Apr 2010 20:55:24 +0100, Brill Pappin br...@pappin.ca wrote:
  It's downright crazy. I don't think it's all the Android Market
  department's fault, as they relay on Google Checkout to handle
  payment, but the checkout folks will not allow a Canadian address or
  account information as a seller (I was able to buy my N1 through the
  market without any problem though).

  It may be that nobody is driving at Android Market because we *still*
  can do something as simple as link to an app.

  Anyway, somebody at Android Market needs to do some Google Checkout
  ass kicking ASAP.

  - Brill

  On Apr 5, 2:14 pm, Kevin Duffey andjar...@gmail.com wrote:
  You still can't? That is crazy.. wonder why... one thing I still don't  
  get
  is why there is no built in conversion of money. If I can buy a UK app,
  can't it list it in USD or at least show both so I can know how much it  
  will
  cost.. and then allow me to buy it? I've not bought an app yet, just  
  from
  what I've read it sounds like that is an issue. If not, I retract this
  statement.

  On Mon, Apr 5, 2010 at 7:06 AM, Brill Pappin br...@pappin.ca wrote:
   Does anyone have any idea when Google plans to allow us Canadian
   developers to actually create accounts for selling apps in the Market?

   I am completely flabbergasted that I can't set that up. Major FAIL.

   - Brill Pappin

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

  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
    
  cr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

   To unsubscribe, reply using remove me as the subject.

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

2010-04-07 Thread Brill Pappin
Hi Scott!

Yah, it has, Startup Weekend Toronto I think, but I see posts from you
now and then :)

I am *very* amazed at the fact that I can't sell anything in the
Market.
Based on how long this and other issues (link linking) are taking to
resolve I'm starting to question Googles commitment to doing it, as
the linking issue at least shouldn't be all that hard to fix.
Not only are things not getting handled, but as far as I can see,
Google is being very silent on the issue... not even any minimal Apple
style leaks!

I also own an iPhone so I've been comparing the day to day usability
of the Nexus One and checking out how to write apps for it.
Very first thing I did was create an iPhone keyboard layout because
the default Android one was giving me trouble :)

http://and-download.hobbyistsoftware.com/android/download?name=iPhone%20Keyboard%20Emulatorid=com.sixgreen.android.softkeyboard

Its free now because its an EA (early access) build, but if I am going
to keep working on it, it would be nice to make a little money to
support its development.

- Brill


On Apr 6, 12:09 pm, Scott Elcomb pse...@gmail.com wrote:
 On Mon, Apr 5, 2010 at 10:06 AM, Brill Pappin br...@pappin.ca wrote:
  Does anyone have any idea when Google plans to allow us Canadian
  developers to actually create accounts for selling apps in the Market?

  I am completely flabbergasted that I can't set that up. Major FAIL.

 Hey Brill,

 Long time no see!  I have to completely agree with you on the FAIL --
 this has been outstanding for quite some time.

 I was under the impression that once we were able to purchase apps
 from the market we'd also be able to sell; I paid my fee right away
 and became a registered Android developer...  We can offer free apps
 but still can't sell.

 I suppose it was an error on my part making that particular connection
 between market and checkout, but I'm holding out and hoping this will
 be resolved in the near term.  Lord knows there is a large number of
 developers in Canada just waiting to make a splash.  :-)

 --
   Scott Elcomb
  http://www.psema4.com/  @psema4

   Member of the Pirate Party of Canada
  http://www.pirateparty.ca/

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

2010-04-07 Thread arnouf
Oki thanks for your confirmation.

BR

On Apr 7, 9:31 am, Kumar Bibek coomar@gmail.com wrote:
 As Dianne had mentioned in that post, as of now, you cannot do it.

 No public API is available

 Thanks and Regards,
 Kumar Bibek

 On Apr 6, 2:30 pm,arnoufarnaud.far...@gmail.com wrote:



  Hi all,

  I'm trying to know the application size (only the code size). I found
  some topics related, but nothing is working.
  The last class provided by Android, PackageStats seems to give
  information about size : code size, cache size...
  But I get always a 0.

  Some guys talked about this issue here 
  :http://groups.google.com/group/android-developers/browse_thread/threa...
  but no solution has been provided.

  Where is the problem ? What are concerned Android version ?

  Thanks by advance for your feedback.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] connecting to internet via app

2010-04-07 Thread Ashish Mahamuni
Hi

Is there any way to start/enable the internet through Wifi/GPRS/EDGE/UMTS
from my android application??

Thanks and Regards.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Urgent : GPS timeout in android

2010-04-07 Thread Brill Pappin
I'm doing that by using a Timer as a watchdog.
It wakes periodically and checks to see if we have a fix yet.
If it doesn't over a specified period of time, it can set a flag or
generate an event to let the rest of the app know.

- Brill Pappin

On Apr 6, 11:34 pm, Farha Ansari farha45ans...@gmail.com wrote:
 Hi,

 In blackberry, we use a timeout to get the location, so that if it
 doesnt retun location in that much time period, we get to know. But in
 Android, there is no concept of timeout, can anyone please tell the
 alternative, that we can find out that after this much time there is
 no location update from GPS.

 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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Eclipse setup - how can I run the Email app from the plattform source

2010-04-07 Thread Brill Pappin
If your rewriting the email app, I'd be willing to help... coming from
the iPhone, I'm not all that impressed with it on the Android and
would like a better alternative.

- Brill

On Apr 6, 9:17 pm, patbenatar patbena...@gmail.com wrote:
 I'm also running into issues of missing dependencies and unresolved
 resources [R.id and stuff] when trying to build some of the open-
 source stock Android apps [like Clock and Email]. Help would be
 great!! Have any of you gotten these apps to build and run on your
 device?

 On Apr 5, 1:19 pm, Ralph Bergmann ra...@dasralph.de wrote:



  Hello,

  I set up my Eclipse as it is described 
  onhttp://source.android.com/using-eclipse.

  But how can I run the Email app on my device? An run as... on the
  source folder miss the Android simulator. When I use the Email sources
  to build a Android project, it miss a lot of dependencies.

  Ralph

  --

  Ralph Bergmann

  www              http://www.dasralph.de/
  mail             ra...@dasralph.de
  skype            dasralph

  xing            http://www.xing.com/profile/Ralph_Bergmann3
  linkedin        http://www.linkedin.com/in/ralphbergmann
  facebook        http://www.facebook.com/dasralph

  pgp key id       30C4ECD8
  pgp fingerprint  C6E4 3435 7CC8 5008 54EC 1C86 4176 7F75 30C4 ECD8

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: urgent-not able to display remote images in gallery

2010-04-07 Thread AJ
Hi anushree,

I have done something like before. But right now I am not able to find
that code. If I am able to find it out i will paste the code.


Thanks,
AJ

On Apr 7, 3:35 pm, anushree godbole.anush...@gmail.com wrote:
 i am storing the imagesurl in an arrayadapter. i want to display all
 the images that i get from the server in a gallery.
 i am pasting my code here can anyone tell me what i am doing wrong??

 public class HelloAndroid extends Activity {
 /** Called when the activity is first created. */

 ImageView imView;
 public NodeList n_thumbnail;
 public NodeList n_gphoto_id;
 public NodeList n_album_id;
 public ArrayListString imgurl = new ArrayListString();
 public ArrayListString photoid = new ArrayListString();
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.main);
 r= new Random();
 ((Gallery) findViewById(R.id.gallery))
 .setAdapter(new ImageAdapter(this));
 try {
 String s=makeHttpRequest(userid, password);
 System.out.println(s);
 getPhotos(s,5435451056290802193);} catch (IOException e) {

 // TODO Auto-generated catch block
 e.printStackTrace();

 }
 }

 private void getPhotos(String auth,String albumid)throws IOException
 {
 try
 {

 DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
 DocumentBuilder db = dbf.newDocumentBuilder();
 System.out.println(Inside fn);
 String s=http://picasaweb.google.com/data/feed/api/user/userid/
 albumid/+albumid+?
 fields=entry(media:group(media:thumbna...@width='72']),gphoto:id,gphoto:albumid);
 URL url = new URL(s);
 HttpURLConnection httpConnection = (HttpURLConnection)
 url.openConnection();
 httpConnection.setRequestProperty(AUTH_HEADER_KEY,
 String.format(AUTH_HEADER_VALUE_TEMPLATE, auth));
 Document doc = db.parse(httpConnection.getInputStream());
 n_thumbnail=doc.getElementsByTagName(media:thumbnail);
 n_gphoto_id=doc.getElementsByTagName(gphoto:id);
 n_album_id=doc.getElementsByTagName(gphoto:albumid);
 int i=0;
 while(in_gphoto_id.getLength())
 {
 Element element = (Element)n_thumbnail.item(i);
 imgurl.add(element.getAttribute(url));
 //imgurl.addAll(collection)
 System.out.println(element.getAttribute(url));
 photoid.add(n_gphoto_id.item(i).getFirstChild().getNodeValue());
 System.out.println(n_gphoto_id.item(i).getFirstChild().getNodeValue());
 System.out.println(n_album_id.item(i).getFirstChild().getNodeValue());
 i++;

 }

 BufferedReader reader = new BufferedReader(new
 InputStreamReader(httpConnection.getInputStream()));
 String line;
 System.out.println(Inside fn);
 while ((line = reader.readLine()) != null) {
 System.out.println(line);}

 reader.close();

 }catch(Exception e){

 e.printStackTrace();

 }
 }

 public class ImageAdapter extends BaseAdapter {
 /** The parent context */
 private Context myContext;
 //int i=0;

 /** Simple Constructor saving the 'parent' context. */
 public ImageAdapter(Context c) { this.myContext = c; }

 /** Returns the amount of images we have defined. */
 public int getCount() { return imgurl.size();}

 /* Use the array-Positions as unique IDs */
 public Object getItem(int position) { return position; }
 public long getItemId(int position) { return position; }

 /** Returns a new ImageView to
 * be displayed, depending on
 * the position passed. */
 public View getView(int position, View convertView, ViewGroup parent)
 {
 ImageView i = new ImageView(this.myContext);

 try {
 System.out.println(Inside image adapter );
 /* Open a new URL and get the InputStream to load data from it. */
 for(int j =0;jimgurl.size();j++){

 URL url2= (URL) new URL(imgurl.get(0).toString());
 System.out.println(url2.toString());
 //HttpURLConnection httpConnection1 =
 (HttpURLConnection)url2.openConnection();
 URLConnection conn = url2.openConnection();
 conn.connect();
 InputStream is = conn.getInputStream();
 BufferedInputStream bis =new BufferedInputStream(is);
 Bitmap b = BitmapFactory.decodeStream(bis);
 bis.close();
 is.close();
 imView.setImageBitmap(b);}
 } catch (IOException e) {

 //i.setImageResource(R.drawable.error);
 Log.e(DEBUGTAG, Remtoe Image Exception, e);

 }

 /* Image should be scaled as width/height are set. */
 i.setScaleType(ImageView.ScaleType.FIT_CENTER);
 /* Set the Width/Height of the ImageView. */
 i.setLayoutParams(new Gallery.LayoutParams(150, 150));
 return i;

 }
 }

 i can see the image url's in the logcat portion however i cannot see
 anything on the emulator screen.that is the gallery code isn't
 working.
 can anyone please help me out here.its urgent as i need to submit my
 project at the earliest
 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

To 

[android-developers] Re: Unable to edit the SyncAdapter Contacts

2010-04-07 Thread piyu

Hi Jegadeesam M,

  No only photo and name details you can edit, For that you can create
your own edit activity with same intent filter.

On Apr 5, 9:03 pm, Jegadeesan M jeg...@gmail.com wrote:
 Hi All ,

 Actually i tried the SampleSyncAdapter (Sample Sync Adapter examples),
 its working fine for me. but i am not able to edit/delete the syncedcontacts. 
  Is this possible to edit thosecontacts? please let me
 know.

 Thanks
 Jegadeesan M

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: connecting to internet via app

2010-04-07 Thread theSmith
What do you mean enable? If you mean bypass the permission, then no.
But if you application has the internet permission then you can
connect several different ways.  Either using the apache http library
or I believe you can also use sockets (but I never have).  Using the
apache library I know it doesn't matter which type of connection the
device has, so long as it has a connection.


--
Creator of My College Life
http://mycollegelife.org

On Apr 7, 9:15 am, Ashish Mahamuni ashish531...@gmail.com wrote:
 Hi

 Is there any way to start/enable the internet through Wifi/GPRS/EDGE/UMTS
 from my android application??

 Thanks and Regards.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] AsyncTask : java.util.concurrent.RejectedExecutionException

2010-04-07 Thread arnouf
Hello,

I'm trying to launch a lot of remote connection retrieve picture on a
server. To do this, I use AsyncTask.

This pics are displayed in a listview using adapter. If I implement
this in my adapter, images are retrieved but the display is bad
(problem with index or something like that).
If I try to retrieve image when I build my object list (contained in
my listview), I get the exception
04-07 13:35:57.744: ERROR/AndroidRuntime(4132): Caused by:
java.util.concurrent.RejectedExecutionException
04-07 13:35:57.744: ERROR/AndroidRuntime(4132): at
java.util.concurrent.ThreadPoolExecutor
$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1876)
04-07 13:35:57.744: ERROR/AndroidRuntime(4132): at
java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:
774)
04-07 13:35:57.744: ERROR/AndroidRuntime(4132): at
java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:
1295)
04-07 13:35:57.744: ERROR/AndroidRuntime(4132): at
android.os.AsyncTask.execute(AsyncTask.java:394)

What is this exception ? Why I can launch multiple asynctask in my
listview (giving to me a bad result) and not in a simple object
without having this issue ?

Thanks for your explanations.


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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: How to save both Image and Text with SQLiteDatabase? And how to binding this images to a simpleCursorAdapter?

2010-04-07 Thread theSmith
David,

Why would you want to save the image in the sqLite database?  I feel
like you are using up an unnessary amount of valuable storage space on
the device.  Wouldn't a better solution be to save the image to the SD
card and only save the location of the image to the database?

---
Creator of My College Life
http://mycollegelife.org

On Apr 7, 9:02 am, AJ ajeet.invinci...@gmail.com wrote:
 Hi David,
 Sorry I don't have any such project/source.
 You can check the following link. It may help you.

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

 Thanks,
 AJ

 On Apr 7, 1:54 pm, David android.and...@gmail.com wrote:

  Hi AJ,

  I just development the project with SDK 2.1, and I found the 
  bookmark in android browser can match my requirement, but is there any 
  source project can run on the emulator?

  The other question, if user click the item on the listview, the app 
  will create a new Activity to show the details of this item, I hope user 
  can use finger to slip right/left to review next/previous item page?

  Thanks in advance.

  Best Regards,
  D.Y

  -邮件原件-
  发件人: android-developers@googlegroups.com 
  [mailto:android-develop...@googlegroups.com] 代表 AJ
  发送时间: 2010年4月7日 18:34
  收件人: Android Developers
  主题: [android-developers] Re: How to save both Image and Text with 
  SQLiteDatabase? And how to binding this images to a simpleCursorAdapter?

  Hi David
  There in Bookmarks [Android Browser] same thing has been done. You can
  refer that.  You can find the code as well.

  Thanks,
  AJ

  On Apr 7, 1:13 pm, David android.and...@gmail.com wrote:

   Dear All,

I want get both Image and Text from the sqLite database and show
   them on the ListView,  at present, I can save the text with sqLite well, 
   but
   failed to save the imges.

Any sample code will be grateful.

   Best Regards,

   D.Y

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

  To unsubscribe, reply using remove me as the subject.

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

2010-04-07 Thread Károly Holczhauser
Hi all !

Guys we need some help with the following task:

 My problem, I would like to append newer element to the list, but on
runtime. So if the user click on the APPEND button, a new element should
be arrive at the end of the list. Can anybody give some solution or some
tutorial for it ?

Thank you : Károly from Hungary

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Selling apps from Canada in the Market?

2010-04-07 Thread gosh
I wouldn't hold your breathe there Brill.

If you do a search in this group on thread titled 'Countries for
selling priced applications in Android Market' you'll see that many
others 'were' asking this question back in August 2009 (and elsewhere
in this group). Google allowed nine countries to sell apps from Sep
2009 and nothing has changed in the 7 months since then.
My interest then 'was' in selling Android apps from Australia.

I approached an Australian Senator ('for the Digital Economy') to try
and see what was happening at Google on this issue (since they don't
answer such questions from mere mortals, or even from their own
collaborating developers) - but the answer the Senator got back with
was simple and the same: 'we are working on more countries'. Tim
O'Reilly got me an avenue to someone a bit further up the Google food
chain ... same simple non-committal answer came back to us: 'we are
working on more countries'.

If you are looking for a professional response to this sort of a
question, from a global company that knows something about application
developer relations in an international context, I recommend that you
look at what Sun/Oracle tell their International enquirers wrt the
same issue at the 'Java Shop', on the web-page here 'Java Warehouse
Developer Center - Supported Locations':

http://java.sun.com/warehouse/overview/locations.jsp

...the issues they cite there regarding seller countries are likely to
be the very same issues that Goggle would be facing with CheckOut and
Apps, iff they actually do intend to include more countries.

The fact the Google can't get a page of information like that to their
own enquiring Android developers, suggests to me that either: 1). They
are not an Internationally competent company when it comes to
collaborating with grass-roots developers; or, 2). They have no
intention of allowing developers from further countries to sell
Android apps (now that they have a critical mass of apps to compete
with iPhone).

Since you (and I) are not from the favored 9 countries, and since 7
months have passed, if you want to make some money from your Android
apps, you should release it for 'free' and simply embed advertising in
it ... as many other developers in this predicament are already doing.
Its also a 'great value' move for Android phone users.

(Btw if you look at Tim OReilly's recent blog on 'The State of the
Internet Operating System' - 
http://radar.oreilly.com/2010/03/state-of-internet-operating-system.html
- a long but very good and insightful read, you will see that while he
cites iPhone, iPad and the App Store, he doesn't cite Android Market
in a 'selling apps' future (i.e. under the heading 'Access Control'),
but he does mention Google re Admob under the 'Advertising' aspect of
the Internet Operating System).

Cheers
Steve

On Apr 6, 12:06 am, Brill Pappin br...@pappin.ca wrote:
 Does anyone have any idea when Google plans to allow us Canadian
 developers to actually create accounts for selling apps in the Market?

 I am completely flabbergasted that I can't set that up. Major FAIL.

 - Brill Pappin

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


Re: [android-developers] Re: ListView/Adapter IllegalStateException

2010-04-07 Thread Jerry Fan
I have a fix for this. Just set the visibility of ur ListView to Gone during
update and back to visible after update. By doing so, u can avoid the
inconsistency of ur adapter and listView item count.

On Wed, Mar 31, 2010 at 4:35 PM, ionel ionelt2...@gmail.com wrote:

 I am calling notifyDataSetChanged() in update method

 On Mar 30, 11:36 pm, social hub shubem...@gmail.com wrote:
  prob u need to call notifyDataSetChanged if data is changed. See if that
  helps
 
  On Tue, Mar 30, 2010 at 3:15 PM, ionel ionelt2...@gmail.com wrote:
   I've implemented a custom ListView and  Adapter, and sometimes I
   receive IllegalStateException exception:” ERROR/AndroidRuntime(3575):
   java.lang.IllegalStateException: The content of the adapter has
   changed but ListView did not receive a notification. Make sure the
   content of your adapter is not modified from a background thread, but
   only from the UI thread.”
 
   Here is some code example:
 
   public interface BuddyChangeListener {
 
   void onChange(ListBuddy buddys);
 
   }
 
   public class BuddyListView extends ListView implements
   BuddyChangeListener
 
 public void onChange(ListBuddy Buddy) {
   MyActivity.instance.handler.post(new Runnable() {
   public void run() {
   if (((BuddyAdapter) refreshListView.getAdapter()) !
   = null) {
   ((BuddyAdapter)
   refreshListView.getAdapter()).update(Buddy);
   }
   }
   });
   }
   public class BuddyAdapter extends BaseAdapter {
 
   private ListBuddy   buddyList;
 
   public BuddyAdapter (Context context, ListBuddy buddyList) {
   this.buddyList= buddyList;
   }
 
   public void update(ListBuddy buddyList) {
   this.buddyList= buddyList;
   this.notifyDataSetChanged();
   }
   }
 
   Every time when the content of the list need to be updated I run from
   onChange method and I use a handler to change the adapter content,to
   update the content from UI thread.
 
   Can someone to tell me if I have made something wrong on update ?
 
   Thanks.
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
   To unsubscribe from this group, send email to android-developers+
   unsubscribegooglegroups.com or reply to this email with the words
 REMOVE
   ME as the subject.

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] IllegalStateException after ListView's adapter has changed

2010-04-07 Thread Jerry Fan
I have a fix for this. Just set the visibility of ur ListView to Gone during
update and back to visible after update. By doing so, u can avoid the
inconsistency of ur adapter and listView item count.

On Mon, Feb 22, 2010 at 3:31 PM, Jayesh Salvi jayeshsa...@gmail.com wrote:

 Hi,

 This is regarding the exception:  java.lang.IllegalStateException: The
 content of the adapter has changed but ListView did not receive a
 notification. - seen on Android 1.6+

 This problem has been discussed in the past [1][2][3][4], and I have
 followed all the solutions suggested in those threads. However, few of my
 users still hit this crash. So I did some source code lookup and have some
 questions.

 Here is the description of what my app is doing:

 I use a ListView and populate it with an adapter. The adapter is a direct
 derivative of BaseAdapter. I populate the list progressively. As the items
 are downloaded from network they get added to the adapter. The fetching of
 items is done in doInBackground() and when they are ready to get added to
 the adapter I invoke publishProgress(), in the onProgressUpdate() method I
 add new items one-by-one to the adapter. As soon as I add the item to the
 adapter, I invoke notifyDataSetChanged().

 I believe this is as per the best practices that Android developers have
 suggested in above mentioned threads.

 Despite this I get crash reports with this exception. They are rare, but
 not as rare as ignorable. I myself have hit this crash on my phone/emulator
 only 1-2 times in last couple of months. The user reported crashes are
 roughly 1 to 3 per day (approx. at least 600 users use the app per day) (A
 minority of users may be hitting this crash over and over again)
 . This leads me to believe that my adapter update logic is mostly right,
 but not full proof.

 So I dug into the source code of ListView and BaseAdapter.

 The exception is thrown because ListView's mItemCount doesn't match the
 underlying adapter's item count. It happens in layoutChildren() [ListView.java
 line 
 1432http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/widget/ListView.java;h=7c8151e65132a91aecadd2048fe205bd1c6768a9;hb=HEAD#l1431
 ]
 
  } else if (mItemCount != mAdapter.getCount()) {
 throw new IllegalStateException(The content of the adapter
 has changed but 
 + ListView did not receive a notification. Make
 sure the content of 
 

 So in order to avoid this from happening mItemCount should be updated as
 soon as the adapter has changed its content. So I searched for locations in
 the code where mItemCount is updated. I found two locations doing that. In
 setAdapter() [ListView.java 
 431http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/widget/ListView.java;h=7c8151e65132a91aecadd2048fe205bd1c6768a9;hb=HEAD#l431]
 and in onMeasure() [ListView.java 
 1033http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/widget/ListView.java;h=7c8151e65132a91aecadd2048fe205bd1c6768a9;hb=HEAD#l1033].
 Consequently, if I am updating the adapter then either setAdapter() or
 onMeasure() should be executed before the comparision in layoutChildren()
 takes place, otherwise the exception will be thrown.

 My question is, is it possible that my code in onProgressUpdate() that
 appends to adapter can get executed between onMeasure() and layoutChildren()
 of the ListView? AFAIU, all three of these methods (onProgressUpdate,
 onMeasure, layoutChildren) run on the same GUI thread.

 I call notifyDataSetChanged immediately after I add to adapter in
 onProgressUpdate(). I looked into its source code. It calls methods on
 DataSetObservable and DataSetObserver. I couldn't find how it could directly
 lead to the updating of mItemCount of the ListView, clearly I don't know
 much of the internal layout code.

 Please let me know what you think. I am trying to understand this mechanism
 as thoroughly as possible.

 Thanks in advance.

 Links:
 [1]
 http://www.mail-archive.com/android-developers@googlegroups.com/msg60355.html
 [2]
 http://www.mail-archive.com/android-developers@googlegroups.com/msg65814.html
 [3]
 http://groups.google.com/group/android-developers/browse_thread/thread/77722caa85f87697
 [4]
 http://groups.google.com/group/android-developers/browse_thread/thread/a451221261cb6a93/2ab5bea015c38437?lnk=gstq=For+Google+about+BaseAdapter+class#2ab5bea015c38437
 [5] ListView.java source code I refered to:
 http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/widget/ListView.java;h=7c8151e65132a91aecadd2048fe205bd1c6768a9;hb=HEAD

 --
 Jayesh

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

Re: [android-developers] AsyncTask : java.util.concurrent.RejectedExecutionException

2010-04-07 Thread Mark Murphy
 What is this exception ?

The second link in a Google search for RejectedExecutionException turns up:

http://pveentjer.wordpress.com/2008/02/06/are-you-dealing-with-the-rejectedexecutionexception/

Your problem is probably the second on that list -- you have tried to
start too many AsyncTasks. AsyncTask uses a limited-length BlockingQueue
for jobs waiting for a thread in the thread pool to free up, and it will
throw that exception when you exceed the available number of slots in the
queue.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Listview append with new element on RUNTIME

2010-04-07 Thread Mark Murphy

 Hi all !

 Guys we need some help with the following task:

  My problem, I would like to append newer element to the list, but on
 runtime. So if the user click on the APPEND button, a new element should
 be arrive at the end of the list. Can anybody give some solution or some
 tutorial for it ?

You should read up on ListAdapter. Once you choose your adapter class
(ArrayAdapter, CursorAdapter, etc.), that will determine how you will
handle your APPEND button.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Multiple Activity History Management

2010-04-07 Thread mr.winky
Thanks Dianne, thats exactly what I was looking for.

On Apr 6, 11:14 am, Dianne Hackborn hack...@android.com wrote:
 If you just want to these to live as separate tasks, use
 android:taskAffinity to set them to be different things; use  for no task
 affinity, or for example :other or whatever text you want for a separate
 real task.  (Note the : prefix is important since that puts you in a
 namespace private to your package, rather than a global namespace that other
 applications may also use.)





 On Mon, Apr 5, 2010 at 7:41 PM, mr.winky mr0wi...@gmail.com wrote:
  I've searched through the postings and believe this is a unique case
  where it is appropriate to ask for feedback. Take the following
  example:

  Program contains 3 activities : A, B, C
  and one service: S

  The launch of the activities is as follows:

  B-C
  S-A

  Therefore activity B and C are part of a separate execution than what
  the service launches (activity A).

  The problem:

  User launches B from the launcher, navigates to C and presses the
  'home' key (the history stack is now B-C). Sometime in the future the
  service launches activity A, and upon exiting activity A the user is
  now presented with activity C which is not the desired intent.

  Using no history is not an option on B/C because I want the user to
  be able to navigate 'back' from C to B. My question to the forum is
  how to setup the project such that when A is launched, the activity
  stack is always A, and not B-C-A or B-A.

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

  To unsubscribe, reply using remove me as the subject.

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

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

 - Show quoted text -

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


[android-developers] handling rotation...

2010-04-07 Thread sdphil
hi, i have a question regarding rotation.

I am looking into using:

android:configChanges=orientation|keyboardHidden

in my manifest file for an activity in my application.  that of course
is accompanied with --

@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
setContentView(R.layout.myContentView);
}

I am doing this for a layout that has a landscape version of that
layout as well (i.e. I have a myContentView.xml in layout-land
directory).  The issue is that when I do this, sometimes it appears as
though it doesn't render properly when going to landscape mode.  I
have two edit boxes on that page that sometimes don't appear.  Usually
it works, but sometimes they just disappear (or are off screen?).
Anyway, I can't figure out why they don't get rendered.  Any ideas on
what i need to be doing here to make them render consistently?

My follow up question is why shouldn't I just do this for every
activity (assuming it worked :-)?  Then I could avoid much of the
complexity surrounding activity lifecycle (I saw some issues regarding
menus, but it seems like that could be overcome).

tia.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: StartActivity(ForResult) at the creation of Main activity

2010-04-07 Thread Will
Hey

On 3 avr, 04:50, Lance Nanek lna...@gmail.com wrote:
 If you are using an older version of Android then it could be this
 bug, which has an easy 
 workaround:http://groups.google.com/group/android-developers/browse_thread/threa...

Thanks a lot, I'll try this asap !
--
Will

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

To unsubscribe, reply using remove me as the subject.


[android-developers] sdcard file permissions for system user

2010-04-07 Thread Niraj
When I insert SD card in my android device,
/sdcard directory has permissions: d---rwxr-x with “system” as owner.

d---rwxr-x  system   sdcard_rw  2008-08-23   13:17
sdcard

Here, the owner is system and doesn't have any permissions.

When I tried to write a file from android application with system as
user, it fails to write as system doesn't have any permission.
The application needs to be with system user.

Is there any solution to this problem?
Can we change the permission of the /sdcard directory?

I have added WRITE_EXTERNAL_STORAGE permission in my manifest file.

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Re: Getting the url of an http response

2010-04-07 Thread mike

On 04/07/2010 03:56 AM, jw wrote:

Well, I'm able to set the response url in the web service, but it's
the parameters I'm interested in... For now I've just set the response
URL to www.google.com and the web service adds my parameter which
gives www.google.com/?x=1y=2... Since this page is not available, I
get the 404 status code, not 3xx...
   


Er, um, 404 says that it's not there and that it doesn't know
where it might be, so it's no surprise there's not a Location:
header.

I suspect that you're not describing the entire process
adequately for us to figure out what's going on. There is
no such thing as a response url and a web service isn't
especially well defined. Putting these things in terms of what
HTTP 1.1 the protocol does would make it easier.

Mike, you're not conflating xml/json in the content by any chance?


Any help?

/J

On Apr 7, 11:41 am, mikeenervat...@gmail.com  wrote:
   

On 04/07/2010 02:30 AM, jw wrote:

 

Hi, thanks for the idea, but it didn't help.
   
 

response.getHeaders(Location)[0] gives me null. I've also tried to
print all header keys and vaules, and none of them are Location.
   

Are you sure you're actually getting a 3xx code back from the
http response? A 301 without a Location header would be bogus.

You might try using a network sniffer like ethereal to see the
actual network traffic going by too.

Mike

 

Any other ideas?
   
 

/J
   
 

On Apr 7, 11:12 am, mikeenervat...@gmail.comwrote:
   
 

On 04/07/2010 12:40 AM, jw wrote:
 
 

Hi all,
   
 

thanks for your time and sorry that I wasn't clear enough.
   
 

I'm making a http post request to a web page which redirects me to
different urls depending on the accuracy of my parameters sent in the
request. This means that if I do it correct, I'll get redirected to
for examplewww.google.comwitha querystring that I need to get
(www.google.com?x=1y=2). Maybe that's not the response url, but I
don't now how to describe it. It's not the same as the request url
anyway.
   
 

I'm able to get the response status code from the repsonse object,
which is ok, and I'm also able to get the html (content) of the
response. I just need to know what url I was redirected to. Does this
help you? I'm very thankful for all help
   
 

sounds like you want to use HttpResponse.getHeaders(Location)
 
 

Mike, it returns an array, but there should only be one if it redirected
 
 

/J
   
 

On Apr 7, 5:31 am, Kevin Duffeyandjar...@gmail.com  wrote:
   
 

There isn't a response URL that is any different than the request URL. It's
not as if the server appends a bunch of stuff to the URL you submit the
request to unless it redirects/forwards to another URL.. in this case, the
server would append to the URL you requested, redirecting you... but even if
it did this, your response would indicate a 3xx redirect and the Location
header, as Frank says above, would contain the new URL you should go to. If
you did get a 301/2 back, you'd have to actually make another request
yourself.
 
 

So not sure as the other guys say, what URL you are talking about
 
 

On Tue, Apr 6, 2010 at 7:59 PM, Frank Weissfewe...@gmail.com  wrote:
 
 

I don't know what response URL means. The only URLs in an HTTP response
that come to mind are: 1) the Location response header for a 301/302
status code, 2) some string in the response data (such as an HTML anchor
element) that you want to interpret as a URL.
   
 

On Tue, Apr 6, 2010 at 1:59 PM, jwjwilner...@gmail.com  wrote:
   
 

Hi all,
 
 

I have a problem. I'm doing a http post request to a URL like this;
 
 

DefaultHttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(url);
HttpResponse response = httpclient.execute(httppost);
 
 

I am able to get the response content (html in this case) but I would
like to be able to get the url of the response. Is there a way? Or
could i use some other technique to do the post request and retrieve
the url?
 
 

The repsonse url is lkewww.url.com?x=1y=2http://www.url.com/?x=1y=2and 
would like to get the
parameter values, I've tried to use the getParams().getParameter() on
the HttpResponse object without any success. So if anyone has a
solution to get the parameters without getting the url, that's ok :)
 
 

Thanks in advance.
 
 

/J
 
 

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

[android-developers] sharing data between activities.

2010-04-07 Thread poohtbear
Hi.
I was playing a bit with adapters cursors and activities.
Let's assume i have a cursor containing a query I've made (it doesn't
matter if it's to DB or content provider).
Now lets assume i bind some of the data (first two rows) to a list
activity. Every click on one of those items should open a new list
activity (i pass on the cursor index in the activity bundle).
Now the question is, which sharing method will be most efficient and
right from code point of view ?

1. I thought of trying to send the cursor object in the intent itself
(hoping it implemented runnable) but I'm not so sure it's that
efficient since the query may contain many rows which will need to be
parceled, and i the other intents uses only a few (say 4-5 columns of
each row) it's a real waste.

2. Thought of trying to create the array list for my other list screen
adapter and serialize it to the intent (again use serialize and intent
to pass on the data) but again i fear for efficiency penalty.

3. my last solution was to use static cursor member in my first
activity, with package permission, it will work and be relatively
efficient, but I'm not so sure regarding  memory efficiency and code
structure, i'm not fond of using static variables in any case.

Is there another sharing method that i don't know off, if two
activities share the same process and application, then they also
share memory space, then it should be easy to pass variables from one
to another, the question is what's the easiest way without
serializing ?

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: AsyncTask : java.util.concurrent.RejectedExecutionException

2010-04-07 Thread arnouf
Ok thanks Mark.
When you have a lot of Image to load this is a big limitation.
Strangely, we don't have this situation If I call the same number of
element inside a listview...But another issue appears : images are not
placed on good lines :(



On Apr 7, 3:57 pm, Mark Murphy mmur...@commonsware.com wrote:
  What is this exception ?

 The second link in a Google search for RejectedExecutionException turns up:

 http://pveentjer.wordpress.com/2008/02/06/are-you-dealing-with-the-re...

 Your problem is probably the second on that list -- you have tried to
 start too many AsyncTasks. AsyncTask uses a limited-length BlockingQueue
 for jobs waiting for a thread in the thread pool to free up, and it will
 throw that exception when you exceed the available number of slots in the
 queue.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Android App Developer Books:http://commonsware.com/books.html

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Re: AsyncTask : java.util.concurrent.RejectedExecutionException

2010-04-07 Thread Mark Murphy
 When you have a lot of Image to load this is a big limitation.

You can:

-- Grab the source code to AsyncTask, clone it into your own package, and
modify the LinkedBlockingQueue. I did this with my AsyncTaskEx class.

-- Skip AsyncTask and roll your own thread pool.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] sharing data between activities.

2010-04-07 Thread Mark Murphy
 Is there another sharing method that i don't know off

Use a Service. Have the Service manage the querying. Have activities
retrieve the Cursor from the Service using an API supplied via
bindService().

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Getting the url of an http response

2010-04-07 Thread jw
I'm sorry, I don't know how to put this in HTTP 1.1 terms since I'm
not familiar to the full standard. I tried to explain as simple as
possible. But I can buy that the response has no Location header if
the status code is 404.

Here's the flow:

My app is sending a HttpPost with DefaultHttpClient. I add some data,
for example username and password. The request is sent to an ASP file
which processes the data and redirects to an url if the login is
accurate. The redirect url is set by me, but I'm only interested in
the parameters added to the redirect url since the parameters is a
userId and a token which i need to get (The thing here is that I
should have my own web application calling this login asp file, cause
then I could set the redirect url to my own application and easily get
the parameters added to the url, but I want to do this in my android
application and thought that I would be able to get the redirect url
from the response).

Is there a (another) way to solve my problem?

Thanks again for your time Mike

/J

On Apr 7, 4:15 pm, mike enervat...@gmail.com wrote:
 On 04/07/2010 03:56 AM, jw wrote:

  Well, I'm able to set the response url in the web service, but it's
  the parameters I'm interested in... For now I've just set the response
  URL towww.google.comand the web service adds my parameter which
  giveswww.google.com/?x=1y=2... Since this page is not available, I
  get the 404 status code, not 3xx...

 Er, um, 404 says that it's not there and that it doesn't know
 where it might be, so it's no surprise there's not a Location:
 header.

 I suspect that you're not describing the entire process
 adequately for us to figure out what's going on. There is
 no such thing as a response url and a web service isn't
 especially well defined. Putting these things in terms of what
 HTTP 1.1 the protocol does would make it easier.

 Mike, you're not conflating xml/json in the content by any chance?

  Any help?

  /J

  On Apr 7, 11:41 am, mikeenervat...@gmail.com  wrote:

  On 04/07/2010 02:30 AM, jw wrote:

  Hi, thanks for the idea, but it didn't help.

  response.getHeaders(Location)[0] gives me null. I've also tried to
  print all header keys and vaules, and none of them are Location.

  Are you sure you're actually getting a 3xx code back from the
  http response? A 301 without a Location header would be bogus.

  You might try using a network sniffer like ethereal to see the
  actual network traffic going by too.

  Mike

  Any other ideas?

  /J

  On Apr 7, 11:12 am, mikeenervat...@gmail.com    wrote:

  On 04/07/2010 12:40 AM, jw wrote:

  Hi all,

  thanks for your time and sorry that I wasn't clear enough.

  I'm making a http post request to a web page which redirects me to
  different urls depending on the accuracy of my parameters sent in the
  request. This means that if I do it correct, I'll get redirected to
  for examplewww.google.comwithaquerystring that I need to get
  (www.google.com?x=1y=2). Maybe that's not the response url, but I
  don't now how to describe it. It's not the same as the request url
  anyway.

  I'm able to get the response status code from the repsonse object,
  which is ok, and I'm also able to get the html (content) of the
  response. I just need to know what url I was redirected to. Does this
  help you? I'm very thankful for all help

  sounds like you want to use HttpResponse.getHeaders(Location)

  Mike, it returns an array, but there should only be one if it redirected

  /J

  On Apr 7, 5:31 am, Kevin Duffeyandjar...@gmail.com      wrote:

  There isn't a response URL that is any different than the request URL. 
  It's
  not as if the server appends a bunch of stuff to the URL you submit the
  request to unless it redirects/forwards to another URL.. in this case, 
  the
  server would append to the URL you requested, redirecting you... but 
  even if
  it did this, your response would indicate a 3xx redirect and the 
  Location
  header, as Frank says above, would contain the new URL you should go 
  to. If
  you did get a 301/2 back, you'd have to actually make another request
  yourself.

  So not sure as the other guys say, what URL you are talking about

  On Tue, Apr 6, 2010 at 7:59 PM, Frank Weissfewe...@gmail.com      
  wrote:

  I don't know what response URL means. The only URLs in an HTTP 
  response
  that come to mind are: 1) the Location response header for a 301/302
  status code, 2) some string in the response data (such as an HTML 
  anchor
  element) that you want to interpret as a URL.

  On Tue, Apr 6, 2010 at 1:59 PM, jwjwilner...@gmail.com      wrote:

  Hi all,

  I have a problem. I'm doing a http post request to a URL like this;

  DefaultHttpClient httpclient = new DefaultHttpClient();
  HttpPost httppost = new HttpPost(url);
  HttpResponse response = httpclient.execute(httppost);

  I am able to get the response content (html in this case) but I would
  like to be able to get the url of the response. Is there a way? Or
  could i 

Re: [android-developers] Re: Getting the url of an http response

2010-04-07 Thread Kevin Duffey
As Mike says, it seems something is missing from your description. From what
you said in your response earlier, you are being redirected. However,
because you are making the first request, the only way you could be
redirected is if the response you got back was a 301 with a Location header
filled out. THEN, you make a second request using the Location URL that is
returned. If you're getting a 404, as Mike said, the initial URL you're
requesting is not being found. I am guessing you are not showing your
complete code, or being completely descriptive because well, you don't want
to give away your secret sauce.. which I can understand. But something is
missing from this that is not allowing us to help you further.

On Wed, Apr 7, 2010 at 7:15 AM, mike enervat...@gmail.com wrote:

 On 04/07/2010 03:56 AM, jw wrote:

 Well, I'm able to set the response url in the web service, but it's
 the parameters I'm interested in... For now I've just set the response
 URL to www.google.com and the web service adds my parameter which
 gives www.google.com/?x=1y=2... Since this page is not available, I
 get the 404 status code, not 3xx...



 Er, um, 404 says that it's not there and that it doesn't know
 where it might be, so it's no surprise there's not a Location:
 header.

 I suspect that you're not describing the entire process
 adequately for us to figure out what's going on. There is
 no such thing as a response url and a web service isn't
 especially well defined. Putting these things in terms of what
 HTTP 1.1 the protocol does would make it easier.

 Mike, you're not conflating xml/json in the content by any chance?


  Any help?

 /J

 On Apr 7, 11:41 am, mikeenervat...@gmail.com  wrote:


 On 04/07/2010 02:30 AM, jw wrote:



 Hi, thanks for the idea, but it didn't help.




 response.getHeaders(Location)[0] gives me null. I've also tried to
 print all header keys and vaules, and none of them are Location.


 Are you sure you're actually getting a 3xx code back from the
 http response? A 301 without a Location header would be bogus.

 You might try using a network sniffer like ethereal to see the
 actual network traffic going by too.

 Mike



 Any other ideas?




 /J




 On Apr 7, 11:12 am, mikeenervat...@gmail.comwrote:




 On 04/07/2010 12:40 AM, jw wrote:




 Hi all,




 thanks for your time and sorry that I wasn't clear enough.




 I'm making a http post request to a web page which redirects me to
 different urls depending on the accuracy of my parameters sent in the
 request. This means that if I do it correct, I'll get redirected to
 for examplewww.google.comwitha querystring that I need to get
 (www.google.com?x=1y=2). Maybe that's not the response url, but I
 don't now how to describe it. It's not the same as the request url
 anyway.




 I'm able to get the response status code from the repsonse object,
 which is ok, and I'm also able to get the html (content) of the
 response. I just need to know what url I was redirected to. Does this
 help you? I'm very thankful for all help




 sounds like you want to use HttpResponse.getHeaders(Location)




 Mike, it returns an array, but there should only be one if it redirected




 /J




 On Apr 7, 5:31 am, Kevin Duffeyandjar...@gmail.com  wrote:




 There isn't a response URL that is any different than the request URL.
 It's
 not as if the server appends a bunch of stuff to the URL you submit
 the
 request to unless it redirects/forwards to another URL.. in this
 case, the
 server would append to the URL you requested, redirecting you... but
 even if
 it did this, your response would indicate a 3xx redirect and the
 Location
 header, as Frank says above, would contain the new URL you should go
 to. If
 you did get a 301/2 back, you'd have to actually make another request
 yourself.




 So not sure as the other guys say, what URL you are talking about




 On Tue, Apr 6, 2010 at 7:59 PM, Frank Weissfewe...@gmail.com
  wrote:




 I don't know what response URL means. The only URLs in an HTTP
 response
 that come to mind are: 1) the Location response header for a
 301/302
 status code, 2) some string in the response data (such as an HTML
 anchor
 element) that you want to interpret as a URL.




 On Tue, Apr 6, 2010 at 1:59 PM, jwjwilner...@gmail.com  wrote:




 Hi all,




 I have a problem. I'm doing a http post request to a URL like this;




 DefaultHttpClient httpclient = new DefaultHttpClient();
 HttpPost httppost = new HttpPost(url);
 HttpResponse response = httpclient.execute(httppost);




 I am able to get the response content (html in this case) but I would
 like to be able to get the url of the response. Is there a way? Or
 could i use some other technique to do the post request and
 retrieve
 the url?




 The repsonse url is lkewww.url.com?x=1y=2http://www.url.com/?x=1y=2and
 would like to get the
 parameter values, I've tried to use the getParams().getParameter()
 on
 the HttpResponse object without any success. So if anyone 

[android-developers] Re: Selling apps from Canada in the Market?

2010-04-07 Thread Brill Pappin
I suspect the issues is actually not that they don't want to allow it,
I think that the issue is that they are trying to keep everything
inside their own umbrella.

What I mean is, Google has a payment processor business and they have
the app business; they are trying to keep everything under one roof.

The problem is not actually that the Market won't do it, its that
Google Checkout can't and having worked with payment processors a lot,
I can tell you that some countries are much easier to get access to
payment systems than others.

In Canada, its difficult (not sure about Australia)  to get access to
the payment networks because here we have fairly strict regulations on
Banks etc and they don't like people on their turf.

Apple on the other hand doesn't have anything invested as a payment
processor, and so doesn't have the same limitation because they can
use any of the many existing ones that handle Canadian transactions
already.

So, my guess is that Google Checkout is having trouble dealing with
the Canadian financial system and getting in the door, however that
failure is hurting their other departments, such as the Android Market

What they should be doing IMO is simply hooking into another existing
processor for countries like Canada until they can sort out their
processor troubles. From our perspective we would not even notice the
change accept possibly by having to enter new credit card data (not
even google is allowed to store it).

This is a guess of course, but based on a little knowledge of the
processor industry.

- Brill Pappin


On Apr 7, 9:45 am, gosh steve.goschn...@gmail.com wrote:
 I wouldn't hold your breathe there Brill.

 If you do a search in this group on thread titled 'Countries for
 selling priced applications in Android Market' you'll see that many
 others 'were' asking this question back in August 2009 (and elsewhere
 in this group). Google allowed nine countries to sell apps from Sep
 2009 and nothing has changed in the 7 months since then.
 My interest then 'was' in selling Android apps from Australia.

 I approached an Australian Senator ('for the Digital Economy') to try
 and see what was happening at Google on this issue (since they don't
 answer such questions from mere mortals, or even from their own
 collaborating developers) - but the answer the Senator got back with
 was simple and the same: 'we are working on more countries'. Tim
 O'Reilly got me an avenue to someone a bit further up the Google food
 chain ... same simple non-committal answer came back to us: 'we are
 working on more countries'.

 If you are looking for a professional response to this sort of a
 question, from a global company that knows something about application
 developer relations in an international context, I recommend that you
 look at what Sun/Oracle tell their International enquirers wrt the
 same issue at the 'Java Shop', on the web-page here 'Java Warehouse
 Developer Center - Supported Locations':

 http://java.sun.com/warehouse/overview/locations.jsp

 ...the issues they cite there regarding seller countries are likely to
 be the very same issues that Goggle would be facing with CheckOut and
 Apps, iff they actually do intend to include more countries.

 The fact the Google can't get a page of information like that to their
 own enquiring Android developers, suggests to me that either: 1). They
 are not an Internationally competent company when it comes to
 collaborating with grass-roots developers; or, 2). They have no
 intention of allowing developers from further countries to sell
 Android apps (now that they have a critical mass of apps to compete
 with iPhone).

 Since you (and I) are not from the favored 9 countries, and since 7
 months have passed, if you want to make some money from your Android
 apps, you should release it for 'free' and simply embed advertising in
 it ... as many other developers in this predicament are already doing.
 Its also a 'great value' move for Android phone users.

 (Btw if you look at Tim OReilly's recent blog on 'The State of the
 Internet Operating System' 
 -http://radar.oreilly.com/2010/03/state-of-internet-operating-system.html
 - a long but very good and insightful read, you will see that while he
 cites iPhone, iPad and the App Store, he doesn't cite Android Market
 in a 'selling apps' future (i.e. under the heading 'Access Control'),
 but he does mention Google re Admob under the 'Advertising' aspect of
 the Internet Operating System).

 Cheers
 Steve

 On Apr 6, 12:06 am, Brill Pappin br...@pappin.ca wrote:



  Does anyone have any idea when Google plans to allow us Canadian
  developers to actually create accounts for selling apps in the Market?

  I am completely flabbergasted that I can't set that up. Major FAIL.

  - Brill Pappin

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

[android-developers] Re: sharing data between activities.

2010-04-07 Thread poohtbear
Isn't that an overkill ? create a service to share a single cursor
between 2 activities ? if it were a generic service that i used to
share many cursor from many queries (lets say it's a query management
service) and several activities will use it then i can understand the
efficiency and code simplicity in it, for more simple examples it
sounds like an overkill.

On Apr 7, 5:39 pm, Mark Murphy mmur...@commonsware.com wrote:
  Is there another sharing method that i don't know off

 Use a Service. Have the Service manage the querying. Have activities
 retrieve the Cursor from the Service using an API supplied via
 bindService().

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Android App Developer Books:http://commonsware.com/books.html

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Re: Getting the url of an http response

2010-04-07 Thread Kevin Duffey
Just posted this right before I posted mine...


Ok, so once again, you are in programmatic control here..  you make the
first request, you get back a response BEFORE a redirect happens. You would
be the one to make the second request to the redirected URL. When you say it
redirects to a URL if the login is accurate.. in the web world.. that means
the URL you first request would send back a 30x to the web browser, and the
browser, before displaying anything, would the request the URL from the
Location header that is sent back from the first request. I've built many a
server side..this is how it would work... if you were a browser. But, you
are controlling the flow.. you're the browser. So you should be getting a
30x with a Location header filled out. There IS another way that a server
side can do this. They can FORWARD to another page.. basically what this
means is they usually flush the response buffer, then access another page
(another URL essentially), filling the response buffer with that page's
response as if you went there first. Even so, from my understanding, if a
server side forwards (internally redirects) to another page, they would
indicate so with the Location header filled out. HOWEVER, if you are calling
somesite.com and it is redirecting you to google.com?someParams, I am not
sure how you are not getting the response back. MAYBE.. and I have not
really used DefaultHttpClient before.. maybe there is a setting in the
library that you have to turn off to avoid automatic redirects? You may
want to look in the javadoc and see if it's automatically doing the redirect
for you before you regain control.


My app is sending a HttpPost with DefaultHttpClient. I add some data,
for example username and password. The request is sent to an ASP file
which processes the data and redirects to an url if the login is
accurate. The redirect url is set by me, but I'm only interested in
the parameters added to the redirect url since the parameters is a
userId and a token which i need to get (The thing here is that I
should have my own web application calling this login asp file, cause
then I could set the redirect url to my own application and easily get
the parameters added to the url, but I want to do this in my android
application and thought that I would be able to get the redirect url
from the response).

On Wed, Apr 7, 2010 at 7:46 AM, jw jwilner...@gmail.com wrote:

 I'm sorry, I don't know how to put this in HTTP 1.1 terms since I'm
 not familiar to the full standard. I tried to explain as simple as
 possible. But I can buy that the response has no Location header if
 the status code is 404.

 Here's the flow:

 My app is sending a HttpPost with DefaultHttpClient. I add some data,
 for example username and password. The request is sent to an ASP file
 which processes the data and redirects to an url if the login is
 accurate. The redirect url is set by me, but I'm only interested in
 the parameters added to the redirect url since the parameters is a
 userId and a token which i need to get (The thing here is that I
 should have my own web application calling this login asp file, cause
 then I could set the redirect url to my own application and easily get
 the parameters added to the url, but I want to do this in my android
 application and thought that I would be able to get the redirect url
 from the response).

 Is there a (another) way to solve my problem?

 Thanks again for your time Mike

 /J

 On Apr 7, 4:15 pm, mike enervat...@gmail.com wrote:
  On 04/07/2010 03:56 AM, jw wrote:
 
   Well, I'm able to set the response url in the web service, but it's
   the parameters I'm interested in... For now I've just set the response
   URL towww.google.comand the web service adds my parameter which
   giveswww.google.com/?x=1y=2... Since this page is not available, I
   get the 404 status code, not 3xx...
 
  Er, um, 404 says that it's not there and that it doesn't know
  where it might be, so it's no surprise there's not a Location:
  header.
 
  I suspect that you're not describing the entire process
  adequately for us to figure out what's going on. There is
  no such thing as a response url and a web service isn't
  especially well defined. Putting these things in terms of what
  HTTP 1.1 the protocol does would make it easier.
 
  Mike, you're not conflating xml/json in the content by any chance?
 
   Any help?
 
   /J
 
   On Apr 7, 11:41 am, mikeenervat...@gmail.com  wrote:
 
   On 04/07/2010 02:30 AM, jw wrote:
 
   Hi, thanks for the idea, but it didn't help.
 
   response.getHeaders(Location)[0] gives me null. I've also tried to
   print all header keys and vaules, and none of them are Location.
 
   Are you sure you're actually getting a 3xx code back from the
   http response? A 301 without a Location header would be bogus.
 
   You might try using a network sniffer like ethereal to see the
   actual network traffic going by too.
 
   Mike
 
   Any other ideas?
 
   /J
 
   On Apr 7, 11:12 am, 

[android-developers] Re: Getting the url of an http response

2010-04-07 Thread jw
Kevin, see my previous reply
Thanks

On Apr 7, 4:47 pm, Kevin Duffey andjar...@gmail.com wrote:
 As Mike says, it seems something is missing from your description. From what
 you said in your response earlier, you are being redirected. However,
 because you are making the first request, the only way you could be
 redirected is if the response you got back was a 301 with a Location header
 filled out. THEN, you make a second request using the Location URL that is
 returned. If you're getting a 404, as Mike said, the initial URL you're
 requesting is not being found. I am guessing you are not showing your
 complete code, or being completely descriptive because well, you don't want
 to give away your secret sauce.. which I can understand. But something is
 missing from this that is not allowing us to help you further.



 On Wed, Apr 7, 2010 at 7:15 AM, mike enervat...@gmail.com wrote:
  On 04/07/2010 03:56 AM, jw wrote:

  Well, I'm able to set the response url in the web service, but it's
  the parameters I'm interested in... For now I've just set the response
  URL towww.google.comand the web service adds my parameter which
  giveswww.google.com/?x=1y=2... Since this page is not available, I
  get the 404 status code, not 3xx...

  Er, um, 404 says that it's not there and that it doesn't know
  where it might be, so it's no surprise there's not a Location:
  header.

  I suspect that you're not describing the entire process
  adequately for us to figure out what's going on. There is
  no such thing as a response url and a web service isn't
  especially well defined. Putting these things in terms of what
  HTTP 1.1 the protocol does would make it easier.

  Mike, you're not conflating xml/json in the content by any chance?

   Any help?

  /J

  On Apr 7, 11:41 am, mikeenervat...@gmail.com  wrote:

  On 04/07/2010 02:30 AM, jw wrote:

  Hi, thanks for the idea, but it didn't help.

  response.getHeaders(Location)[0] gives me null. I've also tried to
  print all header keys and vaules, and none of them are Location.

  Are you sure you're actually getting a 3xx code back from the
  http response? A 301 without a Location header would be bogus.

  You might try using a network sniffer like ethereal to see the
  actual network traffic going by too.

  Mike

  Any other ideas?

  /J

  On Apr 7, 11:12 am, mikeenervat...@gmail.com    wrote:

  On 04/07/2010 12:40 AM, jw wrote:

  Hi all,

  thanks for your time and sorry that I wasn't clear enough.

  I'm making a http post request to a web page which redirects me to
  different urls depending on the accuracy of my parameters sent in the
  request. This means that if I do it correct, I'll get redirected to
  for examplewww.google.comwithaquerystring that I need to get
  (www.google.com?x=1y=2). Maybe that's not the response url, but I
  don't now how to describe it. It's not the same as the request url
  anyway.

  I'm able to get the response status code from the repsonse object,
  which is ok, and I'm also able to get the html (content) of the
  response. I just need to know what url I was redirected to. Does this
  help you? I'm very thankful for all help

  sounds like you want to use HttpResponse.getHeaders(Location)

  Mike, it returns an array, but there should only be one if it redirected

  /J

  On Apr 7, 5:31 am, Kevin Duffeyandjar...@gmail.com      wrote:

  There isn't a response URL that is any different than the request URL.
  It's
  not as if the server appends a bunch of stuff to the URL you submit
  the
  request to unless it redirects/forwards to another URL.. in this
  case, the
  server would append to the URL you requested, redirecting you... but
  even if
  it did this, your response would indicate a 3xx redirect and the
  Location
  header, as Frank says above, would contain the new URL you should go
  to. If
  you did get a 301/2 back, you'd have to actually make another request
  yourself.

  So not sure as the other guys say, what URL you are talking about

  On Tue, Apr 6, 2010 at 7:59 PM, Frank Weissfewe...@gmail.com
   wrote:

  I don't know what response URL means. The only URLs in an HTTP
  response
  that come to mind are: 1) the Location response header for a
  301/302
  status code, 2) some string in the response data (such as an HTML
  anchor
  element) that you want to interpret as a URL.

  On Tue, Apr 6, 2010 at 1:59 PM, jwjwilner...@gmail.com      wrote:

  Hi all,

  I have a problem. I'm doing a http post request to a URL like this;

  DefaultHttpClient httpclient = new DefaultHttpClient();
  HttpPost httppost = new HttpPost(url);
  HttpResponse response = httpclient.execute(httppost);

  I am able to get the response content (html in this case) but I would
  like to be able to get the url of the response. Is there a way? Or
  could i use some other technique to do the post request and
  retrieve
  the url?

  The repsonse url is 
  lkewww.url.com?x=1y=2http://www.url.com/?x=1y=2and
  would like to get the
  parameter 

Re: [android-developers] Re: sharing data between activities.

2010-04-07 Thread Mark Murphy

 Isn't that an overkill ? create a service to share a single cursor
 between 2 activities ? if it were a generic service that i used to
 share many cursor from many queries (lets say it's a query management
 service) and several activities will use it then i can understand the
 efficiency and code simplicity in it, for more simple examples it
 sounds like an overkill.

The other options you cited are bad for performance (putting the Cursor in
an Intent extra) or are risky from a garbage collection standpoint (using
mutable static data members).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Getting the url of an http response

2010-04-07 Thread mscwd01
I think your asking for the final URL you are redirected to... right?

If so this should help nicely: 
http://www.example-code.com/java/http_redirect.asp

I think you need to pay attention to this part:

if (http.get_WasRedirected() == true) {
System.out.println(This was a redirect response);

System.out.println(Redirect URL:);
System.out.println(http.finalRedirectUrl());

}

Hope that helps ;)

On Apr 7, 4:01 pm, jw jwilner...@gmail.com wrote:
 Kevin, see my previous reply
 Thanks

 On Apr 7, 4:47 pm, Kevin Duffey andjar...@gmail.com wrote:



  As Mike says, it seems something is missing from your description. From what
  you said in your response earlier, you are being redirected. However,
  because you are making the first request, the only way you could be
  redirected is if the response you got back was a 301 with a Location header
  filled out. THEN, you make a second request using the Location URL that is
  returned. If you're getting a 404, as Mike said, the initial URL you're
  requesting is not being found. I am guessing you are not showing your
  complete code, or being completely descriptive because well, you don't want
  to give away your secret sauce.. which I can understand. But something is
  missing from this that is not allowing us to help you further.

  On Wed, Apr 7, 2010 at 7:15 AM, mike enervat...@gmail.com wrote:
   On 04/07/2010 03:56 AM, jw wrote:

   Well, I'm able to set the response url in the web service, but it's
   the parameters I'm interested in... For now I've just set the response
   URL towww.google.comandthe web service adds my parameter which
   giveswww.google.com/?x=1y=2... Since this page is not available, I
   get the 404 status code, not 3xx...

   Er, um, 404 says that it's not there and that it doesn't know
   where it might be, so it's no surprise there's not a Location:
   header.

   I suspect that you're not describing the entire process
   adequately for us to figure out what's going on. There is
   no such thing as a response url and a web service isn't
   especially well defined. Putting these things in terms of what
   HTTP 1.1 the protocol does would make it easier.

   Mike, you're not conflating xml/json in the content by any chance?

    Any help?

   /J

   On Apr 7, 11:41 am, mikeenervat...@gmail.com  wrote:

   On 04/07/2010 02:30 AM, jw wrote:

   Hi, thanks for the idea, but it didn't help.

   response.getHeaders(Location)[0] gives me null. I've also tried to
   print all header keys and vaules, and none of them are Location.

   Are you sure you're actually getting a 3xx code back from the
   http response? A 301 without a Location header would be bogus.

   You might try using a network sniffer like ethereal to see the
   actual network traffic going by too.

   Mike

   Any other ideas?

   /J

   On Apr 7, 11:12 am, mikeenervat...@gmail.com    wrote:

   On 04/07/2010 12:40 AM, jw wrote:

   Hi all,

   thanks for your time and sorry that I wasn't clear enough.

   I'm making a http post request to a web page which redirects me to
   different urls depending on the accuracy of my parameters sent in the
   request. This means that if I do it correct, I'll get redirected to
   for examplewww.google.comwithaquerystringthat I need to get
   (www.google.com?x=1y=2). Maybe that's not the response url, but I
   don't now how to describe it. It's not the same as the request url
   anyway.

   I'm able to get the response status code from the repsonse object,
   which is ok, and I'm also able to get the html (content) of the
   response. I just need to know what url I was redirected to. Does this
   help you? I'm very thankful for all help

   sounds like you want to use HttpResponse.getHeaders(Location)

   Mike, it returns an array, but there should only be one if it 
   redirected

   /J

   On Apr 7, 5:31 am, Kevin Duffeyandjar...@gmail.com      wrote:

   There isn't a response URL that is any different than the request URL.
   It's
   not as if the server appends a bunch of stuff to the URL you submit
   the
   request to unless it redirects/forwards to another URL.. in this
   case, the
   server would append to the URL you requested, redirecting you... but
   even if
   it did this, your response would indicate a 3xx redirect and the
   Location
   header, as Frank says above, would contain the new URL you should go
   to. If
   you did get a 301/2 back, you'd have to actually make another 
   request
   yourself.

   So not sure as the other guys say, what URL you are talking about

   On Tue, Apr 6, 2010 at 7:59 PM, Frank Weissfewe...@gmail.com
    wrote:

   I don't know what response URL means. The only URLs in an HTTP
   response
   that come to mind are: 1) the Location response header for a
   301/302
   status code, 2) some string in the response data (such as an HTML
   anchor
   element) that you want to interpret as a URL.

   On Tue, Apr 6, 2010 at 1:59 PM, jwjwilner...@gmail.com      wrote:

   Hi 

[android-developers] Re: sharing data between activities.

2010-04-07 Thread poohtbear
I agree with you, static members don't have to be a manace regarding
GC, but they do carry the memory leaks danger if you don't treat them
well, i close the cursor and null the instance in onDestroy and
recreate it in onCreate.

However in a big complicated program with a lot of code it's a
needless hazard, i do agree to that.
Doesn't the extra service adds to the code complexity ? adds to the
accumulated application memory, after all it's also a component that
consumes resources.
I find it kind of frustrating that i cannot get instance of an
activity or one of it's inner classes without a static member, as i
said they live in the same memory space...



On Apr 7, 6:03 pm, Mark Murphy mmur...@commonsware.com wrote:
  Isn't that an overkill ? create a service to share a single cursor
  between 2 activities ? if it were a generic service that i used to
  share many cursor from many queries (lets say it's a query management
  service) and several activities will use it then i can understand the
  efficiency and code simplicity in it, for more simple examples it
  sounds like an overkill.

 The other options you cited are bad for performance (putting the Cursor in
 an Intent extra) or are risky from a garbage collection standpoint (using
 mutable static data members).

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Android App Developer Books:http://commonsware.com/books.html

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Eclipse setup - how can I run the Email app from the plattform source

2010-04-07 Thread Michael MacDonald
On 04/07/10 09:19, Brill Pappin wrote:
 If your rewriting the email app, I'd be willing to help... coming from
 the iPhone, I'm not all that impressed with it on the Android and
 would like a better alternative.

 - Brill

 On Apr 6, 9:17 pm, patbenatar patbena...@gmail.com wrote:
   

The K9 mail project is doing that; they started with the open-source
e-mail client and have made a lot of improvements:

http://code.google.com/p/k9mail

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

To unsubscribe, reply using remove me as the subject.


[android-developers] getting the SDK samples (a tale of woe and intrigue and two questions)

2010-04-07 Thread greg
Using Eclipse, I thoroughly messed up the creation of my SDK sample
projects (e.g., ApiDemos) ... as I was paying too much attention to
the Butler vs Duke game and not enough attention to the project
creation options I was selecting.  The result was 100+ levels of
ApiDemos subdirectories that apparently I had asked Eclipse to create
in my PC's android-sdk-windows/samples/android-7/ directory.  After
overcoming a slew of 'file name too long' problems reported by Vista's
file manager, I finally removed the cancer-like directory structure
and am now trying to get a fresh copy of the SDK samples.

I moved my messed up samples directory out of the android-sdk-windows
directory and I used the 'Android SDK and AVD Manager' within Eclipse
to re-download the 'SDK Platform Android 2.1 API 7, revision 1'
package.  Although the download status messages seemed okay (e.g.,
downloading samples..., installing samples..., installed samples,
Done. 1 package installed.), it appears that the final unzip did not
execute: a new 'android-sdk-windows/samples' directory was created but
it contains only a '/android-7/ApiDemos/.metadata' directory and all
the sample code is still in a 'android-sdk-windows/temp/
samples-2.1_r01-linux.zip/samples-2.1_r01-linux' directory.  In my
previous download of the SDK samples, I didn't have to manually unzip
the sample directory.

Is 'samples-2.1_r01-linux' the correct directory for the SDK installed
on a Windows system?  How can I fix the 'Android SDK and AVD Manager'
within Eclipse so that it unzips packages after downloading them ...
as it previously has done.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: One view displays multiple canvas, back button doesn't work.

2010-04-07 Thread DulcetTone
You must call super.onKeyDown(int kc, KeyEvent event) when appropriate
to derive the back behavior.

tone

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

2010-04-07 Thread arnouf
I'm not sure that it will resolve my first problem related to the
image loaded from remote and display in my listview
I can use Asynctask in my adapter to load each image. But when I do a
bog scroll, displayed image are not to the good place (ex. : the image
number 4 is displayed at the line 15 ...). It's trying to tesolve this
first issue, that I meet the exception. But this issue is maybe due to
the Async pool too.

I come you back later.

Thanks

On Apr 7, 4:37 pm, Mark Murphy mmur...@commonsware.com wrote:
  When you have a lot of Image to load this is a big limitation.

 You can:

 -- Grab the source code to AsyncTask, clone it into your own package, and
 modify the LinkedBlockingQueue. I did this with my AsyncTaskEx class.

 -- Skip AsyncTask and roll your own thread pool.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Android App Developer Books:http://commonsware.com/books.html

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Re: Multiple Listviews in single Activity?

2010-04-07 Thread ~ TreKing
On Tue, Apr 6, 2010 at 7:44 PM, DonFrench dcfre...@gmail.com wrote:

 And the truth is that even then the odds are that no one will answer you.


I highly disagree.


 I recently posted a very simple and clear one-sentence question


Which was what, out of curiosity?


 that I know a high percentage of the people on this list knew the answer
 to.


And you know this for a fact how?


 Trying to figure out how to get an answer from this group is a puzzle in
 itself.


The problem is that on these Android groups a lot of people post things like
URGENT!: my app doesn't work, why?, or, like in this case, large chunk of
alien code with no context, or here's a picture of what I want to do, how
do I do it?, or other equally vague and generic posts that would take hours
to answer completely.

I don't know about the rest of the group, but I'm more inclined to help
where I can when 1) The post is clear, concise, and specific (not it
doesn't work) and 2) The person indicates that they've put time and energy
into solving the problem and they've narrowed it down to something specific
(they Googled with no result, they checked the debug log with nothing
obvious, they've tried A, B, C, and D with no luck, etc).

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

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: handling rotation...

2010-04-07 Thread Bob Kerns
This doesn't save you from ANY of the complexities of the activity
lifecycles.

It only removes SOME of the reasons you'll transition through them.
You should still code for the lifecycle.

It makes your job harder, because not only to you get to debug your
current problem -- you lose an easy way to test your handling of the
activity lifecycle!

One thing I'd check is if  you're reliably getting the right
orientation's version of your layout. Try changing the background
color or some text, so you can reliably tell them apart, even if mis-
rendered. I don't see why that would be the problem, but it'd be good
to help make sure you're looking for the right problem.

On Apr 7, 7:04 am, sdphil phil.pellouch...@gmail.com wrote:
 hi, i have a question regarding rotation.

 I am looking into using:

     android:configChanges=orientation|keyboardHidden

 in my manifest file for an activity in my application.  that of course
 is accompanied with --

     @Override
     public void onConfigurationChanged(Configuration newConfig) {
         super.onConfigurationChanged(newConfig);
         setContentView(R.layout.myContentView);
     }

 I am doing this for a layout that has a landscape version of that
 layout as well (i.e. I have a myContentView.xml in layout-land
 directory).  The issue is that when I do this, sometimes it appears as
 though it doesn't render properly when going to landscape mode.  I
 have two edit boxes on that page that sometimes don't appear.  Usually
 it works, but sometimes they just disappear (or are off screen?).
 Anyway, I can't figure out why they don't get rendered.  Any ideas on
 what i need to be doing here to make them render consistently?

 My follow up question is why shouldn't I just do this for every
 activity (assuming it worked :-)?  Then I could avoid much of the
 complexity surrounding activity lifecycle (I saw some issues regarding
 menus, but it seems like that could be overcome).

 tia.

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

To unsubscribe, reply using remove me as the subject.


  1   2   3   >