Re: [android-developers] Re: Shape having two sided border

2011-06-17 Thread Prakash Iyer
I'm not sure there is any XML way of doing this. You can extend TextView (or
whatever is the view that you are looking to have this border on) and
implement this in the onDraw. There should also be a way to write a Drawable
and do this which can then be extended to any View but I don't know enough
to suggest.

On Fri, Jun 17, 2011 at 3:41 AM, Sapna Srivastav sapna.ari...@gmail.comwrote:

 I am still getting the four boundaries on the layout.

 On Jun 16, 11:58 am, Rajiv rajiv...@gmail.com wrote:
  Use the following shape tag:
 
   padding android:left=1dp
  android:top=0dp
  android:right=1dp
  android:bottom=0dp
  /
 
  On Thu, Jun 16, 2011 at 12:06 PM, Sapna Srivastav 
 sapna.ari...@gmail.comwrote:
 
   Hi all.
 
   I would like to create a layout having a shape that has border only on
   2 sides:
   left and right, i.e. I want top and  bottom to be open.  How can I
   achieve that
   defining shape in XML?
 
   Currently I have a normal 4 side border using the following shape XML
   definition:
 
   ?xml version=1.0 encoding=utf-8?
   shape xmlns:android=http://schemas.android.com/apk/res/android;
  android:layout_width=fill_parent
  android:layout_height=fill_parent
 
  solid android:color=#FF
 /
 
  stroke android:width=1dp
  android:color=#FF
  /
 
  padding android:left=1dp
   android:top=1dp
   android:right=1dp
   android:bottom=1dp
   /
   /shape
 
   Please help, its urgent.
   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
 
 

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


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

Re: [android-developers] Couldn't be excuted after a button click

2011-06-17 Thread Prakash Iyer
ok, i'll bite. at least i have no clue what you are asking and hence cannot
help. you say it couldn't be executed. what do you actually mean?

as an example the below code start's the activity only when there is an
exception. is that what you wanted? or is that how you cut  paste?

On Fri, Jun 17, 2011 at 11:18 AM, gaara amellal.kamili...@gmail.com wrote:

 Hi,
 i wonder what's wrong with this part of the code,,please it's couldn't
 be executed , the button in which is done is still static.
 Peace,
 Gaara


 final Thread checkUpdate = new Thread() {
public void run() {
EditText name = (EditText) findViewById(R.id.userName);
EditText firstname = (EditText)
 findViewById(R.id.userFirstName);
EditText mail = (EditText) findViewById(R.id.userMail);
EditText phone = (EditText) findViewById(R.id.userPhone);
User u = new User();
u.setFirstname(firstname.getText().toString());
u.setLastname(name.getText().toString());
u.setMail(mail.getText().toString());
u.setPhone(phone.getText().toString());
final UserController uc = new UserController();
try {
uc.create(u);
} catch (Exception e) {
return;

final Intent intent = new Intent(AddUserActivity.this,
GaeHomeScreen.class);
startActivity(intent);
}
   };
checkUpdate.start();

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

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

Re: [android-developers] Re: When will android automatically launch a process when force closed?

2011-06-14 Thread Prakash Iyer
Is this a Service as opposed to an activity? Or is there a
BroadcastReceiver? A plain Activity needs an Intent to start so if you are
positive you have an Activity then you should print out the Intent in the
onCreate and see if you find something.

On Tue, Jun 14, 2011 at 8:00 AM, gunanar...@gmail.com
gunanar...@gmail.comwrote:

 Hi Treking,
 But that's not the behaviour I see. I do see that the process is
 getting auto-started when killed.

 On Jun 14, 1:33 am, TreKing treking...@gmail.com wrote:
  On Mon, Jun 13, 2011 at 8:44 AM, gunanar...@gmail.com
  gunanar...@gmail.comwrote:
 
   Can you please let me know under what conditions will android
 automatically
   start the process after force close, and if there is a way to instruct
 the
   system to not do this for my app?
 
  I believe that if an activity is forced to close (crashes), then the
 system
  goes to the previous activity in the stack.
 
This is a requirement for my app, to be not auto-restarted when the
 user
   kills the app.
 
  If the user kills the app (i.e., they go to the app management screen and
  Force Stop it) then it should not be auto-restarted.
 
 
 ---
 --
  TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
  transit tracking app for Android-powered devices

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

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

Re: [android-developers] Cannot handle exception in a thread

2011-06-14 Thread Prakash Iyer
And when you return from the run method the thread will stop/die by itself.
Ideally your main Activity which started this thread off will be the one
notifying the user and if needed calling finish...

On Tue, Jun 14, 2011 at 7:10 AM, Mark Murphy mmur...@commonsware.comwrote:

 Use runOnUiThread() around your code in the catch block, to have that
 stuff be done on the main application thread.

 On Tue, Jun 14, 2011 at 6:40 AM, Droid rod...@gmail.com wrote:
  I am spinning a thread to go online and get data. But if phone is in a
  network hole (no signal) it throws an exception.
  In the exception I try to call Toast or finish() the activity but both
  those cause a crash.
 
  Here's the error and my code:
   error is:
  06-14 11:32:01.691: ERROR/AndroidRuntime(7389):
  java.lang.RuntimeException: Can't create handler inside thread that
  has not called Looper.prepare()
 
  here is the code, note the catch clause at the end which is where my
  problem lies:
 
 
 *
 private Thread checkUpdate = new Thread() {
 public void run() {
 try {
 URL updateURL = new URL(http://search.twitter.com/
  search.json?q=+string_from_speaker);
 URLConnection conn = updateURL.openConnection();
 ...
 } catch (Exception e) {
  // none of these exception handlers work becaue they are in wrong
  thread!! WTF?
  // NOPE tv1.setText( having trouble getting online); // TODO
  // NOPE Toast.makeText(IconicAgain.this, having trouble getting
  online + e, Toast.LENGTH_LONG).show();
 }
 }
 };
 
 
 
  Can I at least stop this thread somehow? Or close the activity
  somehow?
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 



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

 Android Training in NYC: http://marakana.com/training/android/

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


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

2011-06-07 Thread Prakash Iyer
There are some phones, eg the first HTC phone at VZW, which have 3 mount
points for music. Basically the internal memory is partitioned into the
internal filesystem  a modifiable partition that can be mounted as a USB
drive. Users can move music there  this is scanned by the media player but
is not the external filesystem. So there is no Environment API to get to
this path... I don't know of any way other than a magic absolute path in
that case... Would love to know otherwise...

To the OP, if Dianne/rest don't come back with a solution here  this is
your problem, Google for the specific handset model you are dealing with 
someone will hopefully have the magic path for you;-)
On Jun 7, 2011 3:24 AM, Dianne Hackborn hack...@android.com wrote:

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

Re: [android-developers] Java source code for SDK API 11 12

2011-06-06 Thread Prakash Iyer
Really? I'd love to see the code open sourced as well but I am not sure I
can justify needing sources to compile my application. May be you need to
elaborate. BTW this group is for using the publicly available SDK, so if you
are not doing that you might be in the incorrect mailing group...

On Mon, Jun 6, 2011 at 11:30 AM, Tomas Prochazka
tomas.procha...@gmail.comwrote:

 I know that Google don't open source whole Android 3.0 and 3.1 for
 some reason.

 But how I can work on application for Honeycomb tablets without source
 code of java framework classes? I don't need whole source to compile
 android, I need only trace and debug me code inside to framework
 classes or examine it for better understand how it works. Javadoc is
 not enough on many classes. This make development on Android very
 complicated.

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

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

Re: [android-developers] Re: How much HTML5 does the Honeycomb Android Browser support?

2011-05-31 Thread Prakash Iyer
I just tried this on a 2.3.3 tablet and it was interesting to see Firefox
score 235 with 9 bonus points (for comparison the default browser was 182
with 1 bonus point).

On Tue, May 31, 2011 at 7:33 AM, Mark Murphy mmur...@commonsware.comwrote:

 On Tue, May 31, 2011 at 7:24 AM, Scythe scythe...@gmail.com wrote:
  218 + 3 bonus on Galaxy Tab 10.1v, with 3.0.

 Same on a XOOM with 3.1.

 By way of comparison, Chrome 12 on Linux scores 291 and 13 bonus points.

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

 Android Training in NYC: http://marakana.com/training/android/

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


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

2011-05-25 Thread Prakash Iyer
you are trying to read the contacts but have not sought the permission that
it is so nicely printing out right there...

On Wed, May 25, 2011 at 2:49 PM, Hitendrasinh Gohil 
hitendra.virtuei...@gmail.com wrote:

 E/DatabaseUtils(  113): java.lang.SecurityException: Permission Denial:
 reading com.android.providers.contacts.ContactsProvider uri
 content://call_log/calls from pid=357, uid=10024 requ
 android.permission.READ_CONTACTS
 E/DatabaseUtils(  113): at
 android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:222)
 E/DatabaseUtils(  113): at
 android.content.ContentProvider$Transport.bulkQuery(ContentProvider.java:115)
 E/DatabaseUtils(  113): at
 android.content.ContentProviderNative.onTransact(ContentProviderNative.java:97)
 E/DatabaseUtils(  113): at
 android.os.Binder.execTransact(Binder.java:287)
 E/DatabaseUtils(  113): 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


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

2011-03-04 Thread Prakash Iyer
My 2c, if possible this should be removed when there is a proximity sensor.
Really irritating not to be able to see that email or go back to nav using
the notification when in speaker-phone/bluetooth mode. I know, not the
forum, but... Thanks!!

On Fri, Mar 4, 2011 at 1:06 PM, Dianne Hackborn hack...@android.com wrote:

 On Fri, Mar 4, 2011 at 9:57 AM, TreKing treking...@gmail.com wrote:

 On Fri, Mar 4, 2011 at 11:33 AM, Dianne Hackborn hack...@android.comwrote:

 Yes applications can't do this.  There is really no use in continuing a
 discussion about this.  You can't do it.

 Dianne, do you know if there's a reason the stock Phone Dialer does do
 this? I'm very curious what the logic is behind disabling the user's status
 bar when the phone is in use.


 Well it was requested from the UI designers at some point.  This may come
 from before there was a proximity sensor, to avoid accidentally pulling down
 the notifications with your cheek.

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

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


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


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

2011-03-03 Thread Prakash Iyer
There isn't any. Every few weeks or so such a question will come up and
while I jumped up and answered, usually Mark Murphy or Dianne Hackabod will
come back with this is not supported and by using any private API just
because some code does it might  will cause your code to break. This group
is meant for API published in the SDK only. In short you are on your own
here...

On Wed, Mar 2, 2011 at 11:38 PM, Santhosh Kumar santhoshgu...@gmail.comwrote:

 Hi Prakash,

  Thanks for replying, then what is the API we have to get on with
 developing calendar application?. I downloaded the source code for calendar
 app from source.android.com, and tried to analyze that, but it is still
 missing some packages (android.provider.calendar), and used android 3.0 api
 also, but still missing some packages.

 thanks  regards,
 G.Santhosh Kumar
 +91 9966973790



 On Thu, Mar 3, 2011 at 2:08 AM, Prakash Iyer thei...@gmail.com wrote:

 There is no Calendar API in the SDK. So you cannot thru any public API
 access the calendar on the device if that is what you are looking at.

 On Tue, Mar 1, 2011 at 9:58 AM, Santhosh Kumar 
 santhoshgu...@gmail.comwrote:

 Hi,

 I am working with Calendar functionality in android 2.2 api, and the
 api at that level (level 8) does not contain any Calendar classes to work
 for. so is there any way that i can implement calendar functionality?.

 thanks  regards,
 G.Santhosh Kumar

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


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




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

Re: [android-developers] How to implement Calendar App in Android

2011-03-02 Thread Prakash Iyer
There is no Calendar API in the SDK. So you cannot thru any public API
access the calendar on the device if that is what you are looking at.

On Tue, Mar 1, 2011 at 9:58 AM, Santhosh Kumar santhoshgu...@gmail.comwrote:

 Hi,

 I am working with Calendar functionality in android 2.2 api, and the
 api at that level (level 8) does not contain any Calendar classes to work
 for. so is there any way that i can implement calendar functionality?.

 thanks  regards,
 G.Santhosh Kumar

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

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

2011-02-28 Thread Prakash Iyer
Ok, urgency taken care of and replied. Now can you shed some light on what
is the problem? If there is an exception in an AsyncTask and it stops you
from processing, I'd think the right thing to do would be to inform the user
(thru the UI thread) of the problem and take care of it from there.

On Mon, Feb 28, 2011 at 7:22 AM, vani reddy vani.redd...@gmail.com wrote:

 Hi ,
 How to handle exceptions in AsyncTask in when the server is
 down?
   Please reply asap.Its very urgent

 --
  Regards,
 Vani Reddy

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

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

Re: [android-developers] Re: SDcard mount point in portable way?

2011-02-28 Thread Prakash Iyer
Is this something new? For the HTC phone on Verizon (Desire?) I was pretty
sure this returned the paltry external SD card while most users ended up
using the built in storage. This causes most apps indexing content on these
devices to fail, including the Gesture Search from Google Labs... Would love
to be wrong or plain ignorant on this as it has caused me a lot of grief and
custom code...

On Sat, Feb 26, 2011 at 7:32 PM, Dianne Hackborn hack...@android.comwrote:

 It returns the main partition, that you can count on being populated; for a
 device with a built-in USB mass storage and an external SD card it will
 return the built-in one.

 Android does not yet define the behavior for dealing with multiple SD
 cards.  Devices that use that configuration are outside of the core
 platform, and should provide their own mechanism for them if they want --
 such as a shared library to find out about the secondary storage.

 The platform really needs to define a good UX story around this before just
 throwing APIs at developers.

 On Sat, Feb 26, 2011 at 4:11 PM, Indicator Veritatis mej1...@yahoo.comwrote:

 What does this API do on a phone that has two SD cards? Does it just
 pick only one of them? Or do all such devices fail CDD and so are not
 on the Google Android Market?

 On Feb 26, 3:41 pm, Dianne Hackborn hack...@android.com wrote:
  On Fri, Feb 25, 2011 at 8:31 PM, Dimitry Golubovsky 
 golubov...@gmail.comwrote:
 
   I am not worried about Market at all. I am worried about the portable
   way to tell my program where is the sdcard root directory is mounted
   because part of the usage scenario is user being able to upload
   certain files to sdcard where my program must be able to find them.
 
   To clarify, this is a port of Squeak (Smalltalk) [1], [2] to Android
   which I am trying to alter to fit my needs; in particular the original
   port loaded the image from assets, but I would like to be able to load
   it from sdcard where user may place it after customization using an
   instance of Squeak on user's PC.
 
  The correct way to do this is Environment.getExternalStorageDirectory().
 
  If you want to make your application work on an incompatible device that
 has
  this API broken, you will need to write code specifically for that
 device.
   There is no magical solution that makes your app work regardless of
 what
  someone has done to Android.
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see
 and
  answer them.

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




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


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

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


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

Re: [android-developers] Re: app causes reboot on DroidX after activity gets destroyed - anybody having similar issues?

2011-02-07 Thread Prakash Iyer
Wow! I don't know if the following is helpful at all. I've seen my DroidX
reboot a bunch of times and in almost all cases the offending app is
probably Google Maps. I say probably because that's the forefront app.
Usually the whole screen freezes - nothing has an impact and then I see that
red circular image!! I wonder if there is a way to pin this down for that
app as well which might then make it a bigger priority for Moto to fix??

On Mon, Feb 7, 2011 at 6:48 AM, mot12 martin.hu...@gmail.com wrote:

 Possibly found the culprit. In several activities, I call this:

setContentView(R.layout.main);
switch (Preferences.getPrefOrientation(this, Screen.MAIN))
 {
case 0:
if
 (1.equals(Settings.System.getString(getContentResolver(),
 Settings.System.ACCELEROMETER_ROTATION)))

 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
break;
case 1:

 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
break;
case 2:

 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
break;

 Basically this fixes the screen orientation to portrait or landscape,
 or tells Android to use the rotation sensor again to determine the
 screen orientation. This code works fine except on the DroidX. Even on
 the DroidX fixed orientation works fine (protrait only, landscape
 only) but if I set the orientation to be tied to the sensor, resuming
 such an activity and then changing the sensor orientation causes the
 reboot. My app works fine if I take this single line of code out.

 Of course, this is completely unsatisfying. The line itself doesn't
 cause an immediate blowup but it seems to be the cause for blowups
 later. Maybe this is a firmware bug. Maybe it is something entirely
 different and all this is just circumstantial. I don't have the
 resources to spend more time on this issue now but if anybody has an
 idea on how to make sense of this, I would love to learn.

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


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

Re: [android-developers] Re: app causes reboot on DroidX after activity gets destroyed - anybody having similar issues?

2011-02-07 Thread Prakash Iyer
Cool, I think what you have done is commendable already. BTW if you want to
run some tests and I can help on my DroidX, I'd be happy to.

On Mon, Feb 7, 2011 at 10:35 AM, mot12 martin.hu...@gmail.com wrote:

 @Mark
 Thanks for the hint about the MOTODEV forum. That seems worthwhile
 even though my poor test user has already downloaded and run more than
 20 versions in helping me isolating offending code. I hope one
 additional barebones test won't push him over the edge. Who knows when
 I need him again.

 @Prakash
 I spent some time on the DroidX forums and at there are many posts
 about random reboots even with the stock firmware. Small developers
 can't continue chasing issues that may come down to faulty firmware.
 My time is better spent getting ready for Android 3.0. But the Moto
 guys could do the same thing I did since it is all open source (google
 maps may not be open source, I forgot). But this debugging is a pain.
 Take 30,000 lines of code (in my case), make an educated guess as to
 which parts may be responsible, and strip them out (leaving 22,000 in
 my case). Then the app worked. Then I built 5 test versions, each of
 them putting an additional 2000 lines of code back in. My user
 reported at which point it crashed and the I built 5 new versions
 between the last non-crashing and the crashing version. However, we
 were fairly lucky in that it all seemed to work. Stuff like this
 rarely comes down to a null-pointer or something similar but are often
 due to some side-effects that only occur in certain conditions like
 low memory. So this type of debugging I just outlined is not
 necessarily consistent and the results may even be misleading. We got
 lucky. Of course, Moto has access to parts of the device I don't and I
 am sure they can make the device log survive the reboot, something
 that would have saved me a lot of time.

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


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

2011-01-20 Thread Prakash Iyer
On the phone there's is a what's been using the battery. This says display,
contacts etc. I assume this is reasonably accurate on a process level...
On Jan 19, 2011 9:33 PM, Mark Murphy mmur...@commonsware.com wrote:

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

2010-12-14 Thread Prakash Iyer
Look at the doc for Handler  Looper. That's where you will handle the
message. Pass that instance to the place where you read the socket message
and use it to post. As you learn more you will want to take care of config
changes, not updating the ui when  it isn't visible etc.
On Dec 13, 2010 9:37 PM, JoeSchmoe rthompson.dtisoft@gmail.com
wrote:
 That's what I thought it was. How do I post to the main thread
 though? I can't find any documentation on how to do that?

 On Dec 13, 5:49 pm, Prakash Iyer thei...@gmail.com wrote:
 Look at logcat. I'm reasonably sure the trouble is that you are trying
 to update the UI from a different thread than the main app thread. In
 the button case you are in the main thread. You should post message to
 your main thread from the socket thread and then you should be fine.

 Sent from my iPhone

 On Dec 13, 2010, at 6:59 PM, JoeSchmoe rthompson.dtisoft@gmail.com
wrote:







  When doing

 OnClickListener mButtonYListener = new OnClickListener()
 {
 public void onClick( View v )
 {
 showDialog( DIALOG_PA_MESSAGE );
 }
 };
  .
 protected Dialog onCreateDialog( int id )
 {
 }

  is called and my Dialog Box is displayed properly.

  However, when the message to display the Dialog Box comes from a
  Socket rather than a Button as shown below, the display fails.

 class MyClosure extends Closure
 {
 public void ClosureMethod( Message message )
 {
   showDialog( DIALOG_PA_MESSAGE );
 }
 }

  Any solutions?

  Thanks!

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

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

2010-12-13 Thread Prakash Iyer
All what Mark said + be very careful on how the UI gets updated. If you,
like most others, are using an inner class for AsyncTask then the outer
instance is no longer the visible instance when your app goes away or even
an orientation changes. My 2c., AsyncTask has a noble intention but a very
unforgiving implementation given the app lifecycle. The easiest place to use
an AsyncTask is where you want something computed as long as the app is
visible, i.e. you start it off in onResume and cancel it in onPause. Any
thing else and you will be doing a lot of gymnastics and should be really
looking at alternatives.

On Mon, Dec 13, 2010 at 7:17 AM, Mark Murphy mmur...@commonsware.comwrote:

 On Mon, Dec 13, 2010 at 7:13 AM, umakantpatil umakantpat...@gmail.com
 wrote:
  I'm just confused about the lifecycle of activity and AsyncTask.
  I have an activity which opens new AsyncTask. Now if finish() that
 activity,
  will be background task also get closed ?

 No.

  Or will it be still going ?

 Yes.

  If going on then how long it will be going, till my code exceute or till
 the
  app gets exited ?

 The background thread of the AsyncTask should keep running until
 doInBackground() completes or the process is terminated.

 However, this is not a good thing. If you need to have background
 threads live even after an activity is finished, please have those
 threads be managed by a Service (perhaps even an IntentService).

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

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

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

2010-12-13 Thread Prakash Iyer
Look at logcat. I'm reasonably sure the trouble is that you are trying
to update the UI from a different thread than the main app thread. In
the button case you are in the main thread. You should post message to
your main thread from the socket thread and then you should be fine.

Sent from my iPhone

On Dec 13, 2010, at 6:59 PM, JoeSchmoe rthompson.dtisoft@gmail.com wrote:

 When doing

OnClickListener mButtonYListener = new OnClickListener()
{
public void onClick( View v )
{
showDialog( DIALOG_PA_MESSAGE );
}
};
 .
protected Dialog onCreateDialog( int id )
{
}

 is called and my Dialog Box is displayed properly.

 However, when the message to display the Dialog Box comes from a
 Socket rather than a Button as shown below, the display fails.


class MyClosure extends Closure
{
public void ClosureMethod( Message message )
{
  showDialog( DIALOG_PA_MESSAGE );
}
}


 Any solutions?

 Thanks!

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

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


Re: [android-developers] Re: onItemClick(AdapterView? parent, View view,

2010-12-02 Thread Prakash Iyer
You need to do setText in your implementation of getView. In the item
clicked, store your state and call notifyDatasetChanged (check the exact
name). Do not call getView...
On Dec 2, 2010 2:18 PM, kiros88 ghui...@gmail.com wrote:
 Okay wait so i get the concept tthat u do a getView from an
 ArrayAdapter but what i tried this before during the

 i called the adapter i used
 ArrayAdapter adapt = new
 ArrayAdapterString(this,android.R.layout.simple_list_item_1 ,
 songs);

 then after its already created i do


 public void onItemClick(AdapterView? parent, View view,
 int position, long id) {

 ((TextView)adapt.getView(position+1,null,parent)).setText(hello);

 And this doesnt work it crashes the app


 On Dec 2, 11:06 am, kiros88 ghui...@gmail.com wrote:
 Okay like where do u gets getView I dont see that function in the
 Listview class or the adapterView class so im not really sure where im
 suppose to be able to call getView.

 On Dec 1, 7:54 pm, Prakash Iyer thei...@gmail.com wrote:







  My 2c - you are over-complicating this.The getView is ONLY to give back
the
  view for the item that is requested. If you want this item to be
colored X
  then do it here. If you want another item to be colored Y then do it
when
  getView is called for that item. The state maintenance, i.e. what is X
or Y
  is done independent of the code within getView which needs to just
return
  the View...

  As for the specific text, if you are returning a TextView t, then
t.setText
  would work.

  On Wed, Dec 1, 2010 at 9:14 PM, kiros88 ghui...@gmail.com wrote:
   Okay i dont want to get to many ppl confused so im going to try to
ask
   this very simply. When android goes to this function when a user
   clicks on a item on your listview. basically u get a parent who im
   assuming is the array of textview that was set up during the
   setAdapter phase and view which the the corresponding View to which
   the user touched.   My main and only questions is i know i can adjust
   the view of View by saying stuff like

   (TextView)view = setText(hello)

   during the same time i want to beable to change another TextView in
   the AdapterView like the View after the View view so i guess view
   +1   i want to also be able to change that view into another word.

   Please dont ask me y im doing this just that im doing it for a reason
   I just really need help and i hope this explains that During the
   onItemClick listener function basically I want to adjust 2 different
   Views in the arrays of Views but i have no idea how to access the any
   other view then the given View view thats the argument they give
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.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs
cr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

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

2010-12-01 Thread Prakash Iyer
Hello,

Wrote a simple activity that uses registerReceiver to register an internal
subclass of BroadcastReceiver with an IntentFilter than has
ACTION_MEDIA_EJECT as it's action. I have not set any thing else
(data/category) or requested permissions in my manifest. I used the APIDemos
from the sample code (External Storage) as my guide along with the
documentation. Now when I install this app on a Droid or DroidX I do not get
that event even though I can see other receivers, e.g. something called Vold
on Droid or PhotoWidget on Droid X get those events. As a consolation, even
the APIDemos when installed on the phone doesn't get those events:)

What am I doing wrong?

Best!

-Prakash

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

2010-12-01 Thread Prakash Iyer
Isn't getView called from the system and you override it to give back a view
typically to display a list item? You say that you are calling getView - any
specific reason?

On Wed, Dec 1, 2010 at 1:22 PM, kiros88 ghui...@gmail.com wrote:

 so basically im trying to figure out what View convertView means
 exactly. On the definition it says

 The old view to reuse, if possible. Note: You should check that this
 view is non-null and of an appropriate type before using. If it is not
 possible to convert this view to display the correct data, this method
 can create a new view.

 so if I call getView should my convertView be a default view in case i
 can't get get the view from my adapterView?

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

2010-12-01 Thread Prakash Iyer
what do you mean by default view? that method is supposed to return a View
which is used to render the list item. the default implementation, whose
source i recommend you read, returns back a TextView the id (you can pass a
more complex view which has a TextView element etc. all of which is
documented) to which you pass in the constructor. the convertView is a
recycled view which can be used if it meets all the requirements. you should
override this method, as suggested by treking if you want to do anything
more than what is done by default.

On Wed, Dec 1, 2010 at 1:19 PM, kiros88 ghui...@gmail.com wrote:

 So basically on the function getView. I had a question im not sure
 about whats the argument View convertView for the middle? is taht
 suppose to be a default view or iono?

 On Nov 30, 9:01 pm, TreKing treking...@gmail.com wrote:
  On Mon, Nov 29, 2010 at 12:48 PM, kiros88 ghui...@gmail.com wrote:
   Im assuming the array adapter or adapterView parent
   is like a basic array that creates an array of textviews if thats what
   you want to create with your listviews.
 
  That's the gist of it.
 
   I'm just checking if thats right becuase my main questions is how to
 access
   the seperate textviews in the array.
 
  Generally, you don't - at least not until you need to. When they're going
 to
  be drawn, you'll have this method called on your adapter:
 
  http://developer.android.com/reference/android/widget/Adapter.html#ge...
 
  There you create or update the view as necessary.
 
   i got this method from the android library getDropDownView but im not
 sure
   if thats the method i want to use for this instance.
 
  Probably not.
 
 
 ---
 --
  TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
  transit tracking app for Android-powered devices

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

2010-12-01 Thread Prakash Iyer
My 2c - you are over-complicating this.The getView is ONLY to give back the
view for the item that is requested. If you want this item to be colored X
then do it here. If you want another item to be colored Y then do it when
getView is called for that item. The state maintenance, i.e. what is X or Y
is done independent of the code within getView which needs to just return
the View...

As for the specific text, if you are returning a TextView t, then t.setText
would work.

On Wed, Dec 1, 2010 at 9:14 PM, kiros88 ghui...@gmail.com wrote:

 Okay i dont want to get to many ppl confused so im going to try to ask
 this very simply. When android goes to this function when a user
 clicks on a item on your listview. basically u get a parent who im
 assuming is the array of textview that was set up during the
 setAdapter phase and view which the the corresponding View to which
 the user touched.   My main and only questions is i know i can adjust
 the view of View by saying stuff like

 (TextView)view = setText(hello)

 during the same time i want to beable to change another TextView in
 the AdapterView like the View after the View view so i guess view
 +1   i want to also be able to change that view into another word.

 Please dont ask me y im doing this just that im doing it for a reason
 I just really need help and i hope this explains that During the
 onItemClick listener function basically I want to adjust 2 different
 Views in the arrays of Views but i have no idea how to access the any
 other view then the given View view thats the argument they give 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.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] Copy a database from a retail phone to a development phone?

2010-11-29 Thread Prakash Iyer
you can export your contacts on your retail phone onto the sdcard, pull them
onto your computer, push them onto your development phone, import them onto
that dev phone.

don't know about call logs...

On Wed, Nov 24, 2010 at 5:55 PM, Jon Shemitz shem...@gmail.com wrote:

 I have a need to examine the contacts and call log databases. My
 development phone has no contacts; it also has no SIM card, and hence
 no calls. I need realistic data, so I can't just add some random
 garbage. The obvious answer is to copy the database from my personal
 (2.1u1 retail build) phone to my development (2.2 debug build) phone.

 How?

 I can `adb pull` the databases from my development phone but (while I
 can `adb shell` to my retail phone, once I turn on USB debugging) I
 can't  `adb pull` the databases from my retail phone.

 Is there a better way than writing an export utility that will dump
 the retail databases to text files, and an import utility that will
 append that data to the debug databases?

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

2010-11-11 Thread Prakash Iyer
Look at the NotePad example in the SDK. The main class is SQLiteDatabase.
There are functions to insert, update, replace and select. The helper is
good for creating and updating.
On Nov 11, 2010 8:28 AM, zizzfusion calumer...@gmail.com wrote:
 So I have a rather simple XML output from a database I made in mySQL.
 Now what I want to do is retrieve this data and place it into the
 SQLite database of my app. I'm at the stage where I've defined the
 onCreate methods for each of the tables. The XML data may need to be
 added to or changed over time so I need a way of dynamically loading
 the data into the SQLite database. Should this be possible?

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

2010-10-26 Thread Prakash Iyer
You might be using the contact id as id of raw contact. Isn't clear that's
the problem as I didn't bother to go thru your logic for contactData but
that would result in a problem like what you are describing...
On Oct 26, 2010 7:40 AM, A N K ! T ankit.awasth...@gmail.com wrote:
 while am trying to pick a contact from phone book it is returning another
 contact...
 i dont know what happening..
 this is my code

 .//*contactData is uri getting from onActivity result*

 *String[] parts = contactData.toString().split(/);
 long id = Long.parseLong(parts[parts.length - 1]);
 Uri rawContactUri =
 ContentUris.withAppendedId(RawContacts.CONTENT_URI,
 id);
 Uri entityUri = Uri.withAppendedPath(rawContactUri,
 Entity.CONTENT_DIRECTORY);

 Cursor c = activity
 .managedQuery(
 entityUri,
 new String[] { Entity.MIMETYPE, Entity.DATA1,
 Phone.TYPE },
 Entity.MIMETYPE + =? OR  + Entity.MIMETYPE + =?,
 new String[] {

 ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE,

 ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE },
 null);
 String NumbersData[][] = new String[c.getCount() - 1][2];
 number_type = new String[c.getCount() - 1];
 if (c.moveToFirst()) {
 do {
 String mimeType = c.getString(0);


 if (mimeType


.equals(ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE))
 {
 NAME = c.getString(1);
 Log.d(TAG, Name:  + NumbersData);
 } else if (mimeType

 .equals(ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE)) {
 NumbersData[i][0] = c.getString(2); // this is
 number type
 NumbersData[i][1] = c.getString(1); //this is the
 number
 i++;
 Log.d(TAG, Phone:  + NumbersData);
 }
 } while (c.moveToNext());*

 --

 A N K ! T..

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

2010-10-22 Thread Prakash Iyer
Don't you need to start the thread?
On Oct 22, 2010 9:02 AM, MarcoCanali marco.can...@gmail.com wrote:
 I use thic Code in a Class Of type Service :

 class A extends Service {







 @Override
 public IBinder onBind(Intent intent) {
 // TODO Auto-generated method stub
 Log.v(AppointmentFinderService, OnBind the Binder );
 return mBinder;
 }
 @Override
 public void onCreate() {

 Context context = getBaseContext();

 }
 @Override
 public void onDestroy() {
 // TODO Auto-generated method stub
 super.onDestroy();
 serviceHandler.removeCallbacks(myTask);
 serviceHandler = null;
 /** Destroy the Thread */
 myTask.destroy();
 }
 @Override
 public void onStart(Intent intent, int startId) {
 // TODO Auto-generated method stub
 super.onStart(intent, startId);
 myTask = new Task();
 serviceHandler = new Handler();
 serviceHandler.postDelayed(myTask, delayMillis);
 }





 class Task extends Thread{

 @Override
 public void run() {

 try {

 sleep(timeToSleep);
 } catch (InterruptedException e) {
 // TODO Auto-generated catch block
 e.printStackTrace();

 }
 }


 }
 The Service Work in Right mode but the other activity of application
 don't respond to command ...from the sleep command add !!

 Someone have an Idea of problem with Thread process, the sleep method
 intact the Application main core i think !!!


 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.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] Question on Shelves example

2010-10-21 Thread Prakash Iyer
The reference article on Painless Threading pointed me to the Shelves
example as a place to understand AsyncTask. So I was reading that example.
One question popped into my head while I was going thru ShelvesActivity. The
onPause code calls stopBooksUpdater. That code snippet is as follows,

private void stopBooksUpdater() {
final BooksUpdater booksUpdater = mBooksUpdater;
booksUpdater.clear();
booksUpdater.stop();
}

What's the reason for a local final variable which is manipulated as opposed
to the member variable? This happens in one more place but in others the
member variable is directly accessed, e.g. in onResume.

Thanks!

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

Re: [android-developers] Re: SQLite Database Issues

2010-10-15 Thread Prakash Iyer
I think what Kumar means is that does this ever work for this user in
question? One interpretation of your email is that it works for most users
but fails for some.
On Oct 15, 2010 10:07 AM, Albert albert8...@googlemail.com wrote:
 Well it should be very obvious but the table exits, im sure of that.
 It just from time to time the database fails to recognise that is
 there...

 Cheers,
 Alberto

 On Oct 15, 3:34 am, Kumar Bibek coomar@gmail.com wrote:
 Well, the error is pretty obvious. There is no table with that name. If
you
 have created the table, after your first installation, which didn't have
 this table, try uninstalling and re-installing this app. Make sure, you
 create all the tables that you need before you can start using them.





 On Fri, Oct 15, 2010 at 5:06 AM, Albert albert8...@googlemail.com
wrote:
  Hi all,

  I can see from some user's logs that my app randomly gets the
  following SQLiteException:

  android.database.sqlite.SQLiteException: no such table: DietTip: ,
  while compiling: SELECT DISTINCT tip FROM DietTip
 at android.database.sqlite.SQLiteProgram.native_compile(Native
  Method)
 at
android.database.sqlite.SQLiteProgram.compile(SQLiteProgram.java:
  117)
 at
android.database.sqlite.SQLiteProgram.init(SQLiteProgram.java:
  66)
 at android.database.sqlite.SQLiteQuery.init(SQLiteQuery.java:
  49)..

  It also happens often in another table that tracks the user's
  weight...

  Does anyone know a particular reason for this to be happening? It
  seems that it can't find the table or it can't compile the query. It
  has never happened to me in any of my phones.

  Thanks,
  Alberto

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

 --
 Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

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

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

Re: [android-developers] Why am I getting NullPointerException although I catch it?

2010-10-15 Thread Prakash Iyer
Your catching a NullPointerException in your
inputConnection.getTextBeforeCursor call is unnecessary. You are already
checking to see if inputConnection is null. It From the documentation of
InputConnection, and I quote

This method may fail either if the input connection has become invalid (such
as its process crashing) or the client is taking too long to respond with
the text (it is given a couple seconds to return). In either case, a null is
returned.

end quote. So I would guess your NullPointerException is possibly in the
fact that the cSeq is null and you are calling the method length() on a
possibly null object.

In the future you will be better off reading and sending logcat output which
would probably have told you the line no where the Exception was thrown and
hence made it simpler...

On Fri, Oct 15, 2010 at 10:53 AM, Saied saie...@gmail.com wrote:

 Hello,

 This is baffling me. It must be something that I am doing wrong
 fundamentally, but for the life of me I can't see it
 Can a good soul help me please?

 I am (supposedly) catching NullPointerException and returning 0 if
 that happens. But occasionally I get
 NullPointerException failure anyway.

 Is catching it this way no enough to prevent this failure?

 Thanks for your help.


 private char getCharBehindCursor (int offset){  // get a single char
 behind cursor + offsett
CharSequence cSeq;
InputConnection inputConnection = getCurrentInputConnection();
 if (inputConnection != null){
try {
cSeq =   inputConnection.getTextBeforeCursor
  (offset + 1, 0);
   } catch (NullPointerException npe) {
   /* failure*/
   return (char)0;
   }

   if (cSeq.length() == offset+1){
 return cSeq.charAt(0);
}
}
return (char)0;
 }

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

2010-10-15 Thread Prakash Iyer
I don't think you need to recycle the image in onPause. May be in onStop? If
you want to do it onPause, then you might want to let the Canvas know that
it's underlying image is no longer available in some fashion.

You should call super.X() when you override X as a general rule, so I think
DanH is referring to what looks like you are calling super.onPause in your
override of onDestroy. So you should be calling super.onDestroy...

On Fri, Oct 15, 2010 at 12:21 AM, Lisa lpk...@gmail.com wrote:

 thank you very much、for your answers. (⌒.⌒)/
 --
 viktor :
 I switching image, implements the following:

 if (imgViewBG != null) {
   final Bitmap imageBG = BitmapFactory.decodeFile(strFile+.png);
   imgViewBG.setImageBitmap(imageBG);
 }
 --
 Daniel :
 the size of the image is
 Yes I using big image 854x480, I did display full screen, It's
 necesary in my app. f(・_・)
 I used BitmapFactory.Options for preferably to the size, but image
 quality not good.
 My image have letters, so image quality is important.should write
 letters?

 I sorry , the second question is do not quite understand, how to as
 checking
 My english is not good. p(~_~?)
 --
 Prakash Iyer:
 then where should reomever the bitmap? (・_・?)
 --
 DanH :
 but if I not put super.onPause (); show the following error:

 10-15 02:16:10.778: ERROR/AndroidRuntime(193):
 android.app.SuperNotCalledException: Activity {cai.eigojozu/
 cai.eigojozu.episode.EpisodeActivity} did not call through to
 super.onPause()
 Can I do? (・_・?)
 --
 fr4gus :
 I'm looking, but do not quite understand, for example the difference
 between hard and soft cahce. as used, etc.
 Can you explain me? m(_ _)m  please. ┌(_ _)┐

 thank you very much indeed.
 Thanks a lot for all your replies.





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

2010-10-14 Thread Prakash Iyer
When are you calling the code to recycle? If I had to guess it looks like
you are doing it before the image is used by the canvas.

The onDestroy is called when the app is cleaned up, so that isn't very
useful in this case. From the snippet you have provided it isn't very
obvious why you would run into a problem. Are you during references to the
bitmap?
On Oct 14, 2010 8:11 AM, Lisa lpk...@gmail.com wrote:
 please help me. 。゜゜(´□`。)°゜。

 I am using android 1.6.

 my code to release a bitmap looks like this:

 if (imageBG != null) {
 imageBG.recycle();
 imageBG = null;

 }

 but when I do get to the following error: (u_u,)

 10-14 11:36:52.069: ERROR/AndroidRuntime(618): Uncaught handler:
 thread main exiting due to uncaught exception
 10-14 11:36:52.089: ERROR/AndroidRuntime(618):
 java.lang.RuntimeException: Canvas: trying to use a recycled bitmap
 android.graphics.bit...@437d8e60
 10-14 11:36:52.089: ERROR/AndroidRuntime(618): at
 android.graphics.Canvas.throwIfRecycled(Canvas.java:955)
 10-14 11:36:52.089: ERROR/AndroidRuntime(618): at
 android.graphics.Canvas.drawBitmap(Canvas.java:1044)
 10-14 11:36:52.089: ERROR/AndroidRuntime(618): at
 android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:291)
 ...

 What should I do? ~(・・?)
 I do not know how to release memory. 。゜゜(´□`。)°゜。

 please, help me.┌(_ _)┐

 Thanks a lot for all your replies. m(_ _)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.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: OutOfMemoryError

2010-10-14 Thread Prakash Iyer
Lisa,

Below is a complete guess, so it's worth what you paid for it:) I suspect
the Canvas is referencing the bitmap while trying to save state in onPause.
This is because when the activity resumes it needs to paint it back. Do you
want to move it to onStop?

Best,

Prakash
On Oct 14, 2010 8:36 AM, Lisa lpk...@gmail.com wrote:
 thanks for answering.

 I scale the Bitmap, butthe same time get the error. (u_u,)

 I call before loading the bitmap and also in the onPause and
 onDestroy.
 but when I call on the OnPause I get the following error:

 10-14 11:36:52.069: ERROR/AndroidRuntime(618): Uncaught handler:
 thread main exiting due to uncaught exception
 10-14 11:36:52.089: ERROR/AndroidRuntime(618):
 java.lang.RuntimeException: Canvas: trying to use a recycled bitmap
 android.graphics.bit...@437d8e60
 10-14 11:36:52.089: ERROR/AndroidRuntime(618): at
 android.graphics.Canvas.throwIfRecycled(Canvas.java:955)
 10-14 11:36:52.089: ERROR/AndroidRuntime(618): at
 android.graphics.Canvas.drawBitmap(Canvas.java:1044)
 10-14 11:36:52.089: ERROR/AndroidRuntime(618): at
 android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:
 291)

 I'm doing wrong?
 please, help me.┌(_ _)┐

 Thanks a lot for all your replies. m(_ _)m
 sorry for my bad English. (〃 ̄_ ̄〃)~゚

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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] Question on using custom View for a ListAdapter...

2010-10-14 Thread Prakash Iyer
Hello,

I'd like to show my users a list of items and when any one is selected, sort
of expand the view. Very similar to the the List example no 6 (List Adapter
Collapsed) in the SDK where if you click on the person you see the speech.
Now in my app, I allow only one expanded view, easy enough to do. Also, my
elements are not static and for ease of use, I extend ArrayAdapter. My
questions are as follows,

   1. In the getView there is a convertView parameter. I didn't see much
   documentation around it but given it's name and the source, I assume this is
   where the View object gets reused. In other words, if I don't do a setText
   here if the incoming parameter is non-null, I should see names/labels (of
   list items) getting recycled? I assume the framework has atmost X views
   alive where X could be less than the total count of items and more than a
   screenful. Am I correct or reading too much into this?
   2. Now, I have a TextView which I supply ArrayAdapter and then a
   TableLayout which is made visible on demand. The table can have upto N, say
   50, rows. Each row has 2 columns, an immutable name column and then the
   variable value column. Not every item will have N rows, and which of the N
   rows are present will vary as well. So, is the most efficient means of doing
   this,
  1. Have the view supplied to ArrayAdapter have the TableLayout with N
  rows, all with Visibility of Gone and then fill in the vaalues in getView
  and set Visibility appropriately
  2. View given to ArrayAdapter has the TextView and nothing else.
  Create one TableLayout object, N TableRow objects. Add/remove TableRow
  objects to the TableLayout singleton and add/remove the TableLayout
  singleton from the appropriate View in getView
  3. Something else altogether

Thanks a ton!

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

Re: [android-developers] Question on using custom View for a ListAdapter...

2010-10-14 Thread Prakash Iyer
Mark,

Thanks. I will try both approaches, somehow the in place looks more
intuitive on paper to me. Anyways given your suggestion it's probably
simplest to go with my approach 2, ie dynamically add the singleton to the
appropriate view. I can switch between the two approaches simpler that way
too. I think I'm making sense...

Best,

Prakash
On Oct 14, 2010 11:16 AM, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Oct 14, 2010 at 11:05 AM, Prakash Iyer thei...@gmail.com wrote:
 In the getView there is a convertView parameter. I didn't see much
 documentation around it but given it's name and the source, I assume this
is
 where the View object gets reused. In other words, if I don't do a
setText
 here if the incoming parameter is non-null, I should see names/labels (of
 list items) getting recycled? I assume the framework has atmost X views
 alive where X could be less than the total count of items and more than a
 screenful. Am I correct or reading too much into this?

 That sounds about right.

 Now, I have a TextView which I supply ArrayAdapter and then a TableLayout
 which is made visible on demand. The table can have upto N, say 50, rows.
 Each row has 2 columns, an immutable name column and then the variable
value
 column. Not every item will have N rows, and which of the N rows are
present
 will vary as well. So, is the most efficient means of doing this,

 Have the view supplied to ArrayAdapter have the TableLayout with N rows,
all
 with Visibility of Gone and then fill in the vaalues in getView and set
 Visibility appropriately
 View given to ArrayAdapter has the TextView and nothing else. Create one
 TableLayout object, N TableRow objects. Add/remove TableRow objects to
the
 TableLayout singleton and add/remove the TableLayout singleton from the
 appropriate View in getView
 Something else altogether

 Off the cuff, I'd go with something else altogether, in terms of a
 completely different UI implementation. I do not think your approach
 will be very user-friendly, particularly on smaller screens. Why are
 you forcing all of this into a single ListView? Why not:

 -- A ListView above and a single TableLayout (perhaps in a ScrollView)
 below, where the TableLayout's contents change based upon clicks in
 the ListView

 -- A ListView in one activity and the details (in a TableLayout or
 whatever) in a second activity, started by clicking on a ListView row
 in the first activity?

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

 Android Training in London: http://skillsmatter.com/go/os-mobile-server

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

2010-10-07 Thread Prakash Iyer
Also the paid PrinterShare version does say it will use wifi printers, so
you might want to check that. I have only used the free version so don't
know for sure.
On Oct 6, 2010 7:30 PM, Gober herrsky...@gmail.com wrote:

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

2010-10-07 Thread Prakash Iyer
It is not required that an onPause is always followed by onStop - in fact if
you press the home key that's what I have seen as the default behavior. This
way if the user goes back to your app, thru the home key press or from
launchpad, the onResume will be called and it will all be much faster than
doing an onCreate which would otherwise have been required.

On Thu, Oct 7, 2010 at 10:06 AM, sdphil phil.pellouch...@gmail.com wrote:

 I am seeing an issue where when I hit the back button, I get the
 onPause call, but it isn't followed by onStop and onDestroy.

 On most phones, I see this, but on one particular phone (Droid-X), I
 don't

 Any ideas?

 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.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: How to change the e-mail address programmatically?

2010-10-06 Thread Prakash Iyer
Have you set the required permissions in your manifest? Of course, in that
case you should be seeing that error in logcat. You are seeing something in
logcat right, i.e. you are sure you are seeing the right logcat?

On Wed, Oct 6, 2010 at 2:58 AM, Ali Chousein ali.chous...@gmail.com wrote:

 No, unfortunately I don't see any related message in the logcat.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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: How to start an activity from a service

2010-10-06 Thread Prakash Iyer
would you be able to use the NotificationManager and let the user start the
activity? if possible that might be less intrusive...

On Wed, Oct 6, 2010 at 2:23 AM, Doug beafd...@gmail.com wrote:

 startActivity works the same in a service as it does in an activity
 (Context vs. Activity argument not withstanding), and I don't think
 it's gauche to launch an activity from your service.  In many cases,
 you need to launch an activity from a service when it needs attention.

 Doug

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.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] android design considerations: AsynchTask vs Service (IntentService?)

2010-10-03 Thread Prakash Iyer
Dianne,

With all due respect, HandlerThread or Thread do NOT convey the message that
they can be used with the UI in the same way that an AsyncTask does. In fact
even a small para saying something like

AsyncTask runs as a separate thread and does interact with the Activity's
lifecycle. It is associated with the instance that executed the AsyncTask,
however the onProgress and onResult are called in the main UI thread that
deals with the currently active instance which could be different than the
one that executed the AsyncTask. Thus the developer must ensure that any
reference to the Activity or UI components are not stale.

would help, IMHO.

I think we are beating a dead horse here and way off topic for the OP, so I
will stop...

On Sun, Oct 3, 2010 at 1:13 AM, Dianne Hackborn hack...@android.com wrote:

 On Sat, Oct 2, 2010 at 3:39 PM, Prakash Iyer thei...@gmail.com wrote:

 Each his own. Try writing a AsyncTask that say lives for more than 10s and
 in the final result say updates a text field. Now before the AsyncTask
 completes, just change the orientation. I'd bet most developers would assume
 the text field will get updated. Most developers would be wrong as the
 AsyncTask's onResult will be calling the original object's (the one that did
 the execute) text field and not the one that is currently displayed. Can you
 make sure this works? Yes! Should this be documented? I would think it is
 absolutely essential.


 This has *nothing* to do with AsyncTask, this is all about the
 peculiarities of Activity.  You will run into the same issue if you use
 HandlerThread, a raw Thread()...  heck, you'd even have the issue if you
 didn't use another thread at all but just Handler.postDelayedMessage().

 This behavior is documented in the material Activity; it doesn't make any
 sense to try to document this in every other generic facility for
 asynchronicity just because if you use that with an Activity you will need
 to understand how Activity instances can be fairly transient.

 And what you need to do with AsyncTask is *different* depending on where
 you are using it -- in an Activity, or a Service, or a View, or whatever.
  They each have their own sometimes subtle details about lifecycle that you
 need to understand when introducing asynchronicity.  AsyncTask can't try to
 document exactly how to use it when combined with every other possible
 facility.

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

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

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


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

Re: [android-developers] android design considerations: AsynchTask vs Service (IntentService?)

2010-10-02 Thread Prakash Iyer
I'm not sure I agree with your comment that it is the wrong question. In
fact your explanation of how a majority of the cases a Service runs in the
same process is precisely why most people will consider these as
alternatives. I was trying to point out to the OP that if the OP ever wanted
to create something that lived independent of the UI and/or was planned to
be used by more than one activity independently developed/distributed, a
service would be a better choice...

IMHO the AsyncTask is notoriously poorly documented. It has some really
strange interactions with the Activity lifecycle... As some one pointed out
the IntentService is probably a better choice in many cases. Which again
brings to question the orthogonality of AsyncTask  Service...

On Sat, Oct 2, 2010 at 5:09 AM, Dianne Hackborn hack...@android.com wrote:

 On Fri, Oct 1, 2010 at 2:07 PM, Prakash Iyer thei...@gmail.com wrote:

 Service, OTOH, is designed to work in the background without requiring
 user interaction. Problem is that for your Activity to display the results
 it must somehow interact with your service. Ideally you will want to spawn
 the service off in a separate process and use either Intents or AIDL to
 communicate back progress to the Activity.


 The vast majority of the time, there is no need to run the service in a
 separate process and thus deal with all of the additional complexity of AIDL
 and such.

 As another poster mentioned, IntentService is very useful.

 Also AsyncTask vs. Service is the wrong question.  These are almost
 totally orthogonal to each other -- you very often may use an AsyncTask as
 part of implementing a service for example.

 And if your service is running in the same process as your activity, it is
 very easy to just bind to it from the activity, call on to it to get its
 current state, and supply a callback for when the state changes, just using
 normal Java coding.

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

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

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

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

2010-10-02 Thread Prakash Iyer
PS: Google on the groups website actually works. Here, I have done it for
you...

http://groups.google.com/group/android-developers/browse_thread/thread/d1380717b108b7db/d15fbc13dc64647d?lnk=gstq=LG+Verizon+OTA#d15fbc13dc64647d

Seems like is the user uninstalls and then reinstalls from the Market all is
well. That might be your answer...

On Sat, Oct 2, 2010 at 12:21 PM, lloyd lloydmcfarl...@comcast.net wrote:

  Could you point me to that thread? Yes the 2 problem customers have LG
 phones. How can they do a re-install of the app without my having to make a
 fake release and have the Market update all users? I do not want them to do
 a un-install as that would cause them to lose their data. Right?


  --

 *From:* android-developers@googlegroups.com [mailto:
 android-develop...@googlegroups.com] *On Behalf Of *Prakash Iyer
 *Sent:* Friday, October 01, 2010 6:08 PM
 *To:* android-developers@googlegroups.com
 *Subject:* Re: [android-developers] Corrupt installation



 Could be. If this is a LG on verizon, there's a thread here on how OTA to
 2.1 update caused a similarly described problem.

 On Oct 1, 2010 6:03 PM, lloyd1949 lloydmcfarl...@comcast.net wrote:

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

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

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

Re: [android-developers] OutOfMemory exception in OnCreate

2010-10-02 Thread Prakash Iyer
On Sat, Oct 2, 2010 at 6:14 PM, Yahel kaye...@gmail.com wrote:

 Hi all,

 I'm having a hard time resolving a crash report.
 It's an OutOfMemory exception that occurs during the setContentView in
 the onCreate of my main activity.

 I just want to be sure I understood Android LifeCycle well :

 1) The onCreate of my main activity is called once and only once
 during the life time of my application ? Is that correct ?


If what you mean is the process, then your answer is a no. Assuming this is
an Activity that can be launched from the launcher, i.e. no other Intent, a
process will be spawned the first time the user decides to start your
Activity. Then it goes through the lifecycle as described quite well in the
Activity documentation. Thus it is quite likely that onCreate gets called
multiple times, e.g. if you have not over-ridden the orientation change, it
will get called whenever the phone moves from landscape to portrait or vice
versa. You can test this out quite easily on the emulator.

Thus, if you have static variables etc. they will live thru all of this.
Your view will be cleaned up and redone in the onCreate.


 2) Just like for the big bang, before the oncreate of my activity,
 nothing exists for that activity, so memory consumption is zero, no
 objects exists right ?


Not correct. onCreate is called on an instance, so all the static variables
and any thing else required by your instance, e.g. a String that you may
have defined as a member variable etc is already loaded. Maybe you knew that
and are asking something else??



 So what can cause that sometimes, with random framework and devices, I
 get an OOM exception ?
 I mean if say my background image  is causing this, it should blow up
 everytime, on every device, shouldn't it ? I mean the result should be
 reliable.

 The background image is a standard jpg : 360*480 weighing 37kb,
 nothing fancy really :s


I think more detail here will help, Is this a bitmap loaded into a variable?
If yes and you hold a reference to your Activity object elsewhere, you might
leak for every orientation change.
...

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

Re: [android-developers] android design considerations: AsynchTask vs Service (IntentService?)

2010-10-02 Thread Prakash Iyer
Each his own. Try writing a AsyncTask that say lives for more than 10s and
in the final result say updates a text field. Now before the AsyncTask
completes, just change the orientation. I'd bet most developers would assume
the text field will get updated. Most developers would be wrong as the
AsyncTask's onResult will be calling the original object's (the one that did
the execute) text field and not the one that is currently displayed. Can you
make sure this works? Yes! Should this be documented? I would think it is
absolutely essential.

On Sat, Oct 2, 2010 at 6:25 PM, Tom Gibara tomgib...@gmail.com wrote:

 AsyncTask is excellently documented:

 http://developer.android.com/reference/android/os/AsyncTask.html

  http://developer.android.com/reference/android/os/AsyncTask.htmlAsyncTask
 has no interaction with the Activity lifecycle, except for that which you
 introduce with your own code.

 It's for precisely this reason that AsyncTask and Service are mostly
 orthogonal: An AsyncTask is helpful way of delegating work onto a thread
 other than the main thread; a Service exposes a component lifecycle so that
 a UI-free operation can be managed by the system.

 Tom.

 On 2 October 2010 22:20, Prakash Iyer thei...@gmail.com wrote:

 I'm not sure I agree with your comment that it is the wrong question. In
 fact your explanation of how a majority of the cases a Service runs in the
 same process is precisely why most people will consider these as
 alternatives. I was trying to point out to the OP that if the OP ever wanted
 to create something that lived independent of the UI and/or was planned to
 be used by more than one activity independently developed/distributed, a
 service would be a better choice...

 IMHO the AsyncTask is notoriously poorly documented. It has some really
 strange interactions with the Activity lifecycle... As some one pointed out
 the IntentService is probably a better choice in many cases. Which again
 brings to question the orthogonality of AsyncTask  Service...


 On Sat, Oct 2, 2010 at 5:09 AM, Dianne Hackborn hack...@android.comwrote:

 On Fri, Oct 1, 2010 at 2:07 PM, Prakash Iyer thei...@gmail.com wrote:

 Service, OTOH, is designed to work in the background without requiring
 user interaction. Problem is that for your Activity to display the results
 it must somehow interact with your service. Ideally you will want to spawn
 the service off in a separate process and use either Intents or AIDL to
 communicate back progress to the Activity.


 The vast majority of the time, there is no need to run the service in a
 separate process and thus deal with all of the additional complexity of AIDL
 and such.

 As another poster mentioned, IntentService is very useful.

 Also AsyncTask vs. Service is the wrong question.  These are almost
 totally orthogonal to each other -- you very often may use an AsyncTask as
 part of implementing a service for example.

 And if your service is running in the same process as your activity, it
 is very easy to just bind to it from the activity, call on to it to get its
 current state, and supply a callback for when the state changes, just using
 normal Java coding.

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

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

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


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


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

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

Re: [android-developers] Help with basic Threading / Message handling App

2010-10-01 Thread Prakash Iyer
Can you call the findViewById before the setContentView? If not the text
view member is null and that's your problem...

On Fri, Oct 1, 2010 at 2:54 PM, TreKing treking...@gmail.com wrote:

 On Wed, Sep 29, 2010 at 9:37 PM, EightBitSpade spectegu...@yahoo.comwrote:

 Unfortunately, I don't exactly what this means, but I gather that the
 problem comes from an uncaught exception occuring in threadid=1,
 that it was a java.lang.NullPointerException, and that it had
 something to do with handleMessage. Am i correct in this
 interpretation?


 Yes.


 And can anyone give me pointers on what I'm doing wrong here?


 If you look at the message, it also tells you exactly what line it's
 crashing on. So it's only a matter of using your debugger and stopping on
 the line that's it's throwing the exception on and seeing what's null at
 that point. From there, walk back to see what calls what along the path to
 that point to see where the variable that is null is being sent from and why
 it's not initialized.


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


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.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] android design considerations: AsynchTask vs Service (IntentService?)

2010-10-01 Thread Prakash Iyer
Not sure I am experienced but I did use both AsncTask and Service, so here
is my opinion.

AyncTask works great - until the user does something to visually alter your
app, e.g. changes orientation or goes to the home screen. Reason is that the
AsyncTask will most likely be referring to UI elements in the original
Activity instance and you will suddenly not see anything happening. Google
on the forum and you will see a discussion on a persistent dialog that tells
you the problem and one solution. Also, once the Activity is out of view, I
am guessing the OS can destroy it and there isn't much control given to
AsyncTask.

Service, OTOH, is designed to work in the background without requiring user
interaction. Problem is that for your Activity to display the results it
must somehow interact with your service. Ideally you will want to spawn the
service off in a separate process and use either Intents or AIDL to
communicate back progress to the Activity.

So, if your task can be paused and restarted along with the main Activity,
AsyncTask might work quite well. If not, Service might be the way to go. You
said the initial sync can take 15-20 min, so be sure you understand how an
AsyncTask interacts with Activity if it moved away from the foreground coz'
unless these are your real friends or you are showing something really
compelling, people will move on...

On Wed, Sep 29, 2010 at 2:50 AM, Tia cyclechic...@gmail.com wrote:


 I'm designing an android app which will need todo the following steps:

   1. user pushes a button or otherwise indicates to synch data.
   2. synch process will use REST web services to move data to and
 from the server.
   3. the data will be stored locally in a sqlite database.
   4. the synch process should provide status updates/messages to the
 UI
   5. the user should not be allowed to wander off to other parts of
 the application and do more work during the synch process.

 The first time the synch process runs, it may take 10-20 minutes.
 After the initial synch, less data will be transferred and stored and
 I expect the process to take 1-2 minutes or less.

 I've been doing a lot of reading about android's AsychTask and various
 examples of using a Service ... But I don't fully understand the
 design considerations and trade-offs of choosing one design over the
 other. I currently have my demo project stubbed out using an
 AsychTask. After watching (most of) Developing Android REST client
 applications:
 http://code.google.com/events/io/2010/sessions/developing-RESTful-android-apps.html#
 I'm left confused the design patterns described here feel overly
 complex, perhaps because I just don't get it yet.

 Would love to hear from some more experienced android developers out
 there who have already wrestled with these questions.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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 show notification while service is running..?

2010-10-01 Thread Prakash Iyer
You should look at the appropriately named NotificationManager...

On Thu, Sep 30, 2010 at 1:00 PM, Gold thangadura...@gmail.com wrote:

 Hi,

I want to show notification in service..!

While I click button in my home screen I just call
 service.!

That service run every 30 seconds with the help of
 timer..! I want to show result to user..!

How can I implement this..! Herewith I attached
 code..


 HOme screen
 --

 package com.servicetest;

 import java.util.Timer;

 import android.app.Activity;
 import android.content.Intent;
 import android.os.Bundle;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.widget.Button;
 import android.widget.Toast;

 public class Home extends Activity
 {
private Button btn;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
btn = (Button)findViewById(R.id.Button01);

btn.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v)
{
// TODO Auto-generated method stub
Toast.makeText(getApplicationContext(),
 Hai,
 Toast.LENGTH_SHORT).show();
Intent in = new Intent();
in.setClassName(com.servicetest,
 com.servicetest.ServiceTest);
startService(in);
}
});
}
 }


 ServiceTest.java
 ---


 package com.servicetest;

 import java.util.Date;
 import java.util.Timer;
 import java.util.TimerTask;

 import android.app.AlertDialog;
 import android.app.Notification;
 import android.app.NotificationManager;
 import android.app.Service;
 import android.content.Intent;
 import android.media.MediaPlayer;
 import android.os.IBinder;
 import android.util.Log;
 import android.widget.Toast;

 public class ServiceTest extends Service
 {
private Timer timer = new Timer();
private static final String TAG = MyService;
MediaPlayer player;
WebserviceConnect wsConnect = new WebserviceConnect();
String result = ;
boolean flag = true;
private long delay = 1000;
public static final int NOTIFICATION_ID_RECEIVED = 01221;

@Override
public IBinder onBind(Intent intent)
{
return null;
}

@Override
public void onCreate()
{
Toast.makeText(this, My Service Created,
 Toast.LENGTH_LONG).show();
Log.d(TAG, onCreate);
}

@Override
public void onDestroy()
{
Toast.makeText(this, My Service Stopped,
 Toast.LENGTH_LONG).show();
Log.d(TAG, onDestroy);
}

@Override
public void onStart(Intent intent, int startid) {
Toast.makeText(this, My Service Started,
 Toast.LENGTH_LONG).show();
Log.d(TAG, onStart);

timer.scheduleAtFixedRate(new TimerTask()
{

@Override
public void run()
{
// TODO Auto-generated method stub
result = wsConnect.Connect(CheckStatus,
 ID, 7x897);
Log.d(TAG,result);
}

}, delay  , delay);

Log.d(TAG,result);
Toast.makeText(getApplicationContext(), result, 5).show();
if (result.equals(Success))
{
timer.cancel();
timer = null;
}
}

 }




 Thanks  Warm Regards,
 Gold

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

2010-10-01 Thread Prakash Iyer
Could be. If this is a LG on verizon, there's a thread here on how OTA to
2.1 update caused a similarly described problem.
On Oct 1, 2010 6:03 PM, lloyd1949 lloydmcfarl...@comcast.net wrote:

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Marketplace updates - notified if apk not installed through marketplace?

2010-09-28 Thread Prakash Iyer
I have definitely seen the first issue, at least on 2.1. Seems like the
notification pops up only when I run the Market - don't have to check for
anything but the very act of running the Market seems to trigger a check on
the number of updates available. This seems to be the case on 2.2 as well at
least the first time I am checking this - right now I had to go to Downloads
within Market to see that there is an update though I must caveat this is
for a component used by an app (EStrongs File Explorer's Task Manager) as
opposed to an app itself. Don't know if that matters.

Not seen issue 2.

On Tue, Sep 28, 2010 at 3:20 PM, TreKing treking...@gmail.com wrote:

 On Tue, Sep 28, 2010 at 1:54 PM, Dianne Hackborn hack...@android.comwrote:

 Don't know what you mean about this rarely working, I am not aware of an
 issue there, and do get notifications all the time for apps installed on my
 phone.


 There are two issues I've noticed with notifications. First, the
 notifications don't pop up at all even though there are updates available
 and the option is set. In fact, I just checked the market to verify and I
 have two apps with updates available but no notifications were shown. I
 can't remember the last time I got a notification alerting me to new
 updates. I've just gotten in the habit of periodically checking for them
 myself.

 Second issue I noticed more on the G1 and don't think I've seen it on the
 Nexus, so maybe it's been fixed. But when notifications were shown they were
 almost always incorrect. Either the count was off (it'd say 4 new updates
 but there were really only 2) or it would be completely off and would say
 there were updates but there were none to be found when I went to the
 Market.

 Maybe it's just me ...


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

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

2010-09-27 Thread Prakash Iyer
no idea on a solution but if it helps, i can test it out on my droid x and
let you (and others) know what, if any thing, shows up on logcat.

On Sat, Sep 25, 2010 at 2:25 PM, samspade79 samspad...@gmail.com wrote:

 Good Evening Android Developers,

 My app (amongst other things) enables users to set the wallpaper (with
 some assets included in the app). This works perfectly on my Samsung
 Galaxy S, my Droid (the original) and my 500 year old G1. However I
 have people complaining in the marketplace about issues with the Droid
 X.

 I wondered if anyone on here had knowledge of any problems with the
 Droid X and setting wallpapers? I am unable to test on that phone and
 its driving me mad!

 Cheers,
 Sam

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

2010-09-26 Thread Prakash Iyer
Would be nice to have this at the instant the user is experiencing the issue
as opposed to a separate FAQ.

On Sun, Sep 26, 2010 at 4:23 AM, Doug beafd...@gmail.com wrote:

 Best advise your users, through your dev page or a FAQ, why you can't
 allow app2sd when it has a home screen widget or some other
 constraint that prevents it.

 Ignorant one-star ratings are a fact of life, as far as I can tell.
 No need to get worked up about it, but do what you can to alleviate
 the problem.

 Doug

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

2010-09-26 Thread Prakash Iyer
would he also need to synchronize the threads? else in the thread that he is
displaying the options he might have checked the boolean and then just
before he calls his function to display the onStop could have got called in
the other thread? possible?

On Sat, Sep 25, 2010 at 6:38 PM, Dianne Hackborn hack...@android.comwrote:

 isFinishing() is not what you want, that tells you if you have called
 finish().  The activity can be destroyed for other reasons, such as a
 configuration change.  Just implement onStop() to set a flag to say not to
 open the menu.


 On Sat, Sep 25, 2010 at 3:11 PM, Mark Carter mjc1...@googlemail.comwrote:

 Yeah, I was trying to remember why I posted it delayed - and I think its
 because I was having the problem without the delay.

 I suppose, even if the post is not delayed, the user might still back out
 before the openOptionsMenu gets to the front of the queue.

 Thanks - yeah, maybe use isFinishing() and possibly override it to set a
 flag when super.isFinishing() returns. isFinished() would have been nice!


 On 25 September 2010 23:48, TreKing treking...@gmail.com wrote:

 On Sat, Sep 25, 2010 at 3:11 AM, Mark Carter mjc1...@googlemail.comwrote:

 Is there any way to avoid this?


 Don't post it delayed? It's probably happening if a user clicks your app
 to open it, then decides it was a mistake and tries to exit immediately
 after, so the Activity is exiting by the time your Runnable runs.


 Maybe a test to see whether the activity is still running? If so, what
 is the most reliable way to do that?


 Maybe isFinishing()?


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

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


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




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

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


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


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

2010-09-26 Thread Prakash Iyer
My bad. I interpreted the Runnable in your post to assume a new thread. That
Handler syntax always confuses me! Thanks.
On Sep 26, 2010 8:45 AM, Mark Carter mjc1...@googlemail.com wrote:
 I think all these methods are called on the main thread, so this shouldn't
 be an issue.

 On 26 September 2010 14:23, Prakash Iyer thei...@gmail.com wrote:

 would he also need to synchronize the threads? else in the thread that he
 is displaying the options he might have checked the boolean and then just
 before he calls his function to display the onStop could have got called
in
 the other thread? possible?


 On Sat, Sep 25, 2010 at 6:38 PM, Dianne Hackborn hack...@android.com
wrote:

 isFinishing() is not what you want, that tells you if you have called
 finish(). The activity can be destroyed for other reasons, such as a
 configuration change. Just implement onStop() to set a flag to say not
to
 open the menu.


 On Sat, Sep 25, 2010 at 3:11 PM, Mark Carter mjc1...@googlemail.com
wrote:

 Yeah, I was trying to remember why I posted it delayed - and I think
its
 because I was having the problem without the delay.

 I suppose, even if the post is not delayed, the user might still back
out
 before the openOptionsMenu gets to the front of the queue.

 Thanks - yeah, maybe use isFinishing() and possibly override it to set
a
 flag when super.isFinishing() returns. isFinished() would have been
nice!


 On 25 September 2010 23:48, TreKing treking...@gmail.com wrote:

 On Sat, Sep 25, 2010 at 3:11 AM, Mark Carter mjc1...@googlemail.com
wrote:

 Is there any way to avoid this?


 Don't post it delayed? It's probably happening if a user clicks your
app
 to open it, then decides it was a mistake and tries to exit
immediately
 after, so the Activity is exiting by the time your Runnable runs.


 Maybe a test to see whether the activity is still running? If so,
what
 is the most reliable way to do that?


 Maybe isFinishing()?



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

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

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


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




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

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


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

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


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

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


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

Re: [android-developers] How to share data between applications with no dependency

2010-09-19 Thread Prakash Iyer
You could write a content provider app that installs independent of either
of your apps. Then each of your apps could check for and ask to install the
content provider as appropriate. May not be the simplest but it's a choice.

On Sep 19, 2010 8:23 AM, Mark Murphy mmur...@commonsware.com wrote:

On Sun, Sep 19, 2010 at 8:12 AM, ayanir ayanir...@gmail.com wrote:
 I want to share data between ...
That will be difficult.


 I tried to use ContentProvider but the problem is that only the first
 app can create the Provid...
Correct.


 I want the Content to be kept for the second app.
That is only possible if you store it on external storage.


 Also, I tried to use Settings.System which keeps the data regardless
 if the application is inst...
I have no idea what you are talking about.


 BTW, it seems that I can change ANY of the Settings.System which is
 not secured from Android OS...
Correct. The secure ones are in Settings.Secure.


 I see only one left choice using a File for that but, I wanted to know
 if I can use another way...
A file on external storage is the only thing that survives an
uninstall and is reachable by two applications.

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

Android Training in London: http://skillsmatter.com/go/os-mobile-server


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

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

2010-09-19 Thread Prakash Iyer
I might be missing something. I was proposing content provider as an app of
it's own, much like say how some of the file managers provide security
modules. So when A is installed the content provider is not. Of course the
user can go and just install the content provider but that's no different
than if the user deleted the file I guess.

On Sep 19, 2010 9:28 AM, Mark Murphy mmur...@commonsware.com wrote:

On Sun, Sep 19, 2010 at 9:23 AM, Prakash Iyer thei...@gmail.com wrote:
 You could write a content...
Except it won't support the data survives uninstall requirement:

-- User installs App A
-- App A realizes the provider isn't there and enables its own copy of
the provider
-- Life is good
-- User installs App B
-- App B sees that App A's provider is there, uses it
-- Life is still good
-- User uninstalls App A, wiping out the data
-- App B sees that App A's provider isn't there and enables its own
copy of the provider
-- User sees the data is gone
-- User is unhappy
-- Life is not so good

--

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

Groups Android Developers group.
To post to this group, send email to android-develop...@googlegro...

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] I need complete code of http and php for file upload from android to php server please help me!!!

2010-09-19 Thread Prakash Iyer
Sure. You can find it here,

http://www.catb.org/esr/faqs/smart-questions.html

Will you take fries and a drink with that?

On Sep 19, 2010 9:36 AM, David Harris bumpy...@gmail.com wrote:

Dear Members,

Please Please help me!!!

I need the java code for sending file from android and then a php code
to accept that file and store in my server.

I tried lots of code available on internet but have not succeeded :( i
am using latest Android SDK.

Please provide me with complete code if some one has. I am working on
this issue from last 14 days and it's still not resolved :(

Regards,
David

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: How to share data between applications with no dependency

2010-09-19 Thread Prakash Iyer
Yes. That's what I interpreted the OP saying when he says File is an option
but he's looking for alternatives.

On Sep 19, 2010 10:10 AM, DanH danhi...@ieee.org wrote:

Can an application not place images or music in directories on the
device, and have those files persist beyond the persistence of the
app?

On Sep 19, 7:23 am, Mark Murphy mmur...@commonsware.com wrote:

 On Sun, Sep 19, 2010 at 8:12 AM, ayanir ayanir...@gmail.com wrote:
  I want to share data betw...
 Mark Murphy (a Commons Guy)http://commonsware.com|
http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy


 Android Training in London:http://skillsmatter.com/go/os-mobile-server

-- 
You received this me...

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

Re: [android-developers] Re: How much money do you make?

2010-09-18 Thread Prakash Iyer
Just my 2c - the freemium model when executed well could be one answer.
Basically the free app version should do enough to not invite removal due to
either not compelling or too irritating. But it should also entice
enough so that the user just bites - again patience is key as not every one
will bite the very first time.

One app that does this well is Tapatalk (I am not associated with them in
any way other than being a happy, paying consumer). Their free version
allows me to read from forums, supply login, read private messages etc. but
then if I want to post/reply/click thru to bigger images etc I must upgrade.
They didn't keep telling me I was a cheapskate just when I tried a premium
feature. Loved it enough to pay up.

More than the platform it is the individual app I think. As an example, the
free virus scan software that Google Pack installs on the desktop is
irritating me to the point I am going to replace it - asks me to upgrade
whenever it can as opposed to when it makes sense.

On Sat, Sep 18, 2010 at 9:40 AM, DanH danhi...@ieee.org wrote:

 It's hard to compete against free.  I've not installed many phone
 apps, but in terms of desktop apps I find that quality/fit is so
 variable that I'm reluctant to pay up front for an app (have only done
 it on a couple of occasions), and I would imagine the same is true for
 phone apps.  I have on a handful of occasions (maybe 25% of those that
 give the option) upgraded a free desktop app to paid to gain more
 features (and a little bit out of guilt, I suppose).  I don't ever
 recall upgrading a trial period app -- for some reason they never
 seem that valuable to me when the trial period expires.

 One problem that phone apps have, I suspect, is that it's difficult/
 impossible (depending on the market) to directly provide interfaces to
 upgrade to a new version, whether free or paid, while desktop apps can
 do it seamlessly.

 On Sep 18, 3:59 am, Alex maroeb...@gmail.com wrote:
  I am very interested in the responses to this thread.
 
  I only have one app on the market, a simple home page widget.  It is
  free, and it has been downloaded 13,937 times with an active install
  percentage of 47%.
 
  Obviously, I would like to make some money from my apps, but when I
  look at paid versions of similar apps to mine, the download numbers
  are pitiful.
 
  We are constantly reading about the massive growth of Android and the
  10s of millions of devices out there, so why do most apps struggle to
  even grab a tiny percentage of that user base?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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: How to install the .apk file into blackberry

2010-09-18 Thread Prakash Iyer
Fair enough.

On Sat, Sep 18, 2010 at 4:30 AM, Indicator Veritatis mej1...@yahoo.comwrote:

 You did not read closely enough. I never -said- Android was a JME
 platform. Rather, I said that BlackBerry was a JME platform, and that
 Android used the Java language, NOT the platform.

 And yes, a JME app written for one phone has a good chance of failing
 on another JME phone, which is why people say that Sun's promise of
 write once, anywhere has become (at least for JME) write once,
 debug everywhere;)

 On Sep 17, 5:21 am, Prakash Iyer thei...@gmail.com wrote:
  I would dispute your last statement - Android is not a JME platform. Any
  Java based app has really no chance of running as is on a JME platform.
 In
  fact as any one who has done serious JME programming will tell you, an
  interesting JME program has a decent probability of not working as
 intended
  across JME devices even from the same platform. BTW, a standard JME
 program
  has a non-zero probability that it will not work as is on a BlackBerry -
  basically there are somethings that you need to use the BlackBerry API
 for
  that are not JSR.
 
  Now a Java app, without modifications wouldn't run on Android and vice
 versa
  but that is more due to the runtime support that you will agree is quite
  different in Android devices than on any platform.
 
  To the OP (in a vain attempt to not hijack the thread:)) - the best
 option
  is to use a Web view equivalent and then try to write the skeleton app
  across platforms. Or you could try to write JME compliant code that is
 pure
  Java, makes no use of any JSR and reuse that core across JME and Android
  platforms. The shims (which in this case might be quite thick:)) would be
  platform specific...
 
  On Fri, Sep 17, 2010 at 3:02 AM, Indicator Veritatis 
  mej1...@yahoo.comwrote:
 That is absolutely correct. BlackBerry phones are not Android phones.
   They do not understand APK files, nor is there any practical way to
   translate them to COD files.
 
   Now if the OP had been thinking of running JME files, that could be
   done. BlackBerry does support JME (MIDP 2.0, CLDC 1.2). But this is
   yet another example of how Android, though it uses the Java -
   language-, does not use or support the Java -platform-.
 
   On Sep 16, 1:29 pm, SheikhAman shekh.a...@gmail.com wrote:
Hahaha..
well, jokes apart, I really think you're on the wrong forum.
 
As far as I know, BlackBerry supports .cod files and it won't
understand what an APK file is.
 
secondly, if it the code inside the APK file uses the SDK made for
android and BlackBerry won't know anything about it.
so it won't work.
 
On Sep 16, 12:47 pm, bharani kumar bharanikumariyer...@gmail.com
wrote: Hi ,
 
 How to install the .apk file into blackberry ,
 
 --
 Regards
 B.S.Bharanikumarhttp://php-mysql-jquery.blogspot.com/
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
 

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

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

Re: [android-developers] Re: Service and application got crash

2010-09-18 Thread Prakash Iyer
that is one nice tool. reps inbound for that!

On Sat, Sep 18, 2010 at 4:12 AM, Indicator Veritatis mej1...@yahoo.comwrote:

 And he should use pastebin at http://pastebin.com/ too, right?

 On Sep 17, 8:26 am, TreKing treking...@gmail.com wrote:
  On Thu, Sep 16, 2010 at 5:27 AM, nimi nimishk...@gmail.com wrote:
   Plz take a look at it and help me..
 
  Sorry, but posting hundreds of lines of poorly formatted output is not a
  good way to get help.
 
  Please try to explain your problem in more detail. Explain the steps
 you're
  taking that lead you to your problem and only post logs that are relevant
 to
  the issue at hand.
 
 
 -
  TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
  transit tracking app for Android-powered devices

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.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: What's happening to my posts here? Is someone deleting them?

2010-09-18 Thread Prakash Iyer
I agree - Google hasn't figured out scale yet. After all they deal with what
a few 10's of searches and emails a day...

Some times I wish there would be some one who actually did what Chris is
referring to. Coming back in a few hours to email and finding out the top
posts are
- where are all my posts? well if none of them made it here then this one
wouldn't as well. if this one did then maybe others did as well...
- i am trying to do something that is well documented for a change. i am too
busy to read, so here let me ask the collective wisdom to solve it for me...
- i have screwed up by actually doing something before reading. now let me
find out if any one here can read logcat output because I sure as hell can
only paste it...

On Fri, Sep 17, 2010 at 8:52 PM, Saied saie...@gmail.com wrote:

 I thought people post messages then come back here to see who has
 responded to them and what.

 It's hard to believe that Google cannot handle a few tens of text
 posts everyday.

 Notoriously unreliable?? has anyone been put to task to fix it? This
 does not seem to be a very hard problem for a technology company like
 google.

 the dog ate your messages is a much better excuse.

 On Sep 17, 1:44 pm, Chris Stewart cstewart...@gmail.com wrote:
  Ok ok, I'll fess up.  I've been deleting your posts.  It's not that I
 don't
  find them useful, it's just that they're so painfully boring to read.  I
  can't take it, I... I just can't do it anymore.  It's not you, and I know
  it's *cliché to say*, but it's true.  It's not you at all, it's me.
 
  :-p
 
  --
  Chris Stewarthttp://chriswstewart.com
 
  Fantasy Football
 http://chriswstewart.com/android-applications/fantasy-football/-
  Android app for MFL fantasy football owners
 
  On Fri, Sep 17, 2010 at 3:37 PM, Kostya Vasilyev kmans...@gmail.com
 wrote:
17.09.2010 22:43, TreKing пишет:
 
   On Fri, Sep 17, 2010 at 12:42 PM, Saied saie...@gmail.com wrote:
 
   Is it the policy of this group to remove the posts for which Android
   cannot give an answer?
 
   Not really. I found your post in my email archive. I suggest you use
 your
   email to read from and post to this group. The web interface is
 notoriously
   unreliable.
 
   To OP - if you do this, be advised that your messages will not be
 relayed
   back to you over email. You will only see replies, if any.
 
   --
   Kostya Vasilyev -- WiFi Manager + pretty widget --
 http://kmansoft.wordpress.com
 
--
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

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


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

Re: [android-developers] Is it possible to rotate screen by program code but not accelerometer sensor?

2010-09-18 Thread Prakash Iyer
Not sure what you want to do here. Without the accelerometer the system
wouldn't recognize that the screen has rotated. You (the user) can disable
orientation change in the settings but then no app would ever know the
orientation has changed.

Now, the app can trap the orientation change and decide to do nothing about,
or set a timer and ignore successive notifications to overcome sensitivity
etc.

On Fri, Sep 17, 2010 at 8:17 PM, San Zhang dahua007...@gmail.com wrote:

 Hi every one,

 There are some shortcoming for system's rotate screen function:

 1. It is too sensitive to result in many unwanted rotating actions.
 2. Accelerometer consumed power greatly.

 I want disable it and control screen orientation by my own program. Is it
 possible?

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

2010-09-18 Thread Prakash Iyer
try getting logcat output or use adb to install your package on the emulator
and see what's happening. my guess would be the minSDK version is higher
than what is supported on the emulator...

On Sat, Sep 18, 2010 at 12:11 PM, AgitoM karel.m...@gmail.com wrote:

 Hope anyone can still offer a solution. Or can point me into the
 direction of a resource that might help.
 I'm quite desperate to find a solution to this, since the problem
 means I can't run Android apps on my office computer.

 On Sep 16, 12:20 pm, AgitoM karel.m...@gmail.com wrote:
  Been looking around the internet for some time for a solution, but
  still can't get it to work. Hence I am posting my problem here.
 
  I recently started learning Android, and have set up the development
  environment. I've created a HelloWorld like application. Basically I
  did nothing then create a project, and change the default display
  string. When I try to run the application on the emulator, it does not
  install the application on the Emulator.
 
  This is my Eclipse Console output:
 
  [2010-09-16 12:06:01 - DroidTest] Android Launch!
  [2010-09-16 12:06:01 - DroidTest] adb is running normally.
  [2010-09-16 12:06:01 - DroidTest] Performing
  com.example.DroidTestActivity activity launch
  [2010-09-16 12:06:01 - DroidTest] Automatic Target Mode: Preferred AVD
  'VanillaAVD' is not available. Launching new emulator.
  [2010-09-16 12:06:01 - DroidTest] Launching a new emulator with
  Virtual Device 'VanillaAVD'
 
  Ironically, doing the exact same thing on a other computer, does
  result in the application being installed and runned successfully.
 
  I've tried many things to fix this problem:
  - Fresh Eclipse install
  - Android SDK re-install
  - Project recreation
  - AVD re-creation
  - Changed Eclipse workspace
  - the kill-sever command line command.
 
  Getting quite desperate here, after having tried for two days, so hope
  someone has a clear solution for 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.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] Exception Logging

2010-09-18 Thread Prakash Iyer
I have thought along similar lines. I think it should just be option a.
Don't confuse the user with options. In fact don't even allow user to reply
back directly.

On Sep 18, 2010 1:19 PM, Brad Gies rbg...@gmail.com wrote:

 This is a bit long winded (sorry, but I need to explain what I'm doing
before I can ask the question).

Just wondering if I could get a few (hopefully few hundred) opinions on this
:

I developed an Exception Handler for my first Android app (released the
first month the market opened), which logs all uncaught exceptions to my
server, and since then I have gradually refined it and improved. I'm now
using it in my 4th public Android app and a few private apps, and I find it
extremely helpful to find bugs that don't happen to me when I'm testing.

One thing I added that is proving to be extremely useful is an AlertDialog
when the exception occurs asking the user if it is OK to contact him/her if
I need more information to be able to fix the problem, and a box for them to
enter their email address if they agree. I don't have good numbers for you
on the acceptance rate because most of my public apps already have the users
email address and for the private apps the company enforces their compliance
(or supplies the emails for me to use). BUT... it looks like about 20% of
users do enter their email address if asked, and that is more than enough to
be very useful.

I think I can increase the percentage of users that do supply their emails
addresses, and that is what my question is about :).  (I will ask it soon)

First, It has occurred to me that my Exception Logger might be even more
successful for me if other developers were also using it because users might
have seen it before and trust it when they first see it in my apps. That
obviously would only happen if quite a few developers were using it.

Anyway... sorry it's already getting long, and I AM trying to keep it from
becoming a book. I have repackaged my Exception Logger and will release it
in the next couple of days for other developers to use (the price is the
good one - FREE). I will host the thing on my server (FYI it's a Cloud based
server so we can increase capacity if needed) and any developers using it
will be able to log in and view the exceptions their app has generated, and
sort by time/date, user, and other fields.

NOW.. the question: I think the Exception Logger would be more successful
getting the users to agree to be contacted IF their email addresses were
kept confidential. Actually, I don't think there is much doubt that would be
the case. BUT, there is a tradeoff. Obviously, most developers would prefer
to see the email addresses so they can manage the contacts a bit more
effectively without using my website to do it, BUT if the email addresses
are not confidential, fewer users will give them.

So here are what I think are the options:

a)keep the email addresses confidential, but developers can send the
user an email using my website, include both a reply address which goes to
my website and then forwards the email to the developer, and also the
developers email address so the user could respond directly to the developer
if they choose. I'm sure this would have by far the highest success rate for
getting contact info  but means devs have to use my website to send the
first email at least.

b)give the user a choice of keeping the email address confidential or
just giving it to the developer. This should also have a fairly high
acceptance rate by the user, but complicates the process for them because
they would actually have to read the instructions to figure out how it
works, and quite possibly a few users would think they asked for their email
addresses to be confidential, when they actually checked the other option,
and would be upset if they found out later. It's also a bit more work for
me, for maybe very little benefit.

c)Don't bother keeping the email addresses confidential. All my own apps
work this way, and it is useful, but I'm sure either of the other two
options would have a better success rate of obtaining the email addresses,
and therefore would be better for most devs to get information about
problems in their apps.

I don't try the a) or b) options for myself because obviously I could see
the email addresses in my log files if I wanted to look, and it would be a
little deceitful to tell the user their email would be confidential in that
case, even if I did use them properly ... BUT, I can do that for other
developers without stretching the truth at all, so I think it's worth the
effort if other devs want to use it.

So, please let me know what your opinions are.

I'm also hoping to get some idea of how many developers might want to use
this. I've already done almost all the work, so it will be released even if
nobody wants to use it. It freaks me out a little to open up my server to an
unknown amount of use, but I am well setup to increase server capacity
quickly if needed, and I 

Re: [android-developers] Re: How to install the .apk file into blackberry

2010-09-17 Thread Prakash Iyer
I would dispute your last statement - Android is not a JME platform. Any
Java based app has really no chance of running as is on a JME platform. In
fact as any one who has done serious JME programming will tell you, an
interesting JME program has a decent probability of not working as intended
across JME devices even from the same platform. BTW, a standard JME program
has a non-zero probability that it will not work as is on a BlackBerry -
basically there are somethings that you need to use the BlackBerry API for
that are not JSR.

Now a Java app, without modifications wouldn't run on Android and vice versa
but that is more due to the runtime support that you will agree is quite
different in Android devices than on any platform.

To the OP (in a vain attempt to not hijack the thread:)) - the best option
is to use a Web view equivalent and then try to write the skeleton app
across platforms. Or you could try to write JME compliant code that is pure
Java, makes no use of any JSR and reuse that core across JME and Android
platforms. The shims (which in this case might be quite thick:)) would be
platform specific...

On Fri, Sep 17, 2010 at 3:02 AM, Indicator Veritatis mej1...@yahoo.comwrote:

 That is absolutely correct. BlackBerry phones are not Android phones.
 They do not understand APK files, nor is there any practical way to
 translate them to COD files.

 Now if the OP had been thinking of running JME files, that could be
 done. BlackBerry does support JME (MIDP 2.0, CLDC 1.2). But this is
 yet another example of how Android, though it uses the Java -
 language-, does not use or support the Java -platform-.

 On Sep 16, 1:29 pm, SheikhAman shekh.a...@gmail.com wrote:
  Hahaha..
  well, jokes apart, I really think you're on the wrong forum.
 
  As far as I know, BlackBerry supports .cod files and it won't
  understand what an APK file is.
 
  secondly, if it the code inside the APK file uses the SDK made for
  android and BlackBerry won't know anything about it.
  so it won't work.
 
  On Sep 16, 12:47 pm, bharani kumar bharanikumariyer...@gmail.com
  wrote: Hi ,
 
   How to install the .apk file into blackberry ,
 
   --
   Regards
   B.S.Bharanikumarhttp://php-mysql-jquery.blogspot.com/
 
 

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

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

Re: [android-developers] Re: install android hello alert into BlackBerry Mobile

2010-09-17 Thread Prakash Iyer
OP,

If you do a search you will find a way to run Android apps on
Block/BlackBerry. Involves taking the battery out using cables etc. I
haven't done it yet but I am sure, lots of people here would love to hear
results;-)

On Fri, Sep 17, 2010 at 2:51 AM, Kostya Vasilyev kmans...@gmail.com wrote:

  Yeah, that's the version for the construction market.

 Comes with a 50-lb bag of mortar and a trowel.


 To the OP: Blackberry does not run Android, and so you can't install
 Android application on a Blackberry.


 -- Kostya

 17.09.2010 10:42, Kumar Bibek пишет:

  Blockberry

 On Sep 16, 11:22 am, bharani kumarbharanikumariyer...@gmail.com
 wrote:

 Hi ,

 I did very simple alert program in android,

 i want to install this application into my blockberry and need to test
 that
 application working fine or not ,

 --
 Regards
 B.S.Bharanikumarhttp://php-mysql-jquery.blogspot.com/



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


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

2010-09-17 Thread Prakash Iyer
Please read the SDK documentation. There is in fact code to do exactly this.

On Fri, Sep 17, 2010 at 8:22 AM, mishra ankush.mc...@gmail.com wrote:

 hello all

 I am trying to access the phone number but not success , I can
 access name and id from the original phone book to my application but
 not phone number the code of accessing the name and id is..




 package org.mobilesoftphone.ui;

 import android.app.Activity;
 import android.content.Intent;
 import android.database.Cursor;
 import android.net.Uri;
 import android.os.Bundle;
 import android.provider.BaseColumns;
 import android.provider.ContactsContract;
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
 import android.widget.AdapterView;
 import android.widget.EditText;
 import android.widget.ListView;
 import android.widget.SimpleCursorAdapter;

 public class ContactManager extends Activity {

public static String abcd = org.mobilesoftphone.ui;
private static final int menu_aboutUs = 1;
private static final int menu_exit = 2;

private static final int menu_option = 0;

public static final String TAG = ankush;
public Cursor cursor;
private ListView mContactList;

private boolean mShowInvisible;
private ListView.OnItemClickListener onListClick = new
 ListView.OnItemClickListener() {
public void onItemClick(AdapterView? mAdapterView, View v,
int position, long id) {
// TODO Auto-generated method stub

String callno = ((Cursor)
 mContactList.getAdapter().getItem(
position)).getString(1);

Intent mainformintent = new
 Intent(ContactManager.this,
mainform.class);
String name = org.mobilesoftphone.callstring;
mainformintent.putExtra(name, callno);
ContactManager.this.startActivity(mainformintent);
finish();
}
};

public EditText phonetext;
public void aboutus() {

}

public void exit() {
finish();

}

/**
 * Obtains the contact list for the currently selected account.
 *
 * @return A cursor for for accessing the contact list.
 */
private Cursor getContacts() {
// Run query
Uri uri = ContactsContract.Contacts.CONTENT_URI;
String[] projection = new String[] { BaseColumns._ID,
ContactsContract.Contacts.DISPLAY_NAME };
String selection =
 ContactsContract.Contacts.IN_VISIBLE_GROUP +  =
 '
+ (mShowInvisible ? 0 : 1) + ';
String[] selectionArgs = null;
String sortOrder = ContactsContract.Contacts.DISPLAY_NAME
+  COLLATE LOCALIZED ASC;

return managedQuery(uri, projection, selection,
 selectionArgs,
sortOrder);
}

/**
 * Called when the activity is first created. Responsible for
 initializing
 * the UI.
 */
@Override
public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.phonebook);

mContactList = (ListView) findViewById(R.id.contactList);

// Initialize class properties
mShowInvisible = false;

// Register handler for UI elements

// Populate the contact list
populateContactList();

}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// TODO Auto-generated method stub
menu.add(0, menu_option, 0,
 Setting).setIcon(R.drawable.option);

menu.add(0, menu_aboutUs, 0, About
 Us).setIcon(R.drawable.abcd);
menu.add(0, menu_exit, 0, Exit).setIcon(R.drawable.exit);

// return super.onCreateOptionsMenu(menu);
return true;
}
@Override
protected void onDestroy() {
super.onDestroy();

}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
// TODO Auto-generated method stub

switch (item.getItemId()) {
case menu_option:
option();
return true;
case menu_aboutUs:
aboutus();
return true;
case menu_exit:
exit();
return true;
}
return false;

}

@Override
public void onPause() {


Re: [android-developers] Re: Browser: Keyboard disappears.

2010-09-17 Thread Prakash Iyer
Hmm, may be the OutOfResources exception has something to do with it? Just
sayin'...

On Fri, Sep 17, 2010 at 2:08 AM, KANTESH BABANNAVAR kantesh...@gmail.comwrote:

 Please somebody help me to solve this..

 On Aug 31, 2:57 pm, KANTESH BABANNAVAR kantesh...@gmail.com wrote:
  Hi Androidians,
 
   This is a magic happening with browser. When i touch the URL
  field  in the browser, a fake tittle bar comes up and it is a so
  called search dialog, and start typing some letters fast, the keyboard
  disappears. And the Log events* say the following. Once it is
  happened, especially in land scape, the edit text field (Integrated
  with keyboard itself), does not reflects the letters typed afterwards,
  but gets reflected in the fake tittle bar behind it. I am not able
  categorize where and how its happening. Could anybody help me.
 
  Thank you,
  With Regards
   Kantesh
 
  Log Events: / /
 
  D/dalvikvm( 3742): GC freed 6726 objects / 252560 bytes in 86ms
  E/SurfaceFlinger( 2061): createSurface() failed, generateId = -12
  W/WindowManager( 2061): OutOfResourcesException creating surface
  I/WindowManager( 2061): Out of memory for surface!  Looking for
  leaks...
  W/WindowManager( 2061): No leaked surfaces; killing applicatons!
  W/ActivityManager( 2061): Killing processes for memory at adjustment 1
  W/ActivityManager( 2061): Killing for memory: ProcessRecord{47fb9be8
  2142:com.android.inputmethod.latin/10015} (adj 1)
  I/Process ( 2061): Sending signal. PID: 2142 SIG: 9
  W/WindowManager( 2061): Looks like we have reclaimed some memory,
  clearing surface for retry.
  W/WindowManager( 2061): Due to memory failure, waiting a bit for next
  layout
  I/ActivityManager( 2061): Process com.android.inputmethod.latin (pid
  2142) has died.
  W/ActivityManager( 2061): Scheduling restart of crashed service
  com.android.inputmethod.latin/.LatinIME in 5000ms
  I/WindowManager( 2061): WIN DEATH: Window{480d1bf8 InputMethod
  paused=false}
  I/WindowManager( 2061): WIN DEATH: Window{48138248 PopupWindow:
  47e21b10 paused=false}
  E/ActivityThread( 2061): Failed to find provider info for
  android.server.checkin
  W/Checkin ( 2061): Can't log event SYSTEM_SERVICE_LOOPING:
  java.lang.IllegalArgumentException: Unknown URL
 content://android.server.checkin/events
  I/ActivityManager( 2061): Start proc com.android.inputmethod.latin for
  service com.android.inputmethod.latin/.LatinIME: pid=4285 uid=10015
  gids={3003, 1015}
  D/ddm-heap( 4285): Got feature list request
  D/dalvikvm( 4285): Trying to load lib /system/lib/libjni_latinime.so
  0x47f5fd70
  D/dalvikvm( 4285): Added shared lib /system/lib/libjni_latinime.so
  0x47f5fd70
  W/InputMethodManager( 2061): Ignoring onBind: cur seq=18, given seq=38
  D/dalvikvm( 4285): GC freed 1235 objects / 88664 bytes in 45ms

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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: How to reverse ListView scrolling behavior?

2010-09-17 Thread Prakash Iyer
Hmm... if I have turned the phone upside down. Or maybe a language that goes
from down to top;-)

Seriously though I don't see what the high horses here are. People have
pointed out, rather patiently, that the normal behavior is what is
implemented. Anything that goes against that can still be done but with some
work on part of the OP. One can argue forever on who defines normal of
course...

On Fri, Sep 17, 2010 at 12:48 PM, TreKing treking...@gmail.com wrote:

 On Fri, Sep 17, 2010 at 11:44 AM, DanH danhi...@ieee.org wrote:

 In a particular context normal scroll behavior was (almost) universally
 judged by users as backwards, even though a few screens later the
 situation was reversed.


 What context? If this is clearly explained so the rest of us dumb folk
 understand, it would be easier to climb down off the high horses.


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

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

2010-09-17 Thread Prakash Iyer
Super clever!

On Fri, Sep 17, 2010 at 1:08 PM, Kostya Vasilyev kmans...@gmail.com wrote:

  If this is just for testing, you could put a transparent view on top of
 the ListView, handle events there, and call scrolling methods in the
 ListView.

 -- Kostya

 17.09.2010 21:06, Moto пишет:

  If it makes everyone HAPPY!  I'm essentially doing a small study on
 user interface behavior.  I'm trying to test different behaviors of
 the UI in particular cases.  One would be while driving.  FYI, you
 shouldn't be using your phone while driving...

 In the case of an inverted ListView scrolling behavior, I trying to
 see how it feels to scroll when I have my hand extended out to the car
 craddle holding the phone.

 Here is what I'm trying to test, and I like to actually test not just
 jump into a conclusion, ohh no this is not UI friendly...  ;)

 *On a ListView usually more content is located below so you need to
 scroll down which means you must move your finger up.  Making this
 motion of moving the finger up can be very difficult when you are
 extending your arm.  Also, if the air is a bit humid. By inverting the
 list it might be better to scroll the content by moving your finger
 down than up!

 ***REMEMBER THIS IS A CASE STUDY***

 @TreKing
 Thanks for at least hinting on a path. I have been trying to intercept
 the touch events and trying to invert them but it's not really
 working...  I'll continue to test and try to see if I can post some
 code of what I'm doing.

 -Moto
 On Sep 17, 12:48 pm, TreKingtreking...@gmail.com  wrote:

 On Fri, Sep 17, 2010 at 11:44 AM, DanHdanhi...@ieee.org  wrote:

 In a particular context normal scroll behavior was (almost)
 universally
 judged by users as backwards, even though a few screens later the
 situation was reversed.

 What context? If this is clearly explained so the rest of us dumb folk
 understand, it would be easier to climb down off the high horses.


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



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


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

2010-09-16 Thread Prakash Iyer
would you mind expanding on how you solved the problem. certainly you have
provided a pointer but might help others avoid spending the same cycles...
thanks.

On Wed, Sep 15, 2010 at 9:54 AM, Alok Kulkarni kulsu...@gmail.com wrote:

 Solved the problem. Referred to the Manifest file of Androd Browser.
 Thanks,
 Alok.

 On Wed, Sep 15, 2010 at 4:59 PM, Alok Kulkarni kulsu...@gmail.com wrote:
  Hi,
  I want to do  the following.
  When a user clicks on a URL containing a few specific keywords like
  http://ad.mysite.com from somewhere like entering the URL in a to do
  note in calendar, i want to recognize mysite.com keywords and launch
  my application instead of browser.
  I know that the browser activity's manifest file contains a filter to
  launch it if the keywords http or www are found .So how can i override
  this behaviour?
  Thanks,
  Alok.
 

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

2010-09-16 Thread Prakash Iyer
very good thought but isn't this why you should be saving your state and
starting off as if you were resuming? from a user's perspective it is the
right expectation and from the os perspective this is the right
implementation.

On Wed, Sep 15, 2010 at 10:17 AM, viktor victor.scherb...@gmail.com wrote:

  If you haven't used an app this long, it's reasonable to expect it to be
  killed and started from scratch next time you open it. Why is this a
  problem?

 My app based on maps and blogs, many of users said that isn't
 convenient when they hide an app, and restating it to startup
 activity.

 They want that app coming to the same activity.

 For example, you are reading blog, and meet your friend somewhere, you
 will hide your app. After few minutes you want to come to your blog,
 but blog closed.


 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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: GOOGLE, WHAT IS GOING ON with the Active Install %? Bug in install to SDCARD is my guess!

2010-09-16 Thread Prakash Iyer
2.2 makes it easier to update all. otherwise if you have a lot of apps and
many have regular updates, it is actually quite tedious.

personally every update, pre 2.2. was a time for introspection. do i
love/use this app enough to spend the minute or two it will take of my
effort to click thru the update process. with, 2.2, at least for the apps
that don't change their permissions, it is an easier decision.

On Wed, Sep 15, 2010 at 10:06 AM, Zsolt Vasvari zvasv...@gmail.com wrote:

 So people just ignore the notification icon and don't bother updating?

 On Sep 15, 8:18 am, Michael A. michael.aki...@gmail.com wrote:
  On Sep 14, 9:21 pm, Pent tas...@dinglisch.net wrote:
 
   If that turns out to be it, I'm kindof horrified how many people are
   running old versions of
   my app!
 
  One of my games was released in April. More than 10 updates later, I
  am still receiving crash reports from the original version of the
  game.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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: Verizon Moto droid auto update to 2.2 yesterday

2010-09-16 Thread Prakash Iyer
I have been with the Droid and Droid X on Verizon and never seen this
behavior. They send you a notification that an upgrade is ready or if you
are anxious (like me), you can go check for upgrades. Looks very unusual - I
have seen them sneakily update BlackBerry so I suddenly have newer icons
like VCast XYZ and such. But that's not an OS upgrade...

On Thu, Sep 16, 2010 at 4:02 PM, Kostya Vasilyev kmans...@gmail.com wrote:

  16.09.2010 21:50, john brown пишет:

  But I was surprised that Verizon updated my os without warning or
 consent. They did notify me after the fact. I am just wondering if
 this is common or unusual. (Maybe I am just too cautious because of my
 previous experiences. I would consider it quite a calamity if
 Microsoft updated my XP's to Vistas.)

 FWIW, back when HTC was updating Hero from 1.5 to 2.1, the phone first
 displayed a notification. It was even possible to specify that the update be
 downloaded only over WiFi.

 So I guess that it's vendor / carrier dependent.

 [ waiting for either of my 2.1 phones - Moto Milestone  Samsung Galaxy S -
 to be updated to Froyo ]

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



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