[android-developers] Re: ContentProviders assistance?

2010-03-22 Thread Flying Coder

Hi Mark,
See C:\android-sdk-windows\platforms\android-2.0.1\samples\NotePad
for an example of using a ContentProvider.  To allow the provider to
be used by other applications, just set "Exported" to true for the
provider in the manifest.

You can also set permissions for the provider to limit access to
it, but I haven't had a need for that yet, so haven't bothered to
learn it.

Good luck!
Steve


On Mar 21, 6:42 pm, Mark X  wrote:
> Hello,
>
> I have tried to figure out a way of exposing(sharing) data between a master
> application and slave application in a secure way (not world readable), but
> couldn't find clues on how to do that practically. Of course, reading
> articles outline that ContentProviders are for sharing persistent data, but
> I can't find a working example, nor the information how to setup/implement
> two working piece of software that can work together as different apps.
>
> The data I share is simple - ID & Data.
>
> If there's anyone that already achieved this already, I'm all ears!
>
> Any ideas are welcome!
>
> Thanks,
> Mark

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.


[android-developers] Can anyone hook me up with an Exchange email account that I could use for testing?

2010-03-22 Thread Flying Coder

Hi,
   I'm putting together a lightweight email provider for use with one
of my apps (based on the K9 mail client).  I'd love to test it with an
Exchange account before releasing it.

   I'm hoping that some kind sole out there will be able to hook me up
with an Exchange account that I can use for testing.

Thanks a bunch!

Steve

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.


[android-developers] Re: Can anyone hook me up with an Exchange email account that I could use for testing?

2010-03-24 Thread Flying Coder
Hi Kumar,
Thanks, I wasn't aware of "MS online" -- that's good to know.
But, at the moment, what I really want is the ability to connect with
stand-alone Exchange servers the same way that K9 or the Android Email
client do.  I believe my current solution will work fine, since its
based on the K9 code, but haven't been able to test it yet.  I could
release it as "beta" and let users test it, but I'd really like to
test it myself first.

Cheers,
Steve


On Mar 23, 3:21 pm, Kumar Bibek  wrote:
> Umm, Microsoft online has a hosted trial of 30 days for 2007 exchange
> accounts. You can try that.
>
> Thanks and Regards,
> Kumar Bibek.
>
> On Mar 23, 12:09 am, Flying Coder  wrote:
>
>
>
> > Hi,
> >    I'm putting together a lightweight email provider for use with one
> > of my apps (based on the K9 mail client).  I'd love to test it with an
> > Exchange account before releasing it.
>
> >    I'm hoping that some kind sole out there will be able to hook me up
> > with an Exchange account that I can use for testing.
>
> > Thanks a bunch!
>
> > Steve

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.


[android-developers] Re: Can anyone hook me up with an Exchange email account that I could use for testing?

2010-03-24 Thread Flying Coder
Hi Alexander,
Thanks, can you provide any other details?  I haven't had any luck
in tracking this down.

All the best,
Steve


On Mar 23, 3:23 pm, Alexander Blom  wrote:
> I'm pretty sure Gmail supports Exchange for email now. Try that.
>
> On Mar 22, 8:09 pm, Flying Coder  wrote:
>
>
>
> > Hi,
> >    I'm putting together a lightweight email provider for use with one
> > of my apps (based on the K9 mail client).  I'd love to test it with an
> > Exchange account before releasing it.
>
> >    I'm hoping that some kind sole out there will be able to hook me up
> > with an Exchange account that I can use for testing.
>
> > Thanks a bunch!
>
> > Steve

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.


[android-developers] Re: Can anyone hook me up with an Exchange email account that I could use for testing?

2010-03-28 Thread Flying Coder
Hi Marek,
POP & IMAP aren't a problem.  Its just the proprietary Exchange
stuff I'm worried about.  Thanks for the suggestion to Google it -- it
never occurred to me that companies would offer free Exchange
accounts.  As a matter of fact, I didn't find any "free" ones, but did
find one that offers a 60-day free trial, which is good enough, at
least for now.

Cheers,
Steve


On Mar 25, 3:54 am, Marek Pola  wrote:
> What Email protocol do you want to test? There are plenty of free
> email servers supporting the standard protocols POP3 and IMAP4. Gmail
> supports them both. But if you mean the proprietary Exchange Active
> Sync (EAS) protocol it's a different matter, but there are free
> servers for that too. Google is your friend.
>
> Regards
> Marek
>
> On Mar 24, 11:43 pm, Flying Coder  wrote:
>
>
>
> > Hi Kumar,
> >     Thanks, I wasn't aware of "MS online" -- that's good to know.
> > But, at the moment, what I really want is the ability to connect with
> > stand-alone Exchange servers the same way that K9 or the Android Email
> > client do.  I believe my current solution will work fine, since its
> > based on the K9 code, but haven't been able to test it yet.  I could
> > release it as "beta" and let users test it, but I'd really like to
> > test it myself first.
>
> > Cheers,
> > Steve
>
> > On Mar 23, 3:21 pm, Kumar Bibek  wrote:
>
> > > Umm, Microsoft online has a hosted trial of 30 days for 2007 exchange
> > > accounts. You can try that.
>
> > > Thanks and Regards,
> > > Kumar Bibek.
>
> > > On Mar 23, 12:09 am, Flying Coder  wrote:
>
> > > > Hi,
> > > >    I'm putting together a lightweight email provider for use with one
> > > > of my apps (based on the K9 mail client).  I'd love to test it with an
> > > > Exchange account before releasing it.
>
> > > >    I'm hoping that some kind sole out there will be able to hook me up
> > > > with an Exchange account that I can use for testing.
>
> > > > Thanks a bunch!
>
> > > > Steve

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.


[android-developers] Re: how to detect screen is on or off?

2010-03-29 Thread Flying Coder

I also listen to SCREEN_ON/OFF broadcasts in a couple of my apps.

But, starting in 2.1 there is a new isScreenOn method:

PowerManager pm = (PowerManager)
getSystemService(Context.POWER_SERVICE);
 boolean isScreenOn = pm.isScreenOn();

It won't actually help me with my apps since I'm interested in
transitions between on and off, but its nice to have anyway.

Good luck,
Steve


On Mar 29, 3:20 pm, JP  wrote:
> On Mar 29, 3:00 am, zhiqiang wang  wrote:
>
> > Hi,How can I detect the screen is on or off?
>
> We' had that before, I've implemented the following 
> solution:http://groups.google.com/group/android-developers/browse_thread/threa...

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.


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

2010-03-30 Thread Flying Coder

NC still waiting (but not complaining -- awesome for Google to do
this)

On Mar 29, 8:16 pm, Andrei  wrote:
> FL still waiting
>
> On Mar 29, 5:58 pm, "SoftwareForMe.com SoftwareForMe.com"
>
>
>
>  wrote:
> > Washington State, USA. Still waiting.
>
> > On Mon, Mar 29, 2010 at 2:41 PM, Arnon  wrote:
> > > You mean 4 weeks? ;-)
>
> > > Quote: "Please allow 2-4 weeks from the date of submission of the form
> > > for delivery of the phone. If you do not receive the phone within that
> > > timeframe, please send an email to..."
>
> > > On Mar 29, 3:48 pm, zneref  wrote:
> > > > People relax, 6-weeks term doesn't passed yet ;)
>
> > > > On 29 Mar, 11:25, Paul  wrote:
>
> > > > > Germany, still waiting.
> > > > > ... and growing nervous :)- Hide quoted text -
>
> > > > - Show quoted text -
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com > >  cr...@googlegroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> > > To unsubscribe from this group, send email to android-developers+
> > > unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> > > ME" as the subject.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.


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

2010-03-31 Thread Flying Coder

A pair of Droids in NC, USA today (one for being a ADC2 finalist).
Google, you rock!



On Mar 31, 4:26 pm, Ginda  wrote:
> Germany still waiting (since 6.March )

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

To unsubscribe, reply using "remove me" as the subject.


[android-developers] How to programmatically disable the soft keyboard?

2009-11-08 Thread Flying Coder

My app has a simple number pad dialog for entering data into an
EditText.  I want to use that instead of the soft keyboard.  How can I
keep the soft keyboard from displaying when a user clicks on the
EditText?  I really don't wan to go the thru the hassle of developing
a full blown InputMethod service, etc.

Thanks! :-)

Steve

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Apps not showing up on Droid Eris (running cupcake)??

2009-11-13 Thread Flying Coder

I have the "min SDK version" set to 3 in the manifest.  Shouldn't the
apps still be available in the Cupcake Market?  Anyone know why apps
are not showing up there?  Or better yet, how to make them reappear?

Thanks!

Steve

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 preserve old Db table, while adding new table columns for new version of app?

2009-11-16 Thread Flying Coder

Override the onUpdate method of SQLiteOpenHelper and do:

if (oldVersion < VERSION_WHEN_COLUMN_ADDED)
 db.execSQL("alter table " + TABLE_NAME + " add column " +
COLUMN_NAME + " " + COLUMN_TYPE + ";");

Cheers,
Steve

On Nov 16, 8:17 am, "jagtap.jj"  wrote:
> Hello everybody
>
> Is there way for Android or in SQLite to preserve old version Db table
> columns, while adding new table columns for new version.
>
> The new application version should not vanish all user data from old
> version.
>
> Any suggestions?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Given a TextView of a specific height, how many lines of text can be displayed?

2009-11-22 Thread Flying Coder

I'm using a TextView in a widget to show some info from a
ContentProvider.  Right now, the update takes a little longer than I
would like because I'm processing all of the data from the content
provider, when I really only need the number of lines that will fit in
the TextView.

What's the easiest way to figure out how many lines are available in
the TextView?

Thanks a bunch!

Steve

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Hero & Tattoo: accelerometer doesn't work while screen is off?

2009-11-28 Thread Flying Coder

Hi,
I have an app that needs to monitor the accelerometer while the
screen is off (I hold a partial wake lock).  This works for most
phones, but I've had users with the Hero (running 1.5) and Tattoo
(running 1.6) report that the motion detection doesn't work while the
screen is off.

Has anyone else encountered this issue?  Apparently the Hero &
Tattoo will both be getting 2.0 sometime soon -- will that resolve the
problem?  Anyone know of a workaround or fix for this issue?

Thanks,
Steve

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

2009-12-03 Thread Flying Coder

Moneytoo:  How does one receive the intent?  I'd be happy if my app
could simply tell when a new gmail has arrived.

Thanks,
Steve


On Dec 2, 6:41 pm, moneytoo  wrote:
> You can receive the intent but you can not cancel the notification.
>
> On Dec 2, 7:48 pm, "vendor.net"  wrote:
>
>
>
> > Hi!
>
> > Is it possible to get an intent when the user recieves a mail and to
> > cancel the gmail notification?
>
> > I want to filter some messages and I do not want te get notifications
> > from them.
>
> > 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] ActivityGroup: How do I disable the shadow at the top of the window?

2009-12-05 Thread Flying Coder

Here is the code I use in the parent activity to display a child
activity within a FrameLayout.  However this FrameLayout is just part
of a larger layout and I don't want the shadow that is normally
displayed at the top of an activity's window.  How do I get rid of the
shadow?

Much obliged to anyone who can provide the answer!

Steve


Window w = am.startActivity(id, intent);


currentView = w.getDecorView();

if (currentView != null) {
currentView.setVisibility(View.VISIBLE);
currentView.setFocusableInTouchMode(true);
((ViewGroup) currentView).setDescendantFocusability(
ViewGroup.FOCUS_AFTER_DESCENDANTS);
}


frame.addView(currentView);

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

2009-08-05 Thread Flying Coder


I'm seeing the following notification in LogCat repeated approximately
every 3 seconds:

08-05 10:19:51.500: DEBUG/dalvikvm(58): GC freed 33080 objects /
1212416 bytes in 344ms

the number of objects/bytes varies from one line to the next, but only
slightly.

Pid 58 is the ActivityManager.  Only the home screen is active.

Is the activity manager really creating that much junk every 3
seconds?  Can anyone shed some light on what's going on?

Thanks!

Steve

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

2009-08-05 Thread Flying Coder


Diane:  I just rebooted the phone.  I'll let you know if I'm able to
figure out how to force it to happen.  Its happened in the past, but I
haven't yet noticed what triggers it.  It *seems* to occur only after
the phone has been continuously on for several days.

fadden:  No, I only have a production phone.  Is there any way to
change the "debuggable" property?



On Aug 5, 2:10 pm, fadden  wrote:
> On Aug 5, 7:32 am, Flying Coder  wrote:
>
> > I'm seeing the following notification in LogCat repeated approximately
> > every 3 seconds:
>
> > 08-05 10:19:51.500: DEBUG/dalvikvm(58): GC freed 33080 objects /
> > 1212416 bytes in 344ms
>
> > the number of objects/bytes varies from one line to the next, but only
> > slightly.
>
> Are you able to connect DDMS and look at the process?  (Won't work on
> a production device where the "ro.debuggable" property is set to 0.)
>
> If so, the Allocation Tracker in the stand-alone version of DDMS will
> let you see the last 512 allocations, with stack traces.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Constant Garbage Collection for ActivityManager?

2009-08-05 Thread Flying Coder

Thanks -- will give that a try next time this happens.

On Aug 5, 5:02 pm, fadden  wrote:
> On Aug 5, 11:17 am, Flying Coder  wrote:
>
> > fadden:  No, I only have a production phone.  Is there any way to
> > change the "debuggable" property?
>
> Nope.
>
> If you have the "top" utility installed (I can't remember if it ships
> on production devices), run it and see which processes are very
> eactive.  Another thing to do is grab the output of "adb shell ps -x -
> t" a couple of times, maybe 10 seconds apart, and compare the utime
> values for threads in the active processes to see which ones are
> running.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] how to dial voicemail?

2009-08-16 Thread Flying Coder


According to the docs, the following should work:

Intent intent = new Intent();
intent.setAction(Intent.ACTION_DIAL);
intent.setData(Uri.parse("voicemail:"));

startActivity(intent);

But this just brings up the dialer without a number showing.

Anyone know how to launch the dialer with the voicemail number (or
otherwise lookup the voicemail number)?

Thanks :-)

Steve

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

2009-08-17 Thread Flying Coder


This has been driving me nuts and I'm hoping someone will be able to
help me understand what is happening (or better yet, how to fix
it! ;-).

I set the background image in one of my apps to the system wallpaper
image using the following code:

   Drawable wp = this.getWallpaper();
   background = (ImageView) findViewById(R.id.background);
   background.setImageDrawable(wp);

This seems to work fine, but periodically, I get the out of memory
error shown below.  Actually, on the emulator, all I have to do is
repeatedly rotate the device and this error will consistently happen
after 10-12 rotations.  On the G1, opening and closing the keyboard
doesn't seem to cause this, but I'll still get the failure every once
in a while.

Is getWallpaper() actually making a copy of the image (I would have
thought I'd just get a refernece to the existing bitmap)?  Do I need
to do anything special to free the image?


08-17 08:32:37.943: ERROR/dalvikvm-heap(1597): 614400-byte external
allocation too large for this process.
08-17 08:32:37.943: ERROR/(1597): VM won't let us allocate 614400
bytes
08-17 08:32:38.054: DEBUG/AndroidRuntime(1597): Shutting down VM
08-17 08:32:38.054: WARN/dalvikvm(1597): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
08-17 08:32:38.054: ERROR/AndroidRuntime(1597): Uncaught handler:
thread main exiting due to uncaught exception
08-17 08:32:38.313: ERROR/AndroidRuntime(1597):
java.lang.OutOfMemoryError: bitmap size exceeds VM budget
08-17 08:32:38.313: ERROR/AndroidRuntime(1597): at
android.graphics.BitmapFactory.nativeDecodeFileDescriptor(Native
Method)
08-17 08:32:38.313: ERROR/AndroidRuntime(1597): at
android.graphics.BitmapFactory.decodeFileDescriptor(BitmapFactory.java:
424)
08-17 08:32:38.313: ERROR/AndroidRuntime(1597): at
android.app.ApplicationContext.getCurrentWallpaperLocked
(ApplicationContext.java:523)
08-17 08:32:38.313: ERROR/AndroidRuntime(1597): at
android.app.ApplicationContext.peekWallpaper(ApplicationContext.java:
515)
08-17 08:32:38.313: ERROR/AndroidRuntime(1597): at
android.app.ApplicationContext.getWallpaper(ApplicationContext.java:
504)
08-17 08:32:38.313: ERROR/AndroidRuntime(1597): at
android.content.ContextWrapper.getWallpaper(ContextWrapper.java:201)
08-17 08:32:38.313: ERROR/AndroidRuntime(1597): at onCreate
(MyApp.java:247)
08-17 08:32:38.313: ERROR/AndroidRuntime(1597): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
08-17 08:32:38.313: ERROR/AndroidRuntime(1597): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2231)
08-17 08:32:38.313: ERROR/AndroidRuntime(1597): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
08-17 08:32:38.313: ERROR/AndroidRuntime(1597): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
08-17 08:32:38.313: ERROR/AndroidRuntime(1597): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
08-17 08:32:38.313: ERROR/AndroidRuntime(1597): at
android.os.Handler.dispatchMessage(Handler.java:99)
08-17 08:32:38.313: ERROR/AndroidRuntime(1597): at
android.os.Looper.loop(Looper.java:123)
08-17 08:32:38.313: ERROR/AndroidRuntime(1597): at
android.app.ActivityThread.main(ActivityThread.java:3948)
08-17 08:32:38.313: ERROR/AndroidRuntime(1597): at
java.lang.reflect.Method.invokeNative(Native Method)
08-17 08:32:38.313: ERROR/AndroidRuntime(1597): at
java.lang.reflect.Method.invoke(Method.java:521)
08-17 08:32:38.313: ERROR/AndroidRuntime(1597): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
08-17 08:32:38.313: ERROR/AndroidRuntime(1597): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
08-17 08:32:38.313: ERROR/AndroidRuntime(1597): 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: out of memory error & getWallpaper

2009-08-17 Thread Flying Coder

Hi Nivek,
Unfortunately, doing recycle on the drawable returned by
ContextWrapper.getWallpaper() results in a run-time exception the next
time the app is launched:  attempt to use recycled bitmap.  Though
curiously, if I launch the app again after receiving the exeption, it
works fine.  I.e., run time exception every other launch.

At any rate, thanks for the pointer to Romain Guy's blog -- I
wasn't aware of the onRetainNonConfigurationInstance method.  Should
be useful in some cases.

Cheers,
Steve


On Aug 17, 10:53 am, Nivek  wrote:
> When you change the device orientation, you app is closed and then
> reopened.
>
> Android handles bitmaps a "special" way, you HAVE to explicitly
> recycle them as soon as you don't need them anymore... or they stay
> allocated in memory and NEVER get freed.
>
> I have started to code an app which uses a set of ImageViews. To avoid
> allocation errors on orientation changes, I had to override the
> onDestroy() method this way :
>         /*
>          * (non-Javadoc)
>          *
>          * @see android.app.Activity#onDestroy()
>          */
>         @Override
>         protected void onDestroy() {
>                 super.onDestroy();
>                 if (isFinishing()) {
>                         for (ImageView view : mImgViews) {
>                                 Drawable toRecycle = view.getDrawable
> ();
>                                 if (toRecycle != null) {
>                                         ((BitmapDrawable)
> toRecycle).getBitmap().recycle();
>                                 }
>                         }
>                 }
>         }
>
> After this, If the orientation change time is too long, you have to
> store the data (bitmaps and whatever else you need) with
> onRetainNonConfigurationInstance() and get them back on reinit with
> getLastNonConfigurationInstance().
>
> This has been explained by Romain Guy on his blog 
> :http://www.curious-creature.org/2009/02/16/faster-screen-orientation-...
>
> On 17 août, 15:58, Flying Coder  wrote:
>
>
>
> > This has been driving me nuts and I'm hoping someone will be able to
> > help me understand what is happening (or better yet, how to fix
> > it! ;-).
>
> > I set the background image in one of my apps to the system wallpaper
> > image using the following code:
>
> >    Drawable wp = this.getWallpaper();
> >    background = (ImageView) findViewById(R.id.background);
> >    background.setImageDrawable(wp);
>
> > This seems to work fine, but periodically, I get the out of memory
> > error shown below.  Actually, on the emulator, all I have to do is
> > repeatedly rotate the device and this error will consistently happen
> > after 10-12 rotations.  On the G1, opening and closing the keyboard
> > doesn't seem to cause this, but I'll still get the failure every once
> > in a while.
>
> > Is getWallpaper() actually making a copy of the image (I would have
> > thought I'd just get a refernece to the existing bitmap)?  Do I need
> > to do anything special to free the image?
>
> > 08-17 08:32:37.943: ERROR/dalvikvm-heap(1597): 614400-byte external
> > allocation too large for this process.
> > 08-17 08:32:37.943: ERROR/(1597): VM won't let us allocate 614400
> > bytes
> > 08-17 08:32:38.054: DEBUG/AndroidRuntime(1597): Shutting down VM
> > 08-17 08:32:38.054: WARN/dalvikvm(1597): threadid=3: thread exiting
> > with uncaught exception (group=0x4000fe70)
> > 08-17 08:32:38.054: ERROR/AndroidRuntime(1597): Uncaught handler:
> > thread main exiting due to uncaught exception
> > 08-17 08:32:38.313: ERROR/AndroidRuntime(1597):
> > java.lang.OutOfMemoryError: bitmap size exceeds VM budget
> > 08-17 08:32:38.313: ERROR/AndroidRuntime(1597):     at
> > android.graphics.BitmapFactory.nativeDecodeFileDescriptor(Native
> > Method)
> > 08-17 08:32:38.313: ERROR/AndroidRuntime(1597):     at
> > android.graphics.BitmapFactory.decodeFileDescriptor(BitmapFactory.java:
> > 424)
> > 08-17 08:32:38.313: ERROR/AndroidRuntime(1597):     at
> > android.app.ApplicationContext.getCurrentWallpaperLocked
> > (ApplicationContext.java:523)
> > 08-17 08:32:38.313: ERROR/AndroidRuntime(1597):     at
> > android.app.ApplicationContext.peekWallpaper(ApplicationContext.java:
> > 515)
> > 08-17 08:32:38.313: ERROR/AndroidRuntime(1597):     at
> > android.app.ApplicationContext.getWallpaper(ApplicationContext.java:
> > 504)
> > 08-17 08:32:38.313: ERROR/AndroidRuntime(1597):     at
> > android.content.ContextWrapper.getWallpaper(ContextWrapper.java:201)
> > 08-17 08:32:38.313:

[android-developers] Re: out of memory error & getWallpaper

2009-08-17 Thread Flying Coder


Dianne,
   I suspect you are right, though I'm having a heck of a time
tracking it down (i.e., I don't see any leaks).  Thanks for the info
on the wallpaper!

Cheers,
Steve


On Aug 17, 12:47 pm, Dianne Hackborn  wrote:
> The wallpaper is loaded into each application that requests it.  It is only
> loaded the first time you ask for it, and the next time after it is changed
> to some other image.
>
> You are probably leaking memory.  You can use the hat tool to look at your
> allocations -- search on this list, there have been a number of discussions
> about it.
>
>
>
>
>
> On Mon, Aug 17, 2009 at 9:38 AM, Flying Coder  wrote:
>
> > Hi Nivek,
> >    Unfortunately, doing recycle on the drawable returned by
> > ContextWrapper.getWallpaper() results in a run-time exception the next
> > time the app is launched:  attempt to use recycled bitmap.  Though
> > curiously, if I launch the app again after receiving the exeption, it
> > works fine.  I.e., run time exception every other launch.
>
> >    At any rate, thanks for the pointer to Romain Guy's blog -- I
> > wasn't aware of the onRetainNonConfigurationInstance method.  Should
> > be useful in some cases.
>
> > Cheers,
> > Steve
>
> > On Aug 17, 10:53 am, Nivek  wrote:
> > > When you change the device orientation, you app is closed and then
> > > reopened.
>
> > > Android handles bitmaps a "special" way, you HAVE to explicitly
> > > recycle them as soon as you don't need them anymore... or they stay
> > > allocated in memory and NEVER get freed.
>
> > > I have started to code an app which uses a set of ImageViews. To avoid
> > > allocation errors on orientation changes, I had to override the
> > > onDestroy() method this way :
> > >         /*
> > >          * (non-Javadoc)
> > >          *
> > >          * @see android.app.Activity#onDestroy()
> > >          */
> > >         @Override
> > >         protected void onDestroy() {
> > >                 super.onDestroy();
> > >                 if (isFinishing()) {
> > >                         for (ImageView view : mImgViews) {
> > >                                 Drawable toRecycle = view.getDrawable
> > > ();
> > >                                 if (toRecycle != null) {
> > >                                         ((BitmapDrawable)
> > > toRecycle).getBitmap().recycle();
> > >                                 }
> > >                         }
> > >                 }
> > >         }
>
> > > After this, If the orientation change time is too long, you have to
> > > store the data (bitmaps and whatever else you need) with
> > > onRetainNonConfigurationInstance() and get them back on reinit with
> > > getLastNonConfigurationInstance().
>
> > > This has been explained by Romain Guy on his blog :
> >http://www.curious-creature.org/2009/02/16/faster-screen-orientation-...
>
> > > On 17 août, 15:58, Flying Coder  wrote:
>
> > > > This has been driving me nuts and I'm hoping someone will be able to
> > > > help me understand what is happening (or better yet, how to fix
> > > > it! ;-).
>
> > > > I set the background image in one of my apps to the system wallpaper
> > > > image using the following code:
>
> > > >    Drawable wp = this.getWallpaper();
> > > >    background = (ImageView) findViewById(R.id.background);
> > > >    background.setImageDrawable(wp);
>
> > > > This seems to work fine, but periodically, I get the out of memory
> > > > error shown below.  Actually, on the emulator, all I have to do is
> > > > repeatedly rotate the device and this error will consistently happen
> > > > after 10-12 rotations.  On the G1, opening and closing the keyboard
> > > > doesn't seem to cause this, but I'll still get the failure every once
> > > > in a while.
>
> > > > Is getWallpaper() actually making a copy of the image (I would have
> > > > thought I'd just get a refernece to the existing bitmap)?  Do I need
> > > > to do anything special to free the image?
>
> > > > 08-17 08:32:37.943: ERROR/dalvikvm-heap(1597): 614400-byte external
> > > > allocation too large for this process.
> > > > 08-17 08:32:37.943: ERROR/(1597): VM won't let us allocate 614400
> > > > bytes
> > > > 08-17 08:32:38.054: DEBUG/And

[android-developers] AppWidgetHost: what is the "hostId"?

2009-08-18 Thread Flying Coder


Hi,
The constructor for AppWidgetHost takes a "hostId", but the docs
don't say anything about it.  What is it used for?  What values are
legal?

Thanks for the help!

Steve

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

2009-08-18 Thread Flying Coder

Thanks Balwinder!


On Aug 17, 12:46 pm, "Balwinder Kaur (T-Mobile USA)"  wrote:
> I agree, the documentation for the this is not quite appropriate.
> To retrieve the voicemail number you can try
> TelephonyManager.getVoiceMailNumber
>
> http://developer.android.com/reference/android/telephony/TelephonyMan...()
>
> Balwinder Kaur
> Open Source Development Center
> ·T· · ·Mobile· stick together
>
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
> On Aug 16, 11:20 am, Flying Coder  wrote:
>
>
>
> > According to the docs, the following should work:
>
> > Intent intent = new Intent();
> > intent.setAction(Intent.ACTION_DIAL);
> > intent.setData(Uri.parse("voicemail:"));
>
> > startActivity(intent);
>
> > But this just brings up the dialer without a number showing.
>
> > Anyone know how to launch the dialer with the voicemail number (or
> > otherwise lookup the voicemail number)?
>
> > Thanks :-)
>
> > Steve- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] AppWidgetHost - what is the hostId for?

2009-08-18 Thread Flying Coder


Hi there,
I'm developing my own appwidget hoster and am curious about the
"hostId" used in the constructor:

AppWidgetHost(Context context, int hostId)

The docs don't say anything about it.  Can anyone tell me what its
used for, and what values are legal?


Thanks for the help,
Steve

P.s. Sorry if this is a duplicate post -- I posted this question
earlier, but now I can't find it(!)

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

2009-08-20 Thread Flying Coder

Thanks Jeff!

On Aug 18, 8:38 pm, Jeff Sharkey  wrote:
> The hostId is a number of your choosing that should be internally
> unique to your app (that is, you don't need to worry about collisions
> with other apps on the system).  It's designed for cases where you
> want two unique AppWidgetHosts inside of the same application, so the
> system can optimize and only send updates to actively listening hosts.
>
> j
>
>
>
>
>
> On Tue, Aug 18, 2009 at 10:48 AM, Flying Coder wrote:
>
> > Hi there,
> >    I'm developing my own appwidget hoster and am curious about the
> > "hostId" used in the constructor:
>
> > AppWidgetHost(Context context, int hostId)
>
> > The docs don't say anything about it.  Can anyone tell me what its
> > used for, and what values are legal?
>
> > Thanks for the help,
> > Steve
>
> > P.s. Sorry if this is a duplicate post -- I posted this question
> > earlier, but now I can't find it(!)
>
> --
> Jeff Sharkey
> jshar...@android.com- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: logcat api?

2009-09-06 Thread Flying Coder


There's a great little app on the Market called "log collector"
programmatically reads the logcat output and emails it to someone
(I've had my customers do this several times when they encountered
problems that I couldn't reproduce).

Happily, it looks like this app is open source:

http://code.google.com/p/android-log-collector/

and the permission that Dianne was referring to appears to be:



Enjoy,
Steve


On Sep 6, 3:11 am, Dianne Hackborn  wrote:
> You don't need to run as root, you don't need to run as system, you just
> need to be in the group that can access the log driver, which I am pretty
> sure there is a non-privileged permission for.
>
> On Sat, Sep 5, 2009 at 9:35 PM, Chris Stratton  wrote:
>
> > On Sep 5, 3:44 pm, Dianne Hackborn  wrote:
> > > logcat doesn't need to run as root.
>
> > Technically true, it usually runs as system, but that also seems out
> > of reach for an ordinary application on the phone... wheras adb gets
> > you a shell as this semi privileged uid.  It probably is possible to
> > use the adb shell to make something setuid system which an application
> > or app launched terminal could use to escalate, but finding a place to
> > put it is a challenge (though not an inconquerable one).
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to interpret device state dump from DDMS?

2009-09-08 Thread Flying Coder


Is there any documentation describing the various sections of "dump
device state" output from DDMS?

Thanks,
Steve

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

2009-09-08 Thread Flying Coder


There appears to be a leak when using PhoneStateListeners.  The
following code simply reigsters in onResume and unregisters in onPause
a PhoneStateListener.  Repeatedly launch then press BACK (so the app
is finished & onDestory is called before the next launch) and the
number of activities reported by meminfo will equal the number of
launches.  For instance, here is the output I get after launching (and
finishing) 11 times in sequence:

dumpsys meminfo com.example.leak
Currently running services:
  meminfo
---
DUMP OF SERVICE meminfo:
Applications Memory Usage (kB):
Uptime: 12204322 Realtime: 12204322

** MEMINFO in pid 1358 [com.example.leak] **
native   dalvikothertotal
size: 2648 3079  N/A 5727
   allocated: 2604 2254  N/A 4858
free:   43  825  N/A  868
   (Pss):  913 1305 1475 3693
  (shared dirty): 1080 3864  568 5512
(priv dirty):  808  936 1056 2800

 Objects
   Views:   77ViewRoots:1
 AppContexts:   12   Activities:   11
  Assets:2AssetManagers:2
   Local Binders:   36Proxy Binders:   21
Death Recipients:0
 OpenSSL Sockets:0

 SQL
heap:0  dbFiles:0
   numPagers:0   inactivePageKB:0
activePageKB:0
#

Without the PhoneStateListener, the number of activities is always 1
no matter how many times the app is launched & finished.  So, am I
doing anything wrong here?  Or is this a bug in the
TelephonyManager?

Thanks,
Steve

 here's the code
package com.example.leak;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.util.Log;

public class LeakExample extends Activity {

private class MyPhoneStateListener extends PhoneStateListener {
@Override
public void onCallStateChanged(int state, String 
incomingNumber) {

if ((state == TelephonyManager.CALL_STATE_RINGING)
|| (state == 
TelephonyManager.CALL_STATE_OFFHOOK)) {
LeakExample.this.finish();
}
}
}

MyPhoneStateListener phone_listener = new MyPhoneStateListener();

TelephonyManager telMgr ;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

telMgr = (TelephonyManager) getSystemService
(Context.TELEPHONY_SERVICE);
}

@Override
protected void onPause() {
super.onPause();

telMgr.listen(phone_listener, PhoneStateListener.LISTEN_NONE);
}

@Override
protected void onResume() {
super.onResume();

telMgr.listen(phone_listener, 
PhoneStateListener.LISTEN_CALL_STATE);
}

@Override
protected void onDestroy() {
super.onDestroy();

Log.v("LEAK EXAMPLE", "onDestory");
}



}


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

2009-09-08 Thread Flying Coder


Ugh -- yep, that was the problem.  Thanks! :-)



On Sep 8, 2:04 pm, Romain Guy  wrote:
> When you do this kind of test, you should force GCs on the system
> process with DDMS, then force GCs in your process and then check how
> many activities you have running.
>
>
>
>
>
> On Tue, Sep 8, 2009 at 10:57 AM, Flying Coder wrote:
>
> > There appears to be a leak when using PhoneStateListeners.  The
> > following code simply reigsters in onResume and unregisters in onPause
> > a PhoneStateListener.  Repeatedly launch then press BACK (so the app
> > is finished & onDestory is called before the next launch) and the
> > number of activities reported by meminfo will equal the number of
> > launches.  For instance, here is the output I get after launching (and
> > finishing) 11 times in sequence:
>
> > dumpsys meminfo com.example.leak
> > Currently running services:
> >  meminfo
> > ---­
> > DUMP OF SERVICE meminfo:
> > Applications Memory Usage (kB):
> > Uptime: 12204322 Realtime: 12204322
>
> > ** MEMINFO in pid 1358 [com.example.leak] **
> >                    native   dalvik    other    total
> >            size:     2648     3079      N/A     5727
> >       allocated:     2604     2254      N/A     4858
> >            free:       43      825      N/A      868
> >           (Pss):      913     1305     1475     3693
> >  (shared dirty):     1080     3864      568     5512
> >    (priv dirty):      808      936     1056     2800
>
> >  Objects
> >           Views:       77        ViewRoots:        1
> >     AppContexts:       12       Activities:       11
> >          Assets:        2    AssetManagers:        2
> >   Local Binders:       36    Proxy Binders:       21
> > Death Recipients:        0
> >  OpenSSL Sockets:        0
>
> >  SQL
> >            heap:        0          dbFiles:        0
> >       numPagers:        0   inactivePageKB:        0
> >    activePageKB:        0
> > #
>
> > Without the PhoneStateListener, the number of activities is always 1
> > no matter how many times the app is launched & finished.  So, am I
> > doing anything wrong here?  Or is this a bug in the
> > TelephonyManager?
>
> > Thanks,
> > Steve
>
> >  here's the code
> > package com.example.leak;
>
> > import android.app.Activity;
> > import android.content.Context;
> > import android.os.Bundle;
> > import android.telephony.PhoneStateListener;
> > import android.telephony.TelephonyManager;
> > import android.util.Log;
>
> > public class LeakExample extends Activity {
>
> >        private class MyPhoneStateListener extends PhoneStateListener {
> >               �...@override
> >                public void onCallStateChanged(int state, String 
> > incomingNumber) {
>
> >                        if ((state == TelephonyManager.CALL_STATE_RINGING)
> >                                        || (state == 
> > TelephonyManager.CALL_STATE_OFFHOOK)) {
> >                                LeakExample.this.finish();
> >                        }
> >                }
> >        }
>
> >        MyPhoneStateListener phone_listener = new MyPhoneStateListener();
>
> >        TelephonyManager telMgr ;
>
> >   �...@override
> >    public void onCreate(Bundle savedInstanceState) {
> >        super.onCreate(savedInstanceState);
> >        setContentView(R.layout.main);
>
> >        telMgr = (TelephonyManager) getSystemService
> > (Context.TELEPHONY_SERVICE);
> >    }
>
> >       �...@override
> >        protected void onPause() {
> >                super.onPause();
>
> >                telMgr.listen(phone_listener, 
> > PhoneStateListener.LISTEN_NONE);
> >        }
>
> >       �...@override
> >        protected void onResume() {
> >                super.onResume();
>
> >                telMgr.listen(phone_listener, 
> > PhoneStateListener.LISTEN_CALL_STATE);
> >        }
>
> >       �...@override
> >        protected void onDestroy() {
> >                super.onDestroy();
>
> >                Log.v("LEAK EXAMPLE", "onDestory");
> >        }
>
> > }
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] small test case that demonstrates out of memory failure using getWallpaper()

2009-09-08 Thread Flying Coder


The code below shows how getWallpaper can lead to an out of memory
force close.  This is the same code as I posted earlier for the
PhoneStateListener question, except getWallpaper() is used for the
background.  Launch then exit (BACK) repeatedly will result in a force
close:

09-08 16:45:30.612: ERROR/AndroidRuntime(4564): Uncaught handler:
thread main exiting due to uncaught exception
09-08 16:45:30.632: ERROR/AndroidRuntime(4564):
java.lang.OutOfMemoryError: bitmap size exceeds VM budget
09-08 16:45:30.632: ERROR/AndroidRuntime(4564): at
android.graphics.BitmapFactory.nativeDecodeFileDescriptor(Native
Method)
09-08 16:45:30.632: ERROR/AndroidRuntime(4564): at
android.graphics.BitmapFactory.decodeFileDescriptor(BitmapFactory.java:
424)
09-08 16:45:30.632: ERROR/AndroidRuntime(4564): at
android.app.ApplicationContext.getCurrentWallpaperLocked
(ApplicationContext.java:523)
09-08 16:45:30.632: ERROR/AndroidRuntime(4564): at
android.app.ApplicationContext.peekWallpaper(ApplicationContext.java:
515)
09-08 16:45:30.632: ERROR/AndroidRuntime(4564): at
android.app.ApplicationContext.getWallpaper(ApplicationContext.java:
504)
09-08 16:45:30.632: ERROR/AndroidRuntime(4564): at
android.content.ContextWrapper.getWallpaper(ContextWrapper.java:201)
09-08 16:45:30.632: ERROR/AndroidRuntime(4564): at
com.example.leak.LeakExample.onCreate(LeakExample.java:37)
09-08 16:45:30.632: ERROR/AndroidRuntime(4564): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
09-08 16:45:30.632: ERROR/AndroidRuntime(4564): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2231)
09-08 16:45:30.632: ERROR/AndroidRuntime(4564): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
09-08 16:45:30.632: ERROR/AndroidRuntime(4564): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
09-08 16:45:30.632: ERROR/AndroidRuntime(4564): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
09-08 16:45:30.632: ERROR/AndroidRuntime(4564): at
android.os.Handler.dispatchMessage(Handler.java:99)
09-08 16:45:30.632: ERROR/AndroidRuntime(4564): at
android.os.Looper.loop(Looper.java:123)
09-08 16:45:30.632: ERROR/AndroidRuntime(4564): at
android.app.ActivityThread.main(ActivityThread.java:3948)
09-08 16:45:30.632: ERROR/AndroidRuntime(4564): at
java.lang.reflect.Method.invokeNative(Native Method)
09-08 16:45:30.632: ERROR/AndroidRuntime(4564): at
java.lang.reflect.Method.invoke(Method.java:521)
09-08 16:45:30.632: ERROR/AndroidRuntime(4564): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
09-08 16:45:30.632: ERROR/AndroidRuntime(4564): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
09-08 16:45:30.632: ERROR/AndroidRuntime(4564): at
dalvik.system.NativeStart.main(Native Method)

On my G1 it takes ~20 launch/back cycles before the force close
happens.

Anyone have a good way of dealing with this?  Is there a way to force
a GC on the system process?  Would doing so resolve the problem?

Thanks,
Steve

### here's the code (note that background uses a scale type of
'center'):
package com.example.leak;

import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.util.Log;
import android.widget.ImageView;

public class LeakExample extends Activity {

private class MyPhoneStateListener extends PhoneStateListener {
@Override
public void onCallStateChanged(int state, String 
incomingNumber) {

if ((state == TelephonyManager.CALL_STATE_RINGING)
|| (state == 
TelephonyManager.CALL_STATE_OFFHOOK)) {
LeakExample.this.finish();
}
}
}

MyPhoneStateListener phone_listener = new MyPhoneStateListener();

TelephonyManager telMgr ;

ImageView background ;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

background = (ImageView) findViewById(R.id.background);
BitmapDrawable wp = (BitmapDrawable) this.getWallpaper();
background.setImageDrawable(wp);

telMgr = (TelephonyManager) getSystemService
(Context.TELEPHONY_SERVICE);
}

@Override
protected void onPause() {
super.onPause();

telMgr.listen(phone_listener, PhoneStateListener.LISTEN_NONE);
}

@Override
protected void onResume() {
super.onResume();

telMgr.listen(phone_listener, 
PhoneStateListener.LISTEN_CALL_STATE);
}

@Override
protec

[android-developers] Re: How to interpret device state dump from DDMS?

2009-09-08 Thread Flying Coder

Bummer -- but thanks! :)

On Sep 8, 4:38 pm, fadden  wrote:
> On Sep 8, 8:24 am, Flying Coder  wrote:
>
> > Is there any documentation describing the various sections of "dump
> > device state" output from DDMS?
>
> Not really.  Some parts are self-explanatory, some only have meaning
> to people very well acquainted with the inner workings of the
> subsystem in question.
>
> The standard procedure for reporting a problem internally is to
> include the output from "adb bugreport", which is the same stuff.
> Since you never know what bits might be useful, we include everything
> and the kitchen sink.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] react to SCREEN_ON, but only when user pressed a button

2009-05-18 Thread Flying Coder


Hi,
I have a BroadcastReceiver that receives SCREEN_ON.  If the screen
came on because the user pressed a button, I want to do something.
However, if the screen was turned on by an app (e.g., alarm clock
going off or SMS popup), then I don't want to do anything.  Anyone
know how I can differentiate between the two cases?

Thanks a bunch!
Steve


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



[android-developers] How to detect if sound is currently playing on the speaker?

2009-05-18 Thread Flying Coder


Hi,
Is there any way to tell if an app is currently using the speaker
(playing music or generating other sounds)?  Specifically, I'd like to
detect if an alarm clock is going off (not only the one that comes
with the system, but any alarm clock), but I'll settle for simply
knowing if any sounds are coming out of the speaker.

Any thoughts?

Thanks!
Steve


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

2010-01-29 Thread Flying Coder
Docs for this would be awesome!

Nedrow:  thanks for the link -- that was very helpful.

Steve


On Jan 28, 10:31 pm, jotobjects  wrote:
> Thanks - this sure looks like it might be useful if there was more
> documentation :(
>
> On Jan 28, 3:38 pm, Nerdrow  wrote:
>
>
>
> > Not a lot of good, workable documentation about this.  This helped me
> > out a lot:http://escomic.net/217
>
> > On Jan 27, 3:59 pm, jotobjects  wrote:
>
> > > Where is there information about the syntax of  xml files.
> > > These can be used to define 2D graphics as I understand it.  There are
> > > few spotty examples in the samples directory but that is all I have
> > > found.

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


[android-developers] Android 2.0: Why does my transparent background turn white while scrolling??

2010-01-07 Thread Flying Coder

Hi,
I'm using a ListView with a transparent background.  It works fine
in Android 1.5 & 1.6, but in Android 2.0 and later, the ListView
background turns white while scrolling.  I want it to stay
transparent, just like in 1.5 & 1.6.

Does anyone know what's going on, or better yet, how I can get
this working correctly?

Thanks a bunch!

Steve
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Android 2.0: Why does my transparent background turn white while scrolling??

2010-01-07 Thread Flying Coder
never mind, I found the answer:  
http://developer.android.com/resources/articles/listview-backgrounds.html

On Jan 7, 10:08 am, Flying Coder  wrote:
> Hi,
>     I'm using a ListView with a transparent background.  It works fine
> in Android 1.5 & 1.6, but in Android 2.0 and later, the ListView
> background turns white while scrolling.  I want it to stay
> transparent, just like in 1.5 & 1.6.
>
>     Does anyone know what's going on, or better yet, how I can get
> this working correctly?
>
> Thanks a bunch!
>
> Steve
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Android Coverflow widget

2010-01-08 Thread Flying Coder
Wow - looks great!  I'll definitely play around with it and will let
you know if I have any feedback.

Cheers,
Steve


On Jan 8, 3:45 am, Taf  wrote:
> Hi,
>
> I've had a go at creating a coverflow like widget. My results can be
> found here:
>
> http://www.inter-fuser.com/2010/01/android-coverflow-widget.html
>
> If you fancy giving it a try I'd been interested in your feedback.
> I've only tried it on a HTC G1 running Android 1.1
>
> Thanks,
>
> Neil.
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Create Nexus One live wallpaper

2010-01-12 Thread Flying Coder

My app also runs on Android 1.5 & 1.6.  Currently, I specify the
translucent theme in the manifest.  Is there a way to conditionally
specify either translucent or wallpaper depending on the SDK version?

Thanks,
Steve


On Jan 10, 2:11 pm, Romain Guy  wrote:
> No, don't do this in code, do this in your manifest. Otherwise there
> will be an ugly transition.
>
>
>
>
>
> On Sun, Jan 10, 2010 at 9:57 AM, Beth Mezias  wrote:
> > Just to confirm, the code is ok if it sets the theme:
> >         setTheme(android.R.style.Theme_Wallpaper);
> > Merci beaucoup!
>
> > On Sat, Jan 9, 2010 at 11:50 AM, Romain Guy  wrote:
>
> >> > Can you please tell me if an app is picking up the systemwallpaperto
> >> > set it in an Activity, will the new livewallpaperbreak the
> >> > activity?
>
> >> Not at all. Thewallpapernow lives in its own process, in its own
> >> window. If your app uses the correct theme in its manifest, it will be
> >> transparent and show the livewallpaperunderneath. If not, you can
> >> draw the staticwallpaperin your background yourself. You won't be
> >> able to get live wallpapers though if you don't use the special
> >>wallpapertheme.
>
> >> > On Jan 9, 1:16 am, String  wrote:
> >> >> On Jan 9, 7:30 am, Romain Guy  wrote:
>
> >> >> > We are certainly not trying to piss off developers. The SDK is coming
> >> >> > *very soon* and we understand your frustration. Trust me that if we
> >> >> > could release it right now we would.
>
> >> >> Romain,
>
> >> >> Thanks for your response, and I do want to reiterate that my (our)
> >> >> frustration isn't directed at you personally. But if you have any way
> >> >> of passing word up the chain of command, please try to let them know
> >> >> that external developers are a vital part of the ecosystem, and
> >> >> releasing the appropriate SDK *before* any new OS version needs to be
> >> >> a priority. In fact, I'd go so far as to say that releasing an SDK
> >> >> needs to be an immutable prerequisite for any OS upgrade.
>
> >> >> Thanks again for your patience.
>
> >> >> String
>
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups "Android Developers" group.
> >> > To post to this group, send email to android-developers@googlegroups.com
> >> > To unsubscribe from this group, send email to
> >> > android-developers+unsubscr...@googlegroups.com
> >> > For more options, visit this group at
> >> >http://groups.google.com/group/android-developers?hl=en
>
> >> --
> >> Romain Guy
> >> Android framework engineer
> >> romain...@android.com
>
> >> Note: please don't send private questions to me, as I don't have time
> >> to provide private support.  All such questions should be posted on
> >> public forums, where I and others can see and answer them
>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group.
> >> To post to this group, send email to android-developers@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> android-developers+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >>http://groups.google.com/group/android-developers?hl=en
>
> > --
>
> > Marie von Ebner-Eschenbach  - "Even a stopped clock is right twice a day."
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Create Nexus One live wallpaper

2010-01-12 Thread Flying Coder

Never mind - I found a way to do it:  define sdk-specific themes in
values-v3 & values-v5.


On Jan 12, 6:47 am, Flying Coder  wrote:
> My app also runs on Android 1.5 & 1.6.  Currently, I specify the
> translucent theme in the manifest.  Is there a way to conditionally
> specify either translucent orwallpaperdepending on the SDK version?
>
> Thanks,
> Steve
>
> On Jan 10, 2:11 pm, Romain Guy  wrote:
>
>
>
> > No, don't do this in code, do this in your manifest. Otherwise there
> > will be an ugly transition.
>
> > On Sun, Jan 10, 2010 at 9:57 AM, Beth Mezias  wrote:
> > > Just to confirm, the code is ok if it sets the theme:
> > >         setTheme(android.R.style.Theme_Wallpaper);
> > > Merci beaucoup!
>
> > > On Sat, Jan 9, 2010 at 11:50 AM, Romain Guy  wrote:
>
> > >> > Can you please tell me if an app is picking up the systemwallpaperto
> > >> > set it in an Activity, will the new livewallpaperbreak the
> > >> > activity?
>
> > >> Not at all. Thewallpapernow lives in its own process, in its own
> > >> window. If your app uses the correct theme in its manifest, it will be
> > >> transparent and show the livewallpaperunderneath. If not, you can
> > >> draw the staticwallpaperin your background yourself. You won't be
> > >> able to get live wallpapers though if you don't use the special
> > >>wallpapertheme.
>
> > >> > On Jan 9, 1:16 am, String  wrote:
> > >> >> On Jan 9, 7:30 am, Romain Guy  wrote:
>
> > >> >> > We are certainly not trying to piss off developers. The SDK is 
> > >> >> > coming
> > >> >> > *very soon* and we understand your frustration. Trust me that if we
> > >> >> > could release it right now we would.
>
> > >> >> Romain,
>
> > >> >> Thanks for your response, and I do want to reiterate that my (our)
> > >> >> frustration isn't directed at you personally. But if you have any way
> > >> >> of passing word up the chain of command, please try to let them know
> > >> >> that external developers are a vital part of the ecosystem, and
> > >> >> releasing the appropriate SDK *before* any new OS version needs to be
> > >> >> a priority. In fact, I'd go so far as to say that releasing an SDK
> > >> >> needs to be an immutable prerequisite for any OS upgrade.
>
> > >> >> Thanks again for your patience.
>
> > >> >> String
>
> > >> > --
> > >> > You received this message because you are subscribed to the Google
> > >> > Groups "Android Developers" group.
> > >> > To post to this group, send email to 
> > >> > android-developers@googlegroups.com
> > >> > To unsubscribe from this group, send email to
> > >> > android-developers+unsubscr...@googlegroups.com
> > >> > For more options, visit this group at
> > >> >http://groups.google.com/group/android-developers?hl=en
>
> > >> --
> > >> Romain Guy
> > >> Android framework engineer
> > >> romain...@android.com
>
> > >> Note: please don't send private questions to me, as I don't have time
> > >> to provide private support.  All such questions should be posted on
> > >> public forums, where I and others can see and answer them
>
> > >> --
> > >> You received this message because you are subscribed to the Google
> > >> Groups "Android Developers" group.
> > >> To post to this group, send email to android-developers@googlegroups.com
> > >> To unsubscribe from this group, send email to
> > >> android-developers+unsubscr...@googlegroups.com
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/android-developers?hl=en
>
> > > --
>
> > > Marie von Ebner-Eschenbach  - "Even a stopped clock is right twice a day."
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > Romain Guy
> > Android framework engineer
> > romain...@android.com
>
> > Note: please don't send private questions to me, as I don't have time
> > to provide private support.  All such questions should be posted on
> > public forums, where I and others can see and answer them
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] How do I launch the GMail client programmatically?

2009-07-16 Thread Flying Coder


I know I can do this:

Intent intent = pm.getLaunchIntentForPackage("com.google.android.gm");

startActivity(intent);

But, are there any "generic" intents that will launch gmail?  For
instance, I can use ACTION_SEND to send an email, but what similar
intent will simply launch gmail?

Thanks,
Steve

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Android 3.2 emulator display freezes as soon as I click apps or + in the home screen

2012-04-09 Thread Flying Coder
Did you ever find a solution to this?  I'm having exactly the same problem 
with the latest tools (r17).

Thanks,
Steve


On Tuesday, October 11, 2011 1:37:21 PM UTC-4, Michael Diener wrote:
>
> When running the 3.2 emulator and pressing "apps" or "+" in the home 
> screen, the screen starts to move a bit and then freezes. This happens 
> on a x64 Linux as well as a x64 Windows 7. Sometimes it gets so far 
> that apps are displayed, but only the top half of the screen is used 
> For 3.1 the same thing happens and for 3.0 it works sometimes. 
>
> Anybody else experiencing this or knows a way around this? 
>
> /Michael

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

[android-developers] Re: Google has received a subpoena seeking information related to Android applications

2012-10-01 Thread Flying Coder
I got this too -- anyone know what this is about?

On Monday, October 1, 2012 6:45:39 PM UTC-4, Andrei wrote:
>
> I received this email
> But i am not interested and want my account to be excluded
> What do i need to do?
> Thanks
>
> Google has received a subpoena seeking information related to Android
> applications that may have been made available on alternative markets
> without the consent of the developer. The subpoena seeks information
> about those Android applications, including contact information for the
> developers of the applications. Our records show that your Android
> developer account will be included in the information Google will provide
> in response to this subpoena.
>
> Google is not in a position to provide you with legal advice or discuss
> the substance of the process in our possession. For more information
> about the subpoena, you may wish to contact the Federal Bureau of
> Investigation -- Atlanta Field Office at (404) 679-9000, reference #
> 2011R00320/FBI/ORKIN.
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Lots of lost sales due to Credit Card authorization.

2010-04-28 Thread Flying Coder

Have the customers who contact you about it check their spam folder --
chances are they'll find Google's email there (at least that's been my
experience).

Cheers,
Steve


On Apr 26, 9:54 am, Streets Of Boston  wrote:
> You may experiencing a bug, since e-mails should be sent out to
> customers to update their incorrect payment details.
>
> At least it work sometimes, since i do see customers trying to update
> their payment info when authorization failed.
>
> You lost 120 sales... only 120... I lost wy more than that. :)
> But, then again, i'm happy that these checks are done, since i don't
> want to pay a ton of chargebacks to fix invalid and un-authorized
> transactions.
>
> On Apr 26, 12:19 am, Paul  wrote:
>
>
>
>
>
> > I've lost about 120 sales from the Android Market due to people not
> > ever entering valid credit card information in Google Checkout. Not
> > sure if they ever got the email from google telling them to do it.
>
> > I also have to handle a lot of customer support for these issues.
> > People think the app is going to download and it doesn't. Android
> > Market doesn't tell them that their card didn't authorize. So they
> > contact me. At least once a day I have to email someone and tell them
> > to go into checkout.google.com and make sure their payment methods are
> > correct.
>
> > There has to be a better way. I think if Android Market/Google
> > Checkout told the user immediately in the Android Market that they
> > weren't able to authorize the card, then they would know what to do.
>
> > Also it would be nice if buyers understood, that as a seller I don't
> > get their credit card info, can't charge them, and have no control
> > over the download of the app.
>
> > Google, I love ya, but you've got to work on this issue. Just make it
> > clearer to the buyer.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group 
> > athttp://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Strange layout bug: bottom half of button text missing. Xperia X10

2010-05-04 Thread Flying Coder

Please see this image:  
http://sites.google.com/a/appventive.com/www/files/button_bug.jpg

Notice how the bottom half of the words "Done" & "Clear" are clipped.
This does NOT happen on the emulator or on the N1, Droid or G1.  But,
apparently is happening on the XPeria X10.

Has anyone else seen this?  Any idea how to work around the problem?
Here's the layout for the buttons (background set programmatically):



Thanks,
Steve

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Want to confirm that app is in background due to Home Key press

2010-08-31 Thread Flying Coder
I agree with Frank & Mark:  you don't need to detect the HOME key to
do what you want.  Simply doing the check as part of the activity life
cycle should be sufficient.

However, I think you can detect when the HOME key is pressed by
overriding onUserLeaveHint.  I haven't yet had a reason to use it, but
according to the docs it will only be called if the user put the app
in the background (e.g., by pressing HOME).

Cheers,
Steve


On Aug 31, 1:39 pm, Frank Weiss  wrote:
> When the user "launches the app" from the home screen, the activity
> given in the manifest is started. I suppose the licensing check should
> be done in that activity's lifecycle methods.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Permission checked at install time, but what happens if the "permission user" is installed before the "permission definer"?

2010-09-04 Thread Flying Coder

For example, I am adding an option to my app (Executive Assistant) to
integrate with the Astrid TODO list app.  Astrid defines the
permissions necessary for doing this. My app uses those permissions.
Everything works fine if Astrid is installed before my app.  However,
many users will use my app first, then decide to use Astrid later
(e.g., in at least some cases, because its now supported by my app).
However, in this case, I will get a SecurityException if I try to read
from the Astrid ContentProvider since that permission didn't exist
when my app was installed.

One easy solution would be to simply uninstall, then re-install my app
after Astrid has been installed.  However, this would require the user
to reconfigure my app, which would understandably be quite annoying
for the user.

So, two questions:  (1) is there any way for my app to "re-request"
the permission after Astrid has been installed?  And, (2) if not, is
there any easy way to save & restore my applications data (database &
shared preferences) between an uninstall/reinstall so that the user
does not have to reconfigure?

Thanks a bunch,
Steve




-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Permission checked at install time, but what happens if the "permission user" is installed before the "permission definer"?

2010-09-05 Thread Flying Coder

Mark & Dianne,
Thanks for the replies.  I was hoping there might some equivalent
of "adb install -r" that would allow my app to be re-installed without
losing its data (is it possible?).  Unfortunately, the backup/restore
to SD card won't work for this app because the SharedPreferences
contains some sensitive data.  It looks like I will have to go with
the plug-in approach.

Cheers,
Steve


On Sep 4, 9:01 pm, Dianne Hackborn  wrote:
> Generally, unfortunately, this doesn't work.  As of froyo, if it is a
> signature permission, it will work -- the original app will be granted the
> permission once it is known.  (This is safe because it is not a permission
> the user ever needs to be shown anyway.)
>
> But for a permission the user needs to approve...  it won't get granted
> until the first app is re-installed or updated, and the permission it wants
> is known.
>
> This is something that really needs to be improved.
>
>
>
>
>
> On Sat, Sep 4, 2010 at 2:56 PM, Flying Coder  wrote:
>
> > For example, I am adding an option to my app (Executive Assistant) to
> > integrate with the Astrid TODO list app.  Astrid defines the
> > permissions necessary for doing this. My app uses those permissions.
> > Everything works fine if Astrid is installed before my app.  However,
> > many users will use my app first, then decide to use Astrid later
> > (e.g., in at least some cases, because its now supported by my app).
> > However, in this case, I will get a SecurityException if I try to read
> > from the Astrid ContentProvider since that permission didn't exist
> > when my app was installed.
>
> > One easy solution would be to simply uninstall, then re-install my app
> > after Astrid has been installed.  However, this would require the user
> > to reconfigure my app, which would understandably be quite annoying
> > for the user.
>
> > So, two questions:  (1) is there any way for my app to "re-request"
> > the permission after Astrid has been installed?  And, (2) if not, is
> > there any easy way to save & restore my applications data (database &
> > shared preferences) between an uninstall/reinstall so that the user
> > does not have to reconfigure?
>
> > Thanks a bunch,
> > Steve
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@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] Re: Permission checked at install time, but what happens if the "permission user" is installed before the "permission definer"?

2010-09-05 Thread Flying Coder

Call it what you want, is there a way to make it happen?  I believe
the "in place update" would be sufficient to get the permission
recognized.

On Sep 5, 11:21 am, Mark Murphy  wrote:
> On Sun, Sep 5, 2010 at 9:19 AM, Flying Coder  wrote:
> >    Thanks for the replies.  I was hoping there might some equivalent
> > of "adb install -r" that would allow my app to be re-installed without
> > losing its data (is it possible?).
>
> adb install -r doesn't "re-install" an app. It does an in-place
> update. This does have the effect of keeping your data around, but so
> does a regular Market update.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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


[android-developers] Re: Permission checked at install time, but what happens if the "permission user" is installed before the "permission definer"?

2010-09-05 Thread Flying Coder

OK.  BTW, thanks for the tip about the "signature permission".  That
not only helped with a workaround for this problem, but also with
another related issue.

Cheers,
Steve

On Sep 5, 2:58 pm, Dianne Hackborn  wrote:
> There isn't a way in the SDK.  You need to go through the permissions screen
> so the user can approve the permissions being granted.  (adb install doesn't
> go through permissions because the shell is running as the user.)
>
>
>
>
>
> On Sun, Sep 5, 2010 at 8:33 AM, Mark Murphy  wrote:
> > On Sun, Sep 5, 2010 at 11:31 AM, Flying Coder 
> > wrote:
> > > Call it what you want, is there a way to make it happen?
>
> > Run adb install -r, or publish an update to your app on the Market. I
> > don't know of any other mechanism to do this.
>
> > --
> > 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 Android Development_ Version 3.1 Available!
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@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] Another developer has published an app using the EXACT same name as mine

2010-09-14 Thread Flying Coder

Surely, this can't be allowed, can it?  What recourse do I have?

Thanks,
Steve


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Another developer has published an app using the EXACT same name as mine

2010-09-14 Thread Flying Coder

Hi Dan,
Thanks for the feedback.  The app is "ICE: In Case of Emergency"
and has been published on the Market since Feb 09 (at the time, it was
the only ICE app for Android).  Its currently one of the top-rated
paid apps in the Health category. Its such a common phrase, that I
wasn't expecting to be able to Trademark it, but I did expect the
Market to require competitors to use names that were at least a LITTLE
different.

I discovered the copycat today when I got an email requesting
technical support from someone who thought they had purchased my app,
when in fact they had purchased the copycat's.

Cheers,
Steve



On Sep 14, 1:58 pm, DanH  wrote:
> Do you have the app name trademark protected?
>
> If you have been using the app name for some time (how long "some" is
> depends) then you could claim it as your trademark.  Simplest way to
> do this is to simply place (tm) after the name.  It's not nearly as
> good as a registered trademark, but it carries some weight.
>
> However, once a copycat has jumped on the name, it's harder to claim
> your trademark, especially if you haven't used it very long.
>
> And in any event you have to hire your own lawyer to go after the
> copycat, and if he's in another country things get dicey real
> quickly.  (However, not vigorously defending your trademark against a
> copycat causes you to lose any rights you do have very quickly.)
>
> Do go to some effort (eg, preserve letters/invoices/etc) to establish
> your "priority" on the name, so that a year from now the other guy
> can't come along and sue YOU for trademark infringement.
>
> (And it's probably worth the effort to send the other guy a cease-and-
> desist letter.  Probably would do no good, but it's cheap.)
>
> I suppose if someone duplicates a name in the Android store then you
> may have some recourse with store management, but it would be purely
> at their discretion, especially given how hard it is to find a unique
> name anymore.
>
> (I wonder how many here even know how to copyright their work?)
>
> On Sep 14, 12:41 pm, Flying Coder  wrote:
>
>
>
> > Surely, this can't be allowed, can it?  What recourse do I have?
>
> > Thanks,
> > Steve

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Another developer has published an app using the EXACT same name as mine

2010-09-15 Thread Flying Coder

@Dan:  thanks for the advice and link -- I will check it out.

@Martin: thanks for the feedback.  It is very frustrating the Market
allows this issue to crop up.  At one time at least, I believe it did
require apps to have unique names.  btw, I still owe you that write-up
-- sorry, I've side-tracked with other things lately.

@Metal Mikey:  Thanks for the support!

@JP: thanks, I will look into the DMCA takedown notice.

All the best,
Steve

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

2010-07-12 Thread Flying Coder

Hi,
   Set the type to:
ContactsContract.CommonDataKinds.Phone.CONTENT_TYPE

Cheers,
Steve


On Jul 11, 8:45 am, andreas  wrote:
> Hi,
>
> I use this code to start the contact app and pick a contact in my app
>
> Intent contactintent = new Intent (Intent.ACTION_PICK);
> contactintent.setType(ContactsContract.Contacts.CONTENT_TYPE);
> startActivityForResult(contactintent,PICKCONTACT);
>
> and then working with the result in onActivityResult.
>
> But is there a way to tell the contact activity only to show contacts
> which have a phone number or an email-adress?
>
> Andreas

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

2010-07-19 Thread Flying Coder
Hi Mark,
 I normally enjoy reading your posts here and usually even agree
with you.  Though in this instance, I have to disagree with your
blanket characterization of all current lock screen replacements as
"malware".

 I have two apps on the Market that offer lock screen
functionality.  Both are highly rated with many thousands of downloads
and hundreds of ratings.  One of them "ICE: In Case of Emergency" has
even been credited by several users with saving their lives.  Both
apps use only public, documented API's for the lock screen support,
though possibly in ways not intended by the framework engineers.  You
can choose to call this malware if you like, but the users of these
apps clearly don't think so.

 I look forward to the day that Android provides an "official"
lock screen replacement mechanism, but in the meantime, I make do with
what is available.

Steve





On Jul 19, 11:05 am, Mark Murphy  wrote:
> On Mon, Jul 19, 2010 at 9:56 AM, arnouf  wrote:
> > I don't agree with you mark, because there are some differents apps on
> > market replacing lock screen without change the installed firmware or
> > change root access.
>
> Those are not replacement lock screens. Those use malware techniques.
>
> Google has said on this list, repeatedly, that there are no APIs for
> replacing the lock screen nor any near-term plans to add any.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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


[android-developers] Re: Android lock screen

2010-07-19 Thread Flying Coder
Hi Mark,

> > Both
> > apps use only public, documented API's for the lock screen support,
> > though possibly in ways not intended by the framework engineers.  You
> > can choose to call this malware if you like, but the users of these
> > apps clearly don't think so.
>
> IMHO, any technique that would allow an application to prevent other
> applications (including the home screen) from running, in the absence
> of a managed API to support this, is a security flaw. This can be used
> by anyone from script kiddies to the Mafia to government agencies in
> ways that are antithetical to user interests. Just because you are
> using that technique for positive aims does not magically absolve it
> from being a security flaw.

Sorry Mark, but in this particular instance, you don't know what you
are talking about.  The API's I use cannot prevent another app from
running, certainly not the home screen app.  Press HOME from either of
my lock screen apps and you will exit the lock screen securely (with
pattern/pin/password entry if that's how your phone is setup).  Note
that this is how the API's are implemented -- it does not depend on my
apps.

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

2010-07-24 Thread Flying Coder

I get these periodically.  I used to reply asking if they meant to
send something.  The ones who followed up all said that they had just
accidentally sent the message.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] DDMS Telephony Status controls not working for the emulator in latest SDK tools

2010-08-05 Thread Flying Coder

I'm trying to test failure modes in my app.  Using DDMS Emulator
Controls, I set "telephony status"/data to "denied".  This removes the
3G icon from the status bar as expected.  However, it does NOT prevent
my app from accessing the network -- it seems to have no effect at
all.

This is using the latest SDK tools.  The emulator is emulating a 2.1
device.

Anyone else seen this?  Have a solution or workaround?

Thanks a bunch,
Steve

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Looking for recommendations for a textbook to use in a class on Android Development

2010-08-05 Thread Flying Coder

I've been approached by a local community college to teach a course on
Android Development.  Have you taught such a course?  Taken one that
you thought was good?  I appreciate any recommendations you might
offer on textbooks or other materials that you used.

Thanks in advance,
Steve

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

2010-08-05 Thread Flying Coder
Hi Nikki,
Toast's need to happen on the main UI thread.  Slightly different
situation, but you may find this thread useful:

http://groups.google.com/group/android-developers/browse_thread/thread/8fe7d6a776f5f2fb/a9ecf18a32891cab#a9ecf18a32891cab

Cheers,
Steve


On Aug 5, 8:48 am, nikki  wrote:
> hi group
>
> i have a service class written which gives notification(Toast dialog)
> on every life cycle method call back. when i run my application all
> works well.
>
> but when run this service class from my test project the toast message
> are not displayed.
>
> it give the following log for the toast message
>
> 08-05 18:05:42.097: INFO/TestRunner(1763): started:
> testService(com.android.example.testing.dummyapp.test.ServiceTest)
> 08-05 18:05:42.317: INFO/NotificationService(581): enqueueToast
> pkg=com.android.example.testing.dummyapp
> callback=android.app.itransientnotification$stub$pr...@43703378
> duration=0
> 08-05 18:05:47.366: INFO/NotificationService(581): enqueueToast
> pkg=com.android.example.testing.dummyapp
> callback=android.app.itransientnotification$stub$pr...@436faa18
> duration=1
> 08-05 18:05:52.407: INFO/NotificationService(581): enqueueToast
> pkg=com.android.example.testing.dummyapp
> callback=android.app.itransientnotification$stub$pr...@43720e40
> duration=1
> 08-05 18:05:57.443: INFO/TestRunner(1763): finished:
> testService(com.android.example.testing.dummyapp.test.ServiceTest)
> 08-05 18:05:57.447: INFO/TestRunner(1763): passed:
> testService(com.android.example.testing.dummyapp.test.ServiceTest)
>
> i want that the toast message should also be displayed on subsequent
> calls to life cycle methods

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 do you specify ContentProvider authorities when using the Lite & Pro app publishing model?

2010-12-14 Thread Flying Coder

Having lite & pro ContentProviders is very easy if you use a library
project.  Simply put all of the shared functionality between lite &
pro versions, including the ContenteProvider, in the base library
project.  Then, have 2 separate lite & pro projects that use the same
base library project.  Define any lite/pro specific variables &
manifest values in the lite & pro versions, and that's it.

For instance, in one of my apps, I have both lite & pro versions with
ContentProviders.  The ContentProvider is defined in the library
project and references an AUTHORITY variable defined in an Application
object.  Then, in each of the LITE & PRO versions, I created a
subclass of the Application object that overrides the AUTHORITY
variable with the correct version-specific value.  Similarly, the LITE
& PRO Manifest files have corresponding version-specific authority
strings for the ContentProvider.

Works like a charm.

Cheers,
Steve


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

2010-12-18 Thread Flying Coder

Same large drop in sales here too.  Also, similar big, overnight drop
in ranking for my top-rated app.  A few months ago it had been #1 in
the Health category for many months.  Then was in the top 3 or 4 for
several months, then a couple of days ago plummeted to 13th. :-(





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


[android-developers] Re: Anyone else ever submitted to Motorola Shop4Apps? I did and so far it seems dismal - share your experience?

2010-09-20 Thread Flying Coder

I posted one of my most popular apps on Shop4Apps China a few months
ago.  Sadly, I have yet to make even 1 sale.  Granted, the app is in
English so I would not expect it to be anywhere near as popular in
China as it is here, but I did expect to sell at least a few.

Shop4Apps, as well as Motorola's "App Accelerator" program, have both
been colossal wastes of my time.

Cheers,
Steve


On Sep 20, 1:08 pm, niko20  wrote:
> So a long time ago before Moto supported paid apps in Shop4Apps I had
> submitted one of my apps - it was a paid app but that was before I
> knew they didn't support devs getting paid yet. So I asked them to
> remove all my apps.
>
> A few weeks ago I found out that they now supported getting paid thru
> paypal, so you could sell your apps in China. So I resubmitted my
> apps.
>
> Unfortunately the only bad thing is it's like putting your app in a
> black hole. You really don't get any stats! Once a week they update
> your download count. And right now the download count is China only
> (even though Shop4Apps supports Mexico and Brazil as well). So far my
> download count shows as "7". This is for an app the gets bought over
> 40 times a day on the Android market.
>
> Wow - a whopping 7 so far, so this really still feels like a waste of
> time just like when I originally got into it.
>
> I still think because of this that alternative markets are never going
> to pan out - because for one, people don't seem to know about them,
> and for two, the companies that run the alternative market don't even
> provide the same level of information that Google does - even though
> we as devs complain that Google needs to provide more stats, better
> stats, it still seems they are ahead of the other market providers.
> Like I said, for motodev, it's like your app just disappears. You just
> "hope" that after a month, or up to 90 days, that you get some money
> for it somehow.
>
> Has anyone else here posted their app to Shop4Apps and would you be
> willing to share your current experience? I'm wondering if it's time
> to get back out of their store AGAIN.
>
> I also read that many people were concerned that since it's for China
> you won't get many sales anyway since they pirate everything over
> there instead.
>
> Well, just venting - misery loves company. I already make good sales
> on Android Market but obviously the more markets available (more
> countries) the better your results should be..
>
> -niko

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


[android-developers] How to use appt --rename-manifest-package during ant build?

2010-10-17 Thread Flying Coder

I have an app with both a free & paid version.  I have been using appt
--rename-manifest-package from the command line to rename the package
from one version to another.  But, I would like to using ant to do
builds.

Anyone know how to use the rename-manifest-package option in an ant
build?  Sorry if this is a stupid question, but I am a complete novice
when it comes to ant.

Thanks a bunch!

Steve

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


[android-developers] How to use appt --rename-manifest-package during ant build?

2010-10-17 Thread Flying Coder

I have an app with both a paid & free version.  I have been using aapt
--rename-manifest-package from the command line to switch from one
package to the other.  However, I would like to start using ant to do
the builds (to more easily use LVL).

Does anyone know how to use rename-manifest-package with ant?  Sorry
if this is a stupid question -- I am a complete novice when it comes
to ant.

Thanks a bunch!

Steve

P.s.  I tried posting this several hours ago, but it looks like it
didn't make it thru -- my apologies if you see this more than once.

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


[android-developers] Anyone have an experience dealing with Ubinuri?

2010-10-27 Thread Flying Coder
I'm sure many, if not most, of us have been contacted by Ubinuri about
distributing apps in Korea.  Just wondering if anyone has any
experience dealing with them?  Good, bad?

Thanks,
Steve

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Even with Min SDK version, building app against 2.2 breaks 1.5?

2010-05-24 Thread Flying Coder
Hi Greg,
Did you ever figure out what was going on?  I'm having exactly the
same problem.

Thanks,
Steve


On May 21, 8:39 pm, Greg Giacovelli  wrote:
> Nope it's just in drawable.
>
> -Greg
>
> On May 21, 5:28 pm, Xavier Ducrohet  wrote:
>
>
>
>
>
> > Is that resource in a qualified drawable folder? (like drawable-hdpi ?)
>
> > Xav
>
> > On Fri, May 21, 2010 at 5:10 PM, Greg Giacovelli  
> > wrote:
> > >  public static final int profile_section_background=0x7f020033;
> > > is the value inside of R
>
> > > spec resource 0x7f020033 :drawable/
> > > profile_section_background: flags=0x
>
> > > is the value from the dump using the toolset from android-8 and the
> > > android-1.5 platforms
>
> > > However I assume this is correct as the stack specifies that it cannot
> > > find the resource specified. Is there a way to extract the xml
> > > content?
> > > I have been trying to use the dump xmltree command however I think
> > > there is a typo in the error message and the format for the reference
> > > is not known to me.
>
> > > aapt dump xmltree   :drawable/profile_section_background
> > > returns
> > > ERROR: dump failed because resource :drawable/
> > > profile_section_background found
>
> > > -Greg
>
> > > On May 21, 4:28 pm, Xavier Ducrohet  wrote:
> > >> This is quite strange. Look inside your apk for the ID of the
> > >> resources that seemed to be missing (or if it's actually missing) and
> > >> match it with the R class.
>
> > >> To look at the compiled resources:
>
> > >> aapt dump resources .apk
>
> > >> aapt is in /platforms/android-8/tools/
>
> > >> Xav
>
> > >> On Fri, May 21, 2010 at 4:17 PM, Greg Giacovelli  
> > >> wrote:
> > >> > Yeah that was what I tried before posting. I did that like 3 times.
> > >> > The same APK works on 2.1 devices so it cannot be an inlining issue.
>
> > >> > I am sorry I know it's a vague error. The drawable in question is just
> > >> > a selector with dither equals true with 4 states inside of it. Nothing
> > >> > complicated but maybe it helps somewhere.
>
> > >> > -Greg
>
> > >> > On May 21, 2:17 pm, "Mark Murphy"  wrote:
> > >> >> > I just built my app against the new SDK released yesterday and it
> > >> >> > seems to break when I run the app in my old 1.5 profile in regards 
> > >> >> > to
> > >> >> > packaging assets.
> > >> >> > I haven't changed anything about my application and it ran on API 3 
> > >> >> > -
> > >> >> > 7. However just increasing that build to 8 seems to change something
> > >> >> > with the way assets are packed.  Here is a stack trace with the app
> > >> >> > trying to load a resource that it says it cannot fine. If I 
> > >> >> > recompile
> > >> >> > the same code in the same workspace against API 8, it cannot find 
> > >> >> > some
> > >> >> > of my drawables. Anything that seems wrong or is this a bug?
>
> > >> >> Do a full rebuild of the project. In Eclipse, I think Project|Force 
> > >> >> Clean
> > >> >> does this. Outside of Eclipse, ant clean does this.
>
> > >> >> Most likely, the resource IDs changed, but Java code that inlined 
> > >> >> those
> > >> >> resource IDs did not.
>
> > >> >> --
> > >> >> Mark Murphy (a Commons Guy)http://commonsware.com
> > >> >> Android App Developer Books:http://commonsware.com/books.html
>
> > >> >> --
> > >> >> You received this message because you are subscribed to the Google
> > >> >> Groups "Android Developers" group.
> > >> >> To post to this group, send email to 
> > >> >> android-developers@googlegroups.com
> > >> >> To unsubscribe from this group, send email to
> > >> >> android-developers+unsubscr...@googlegroups.com
> > >> >> For more options, visit this group 
> > >> >> athttp://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
>
> > >> --
> > >> Xavier Ducrohet
> > >> Android SDK Tech Lead
> > >> Google Inc.
>
> > >> Please do not send me questions directly. Thanks!
>
> > >> --
> > >> You received this message because you are subscribed to the Google
> > >> Groups "Android Developers" group.
> > >> To post to this group, send email to android-developers@googlegroups.com
> > >> To unsubscribe from this group, send email to
> > >> android-developers+unsubscr...@googlegroups.com
> > >> For more options, visit this group 
> > >> athttp://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: Froyo-Problem: Calendar access

2010-05-28 Thread Flying Coder
Definitely looking forward to the day when Android makes the API
official again (also VERY much looking forward to the day when there
is an API to access the email and/or gmail database).

But, in the meantime, prior to Froyo, I was using the following uri to
access calendar events:

content://calendar/calendars/instances/when//

Anyone know what the new URI would be?  Simply substituting the 2.2
authority doesn't do the trick.

Thanks,
Steve


On May 28, 3:22 am, arnoldl  wrote:
> Adam 
>
> you're my hero of the day :-)
>
> On 26 mei, 18:01, Adam Jensen  wrote:
>
>
>
> > Here are the URI and package name changes between 2.1 and 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: Home key - desired behaviour?

2010-06-06 Thread Flying Coder
It would be more accurate to say that onStop is *supposed* to be
called whenever HOME is pressed.  In 2.1, this does not happen:

http://code.google.com/p/android/issues/detail?id=6094#c0

Cheers,
Steve


On Jun 5, 7:59 pm, Mark Murphy  wrote:
> guich wrote:
> > Thanks. I got that the onStop event is called when the home key is
> > pressed.
>
> onStop() is called any time the activity is no longer visible. Hence,
> onStop() will be called for:
>
> -- HOME
> -- BACK
> -- you starting another activity
> -- the user choosing a notification from the drawer
> -- an incoming phone call
> -- etc.
>
> > As a side question, is there a way to discover the name of the intent
> > that called another intent? Like a stack trace of intents.
>
> No, sorry.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android App Developer Books:http://commonsware.com/books

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


[android-developers] how to display a Toast from an IntentService?

2010-06-11 Thread Flying Coder

So, I have an IntentService that handles button callbacks from a
widget.  When the user presses a certain button, I want to display a
Toast.  I return from onHandleIntent almost immediately after doing
Toast.show(), which in turn stops the service and kills its thread,
which keeps the Toast from actually being displayed.

Can anyone suggest an easy way to get the Toast (or something similar)
to display from an IntentService?

Thanks a bunch,
Steve

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

2010-06-11 Thread Flying Coder
Hi Mark,
Thanks for the suggestion, but unfortunately, SystemClock.sleep()
doesn't do the trick. :-(

Cheers,
Steve


On Jun 11, 1:22 pm, Mark Murphy  wrote:
> Flying Coder wrote:
> > So, I have an IntentService that handles button callbacks from a
> > widget.  When the user presses a certain button, I want to display a
> > Toast.  I return from onHandleIntent almost immediately after doing
> > Toast.show(), which in turn stops the service and kills its thread,
> > which keeps the Toast from actually being displayed.
>
> That's interesting. I've never tried that pattern. I'm a bit surprised
> that the Toast doesn't fire.
>
> > Can anyone suggest an easy way to get the Toast (or something similar)
> > to display from an IntentService?
>
> Have you tried SystemClock.sleep()? It's a serious kludge, but I don't
> know what else you can do.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Consulting:http://commonsware.com/consulting

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

2010-06-11 Thread Flying Coder
Thanks Satya,
   That did indeed do the trick!

All the best,
Steve


On Jun 11, 2:01 pm, Satya Komatineni 
wrote:
> May be this will work:
>
> MyService extends IntentService
> {
>       Handler  mMainThreadHandler = null;
>      onCreate() {
>                 super.onCreate();
>                 //initialize and populate the mMainThreadHandler
>                //because this method runs on the main thread
>                //unlike the deriver handle...method
>       }
>       onHandleIntent() {
>              //this runs on its own thread
>              //do your work
>              //post a message to mMainThreadHandler
>       }
>      
>        //in that handle of the mMainThreadHandler
>       {
>                show the toast as this runs on the main thread now
>       }
>
> }
>
> I am a bit guessing here.
>
> Satya
>
>
>
> On Fri, Jun 11, 2010 at 1:46 PM, Dianne Hackborn  wrote:
> > Oh for doing it from the callback from IntentService, you need to do it from
> > a thread that is actually running a responsive looper (which by definition
> > IntentService does not, since the thread it is calling you on is there to
> > run long-running operations).
> > So schedule a message in a Handler of the main thread, and show it there.
> >  Basically the same as any time you want to touch other parts of your UI.
>
> > On Fri, Jun 11, 2010 at 10:42 AM, Flying Coder  wrote:
>
> >> Hi Mark,
> >>    Thanks for the suggestion, but unfortunately, SystemClock.sleep()
> >> doesn't do the trick. :-(
>
> >> Cheers,
> >> Steve
>
> >> On Jun 11, 1:22 pm, Mark Murphy  wrote:
> >> > Flying Coder wrote:
> >> > > So, I have an IntentService that handles button callbacks from a
> >> > > widget.  When the user presses a certain button, I want to display a
> >> > > Toast.  I return from onHandleIntent almost immediately after doing
> >> > > Toast.show(), which in turn stops the service and kills its thread,
> >> > > which keeps the Toast from actually being displayed.
>
> >> > That's interesting. I've never tried that pattern. I'm a bit surprised
> >> > that the Toast doesn't fire.
>
> >> > > Can anyone suggest an easy way to get the Toast (or something similar)
> >> > > to display from an IntentService?
>
> >> > Have you tried SystemClock.sleep()? It's a serious kludge, but I don't
> >> > know what else you can do.
>
> >> > --
> >> > Mark Murphy (a Commons
> >> > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> >> > Android Consulting:http://commonsware.com/consulting
>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group.
> >> To post to this group, send email to android-developers@googlegroups.com
> >> To unsubscribe from this group, 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] pirated apps hosted on Google Sites :-(

2010-07-01 Thread Flying Coder

Nothing new about people pirating apps, but this guy is actually
trying to pass himself off as a legitimate Google and T-Mobile site:

The "Official T-Mobile My Touch 3G Fan Page"

http://sites.google.com/site/officialmytouch3gfanpage/calendar

where you can download "Free Paid Apps".

Google, can you please shut this guy down?

Thank you,
Steve


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