Re: [android-developers] Dialog dismiss()

2011-09-08 Thread TreKing
On Thu, Sep 8, 2011 at 2:14 PM, Greg Donald gdon...@gmail.com wrote:

 How can I keep my dismiss() calls from blowing up?


Keep a class-level reference to the dialog and dismiss it if you're being
destroyed. Or use showDialog() / dismissDialog().

The issue (I ran into this):
1 - You show your dialog in Activity instance A.
2 - You rotate device while it's still showing.
3 - Background thread is still running in Activity instance A which is now
being destroyed.
4 - Background thread finally finishes and tries to dismiss a dialog that is
no longer attached to the original Activity instance A.
5 - Boom.


  Why doesn't try/catch work?


I *think* because dismiss is asynchronous - calling dismiss just puts the
dialog in the queue for cleanup. I think.

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

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

[android-developers] ViewFlipper with arbitrary number of Views

2011-09-08 Thread Pinheiro
Hi!
I'm developing a simple photo gallery application that pulls files
from the Net and uses a ViewFlipper to change Views.
Since I don't know how many Views the ViewFlipper will have, I have to
add all the views in code and not in XML.

My question is: are all the Views of the ViewFlipper loaded in RAM? If
I use, fo instance, a gallery with 100 or even 1000 photos with
320x480, will I run the risk of running out of memory or is Android
smart enough to and fetch and drop Views from memory as needed?

The alternative is the use a ViewFlipper with just 3 views (current,
previous and next) and load photos as needed but it is a cumbersome
process. Nevertheless, if anyone has a code example, I will be very
grateful.

Thanks in advance!

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


Re: [android-developers] log disappears

2011-09-08 Thread TreKing
There's a bug where after the logcat buffer gets full it wipes itself
continuously (you'll see one line at the top sometimes). If you hit the
little red X icon in the LogCat view, it will clear it out and let it start
over until it's full again.

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

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

Re: [android-developers] ViewFlipper with arbitrary number of Views

2011-09-08 Thread Mark Murphy
On Thu, Sep 8, 2011 at 3:45 PM, Pinheiro rui.c.pinhe...@gmail.com wrote:
 I'm developing a simple photo gallery application that pulls files
 from the Net and uses a ViewFlipper to change Views.
 Since I don't know how many Views the ViewFlipper will have, I have to
 add all the views in code and not in XML.

Consider using AdapterViewFlipper on Honeycomb.

 My question is: are all the Views of the ViewFlipper loaded in RAM?

Yes.

 If
 I use, fo instance, a gallery with 100 or even 1000 photos with
 320x480, will I run the risk of running out of memory or is Android
 smart enough to and fetch and drop Views from memory as needed?

You will run out of heap space.

 The alternative is the use a ViewFlipper with just 3 views (current,
 previous and next) and load photos as needed but it is a cumbersome
 process.

Hopefully, later this year, AdapterViewFlipper will hit the AOSP
repository, and we can look to try it out on earlier versions of
Android.

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


[android-developers] Re: ViewFlipper with arbitrary number of Views

2011-09-08 Thread Pinheiro
Thanks for the fast reply, it confirms my fears :-|

 AdapterViewFlipper on Honeycomb.

 Opsssieee, no can do... the app has to be compatible with 2.2.

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


[android-developers] Re: Live wallpaper thumbnail 208x192?

2011-09-08 Thread nadam
It's 208x192 on the Xoom. Not square. Other people have noticed this
too.
http://blog.perpetumdesign.com/2011/04/honeycomb-live-wallpaper-icon-mystery.html

Adding an xhdpi drawable doesn't make any difference since the Xoom is
an mdpi device. However, I can add a 208x192 drawable to drawable-
xlarge to make the thumbnail appear on the Xoom without messing up the
thumbnail on mdpi phones.

On 8 Sep, 09:00, James W jpbwebs...@gmail.com wrote:
 There doesn't appear to be any official documentation on the required
 size.

 However, from my testing on the emulator and real devices, it seems
 that the clearest/sharpestthumbnailimages are obtained by doubling
 the resolution of the icon size for each density.

 So for HDPI which has an icon size of 72x72, use 144x144 for 
 thewallpaperthumbnail.
 For MDPI with an icon size of 48, use 96.
 For LDPI with icon size of 36, use 72.

 Following this pattern, if XHDPI is double the density of MDPI, it
 should have an icon size of 96, hence I would expect 192x192 for 
 thethumbnail, at least one dimension of you are reporting below.

 Do they really not appear square on your Xoom? Or is it possible that
 they are using 192x192 and adding extra padding?

 On Sep 8, 1:25 am, nadam a...@anyro.se wrote:







  I can't find any documentation or examples oflivewallpaperthumbnail
  sizes. On my Motorola Xoom the thumbnails are displayed as 208x192,
  but other mdpi-devices (phones) use much smaller thumbnails. What are
  the recommended sizes for ldpi, mdpi, hdpi and xhdpi?

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


[android-developers] Re: Publish modified APK to the Android Market without triggering an Update to existing users?

2011-09-08 Thread BenMc
I don't think you can do that.

My users have been understanding of updates that have to go out for
the sake of compatibility with other devices.

I use minor version numbers like 3.0.1, .3.0.2 etc for minor fixes or
compatibility updates, and when they run the app after an update, it
shows what has been updated and I provide further explanation if the
update doesn't affect all users.

Android users should be understanding because they know there is a TON
of hardware out there that we have to support.



On Sep 8, 7:14 am, Paul idi...@gmail.com wrote:
 I'd like to publish a modified APK without triggering an update for my
 existing users. Wondering if I can just upload a new one with the same
 version number as the one that's out there already. Has anyone done
 this?

 Why? Because I'm fixing something that is mostly needed by newer
 phone's hitting the market and if existing users see an update they'll
 expect improvements, new features, etc. They've been waiting for new
 stuff for a while and this would just frustrate people. I'm not ready
 to deploy new features just yet, but have a fix that is needed for
 some newer phone's (different screen sizes) hitting the market.

 So I'd like to just deploy the modified apk with the same version. Let
 me know if anyone has success doing this and if there were any
 problems encountered. Thanks in advance.

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


[android-developers] Re: Filenot found exception

2011-09-08 Thread Jeremy Dagorn
Hi,

It is better to access sdcard by doing the following :


File SDCardFolder = new File(Environment.getExternalStorageDir()+/
yourfolder);
// test it :
if (SDCardFolder.exists()) String[] contentFolder =
SDCardFolder.list();

Check also if your permissions are well located in your manifest file,
sometimes you could write them in a wrong location, and they are
not recorded by the app..



On Sep 8, 6:12 am, vani reddy vani.reddy.bl...@gmail.com wrote:
 Hi friends,

 I am getting the below exception
 java.io.FileNotFoundException: /mnt/sdcard/ (Permission denied)
 Also i have set the below permissions in the manifest
 uses-permission
 android:name=android.permission.WRITE_EXTERNAL_STORAGE/uses-permission
 android:name=android.permission.READ_EXTERNAL_STORAGE/

 How to gain access to sdcard ?
 Please reply its too 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


[android-developers] Re: disable horizontal scrolling on a WebView

2011-09-08 Thread Jeremy Dagorn
Hi,

myWebView.setHorizontalScrollBarEnabled(false);?

best,


On Sep 8, 1:43 pm, bob b...@coolgroups.com wrote:
 Anyone know how to disable horizontal scrolling on a WebView?

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


[android-developers] Re: video frame transcoding in android

2011-09-08 Thread Drezden
You have too many questions, just hire someone to do it for you.

On Sep 7, 5:45 am, NAVI NEW navi44...@gmail.com wrote:
 Please help me how to do video frame trans-coding in 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


[android-developers] Re: how to Change resolution of video by java /Android code

2011-09-08 Thread Drezden
Go away.

On Sep 7, 4:16 am, NAVI NEW navi44...@gmail.com wrote:
 i have a video which have which containing  different video
 resolution, i want give it fix resolution by code.It's possible or not
 by code

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


[android-developers] Re: Upgrading from 1.6 to 2.2+

2011-09-08 Thread kypriakos

Hi guys,

apologies for the vagueness. We wrote apps using API 4 to run on HTC
G1
development phones that can run at the max Android 1.6. We wanted to
port a number of them to Android 2.2+ without (which was the first
mistake) testing them on actual hardware that does run that OS. Would
such phones run apps written with API 4 without major overhaul?

@ Diane - The diffs are primarily incremental right? Each new API
compared
to the one before it? Still this helps!

@ Mark - is Marakana only providing sessions on the West Coast? Do
they
have anything planned for the NorthEast?

On Sep 8, 12:22 pm, Dianne Hackborn hack...@android.com wrote:
 Information about the major changes in each version is available here:

 http://developer.android.com/sdk/index.html

 On the left is the section for each version.  This includes an overview of
 the major new feature, as well as detailed API diffs of the new APIs
 introduced in that version.

 Your question isn't specific enough to be able to answer much more than
 that.









 On Thu, Sep 8, 2011 at 8:53 AM, kypriakos demet...@ece.neu.edu wrote:

  Hi all,

  we are in the process of moving a number of apps and their convoluted
  logic from older OSes (1.6) to 2.2. Are versions 2.2+ backwards
  compatible
  for the most part with older versions? What are the most profound
  changes that need to be done? Most of these apps make use of data
  on the SD card (read and write to it) but the rest of the
  functionality is
  modest.

  I  know this is a loaded question and I am not looking for a
  comprehensive
  answer but more like major points/directions to follow. I was thinking
  also
  that Mark's books may come handy since they do progressively walk
  through
  versions.

  Thanks

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

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

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

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


[android-developers] can you switch screen orientation via an app?

2011-09-08 Thread Jim Graham
My new tablet (Archos 101IT) thanks to a friend from college) allows you
to lock the screen orientation in either portrait or landscape, IF you
want to.  99% of the time, I like to keep it in landscape mode.  HOWEVER,
there are a few apps which really work best in portrait.  As it is now, I
have to go into settings and switch the orientation back to rotate with
the tablet.  What I'd LIKE to do is have an app in the launcher pro dock
that will change the setting to portrait, and then later set it back to
landscape.  Basically something similar to WiFi On/Off, Airplane mode
On/Off, etc

Does anyone know if this is possible?  And if so, can you point me to
the right terms to search for in the dev guide?  I've only got a few
days to write this before I have to go into the hospital for cancer
surgery, and I'd like to have it working before then

Note:  don't worry about users hating this, as I'm THE user.  :-)
I just want to write this for my own use.

Thanks,
   --jim

-- 
73 DE N5IAL (/4)| DMR: So fsck was originally called
spooky1...@gmail.com|  something else.
 Running FreeBSD 7.0  | Q:   What was it called?
ICBM / Hurricane:   | DMR: Well, the second letter was different.
   30.44406N 86.59909W  |-- Dennis M. Ritchie, Usenix, June 1998.

Android Apps Listing at http://www.jstrack.org/barcodes.html

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


[android-developers] Re: Upgrading from 1.6 to 2.2+

2011-09-08 Thread kypriakos

Scratch the without (which was the first mistake) testing them on
actual
hardware that does run that OS. We are planning this upgrade now but
we don't have the hardware for it yet so we will be testing them on
emulators.
That was a different posting I had - I cannot see any dev phones on
the
Market.

On Sep 8, 4:40 pm, kypriakos demet...@ece.neu.edu wrote:
 Hi guys,

 apologies for the vagueness. We wrote apps using API 4 to run on HTC
 G1
 development phones that can run at the max Android 1.6. We wanted to
 port a number of them to Android 2.2+ without (which was the first
 mistake) testing them on actual hardware that does run that OS. Would
 such phones run apps written with API 4 without major overhaul?

 @ Diane - The diffs are primarily incremental right? Each new API
 compared
 to the one before it? Still this helps!

 @ Mark - is Marakana only providing sessions on the West Coast? Do
 they
 have anything planned for the NorthEast?

 On Sep 8, 12:22 pm, Dianne Hackborn hack...@android.com wrote:







  Information about the major changes in each version is available here:

 http://developer.android.com/sdk/index.html

  On the left is the section for each version.  This includes an overview of
  the major new feature, as well as detailed API diffs of the new APIs
  introduced in that version.

  Your question isn't specific enough to be able to answer much more than
  that.

  On Thu, Sep 8, 2011 at 8:53 AM, kypriakos demet...@ece.neu.edu wrote:

   Hi all,

   we are in the process of moving a number of apps and their convoluted
   logic from older OSes (1.6) to 2.2. Are versions 2.2+ backwards
   compatible
   for the most part with older versions? What are the most profound
   changes that need to be done? Most of these apps make use of data
   on the SD card (read and write to it) but the rest of the
   functionality is
   modest.

   I  know this is a loaded question and I am not looking for a
   comprehensive
   answer but more like major points/directions to follow. I was thinking
   also
   that Mark's books may come handy since they do progressively walk
   through
   versions.

   Thanks

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

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

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

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


Re: [android-developers] Re: Upgrading from 1.6 to 2.2+

2011-09-08 Thread Mark Murphy
On Thu, Sep 8, 2011 at 4:40 PM, kypriakos demet...@ece.neu.edu wrote:
 Would
 such phones run apps written with API 4 without major overhaul?

Unless your apps are doing something very strange, they should run
fine. Again, if these app are on the Market, they are probably already
running on newer versions of Android.

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


Re: [android-developers] Dialog dismiss()

2011-09-08 Thread Greg Donald
On Thu, Sep 8, 2011 at 2:29 PM, TreKing treking...@gmail.com wrote:
 On Thu, Sep 8, 2011 at 2:14 PM, Greg Donald gdon...@gmail.com wrote:

 How can I keep my dismiss() calls from blowing up?

 Keep a class-level reference to the dialog and dismiss it if you're being
 destroyed.

Well, I just have the one instance I reuse everywhere already.  And if
what you said below about it being asynchronous is true, then my other
checks to see if it's still around could still pass later.

I don't get why if( this != null ) evaluates to true when the stack
trace seems to imply the Activity is gone already.

 2 - You rotate device while it's still showing.

Exactly what I'm hearing.  Rotate, boom.

  Why doesn't try/catch work?

 I *think* because dismiss is asynchronous - calling dismiss just puts the
 dialog in the queue for cleanup. I think.

Geez..  I'm thinking I might just lock it in to landscape mode and
forgo the grief.


-- 
Greg Donald

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

2011-09-08 Thread Miguel Morales
The problem is that you are attempting to update the UI in a foreign thread.
This line: progressDialog.dismiss();

You seem to be using a handler, so just change it to:
handler.postRunnable(new Runnable() {
@Override
public void run() {
progressDialog.dismiss();
});

Don't ever touch the UI outside of the UI thread.

To handle rotation, save a static instance of your activity in your
onCreate() method and remove it on onDestroy();
So, something like:

static MyActivity mStaticSelf = null;

onCreate() {
mStaticSelf = this;
}

Then change your handler code to:
@Override
public void run() {
mStaticSelf.progressDialog.dismiss();
});

On Thu, Sep 8, 2011 at 2:30 PM, Greg Donald gdon...@gmail.com wrote:
 On Thu, Sep 8, 2011 at 2:29 PM, TreKing treking...@gmail.com wrote:
 On Thu, Sep 8, 2011 at 2:14 PM, Greg Donald gdon...@gmail.com wrote:

 How can I keep my dismiss() calls from blowing up?

 Keep a class-level reference to the dialog and dismiss it if you're being
 destroyed.

 Well, I just have the one instance I reuse everywhere already.  And if
 what you said below about it being asynchronous is true, then my other
 checks to see if it's still around could still pass later.

 I don't get why if( this != null ) evaluates to true when the stack
 trace seems to imply the Activity is gone already.

 2 - You rotate device while it's still showing.

 Exactly what I'm hearing.  Rotate, boom.

  Why doesn't try/catch work?

 I *think* because dismiss is asynchronous - calling dismiss just puts the
 dialog in the queue for cleanup. I think.

 Geez..  I'm thinking I might just lock it in to landscape mode and
 forgo the grief.


 --
 Greg Donald

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



-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com/, http://www.youtube.com/user/revoltingx

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

2011-09-08 Thread Sarath Krishna
I was reading about PowerManager API . But, I couldn't understand the
term wavelock.  What is a wavelock? What does it exactly do?

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

2011-09-08 Thread Miguel Morales
Actually, don't use a ProgressDialog, use Activity.showDialog()
instead.  This handles device orientation.

On Thu, Sep 8, 2011 at 2:41 PM, Miguel Morales therevolti...@gmail.com wrote:
 The problem is that you are attempting to update the UI in a foreign thread.
 This line: progressDialog.dismiss();

 You seem to be using a handler, so just change it to:
 handler.postRunnable(new Runnable() {
    @Override
    public void run() {
        progressDialog.dismiss();
    });

 Don't ever touch the UI outside of the UI thread.

 To handle rotation, save a static instance of your activity in your
 onCreate() method and remove it on onDestroy();
 So, something like:

 static MyActivity mStaticSelf = null;

 onCreate() {
    mStaticSelf = this;
 }

 Then change your handler code to:
 @Override
    public void run() {
        mStaticSelf.progressDialog.dismiss();
    });

 On Thu, Sep 8, 2011 at 2:30 PM, Greg Donald gdon...@gmail.com wrote:
 On Thu, Sep 8, 2011 at 2:29 PM, TreKing treking...@gmail.com wrote:
 On Thu, Sep 8, 2011 at 2:14 PM, Greg Donald gdon...@gmail.com wrote:

 How can I keep my dismiss() calls from blowing up?

 Keep a class-level reference to the dialog and dismiss it if you're being
 destroyed.

 Well, I just have the one instance I reuse everywhere already.  And if
 what you said below about it being asynchronous is true, then my other
 checks to see if it's still around could still pass later.

 I don't get why if( this != null ) evaluates to true when the stack
 trace seems to imply the Activity is gone already.

 2 - You rotate device while it's still showing.

 Exactly what I'm hearing.  Rotate, boom.

  Why doesn't try/catch work?

 I *think* because dismiss is asynchronous - calling dismiss just puts the
 dialog in the queue for cleanup. I think.

 Geez..  I'm thinking I might just lock it in to landscape mode and
 forgo the grief.


 --
 Greg Donald

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



 --
 ~ Jeremiah:9:23-24
 Android 2D MMORPG: http://solrpg.com/, http://www.youtube.com/user/revoltingx




-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com/, http://www.youtube.com/user/revoltingx

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

2011-09-08 Thread bob
Can someone tell me how to pop up a dialog with two buttons on it that
say Facebook and Twitter?

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

2011-09-08 Thread TreKing
On Thu, Sep 8, 2011 at 4:30 PM, Greg Donald gdon...@gmail.com wrote:

 I don't get why if( this != null ) evaluates to true when the stack trace
 seems to imply the Activity is gone already.


Be careful - in you code *this* refers to the thread itself, *not* the
Activity. In any case, the parent Activity also will not be null as long as
the thread spawned from within it is still running, since the thread itself
holds an implicit reference to it (TheThreadsActivity.this).

Geez..  I'm thinking I might just lock it in to landscape mode and forgo the
 grief.


That will just hide the problem - rotating the device is the easiest but not
only way to get in this situation. Better to deal with it and fix it
correctly.

On Thu, Sep 8, 2011 at 4:41 PM, Miguel Morales therevolti...@gmail.com
 wrote:

 The problem is that you are attempting to update the UI in a foreign
 thread.
 This line: progressDialog.dismiss();


dismiss() can be called from any thread:
http://developer.android.com/reference/android/app/Dialog.html#dismiss()
It just queues the dialog up for cleanup - or something along those lines.
This is why Greg's code path is not in the stacktrace.

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

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

[android-developers] error compiling .aidl file

2011-09-08 Thread Chetan Dhillon
Hi,

I have a very simple .aidl file that I am getting error compiling.

Here is my IPresence.aidl:

package com.sample.presence;

import com.sample.presence.StatusMessage;

interface IPresence {
int setStatusMessage(in String msg);
}

I also have StatusMessage.aidl in the package defined as:

package com.sample.presence;

parcelable StatusMessage;

Also StatusMessage.java that defines CREATOR and other methods,

When I compile this IPresence.aidl, I am getting the following error:

sh-3.2$ aidl -I. IPresence.aidl
IPresence.aidl:1: syntax error
IPresence.aidl:1: syntax error don't know what to do with import
IPresence.aidl:1: syntax error don't know what to do with import
IPresence.aidl:1: syntax error don't know what to do with
com.sample.presence.StatusMessage
IPresence.aidl:1: syntax error don't know what to do with ;
sh-3.2$


I did google on these error but could not find any help.  I have
another .aidl in another package and that also has imports but that is
compiling fine. Any help?

thanks
Chetan

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

2011-09-08 Thread Miguel Morales
 dismiss() can be called from any
 thread: http://developer.android.com/reference/android/app/Dialog.html#dismiss()
 It just queues the dialog up for cleanup - or something along those lines.

Hmm, I see.  I would argue it shouldn't be thread safe, since it
violates the don't touch the UI rule.
But yeah, I highly recommend using showDialog/removeDialog and don't
bother holding an instance of the progress dialog yourself.
This, along with the static activity should work ok if you want a
quick fix.  Or, you'll have to use saveinstance to save status of your
app and handle it accordingly in onCreate().



 This is why Greg's code path is not in the stacktrace.
 -
 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



-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com/, http://www.youtube.com/user/revoltingx

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

2011-09-08 Thread Miguel Morales
Override the dialog class and set your own layout.
I *think* dialog builder also has a method for setting your own layout.

On Thu, Sep 8, 2011 at 3:09 PM, bob b...@coolgroups.com wrote:
 Can someone tell me how to pop up a dialog with two buttons on it that
 say Facebook and Twitter?

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




-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com/, http://www.youtube.com/user/revoltingx

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

2011-09-08 Thread Mark Murphy
On Thu, Sep 8, 2011 at 5:42 PM, Sarath Krishna
sarathkrishn...@gmail.com wrote:
 I was reading about PowerManager API . But, I couldn't understand the
 term wavelock.  What is a wavelock? What does it exactly do?

There is no wavelock. There is WakeLock. An acquired WakeLock keeps
the device awake (e.g., CPU powered on), until it is later released.

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


Re: [android-developers] What is wavelock in PowerManager API

2011-09-08 Thread Pratik Prajapati
copied Wakelock documentation below.


Wakelocks
=

A locked wakelock, depending on its type, prevents the system from entering
suspend or other low-power states. When creating a wakelock, you can select
if it prevents suspend or low-power idle states.  If the type is set to
WAKE_LOCK_SUSPEND, the wakelock prevents a full system suspend. If the type
is WAKE_LOCK_IDLE, low-power states that cause large interrupt latencies, or
that disable a set of interrupts, will not be entered from idle until the
wakelocks are released. Unless the type is specified, this document refers
to wakelocks with the type set to WAKE_LOCK_SUSPEND.

If the suspend operation has already started when locking a wakelock, it will
abort the suspend operation as long it has not already reached the suspend_late
stage. This means that locking a wakelock from an interrupt handler or a
freezeable thread always works, but if you lock a wakelock from a suspend_late
handler you must also return an error from that handler to abort suspend.

Wakelocks can be used to allow user-space to decide which keys should wake the
full system up and turn the screen on. Use set_irq_wake or a platform specific
api to make sure the keypad interrupt wakes up the cpu. Once the keypad driver
has resumed, the sequence of events can look like this:
- The Keypad driver gets an interrupt. It then locks the keypad-scan wakelock
  and starts scanning the keypad matrix.
- The keypad-scan code detects a key change and reports it to the input-event
  driver.
- The input-event driver sees the key change, enqueues an event, and locks
  the input-event-queue wakelock.
- The keypad-scan code detects that no keys are held and unlocks the
  keypad-scan wakelock.
- The user-space input-event thread returns from select/poll, locks the
  process-input-events wakelock and then calls read in the input-event device.
- The input-event driver dequeues the key-event and, since the queue is now
  empty, it unlocks the input-event-queue wakelock.
- The user-space input-event thread returns from read. It determines that the
  key should not wake up the full system, releases the process-input-events
  wakelock and calls select or poll.

 Key pressed   Key released
 | |
keypad-scan  ++
input-event-queue+++  +++


process-input-events   +++  +++



On Thu, Sep 8, 2011 at 3:45 PM, Mark Murphy mmur...@commonsware.com wrote:

 On Thu, Sep 8, 2011 at 5:42 PM, Sarath Krishna
 sarathkrishn...@gmail.com wrote:
  I was reading about PowerManager API . But, I couldn't understand the
  term wavelock.  What is a wavelock? What does it exactly do?

 There is no wavelock. There is WakeLock. An acquired WakeLock keeps
 the device awake (e.g., CPU powered on), until it is later released.

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




-- 
Kind Regards,
Pratik Prajapati

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

2011-09-08 Thread manan
Hi

I want to have some information about odex files.
I have never used this in my application, i have always used
classes.dex files.

My questions is
1. What do I need to do to create odex files
2. Is there any problem I can have when upgrading my apps from market
in this case.

Thanks,
Manan

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

2011-09-08 Thread Goutom
Hi
what is this?It retuns null though my org_work_address is entered.

ContactsContract.CommonDataKinds.Organization.OFFICE_LOCATION

Thanks in advance.

Regards
Goutom

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

[android-developers] Re: log disappears

2011-09-08 Thread Indicator Veritatis
A common reason for its disappearance is that Eclipse somehow lost
track of which device it is supposed to be connected to. Clock on the
little 'Device' icon in the DDMS perspective to make it come back.

But this irritating disappearing trick, and a few other
inconveniences, is why for serious debugging, I do not rely on the
DDMS perspective: I open a terminal window (yes, I run Eclipse under
Linux) and use a command line such as adb logcat or even adb logcat
tee | logcatout.txt to keep a copy for handy searching later.

Sometimes even this fails, but then stopping and restarting adb almost
always fixes it.

On Sep 8, 12:08 pm, Rafael Maas rafaelm...@gmail.com wrote:
 same thing happens here :(

 2011/9/8 bob b...@coolgroups.com: Anyone know why sometimes the log 
 disappears in the Eclipse log window?

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, 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: Fwd: [android-developers] Re: soap webservie (celsius to fareheit

2011-09-08 Thread Indicator Veritatis
Why is a SocketException being reported as 'WARN'? This is a fatal
error, not a mere warning.

And this trace does not contain enough information for us to see why
it is timing out. You would be better off running Wireshark to see if
you get to the network at all, double check the URL, IP address and
ports. Make sure you have access to that port through any firewalls
you are traversing.

On Sep 8, 7:06 am, arun kumar arun.kata...@gmail.com wrote:
 while accessing the webservice am getting socketexception

 09-08 19:28:24.206: WARN/System.err(526): java.net.SocketException: The
 operation timed out
 09-08 19:28:24.213: WARN/System.err(526):     at org.apache.harmony.luni.
 platform.OSNetworkSystem.connectStreamWithTimeoutSocketImpl(Native Method)
 09-08 19:28:24.213: WARN/System.err(526):     at
 org.apache.harmony.luni.platform.OSNetworkSystem.connect(OSNetworkSystem.java:115)
 09-08 19:28:24.223: WARN/System.err(526):     at
 org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:244)
 09-08 19:28:24.233: WARN/System.err(526):     at
 org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:533)
 09-08 19:28:24.233: WARN/System.err(526):     at
 java.net.Socket.connect(Socket.java:1055)
 09-08 19:28:24.243: WARN/System.err(526):     at
 org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.init(HttpConnection.java:62)
 09-08 19:28:24.243: WARN/System.err(526):     at
 org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionPool.get(HttpConnectionPool.java:88)
 09-08 19:28:24.243: WARN/System.err(526):     at
 org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getHTTPConnection(HttpURLConn...)
 09-08 19:28:24.254: WARN/System.err(526):     at
 org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl...)
 09-08 19:28:24.254: WARN/System.err(526):     at
 org.ksoap2.transport.ServiceConnectionSE.connect(ServiceConnectionSE.java:46)
 09-08 19:28:24.254: WARN/System.err(526):     at
 org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:68)
 09-08 19:28:24.263: WARN/System.err(526):     at
 com.Tracking.Tracking.onCreate(Tracking.java:38)
 09-08 19:28:24.263: WARN/System.err(526):     at
 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
 09-08 19:28:24.263: WARN/System.err(526):     at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
 09-08 19:28:24.263: WARN/System.err(526):     at
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
 09-08 19:28:24.273: WARN/System.err(526):     at
 android.app.ActivityThread.access$2300(ActivityThread.java:125)
 09-08 19:28:24.273: WARN/System.err(526):     at
 android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
 09-08 19:28:24.273: WARN/System.err(526):     at
 android.os.Handler.dispatchMessage(Handler.java:99)
 09-08 19:28:24.273: WARN/System.err(526):     at
 android.os.Looper.loop(Looper.java:123)
 09-08 19:28:24.283: WARN/System.err(526):     at
 android.app.ActivityThread.main(ActivityThread.java:4627)
 09-08 19:28:24.283: WARN/System.err(526):     at
 java.lang.reflect.Method.invokeNative(Native Method)
 09-08 19:28:24.283: WARN/System.err(526):     at
 java.lang.reflect.Method.invoke(Method.java:521)
 09-08 19:28:24.283: WARN/System.err(526):     at
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
 09-08 19:28:24.293: WARN/System.err(526):     at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
 09-08 19:28:24.293: WARN/System.err(526):     at
 dalvik.system.NativeStart.main(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


[android-developers] Re: close button

2011-09-08 Thread Indicator Veritatis
Mark is right. Implementing a 'close box' under Android is a bad idea,
because it is misleading to the user. The truth is that the Android OS
does NOT support the notion of 'close' for apps. It implements a
different paradigm, one more like SymbianOS (yechh!) than like
Windows. The user leaves apps and enters others, but it is the system
that decides to definitively CLOSE them, killing the hosting process.

Many Android apps really do follow this Symbian-like pattern, so it is
reasonable to expect users to be used to it, even to prefer it in
Android apps.

Now I realize that many people have a spec from the client that asks
for this close box. But in that case, the best procedure is to
negotiate with the client, explaining why this is a bad idea,
misleading to the users.

If the client refuses to see the light, the closest you can get to a
close box is to call Activity.finish() (on the current activity) after
sending a message to all your other activities and possibly Services,
BroadcastReceivers to do similarly (for a ordered Receiver this would
be AbortBroadcast) But as Mark said, this is a bad idea. For one
thing, doing similarly is not straightforward, since Services and
BroadcatReceivers do NOT have a finish() method. And what about data
connections? Are you going to have to shut down the ContentProviders
too?

Finally, look at the link Mark gave. It is a good explanation from a
slightly different POV of why you should not do a close/exit box.

On Sep 8, 5:16 am, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Sep 7, 2011 at 11:27 AM, Ali Alyassen omg...@gmail.com wrote:
  i have a close button in my project so i want if any one press these
  button i want my app close

 Please don't.

 http://stackoverflow.com/questions/2033914/quitting-an-application-is...

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

 Android Training in Oslo:http://bit.ly/fjBo24

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


[android-developers] Re: Inflating editext into AlertDialog...

2011-09-08 Thread sblantipodi
but I think that there is another way to prompt a user for an input
that shows the softkeyboard automatically.

what is the working method to do this?

On Sep 8, 7:54 pm, TreKing treking...@gmail.com wrote:
 On Thu, Sep 8, 2011 at 12:37 PM, sblantipodi
 perini.dav...@dpsoftware.orgwrote:

  that it doesn't show the softkeyboard automatically on android 2.3 or
  older when the alert is shown also if the editext is selected by
  default.
  it does show the softkeyboard on android 3.2.

 This just came up in the list recently ... I don't think there's a good fix
 for this.

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

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


[android-developers] Re: Finding if the Soft Input Method is visible

2011-09-08 Thread sblantipodi
store the value of the height and width at startup and compare
the height with the initial value.

On Sep 8, 8:50 pm, guich guiha...@gmail.com wrote:
 Hi,

 Is there a way to know if the SIM is visible or not? I'm using the
 android:windowSoftInputMode=adjustResize in the manifest, but i
 can't find anything that tells me if the window is being resized if
 the SIM is being shown.

 Of course, i do see the height going from 455 to 231, but how can i
 know if this was caused by the SIM appearing or a screen rotation?

 thanks

     guich

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

2011-09-08 Thread TreKing
On Thu, Sep 8, 2011 at 8:00 PM, sblantipodi perini.dav...@dpsoftware.orgwrote:

 what is the working method to do this?


There didn't seem to be one, from what I remember from that last discussion.

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

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

Re: [android-developers] Export Data from my app

2011-09-08 Thread TreKing
2011/9/8 ΙΟΥΛΙΑ ΓΡΗΓΟΡΙΑΔΟΥ iouliag...@gmail.com

 *Copying your existing database seems like a simple solution.*


  Copying? just pick data row-row to a file?


I don't know much about SQLite, but a file is a file so you should be able
to do some standard read-from file-A-then-write-to-file-B stuff.



  *I read   about save to SD card, but I didn't underastand
 many things. For exaple did I need a key for the permission? Or just put a
 line of code in the manifest file?*


You need the permission to write to the SD card, yes.

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

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

[android-developers] Re: Need your help: how to monitor the dialpad key press action in another application during an active call?

2011-09-08 Thread xavier
Security concern? Not sure, why?
I just want to display some suggestive info to direct the caller using
the DTMF..

On Sep 8, 8:15 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Sep 8, 2011 at 1:28 AM, xavier bzp1...@gmail.com wrote:
  I know that I can't replace the default InCallScreen when the call has
  been set up, but I really want to show some additional info during the
  call, so I want to create one new activity which is transparent and
  always above the default InCallScreen.

  The question is that I want to display different info when the caller
  dials some special key (1-9,*,#), how can I get this key press
  notification?

 Fortunately, you can't, for obvious security and privacy reasons.

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

 Android Training in Oslo:http://bit.ly/fjBo24

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


Re: [android-developers] Re: Need your help: how to monitor the dialpad key press action in another application during an active call?

2011-09-08 Thread Dianne Hackborn
Enter your voice mail pin.

Hi, this is your bank, enter your account number.

On Thu, Sep 8, 2011 at 6:36 PM, xavier bzp1...@gmail.com wrote:

 Security concern? Not sure, why?
 I just want to display some suggestive info to direct the caller using
 the DTMF..

 On Sep 8, 8:15 pm, Mark Murphy mmur...@commonsware.com wrote:
  On Thu, Sep 8, 2011 at 1:28 AM, xavier bzp1...@gmail.com wrote:
   I know that I can't replace the default InCallScreen when the call has
   been set up, but I really want to show some additional info during the
   call, so I want to create one new activity which is transparent and
   always above the default InCallScreen.
 
   The question is that I want to display different info when the caller
   dials some special key (1-9,*,#), how can I get this key press
   notification?
 
  Fortunately, you can't, for obvious security and privacy reasons.
 
  --
  Mark Murphy (a Commons Guy)http://commonsware.com|
 http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
 
  Android Training in Oslo:http://bit.ly/fjBo24

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




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

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

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

Re: [android-developers] Re: Need your help: how to monitor the dialpad key press action in another application during an active call?

2011-09-08 Thread Matt Powers
Hahahahahaahhahaa

On Sep 8, 2011, at 9:51 PM, Dianne Hackborn hack...@android.com wrote:

 Enter your voice mail pin.
 
 Hi, this is your bank, enter your account number.
 
 On Thu, Sep 8, 2011 at 6:36 PM, xavier bzp1...@gmail.com wrote:
 Security concern? Not sure, why?
 I just want to display some suggestive info to direct the caller using
 the DTMF..
 
 On Sep 8, 8:15 pm, Mark Murphy mmur...@commonsware.com wrote:
  On Thu, Sep 8, 2011 at 1:28 AM, xavier bzp1...@gmail.com wrote:
   I know that I can't replace the default InCallScreen when the call has
   been set up, but I really want to show some additional info during the
   call, so I want to create one new activity which is transparent and
   always above the default InCallScreen.
 
   The question is that I want to display different info when the caller
   dials some special key (1-9,*,#), how can I get this key press
   notification?
 
  Fortunately, you can't, for obvious security and privacy reasons.
 
  --
  Mark Murphy (a Commons 
  Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
 
  Android Training in Oslo:http://bit.ly/fjBo24
 
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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

[android-developers] Sharekit

2011-09-08 Thread bob
Does anyone know how Sharekit shortens URLs?  I need to do the same
thing on 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


Re: [android-developers] Re: Publish modified APK to the Android Market without triggering an Update to existing users?

2011-09-08 Thread Nikolay Elenkov
On Fri, Sep 9, 2011 at 3:38 AM, Paul idi...@gmail.com wrote:
 I for one however, do not want to experiment with a top
 selling app by attempting to publish something and get an error or
 have unexpected results. So I was hoping that someone else had actual
 experience trying it and could share.

You can always deploy a simple test app and check how the Market
behaves. The Market has undergone significant changes in recent months,
so unless someone tried to do same thing (very unlikely) within the last
few weeks, 'actual experience' wouldn't do you any good.

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


[android-developers] Re: How to obtain the tweets of a programatically given Twitter user without registering my app on dev.twitter.com?

2011-09-08 Thread albnok
You should get a new key for each app. Anyway the process of asking
isn't that hard once you've done it.

That said you don't need any keys to use the Twitter Search API that I
mentioned earlier.

On Sep 8, 3:38 pm, saex elpablos...@gmail.com wrote:
 You can use the same key  secret key in a lot of apps? or you have to
 get a new key for each app?

 On 8 sep, 01:49, albnok alb...@gmail.com wrote:







  It is very much possible to get tweets from a user without logging in,
  provided that user did not set tweets to private.

 https://dev.twitter.com/docs/api/1/get/search

  Heck, you can search from a hashtag, even!

  You can choose to have Twitter give you the tweets in JSON or XML.
  JSON's a bit easier for me. No worries about parsing HTML whatsoever.

  Also, don't worry about registering your app - they just ask you to
  email. For some reason this is a BIG HURDLE to all the programmers I
  talked to! I just emailed, and the Twitter representative was very
  helpful. I got my XAuth key sorted in about 3 days. Of course, you
  must justify why you need it...

  On Sep 8, 1:46 am, saex elpablos...@gmail.com wrote:

   Hi

   i need to achieve that, show the last tweets of a programatically
   given user.

   But i need to do it without login on twitter, without using Oauth, and
   without registering my app on dev.twitter.com

   It is possible? i can't find the way to do it :S

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


[android-developers] Re: Need your help: how to monitor the dialpad key press action in another application during an active call?

2011-09-08 Thread xavier
Hah, how about playing the annc at the same time while display? Isn’t
it better?

On Sep 9, 9:58 am, Matt Powers mtpow...@gmail.com wrote:
 Hahahahahaahhahaa

 On Sep 8, 2011, at 9:51 PM, Dianne Hackborn hack...@android.com wrote:







  Enter your voice mail pin.

  Hi, this is your bank, enter your account number.

  On Thu, Sep 8, 2011 at 6:36 PM, xavier bzp1...@gmail.com wrote:
  Security concern? Not sure, why?
  I just want to display some suggestive info to direct the caller using
  the DTMF..

  On Sep 8, 8:15 pm, Mark Murphy mmur...@commonsware.com wrote:
   On Thu, Sep 8, 2011 at 1:28 AM, xavier bzp1...@gmail.com wrote:
I know that I can't replace the default InCallScreen when the call has
been set up, but I really want to show some additional info during the
call, so I want to create one new activity which is transparent and
always above the default InCallScreen.

The question is that I want to display different info when the caller
dials some special key (1-9,*,#), how can I get this key press
notification?

   Fortunately, you can't, for obvious security and privacy reasons.

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

   Android Training in Oslo:http://bit.ly/fjBo24

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


[android-developers] Cure your android cancer

2011-09-08 Thread Ryan Mattison
Hi,

I'm surprised, I wrote a snippet tool to cure one of the 5,000 Android
cancer cells running through your veins.  Only a 50-100 downloaders.

http://marketplace.eclipse.org/node/113218

This should should feel like heroin.  Once a brilliant idea for an OS
now a garbage dump, get whatever you have to do done and get paid.   I
was a sandwich artist once, I made good sandwiches.

Ryan

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


[android-developers] Outgoing Number Broadcast Receiver.

2011-09-08 Thread lb
Hi,
I'm not sure if this is known issue at least I see some problems being
reported in older posts.

I dynamically registered a broadcast receiver in my Service class for
Outgoing call - code snip is below:
onCreate() {
  :
IntentFilter ifNum = new IntentFilter();
ifNum.addAction(Intent.ACTION_NEW_OUTGOING_CALL);
registerReceiver(mNumReceiver, ifNum);
  :
}

public static class OutgoingNumRecv extends BroadcastReceiver {
public OutgoingNumRecv() {
Log.d(LOGTAG,  Object Created for OutgoingNum);
}
public void onReceive(Context ctxt, Intent newInt) {
Log.d(LOGTAG, Got the OutgoingNum receiver event);
}
}

Without static it is working fine in Emulator but it wasn't receiving
any events in HTC device. So thought of making it static and add this
in AndroidManifest.xml.

In AndroidManifest.xml
application
:
receiver
 android:name=.MyTestService.OutgoingNumRecv
 android:enabled=true
 android:exported=true
 intent-filter
android:name=android.intent.action.NEW_OUTGOING_CALL /
/receiver
:
/application
uses-permission
android:name=android.permission.PROCESS_OUTGOING_CALLS/
:

Still I do not see broadcast events being received and I also upgraded
my phone to Gingerbread version (2.3.3 and kernel 2.6.35.10).

Thanks
lb

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

2011-09-08 Thread bob
  Is there any easy way to add a cancel button to this?

  AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(t);
builder.setMessage(m);
builder.setCancelable(true);
builder.setPositiveButton(Facebook, new OnClickListener() {

@Override
public void onClick(DialogInterface arg0, int arg1) {
// TODO Auto-generated method stub

}
});

builder.setNegativeButton(Twitter, new OnClickListener() {

@Override
public void onClick(DialogInterface arg0, int arg1) {
// TODO Auto-generated method stub

}
});

builder.show();

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


[android-developers] Re: Got the Bluetooth blues: Service Discovery Failed

2011-09-08 Thread gjs
Hi,

Are you sure you are using the correct UUID value for your device ?

The default UUID in bluetoothchat usually needs to be changed, see the
Android bluetooth docs.

Regards

On Sep 8, 2:45 pm, darrinps darri...@gmail.com wrote:
 I've been fighting this for a long time now and thought I'd ask the
 group.

 I have a Samsung Galaxy S running 2.2. I am trying to connect to a
 Bluetooth device (Free2move dongle).

 I can get up to the point where I do the
 createRfcommSocketToServiceRecord  and then I get Service Discovery
 Failed.

 Here is what my app (VERY closely based on BluetoothChat) is telling
 me:

 09-07 23:41:09.582: DEBUG/BluetoothChatService(11472): Paired device
 found: Free2move WU
 09-07 23:41:09.582: DEBUG/BluetoothChatService(11472): Found Free2move
 device: 00:0B:CE:03:35:49
 09-07 23:41:16.644: DEBUG/BluetoothChatService(11472): Will try to
 connect to: 00:0B:CE:03:35:49
 09-07 23:41:28.637: DEBUG/BluetoothChatService(11472): BluetoothSocket
 created for device: Free2move WU
 09-07 23:41:28.641: INFO/BluetoothChatService(11472): BEGIN
 ConnectThread
 09-07 23:41:28.656: INFO/BluetoothChatService(11472): Using socket to
 connect now...
 09-07 23:41:30.621: DEBUG/BluetoothChatService(11472): setState()
 STATE_NONE - STATE_CONNECTING
 09-07 23:41:34.695: ERROR/BluetoothChatService(11472): Connection
 failed
 09-07 23:41:34.711: DEBUG/BluetoothChatService(11472): setState()
 STATE_CONNECTING - STATE_LISTEN
 09-07 23:41:34.730: WARN/BluetoothChatService(11472): Connection
 failed with exception: Service discovery failed
 09-07 23:41:34.730: WARN/BluetoothChatService(11472): With cause:
 class java.io.IOException
 09-07 23:41:34.742: WARN/BluetoothChatService(11472):
 android.bluetooth.BluetoothSocket$SdpHelper.doSdp: 377
 09-07 23:41:34.742: WARN/BluetoothChatService(11472):
 android.bluetooth.BluetoothSocket.connect: 201
 09-07 23:41:34.762: WARN/BluetoothChatService(11472):
 com.standardandroid.speedpro.bluetooth.BluetoothChatService
 $ConnectThread.run: 569

 The code that dies looks like this:

 private class ConnectThread extends Thread
         {
                 private final BluetoothSocket mmSocket;
                 private final BluetoothDevice mmDevice;

                 public ConnectThread(BluetoothDevice device)
                 {
                         mmDevice = device;
                         BluetoothSocket tmp = null;

                         // Get a BluetoothSocket for a connection with the
                         // given BluetoothDevice
                         try
                         {

                                 tmp = 
 device.createRfcommSocketToServiceRecord(MY_UUID);

 I've seen some reports that this might be a bug in Android 
 itself:http://groups.google.com/group/android-platform/browse_thread/thread/...

 Does anyone know? Android folks?

 Thanks.

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


[android-developers] cancel button

2011-09-08 Thread Chris
Bob,  my friends 

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


[android-developers] Re: cancel button

2011-09-08 Thread Chris
Sorry wrong thread.

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

[android-developers] getting emulator console using telnet

2011-09-08 Thread krishna chaitanya
hi all,

I am trying to simulate location updates using emulator console using
telnet.

I am using windows vista, and when i am trying to connect to emulator
at port 5554 its showing that telnet is not recognized as internal or
external command.

i am using C:\ telnet localhost emulator 5554

any suggestion please...

regards,
Krishna

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


[android-developers] getting emulator console using telnet

2011-09-08 Thread krishna chaitanya
hi all,

I am trying to simulate location updates using emulator console using
telnet.

I am using windows vista, and when i am trying to connect to emulator
at port 5554 its showing that telnet is not recognized as internal or
external command.

i am using C:\ telnet localhost emulator 5554

any suggestion please...

regards,
Krishna

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


[android-developers] Re: getting emulator console using telnet

2011-09-08 Thread krishna chaitanya
ok sori  guys.

the thing is that by default telnet doesnot work in vista.
so we need to install the telnet client in vista first for this
command to work

Control panel - programs and features - Turn windows features on or
off - select telnet client

installation takes few minutes. u r done ...
It works!

regards,
Krishna


On Sep 9, 10:35 am, krishna chaitanya chaitanya.ju...@gmail.com
wrote:
 hi all,

 I am trying to simulate location updatesusingemulatorconsoleusingtelnet.

 I amusingwindows vista, and when i am trying to connect toemulator
 at port 5554 its showing thattelnetis not recognized as internal or
 external command.

 i amusingC:\telnetlocalhostemulator5554

 any suggestion please...

 regards,
 Krishna

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


<    1   2