Saturday, October 31, 2009

[android-developers] how to show a dialog when a activity is running and game is over ?

I want to show a dialog to ask player "play again ?" when the game is
over.I find the code can only add in a activity for dialog is a part
of activity,But I should show the dialog when the game is over,in
other words ,I should know the time game is over.how can I do this?

any advices or example code with be appreciate.

notenking

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

[android-developers] Re: Self-restarting service

I suppose you could try having a parent service that only has the job
of keeping your other service alive. Essentially it could be crash
proof if you made it simple enough. I'm not sure but I think services
and activities can execute code when they're paused or closed.
Hopefully when something crashes onDestroy() still gets called. You
could write your main service to send an intent to the parent service
to get restarted.

Take all this with a grain of salt. My advice is just a shot in the
dark.

On Oct 31, 11:07 pm, Anders Feder <anders.feder...@gmail.com> wrote:
> Hello,
>
> I am developing a slightly "mission critical" Android application, and want
> a Service component of it to be essentially "immortal" or at least
> "self-restarting" in the event of a crash (of the service). What would be
> the best way to accomplish this? I use API level 3 (Android 1.5).
>
> Thanks in advance,
> Anders Feder

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

[android-developers] Self-restarting service

Hello,

I am developing a slightly "mission critical" Android application, and want a Service component of it to be essentially "immortal" or at least "self-restarting" in the event of a crash (of the service). What would be the best way to accomplish this? I use API level 3 (Android 1.5).

Thanks in advance,
Anders Feder

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

[android-developers] Re: Sleep mode

Anyone? If it can't be done in any other way, is there by any chance any way to emulate that the 'end call' button has been pressed? (I've tried with dispatchKeyEvent() to my own activity, but that didn't do anything.)

Thanks,
Anders Feder

2009/10/24 Anders Feder <anders.feder.83@gmail.com>
Hello,

Is it possible to programmaticly send the device into sleep mode (i.e. like when pressing the [end call] button once so screen the turns off and locks)?

Thanks in advance,
Anders Feder

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

[android-developers] Android SDK and AVD Manager

I just setup my development environment on a Windows XP VM and I'm
having problems getting the Android SDK & AVD Manager to retreive the
available packages. The message under Sites, Packages, and Archives
says "Failed to fetch URL". When I attempt to retrieve the 'Available
Packages', I get the following message:

XML verification failed for http://dl-ssl.google.com/android/repository/repository.xml.
Error: The markup declarations contained or pointed to by the document
type declaration must be well-formed.
Failed to fetch URL http://dl-ssl.google.com/android/repository/repository.xml,
reason: Unknown
Failed to parse XML document

I have the Windows firewall turned off, no antivirus software, and
have the "force https:// ...to be fetched using http://" checked. I've
also tried manually creating a file named 'androidtool.cfg' with the
text "sdkman.force.http=true".

Still getting the same error. Any ideas what to try next?

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

[android-developers] Re: what about the Android 3d module file type ".gles"

its a graphical layout engine script file, hence the name

On Oct 31, 2:08 am, LemonDev <lem...@gmail.com> wrote:
> GlobalTime use this file type ,but i have found nothing about it in
> the Android documents .and also no discussions on the internet .
> so , how can we export a "gles" file type from others like 3DMax...

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

Ever Attended A Mustache Wedding Party?



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

[android-developers] Locale and TTS problem

I have set my emulator to use US English.

When I run Locale.getDefault()

There is no country code!
The language code is set to "en_us"

When I set a varaible "audioLocale" using

audioLocale= Locale.US

The country code is "US"
The language code is "en"

When I run

mTts.isLanguageAvailable(audioLocale) == TextToSpeech.LANG_AVAILABLE

I get

-2 == 0

Why is mTts reporting that the US language is not 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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: AppWidgetProvider

Ah right, yes I believe there is an emulator only bug in 2.0 with
widgets. I've experienced your problem before, launching a new
emulator usually fixes it. Haven't really been able to track down the
cause of it but I don't think it will be a problem with devices. I'm
not sure if it has any effect but lately I've been running a lot of
different emulators at once, which could cause problems, sometimes I
have emulators launch with crippled performance and small things like
that.

On Nov 1, 7:17 am, ben <benbros...@gmail.com> wrote:
> Yea our provider is fully public. Our widgets worked perfectly fine,
> well we worked around the current widget bugs, until 2.0. The 1.6
> release we have no problems on actual phones or the emulator with the
> 2.0  emulator is where we see the problems, hopefully it's just a bug
> in the emulator. But it would be nice to know either way.
>
> On Oct 30, 10:40 pm, adamphillips12 <adamphillip...@gmail.com> wrote:
>
> > There are bugs with widgets and there are incorrectly or undocumented
> > features.
>
> > Part of your problem is probably this:http://groups.google.com/group/android-developers/browse_thread/threa...
>
> > The other part might be a problem with you receiving intents, try
> > making your provider fully public in the manifest (unless it already
> > is) and see if anything gets through or check you've probably declared
> > it for the widget intents. If you delete all the widgets you've placed
> > and call the method to get the widget ids for your package, if it is
> > not empty, you have the above bug I linked, test it out.
>
> > On Oct 31, 2:00 am, ben <benbros...@gmail.com> wrote:
>
> > > It seems like the convenience functions (onUpdate, onEnabled, etc.)
> > > aren't being called in the emulator on Android 2.0. Is this a bug, or
> > > are these functions just being eliminated? It would have been nice to
> > > see this documented somewhere.

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

[android-developers] Re: My appwidget broken Donut when keyboard slide out/in

Hi String,
I use static var, i will test it.
Hi Jeff,
Here is my layout file content. it seems will cause confliction
with others:
Thanks for your kindly help.

<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout android:id="@+id/LinearLayout01"
android:layout_width="72dp" android:layout_height="72dp"
android:background="@drawable/bg" android:orientation="vertical"
android:paddingTop="3dp"
xmlns:android="http://schemas.android.com/apk/res/android">

<TextView android:text="TextView01"
android:layout_width="wrap_content" android:textStyle="bold"
android:layout_height="14sp" android:id="@+id/TVWeeks"
android:textSize="12sp"
android:paddingLeft="8dp"
android:textColor="#000000">
</TextView>

<ImageView android:id="@+id/ImageView01"
android:layout_width="65sp"
android:src="@drawable/line"
android:paddingLeft="5dp"
android:layout_height="2sp">
</ImageView>
<TextView android:text="TextView01"
android:paddingLeft="8dp"
android:textSize="12sp"
android:layout_width="wrap_content" android:textColor="#000000"
android:layout_height="14sp" android:id="@+id/TVHeight">
</TextView>

<TextView android:text="TextView01"
android:textSize="12sp"
android:paddingLeft="8dp"
android:layout_width="wrap_content" android:textColor="#000000"
android:layout_height="16sp" android:id="@+id/TVWeight">
</TextView>

<ImageView android:id="@+id/ImageView02"
android:layout_width="65sp"
android:src="@drawable/line"
android:paddingLeft="5dp"
android:layout_height="2sp">
</ImageView>
<TextView android:text="TextView01" android:textColor="#000000"
android:textSize="12sp"

android:paddingLeft="8dp"
android:layout_width="wrap_content"
android:layout_height="16sp"
android:id="@+id/TVMomWeiAdded">
</TextView>


</LinearLayout>


On Oct 31, 4:13 am, Jeff Sharkey <jshar...@android.com> wrote:
> There can be issues if the android:id's in your layouts conflict with
> other widgets.  This was fixed in Eclair by having Launcher create
> separate SparseArray "jails" for each widget to store their state
> into.  It's change 09ddc08b... to be specific.
>
> Could you post your layout file, or describe how you're allocating ids?
>
> j
>
>
>
> On Thu, Oct 29, 2009 at 12:25 AM, String <sterling.ud...@googlemail.com> wrote:
>
> > On Oct 29, 6:51 am, Eong <eong.c...@gmail.com> wrote:
>
> >> Yeap. My users reported this to me today. The OTA release has the same
> >> bug. They should push a fixed update right now.
>
> > FWIW, I'm not convinced it's a bug in Donut. I'm not seeing the same
> > issue in my widgets, and I do plenty in onUpdate. If you genuinely
> > think it's a platform bug, produce a minimal test case and write it
> > up, please.
>
> > I'm assuming you're aware that keyboard open/close on an HTC Dream
> > destroys and recreates the widget instance, so if (for example) you're
> > referencing any static vars in your code, those will no longer exist.
> > I'm also assuming that you're sending a complete set of views to the
> > RemoteViews object every time, or you probably would have had trouble
> > before now. But you might check those things. :^)
>
> > String
>
> --
> Jeff Sharkey
> jshar...@android.com

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

Re: [android-developers] Re: Android 2.0 Bluetooth Code Samples

It's awesome

thanks CLC

On Thu, Oct 29, 2009 at 9:11 AM, CLC <clchen+clc@google.com> wrote:

Hi jb,

 Here is some sample code that uses Bluetooth:
http://code.google.com/p/apps-for-android/source/browse/trunk/BTClickLinkCompete

 This is the demo that was shown in the Eclair 2.0 video. You run the
app on two (or more) Android 2.0 devices, and you can then flick the
Android robot between the screens of the devices as if it were all
just one big screen.

-Charles

On Oct 27, 5:25 pm, jb <jburket...@gmail.com> wrote:
> Does anyone have any working code with the added Bluetooth support?
> Also, were you able to get Bluetooth working in the AVD? 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+unsubscribe@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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Debug question

When I experienced this problem, the solution for me to was to do a
project clean and rebuild the entire project. Then the app would load
properly from the Eclipse debug launch.

Roland

On Oct 31, 7:10 pm, mh <haye...@gmail.com> wrote:
> After much screwing around with configuration settings I finally got
> Eclipse to recognize and attach to a tethered MyTouch for debugging.
>
> The problem now is that before running the debugger I have to manually
> push the build to the device in order for the debugger to launch it.
> If I do not first manually install the file on the device it does not
> get uploaded and I see the following errors in the android console
> window:
>
> [2009-10-31 16:54:05 - MyApp]Starting activity com.me.android.MyApp on
> device
> [2009-10-31 16:54:06 - MyApp]New package not yet registered with the
> system. Waiting 3 seconds before next attempt.
> [2009-10-31 16:54:09 - MyApp]Starting activity com.me.android.MyApp on
> device
> [2009-10-31 16:54:11 - MyApp]New package not yet registered with the
> system. Waiting 3 seconds before next attempt.
> [2009-10-31 16:54:14 - MyApp]Starting activity com.me.android.MyApp on
> device
> [2009-10-31 16:54:15 - MyApp]ActivityManager: Starting: Intent
> { cmp=com.me.android/.MyApp}
> [2009-10-31 16:54:15 - MyApp]ActivityManager: Error type 3
> [2009-10-31 16:54:15 - MyApp]ActivityManager: Error: Activity class
> {com.me.android/com.me.android.MyApp} does not exist.
>
> If the file exists then the debugger attaches and breakpoints work but
> the old image is the one that is always connected to as automatic
> uploads still do not happen upon rebuild/redeploy.
>
> I have tried turning USB storage on and off but that does not work
> either.
>
> Am I missing an address setting or checkbox somewhere?

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

[android-developers] Re: IMPORTANT - display.getOrientation() does not work on all devices

Wait-

YOu are remapping the coords after rotation? Well then that's where
the problem has to be, since clearly Mark has shown that the
getOrientation() works correctly....

-niko

On Oct 31, 1:25 pm, mscwd01 <mscw...@gmail.com> wrote:
> Well then this is extremely confusing!
>
> Firstly, thanks Mark for taking the time to test it.
>
> The only other thing which could be wrong is how the coordinate system
> is represented in each device. I draw to the screen once I have
> remapped the coordinate system i.e.:
>
> if(screenOrientation == 1) {  // Portrait
>   SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_MINUS_Z,
> SensorManager.AXIS_X, outR);}
>
> else { // All other send to Landscape
>   SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_X,
> SensorManager.AXIS_Z, outR);
>
> }
>
> However, this shouldn't be an issue should it?
>
> On Oct 31, 6:19 pm, Mark Murphy <mmur...@commonsware.com> wrote:
>
> > mscwd01 wrote:
> > > Okay this is getting really rather annoying now.
>
> > > I have used both of the following methods of getting the screen
> > > orientation and both do not work properly on different devices.
>
> > > Method 1:
> > > Display display = ((WindowManager) getSystemService
> > > (WINDOW_SERVICE)).getDefaultDisplay();
> > > int screenOrientation = display.getOrientation();
>
> > > Method 2:
> > > int screenOrientation = getResources().getConfiguration().orientation;
>
> > > Both methods work fine on the HTC Hero; however, they both fail on the
> > > G1 and G2 devices (according to the users of my app).
>
> > > How can we be expected to make high quality applications if the API is
> > > not supported on all devices???
>
> > > I would be very greatful if someone could offer a solution to this,
> > > its just not acceptable.
>
> > I just tested this on a G1, and
> > getResources().getConfiguration().orientation is 2 in landscape and 1 in
> > portrait, just like it should be.
>
> > I also tested it on an HTC Magic, and it works just fine.
>
> > Heck, it even works on an ARCHOS 5 Android tablet.
>
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > Android Development Wiki:http://wiki.andmob.org

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

[android-developers] Re: Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml

I too am running running on Ubuntu version 9.10 as well.

Adding sdkman.force.http=true to ~/.android/androidtool.cfg allowed me
to retrieve the Sites, Packages, and Archives via the Android SDK and
AVD Manager.

However, nothing happens when I select one of the and click "Install
Selected" (button), nothing happens, when I select one of the items
from the list to install by clicking on "install selected".

Any help will be greatly appreciated.


On Oct 30, 10:13 am, Hans <hdic...@gmail.com> wrote:
> Adding sdkman.force.http=true to ~/.android/androidtool.cfg allowed me
> to retrieve the Sites, Packages, and Archives via the Android SDK and
> AVD Manager.
>
> However, when I select, for example, "SDK Platform Android 2.0, API 5,
> revision 1", and click "Install Selected" (button), nothing happens.
>
> I am running on Ubuntu version 9.10 x64 (released version).  The
> machine has 4GB RAM.  JDK 6-15-1, via the Synaptic Package Manager, is
> installed (along with the dependencies).
>
> On Oct 29, 1:24 pm, Xavier Ducrohet <x...@android.com> wrote:
>
> > On Wed, Oct 28, 2009 at 9:23 PM, orange80 <jpsw...@gmail.com> wrote:
>
> > > We already know about that... our problem is that the "force http"
> > > workaround DOES NOT work for us either.
>
> > which, frankly, is mind boggling.
> > Can you give me the exact output of the status window in the SDK
> > Manager when you try to update from the repository?
>
> > Also, can you tell me which JDK you are using, OS config, etc..
>
> > thanks!
> > Xav
>
> > --
> > Xavier Ducrohet
> > Android SDK Tech Lead
> > Google Inc.
>
> > Please do not send me questions directly. Thanks!

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

[android-developers] http client connect timeout

I try to set timeout for apache http client like this
HttpConnectionParams.setConnectionTimeout( params, TIMEOUT );
But it does not work
Is there a way to set connect timeout for http client on Android?
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Debug question

One additional data point. The line:

[2009-10-31 17:13:10 - MyApp]Application already deployed. No need to
reinstall.

appears at the beginning of a launch. The application is *not* seen
under Manage Applications on the device nor does it appear anywhere as
a background [hidden] task.

mh wrote:
> After much screwing around with configuration settings I finally got
> Eclipse to recognize and attach to a tethered MyTouch for debugging.
>
> The problem now is that before running the debugger I have to manually
> push the build to the device in order for the debugger to launch it.
> If I do not first manually install the file on the device it does not
> get uploaded and I see the following errors in the android console
> window:
>
> [2009-10-31 16:54:05 - MyApp]Starting activity com.me.android.MyApp on
> device
> [2009-10-31 16:54:06 - MyApp]New package not yet registered with the
> system. Waiting 3 seconds before next attempt.
> [2009-10-31 16:54:09 - MyApp]Starting activity com.me.android.MyApp on
> device
> [2009-10-31 16:54:11 - MyApp]New package not yet registered with the
> system. Waiting 3 seconds before next attempt.
> [2009-10-31 16:54:14 - MyApp]Starting activity com.me.android.MyApp on
> device
> [2009-10-31 16:54:15 - MyApp]ActivityManager: Starting: Intent
> { cmp=com.me.android/.MyApp}
> [2009-10-31 16:54:15 - MyApp]ActivityManager: Error type 3
> [2009-10-31 16:54:15 - MyApp]ActivityManager: Error: Activity class
> {com.me.android/com.me.android.MyApp} does not exist.
>
> If the file exists then the debugger attaches and breakpoints work but
> the old image is the one that is always connected to as automatic
> uploads still do not happen upon rebuild/redeploy.
>
> I have tried turning USB storage on and off but that does not work
> either.
>
> Am I missing an address setting or checkbox somewhere?

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

[android-developers] Debug question

After much screwing around with configuration settings I finally got
Eclipse to recognize and attach to a tethered MyTouch for debugging.

The problem now is that before running the debugger I have to manually
push the build to the device in order for the debugger to launch it.
If I do not first manually install the file on the device it does not
get uploaded and I see the following errors in the android console
window:

[2009-10-31 16:54:05 - MyApp]Starting activity com.me.android.MyApp on
device
[2009-10-31 16:54:06 - MyApp]New package not yet registered with the
system. Waiting 3 seconds before next attempt.
[2009-10-31 16:54:09 - MyApp]Starting activity com.me.android.MyApp on
device
[2009-10-31 16:54:11 - MyApp]New package not yet registered with the
system. Waiting 3 seconds before next attempt.
[2009-10-31 16:54:14 - MyApp]Starting activity com.me.android.MyApp on
device
[2009-10-31 16:54:15 - MyApp]ActivityManager: Starting: Intent
{ cmp=com.me.android/.MyApp}
[2009-10-31 16:54:15 - MyApp]ActivityManager: Error type 3
[2009-10-31 16:54:15 - MyApp]ActivityManager: Error: Activity class
{com.me.android/com.me.android.MyApp} does not exist.

If the file exists then the debugger attaches and breakpoints work but
the old image is the one that is always connected to as automatic
uploads still do not happen upon rebuild/redeploy.

I have tried turning USB storage on and off but that does not work
either.

Am I missing an address setting or checkbox somewhere?


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

Re: [android-developers] Re: Selling Applikation not on Android Market

No, market is not involved at all.  The platform has a built-in viewer for this MIME type that allows the user to directly install the app.

On Sat, Oct 31, 2009 at 4:16 PM, Mr.No <f.hildt@arcor.de> wrote:
Ahhh, the "Web View" fires then an Intent to the Android Market
Applikation, i'm right, aren't I?

THX :)

On 1 Nov., 00:08, "Mark Murphy" <mmur...@commonsware.com> wrote:
> > and how then the Application is installed on the device, via web
> > browser?
>
> Step #1: User views a Web page
>
> Step #2: User clicks a link on that Web page that links to that application
>
> Step #3: Browser downloads the application and prompts user to install it
>
> --
> 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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en



--
Dianne Hackborn
Android framework engineer
hackbod@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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Selling Applikation not on Android Market

Ahhh, the "Web View" fires then an Intent to the Android Market
Applikation, i'm right, aren't I?

THX :)

On 1 Nov., 00:08, "Mark Murphy" <mmur...@commonsware.com> wrote:
> > and how then the Application is installed on the device, via web
> > browser?
>
> Step #1: User views a Web page
>
> Step #2: User clicks a link on that Web page that links to that application
>
> Step #3: Browser downloads the application and prompts user to install it
>
> --
> 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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: app widget sizes for WVGA and FWVGA

It's not the number of pixels, it's the density.

On Sat, Oct 31, 2009 at 12:10 PM, sdphil <phil.pellouchoud@gmail.com> wrote:
That makes sense for portrait (480 / 320 = 1.5) but for fwvga in
landscape, 854 / 480 = 1.78.

On Oct 31, 10:55 am, Dianne Hackborn <hack...@android.com> wrote:
> Multiply by 1.5.
>
> On Sat, Oct 31, 2009 at 8:23 AM, sdphil <phil.pellouch...@gmail.com> wrote:
> > what are the 4x1 app widget sizes for WVGA and FWVGA in both portrait
> > and landscape?
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscribe@googlegroups.com<android-developers%2Bunsubs cribe@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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en



--
Dianne Hackborn
Android framework engineer
hackbod@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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Selling Applikation not on Android Market

> and how then the Application is installed on the device, via web
> browser?

Step #1: User views a Web page

Step #2: User clicks a link on that Web page that links to that application

Step #3: Browser downloads the application and prompts user to install it

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Selling Applikation not on Android Market

Thx,
and how then the Application is installed on the device, via web
browser?

On 31 Okt., 23:53, "Mark Murphy" <mmur...@commonsware.com> wrote:
> > it is possible to publish your own Android Application on a own Web
> > Server?
>
> Absolutely! All you need to do is set up the MIME type, so your APK is
> served as:
>
> application/vnd.android.package-archive
>
> --
> 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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Selling Applikation not on Android Market

> it is possible to publish your own Android Application on a own Web
> Server?

Absolutely! All you need to do is set up the MIME type, so your APK is
served as:

application/vnd.android.package-archive

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Double quotes in resources?

On Oct 31, 11:40 pm, "Mark Murphy" <mmur...@commonsware.com> wrote:
> > Is this a bug or a feature? I don't see the purpose..
>
> I think it's documented somewhere. I remember it from my one book, and I
> doubt I just made it up. ;-)
>
> So, I vote "feature".

Found it on http://developer.android.com/guide/topics/resources/available-resources.html:

<quote>If you use an apostrophe or a quote in your string, you must
either escape it or enclose the whole string in the other kind of
enclosing quotes</quote>

Does not give a reason though.

Thanks again,
Markus

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

[android-developers] Selling Applikation not on Android Market

Hello,
it is possible to publish your own Android Application on a own Web
Server?

thx in advance

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

Re: [android-developers] Re: Double quotes in resources?

> Is this a bug or a feature? I don't see the purpose..

I think it's documented somewhere. I remember it from my one book, and I
doubt I just made it up. ;-)

So, I vote "feature".

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Back key after Search doesn't return to list in 2.0 as it did in all earlier versions

Hi all,

I experience something slightly confusing in the 2.0 emulators (tried
several variants):

One of my apps is somewhat similar to Market in structure in that it is
a ListActivity that keeps creating new Intent(this, xxx.class); of
itself with various .putExtra(); that presents data in appropriate ways.
In the Manifest there is also an intent-filter for action.SEARCH that
triggers onSearchRequested() and then onCreate() checks for
Intent.ACTION_SEARCH - pretty straight forward IMHO and it has also
worked exactly as intended up to and including 1.6 (where the new search
stuff seemed to integrate as expected).

However, in 2.0 I don't get back to the previous ListActivity when I
have used the search key to show something and then press the Back key.
The back key takes yet another step back.

Is this related to some other Back key issues I've seen mentioned here,
an intended new behaviour that I must handle differently in 2.0 or some
kind of bug that needs reporting. I don't have any kind if special key
listening going on at all.

Best / Jonas

PS. Lack of account handling and hardware to test Bluetooth on really
makes the emulation testing a pain - I'd love a Moto Droid over here.
Any suggestions as to how I can get my hands on one soon would be much
appreciated...

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

[android-developers] Re: Double quotes in resources?

On Oct 31, 11:28 pm, "Mark Murphy" <mmur...@commonsware.com> wrote:
> > I'm probably missing something obvious, but for some reason I don't
> > manage to put a string with double quotes in a resources file.
>
> > strings.xml:
> >    <resources>
> >       <string name="message_empty_folder">Folder &quot;%s&quot; is
> > empty.</string>
> >    </resources>
>
> > LIstFolderActivity.java:
> >    String format = getResources().getString
> > (R.string.message_empty_folder);
> >    System.out.println(format);
>
> > Log output:
> >    Folder %s is empty.
>
> > What's eating up the double quotes?
>
> Try using \" and see if that works.

Works, many thanks!

Is this a bug or a feature? I don't see the purpose..

Markus

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

[android-developers] Re: second dialog in activity is not showing

The UI is not thread safe and calling related methods from a
background thread like that run by java.util.Timer can cause trouble.
There's a good blog post on ways to schedule work on the UI thread or
communicate back to it here:
http://android-developers.blogspot.com/2009/05/painless-threading.html

There's also an example of communicating back to the UI thread called
"Example ProgressDialog with a second thread" on this page:
http://developer.android.com/intl/fr/guide/topics/ui/dialogs.html

On Oct 31, 4:42 pm, Anton Pirker <an...@ignaz.at> wrote:
> Hi android guys and girls!
>
> I have a really strange problem. I have an activity which displays a map
> and a marker with the users current location on that maps.
>
> Right now my code is something like this: (in onCreate of the activity)
>
> 1) display a progress dialog with the text "detecting your location,
> please wait..."
>
> 2) request location updates. (activity implements LocationListener)
>     locationManager.requestLocationUpdates(provider,
> (long)Constants.MIN_TIME, (float)Constants.MIN_DISTANCE, this);
>
> 3) right after the line above i have following:
>     timer.schedule(new GetLastLocation(this), 5000);
>     which means: wait 5 sec and then call GetLastLocation().run()
>
>     GetLastLocation looks like this:
>
>     class GetLastLocation extends TimerTask {
>         private SetupActivity parent;
>         public GetLastLocation(SetupActivity act) {
>             parent = act;
>         }
>         public void run() {
>             removeDialog(DIALOG_GET_POSITION);
>             parent.showMessage();
>         }
>     }
>
>     So if 5 seconds pass by, i dismiss(remove) the dialog i displayed in 1)
>
> 4) now i want to show an AlertDialog with the message "could not find
> your location, taking the last known"
>     parent.showMessage() looks like this:
>     public void showMessage() {
>         Log.e("###", "showMessage 1/2");
>         showDialog(DIALOG_GET_POSITION);
>         Log.e("###", "showMessage 2/2");
>     }
>
> and here the first log message "showMessage 1/2" is printed to the log,
> but not the second one "showMessage 2/2".
> And there is no exception and nothing that tells me what is wrong...
>
> Could someone please help me?
> Maybe there is a better way to get he location and if no location is
> delivered show a message!
>
> Thankful for every hint,
> Anton
>
> --
> DI(FH) Anton Pirker
>
> ------------------------------
> cross platform mobile software
> burggasse 123/53
> a-1070 wien
> tel: +43 699 1234 0 456
> skype: antonpirker
>
> http://anton-pirker.at

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

Re: [android-developers] Double quotes in resources?

> I'm probably missing something obvious, but for some reason I don't
> manage to put a string with double quotes in a resources file.
>
> strings.xml:
> <resources>
> <string name="message_empty_folder">Folder &quot;%s&quot; is
> empty.</string>
> </resources>
>
> LIstFolderActivity.java:
> String format = getResources().getString
> (R.string.message_empty_folder);
> System.out.println(format);
>
> Log output:
> Folder %s is empty.
>
> What's eating up the double quotes?

Try using \" and see if that works.

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Double quotes in resources?

I'm probably missing something obvious, but for some reason I don't
manage to put a string with double quotes in a resources file.

strings.xml:
<resources>
<string name="message_empty_folder">Folder &quot;%s&quot; is
empty.</string>
</resources>

LIstFolderActivity.java:
String format = getResources().getString
(R.string.message_empty_folder);
System.out.println(format);

Log output:
Folder %s is empty.

What's eating up the double quotes?

Thanks in advance,
Markus

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

[android-developers] second dialog in activity is not showing

Hi android guys and girls!

I have a really strange problem. I have an activity which displays a map
and a marker with the users current location on that maps.

Right now my code is something like this: (in onCreate of the activity)

1) display a progress dialog with the text "detecting your location,
please wait..."

2) request location updates. (activity implements LocationListener)
locationManager.requestLocationUpdates(provider,
(long)Constants.MIN_TIME, (float)Constants.MIN_DISTANCE, this);

3) right after the line above i have following:
timer.schedule(new GetLastLocation(this), 5000);
which means: wait 5 sec and then call GetLastLocation().run()

GetLastLocation looks like this:

class GetLastLocation extends TimerTask {
private SetupActivity parent;
public GetLastLocation(SetupActivity act) {
parent = act;
}
public void run() {
removeDialog(DIALOG_GET_POSITION);
parent.showMessage();
}
}

So if 5 seconds pass by, i dismiss(remove) the dialog i displayed in 1)

4) now i want to show an AlertDialog with the message "could not find
your location, taking the last known"
parent.showMessage() looks like this:
public void showMessage() {
Log.e("###", "showMessage 1/2");
showDialog(DIALOG_GET_POSITION);
Log.e("###", "showMessage 2/2");
}


and here the first log message "showMessage 1/2" is printed to the log,
but not the second one "showMessage 2/2".
And there is no exception and nothing that tells me what is wrong...


Could someone please help me?
Maybe there is a better way to get he location and if no location is
delivered show a message!


Thankful for every hint,
Anton

--
DI(FH) Anton Pirker

------------------------------
cross platform mobile software
burggasse 123/53
a-1070 wien
tel: +43 699 1234 0 456
skype: antonpirker

http://anton-pirker.at

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

[android-developers] Re: AppWidgetProvider

Yea our provider is fully public. Our widgets worked perfectly fine,
well we worked around the current widget bugs, until 2.0. The 1.6
release we have no problems on actual phones or the emulator with the
2.0 emulator is where we see the problems, hopefully it's just a bug
in the emulator. But it would be nice to know either way.

On Oct 30, 10:40 pm, adamphillips12 <adamphillip...@gmail.com> wrote:
> There are bugs with widgets and there are incorrectly or undocumented
> features.
>
> Part of your problem is probably this:http://groups.google.com/group/android-developers/browse_thread/threa...
>
> The other part might be a problem with you receiving intents, try
> making your provider fully public in the manifest (unless it already
> is) and see if anything gets through or check you've probably declared
> it for the widget intents. If you delete all the widgets you've placed
> and call the method to get the widget ids for your package, if it is
> not empty, you have the above bug I linked, test it out.
>
> On Oct 31, 2:00 am, ben <benbros...@gmail.com> wrote:
>
>
>
> > It seems like the convenience functions (onUpdate, onEnabled, etc.)
> > aren't being called in the emulator on Android 2.0. Is this a bug, or
> > are these functions just being eliminated? It would have been nice to
> > see this documented somewhere.

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

Download XXX Videos.

!!! +18 HIDDIN CAM - WAREHOUSE WONDERS2 XXX PORN +18 !!!
http://www.banatmsr.com/a7a/

http://www.banatmsr.com/a7a/

http://www.banatmsr.com/a7a/

http://www.banatmsr.com/a7a/

Remember, there are always more hard core galleries
hidden behind the posted images and banner ads.

Click On The Image Go To Website There Download XXX Videos.
Before Downloading All Videos NO PASSWORD NEEDED
download free

click here

http://jr0o0o.com/vb/includes/forex/

http://jr0o0o.com/vb/includes/forex/

http://jr0o0o.com/vb/includes/forex/

http://jr0o0o.com/vb/includes/forex/

 


 


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

[android-developers] Re: app widget sizes for WVGA and FWVGA

That makes sense for portrait (480 / 320 = 1.5) but for fwvga in
landscape, 854 / 480 = 1.78.

On Oct 31, 10:55 am, Dianne Hackborn <hack...@android.com> wrote:
> Multiply by 1.5.
>
> On Sat, Oct 31, 2009 at 8:23 AM, sdphil <phil.pellouch...@gmail.com> wrote:
> > what are the 4x1 app widget sizes for WVGA and FWVGA in both portrait
> > and landscape?
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscribe@googlegroups.com<android-developers%2Bunsubs cribe@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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

laser hair removal

laser hair removal

Chicago Laser Hair Removal - Where to Go
by: Dion Semeniuk
http://laserhairremovallaser.blogspot.com/2009/10/chicago-laser-hair-removal-where-to-go.html


Laser Hair Removal in Chicago - Best of The Best
http://laserhairremovallaser.blogspot.com/2009/10/laser-hair-removal-in-chicago-best-of.html


Laser Hair Removal In New York
By Clif Haley
http://laserhairremovallaser.blogspot.com/2009/10/laser-hair-removal-in-new-york.html


Manhattan Laser Hair Removal
By Clif Haley
http://laserhairremovallaser.blogspot.com/2009/10/manhattan-laser-hair-removal.html


New York City Laser Hair Removal
By Clif Haley
http://laserhairremovallaser.blogspot.com/2009/10/new-york-city-laser-hair-removal.html


Manhattan Male Laser Hair Removal
By Clif Haley
http://laserhairremovallaser.blogspot.com/2009/10/manhattan-male-laser-hair-removal.html


Laser Hair Removal Cost - How Much for You?
By Michell Jones
http://laserhairremovallaser.blogspot.com/2009/10/laser-hair-removal-cost-how-much-for.html


Laser Hair Removal in Bridgeport
By Donald Hayward
http://laserhairremovallaser.blogspot.com/2009/10/laser-hair-removal-in-bridgeport.html


Laser Hair Removal Cost: 5 Main Factors
By Kathlene Capelle
http://laserhairremovallaser.blogspot.com/2009/10/laser-hair-removal-cost-5-main-factors.html


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

[android-developers] Re: Including extra sqlite databases?

Thanks Ian, I also found this writeup on the subject as you're
describing it:

http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/


On Oct 31, 1:49 pm, Ian Guedes Maia <iangm...@gmail.com> wrote:
> Add it o assets/ and write it to the filesystem when the application
> loads for the first time or when you do the first database access (you
> can do that easily using a class that extends SQLiteOpenHelper to
> create the database if it doesn't exist yet). Use
> context.getDatabasePath(DB_NAME) to get the location where you can
> create the file of your database.
>
> 2009/10/31 Mark Wyszomierski <mar...@gmail.com>:
>
>
>
> > Hi Mark,
>
> > Yeah I think I need to write it to a local file, SQLiteDatabase has
> > constructors which only read from a file path, or File instance.
>
> > I'm wondering though if I can stick it in res/raw and read it straight
> > from there. Some examples like:
>
> >  http://www.anddev.org/working_with_files-t115.html
>
> > I've added the sqlite file to my raw folder, it appears in my .R file,
> > however eclipse intellisense cannot resolve it when I type
> > R.raw.mydatabase - odd -
>
> > Thanks
>
> > On Oct 31, 7:42 am, Mark Murphy <mmur...@commonsware.com> wrote:
> >> Mark Wyszomierski wrote:
> >> > I have some external sqlite files I'd like to include with my app. It
> >> > looks like I can add them to the /assets folder, then read them from
> >> > there? Is the /assets folder the appropriate location for them?
>
> >> assets/ is a fine spot for packaging them, but I don't think you can
> >> read them from there. I suspect you will need to copy them out of the
> >> APK into a regular file somewhere, then use that copy.
>
> >> --
> >> Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> >> _Beginning Android_ from Apress Now 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+unsubscribe@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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Mystery Null Pointer Error - Seeking Opinions

Jason Van Anden wrote:
> 10-31 14:12:03.667: ERROR/AndroidRuntime(7369): Uncaught handler: thread
> main exiting due to uncaught exception
>
> 10-31 14:12:04.077: ERROR/AndroidRuntime(7369):
> java.lang.NullPointerException
> 10-31 14:12:04.077: ERROR/AndroidRuntime(7369): at
> com.bubblebeats.free.Peeps.onPrepareOptionsMenu(Peeps.java:377)

So...what's on line 377 of Peeps.java?

Personally, I'm hoping for a sugar-coated marshmallow confection, mostly
because Peeps are made by a local firm... ;-)

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

Android Development Wiki: http://wiki.andmob.org

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

[android-developers] Mystery Null Pointer Error - Seeking Opinions

*,

An error that appeared in my Flurry logs but seemed impossible to reproduce otherwise just occured!  That's the good news.  The bad news is that the LogCat info is not telling me enough.  I would appreciate a second set of eyes taking a look and offering wisdom.

The lead up is that I was playing with my app, and put it away for a while.  I did a lot of other things with my phone since, like making phone calls, etc ...  I hooked up my phone to the computer to make another attempt to find the mystery bug, and decided to see if anything weird appeared in the logs from earlier.  I then brought my app to the foreground using the Home/Hold technique and whamo!  the bug appeared before my eyes in LogCat. 

I got a Force Close message.  When the app died, it did not get resurrected.  What is particularly odd is the "onPrepareOptionsMenu" being called (at all).

So here is what LogCat coughed up:

This is not my app but may provide a clue ...
-----------------------------------------------------------

10-31 14:12:02.047: INFO/WindowManager(74): onOrientationChanged, rotation changed to 0
10-31 14:12:02.117: WARN/InputManagerService(74): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@43422388

7369 is my app:
---------------------

10-31 14:12:02.127: DEBUG/dalvikvm(7369): Trying to load lib /system/lib/libsoundpool.so 0x0
10-31 14:12:02.677: DEBUG/dalvikvm(7369): Added shared lib /system/lib/libsoundpool.so 0x0
10-31 14:12:03.277: DEBUG/FlurryAgent(7369): Starting new session
10-31 14:12:03.657: DEBUG/AndroidRuntime(7369): Shutting down VM
10-31 14:12:03.657: WARN/dalvikvm(7369): threadid=3: thread exiting with uncaught exception (group=0x4001da28)
10-31 14:12:03.657: DEBUG/FlurryAgent(7369): Ending session
10-31 14:12:03.667: ERROR/AndroidRuntime(7369): Uncaught handler: thread main exiting due to uncaught exception

10-31 14:12:04.077: ERROR/AndroidRuntime(7369): java.lang.NullPointerException
10-31 14:12:04.077: ERROR/AndroidRuntime(7369):     at com.bubblebeats.free.Peeps.onPrepareOptionsMenu(Peeps.java:377)
10-31 14:12:04.077: ERROR/AndroidRuntime(7369):     at android.app.Activity.onPreparePanel(Activity.java:2065)
10-31 14:12:04.077: ERROR/AndroidRuntime(7369):     at com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:429)
10-31 14:12:04.077: ERROR/AndroidRuntime(7369):     at com.android.internal.policy.impl.PhoneWindow.openPanel(PhoneWindow.java:517)
10-31 14:12:04.077: ERROR/AndroidRuntime(7369):     at com.android.internal.policy.impl.PhoneWindow.openPanelsAfterRestore(PhoneWindow.java:1590)
10-31 14:12:04.077: ERROR/AndroidRuntime(7369):     at com.android.internal.policy.impl.PhoneWindow.access$1500(PhoneWindow.java:86)
10-31 14:12:04.077: ERROR/AndroidRuntime(7369):     at com.android.internal.policy.impl.PhoneWindow$DecorView.onAttachedToWindow(PhoneWindow.java:2043)
10-31 14:12:04.077: ERROR/AndroidRuntime(7369):     at android.view.View.dispatchAttachedToWindow(View.java:5567)
10-31 14:12:04.077: ERROR/AndroidRuntime(7369):     at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:1032)
10-31 14:12:04.077: ERROR/AndroidRuntime(7369):     at android.view.ViewRoot.performTraversals(ViewRoot.java:676)
10-31 14:12:04.077: ERROR/AndroidRuntime(7369):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1613)
10-31 14:12:04.077: ERROR/AndroidRuntime(7369):     at android.os.Handler.dispatchMessage(Handler.java:99)
10-31 14:12:04.077: ERROR/AndroidRuntime(7369):     at android.os.Looper.loop(Looper.java:123)
10-31 14:12:04.077: ERROR/AndroidRuntime(7369):     at android.app.ActivityThread.main(ActivityThread.java:4203)
10-31 14:12:04.077: ERROR/AndroidRuntime(7369):     at java.lang.reflect.Method.invokeNative(Native Method)
10-31 14:12:04.077: ERROR/AndroidRuntime(7369):     at java.lang.reflect.Method.invoke(Method.java:521)
10-31 14:12:04.077: ERROR/AndroidRuntime(7369):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
10-31 14:12:04.077: ERROR/AndroidRuntime(7369):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
10-31 14:12:04.077: ERROR/AndroidRuntime(7369):     at dalvik.system.NativeStart.main(Native Method)
10-31 14:12:04.517: DEBUG/dalvikvm(7369): GC freed 1736 objects / 111624 bytes in 248ms

Thanks for the feedback in advance.

Jason Van Anden
http://www.BubbleBeats.com

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

[android-developers] Re: IMPORTANT - display.getOrientation() does not work on all devices

Well then this is extremely confusing!

Firstly, thanks Mark for taking the time to test it.

The only other thing which could be wrong is how the coordinate system
is represented in each device. I draw to the screen once I have
remapped the coordinate system i.e.:

if(screenOrientation == 1) { // Portrait
SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_MINUS_Z,
SensorManager.AXIS_X, outR);
}
else { // All other send to Landscape
SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_X,
SensorManager.AXIS_Z, outR);
}

However, this shouldn't be an issue should it?

On Oct 31, 6:19 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> mscwd01 wrote:
> > Okay this is getting really rather annoying now.
>
> > I have used both of the following methods of getting the screen
> > orientation and both do not work properly on different devices.
>
> > Method 1:
> > Display display = ((WindowManager) getSystemService
> > (WINDOW_SERVICE)).getDefaultDisplay();
> > int screenOrientation = display.getOrientation();
>
> > Method 2:
> > int screenOrientation = getResources().getConfiguration().orientation;
>
> > Both methods work fine on the HTC Hero; however, they both fail on the
> > G1 and G2 devices (according to the users of my app).
>
> > How can we be expected to make high quality applications if the API is
> > not supported on all devices???
>
> > I would be very greatful if someone could offer a solution to this,
> > its just not acceptable.
>
> I just tested this on a G1, and
> getResources().getConfiguration().orientation is 2 in landscape and 1 in
> portrait, just like it should be.
>
> I also tested it on an HTC Magic, and it works just fine.
>
> Heck, it even works on an ARCHOS 5 Android tablet.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Development Wiki:http://wiki.andmob.org

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

Re: [android-developers] Re: IMPORTANT - display.getOrientation() does not work on all devices

mscwd01 wrote:
> Okay this is getting really rather annoying now.
>
> I have used both of the following methods of getting the screen
> orientation and both do not work properly on different devices.
>
> Method 1:
> Display display = ((WindowManager) getSystemService
> (WINDOW_SERVICE)).getDefaultDisplay();
> int screenOrientation = display.getOrientation();
>
> Method 2:
> int screenOrientation = getResources().getConfiguration().orientation;
>
> Both methods work fine on the HTC Hero; however, they both fail on the
> G1 and G2 devices (according to the users of my app).
>
> How can we be expected to make high quality applications if the API is
> not supported on all devices???
>
> I would be very greatful if someone could offer a solution to this,
> its just not acceptable.

I just tested this on a G1, and
getResources().getConfiguration().orientation is 2 in landscape and 1 in
portrait, just like it should be.

I also tested it on an HTC Magic, and it works just fine.

Heck, it even works on an ARCHOS 5 Android tablet.

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

Android Development Wiki: http://wiki.andmob.org

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

Re: [android-developers] Re: IMPORTANT - display.getOrientation() does not work on all devices

mscwd01 wrote:
> Okay this is getting really rather annoying now.
>
> I have used both of the following methods of getting the screen
> orientation and both do not work properly on different devices.
>
> Method 1:
> Display display = ((WindowManager) getSystemService
> (WINDOW_SERVICE)).getDefaultDisplay();
> int screenOrientation = display.getOrientation();
>
> Method 2:
> int screenOrientation = getResources().getConfiguration().orientation;
>
> Both methods work fine on the HTC Hero; however, they both fail on the
> G1 and G2 devices (according to the users of my app).
>
> How can we be expected to make high quality applications if the API is
> not supported on all devices???
>
> I would be very greatful if someone could offer a solution to this,
> its just not acceptable.

I just tested this on a G1, and
getResources().getConfiguration().orientation is 2 in landscape and 1 in
portrait, just like it should be.

I also tested it on an HTC Magic, and it works just fine.

Heck, it even works on an ARCHOS 5 Android tablet.

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

Android Development Wiki: http://wiki.andmob.org

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

[android-developers] Re: IMPORTANT - display.getOrientation() does not work on all devices

Sorry I meant "works on the HTC Hero" NOT magic ;)

On Oct 31, 6:11 pm, mscwd01 <mscw...@gmail.com> wrote:
> Dianne, I have used the configuration to try and determine orientation
> (see Method 2); however, this still fails on G1 and G2 devices. It
> works on the HTC magic though.
>
> If you could offer some other solution i'd be very appreciative
> indeed ;)
>
> On Oct 31, 6:00 pm, Dianne Hackborn <hack...@android.com> wrote:
>
> > I'll make this a little stronger -- the Display object is LOW LEVEL access
> > to the display.  Trying to use this in an application is almost guaranteed
> > to not do what you want.  The current orientation should be retrieved from
> > Configuration.  The width and height should be retrieved from the view
> > hierarchy.
>
> > I believe that Display.getOrientation actually returns the physical rotation
> > applied to the display...  I also notice that the documentation says nothing
> > about what it actually returns, so  how can you use it correctly? :)  (The
> > Display object clearly needs a lot more documentation...  but this is a
> > pretty low priority because, again, it really shouldn't be used by
> > applications.)
>
> > On Sat, Oct 31, 2009 at 5:08 AM, Mark Murphy <mmur...@commonsware.com>wrote:
>
> > > mscwd01 wrote:
> > > > I added this to the activity tag in the manifest:
> > > > android:screenOrientation="sensor"
>
> > > > Would that make any difference?
>
> > > That changes the trigger. For devices with a keyboard (e.g., G1), by
> > > default, an orientation change is triggered by sliding the keyboard, not
> > > the accelerometer. android:screenOrientation="sensor" forces it to be
> > > the "sensor" (a.k.a., accelerometer) like the Magic, Hero, and other
> > > keyboard-less devices.
>
> > > Since you are experiencing your problem with both the G1 (with keyboard)
> > > and the Magic (sans keyboard), I doubt this will help, but I could
> > > easily be wrong.
>
> > > --
> > > Mark Murphy (a Commons Guy)
> > >http://commonsware.com|http://twitter.com/commonsguy
>
> > > Warescription: Three Android Books, Plus Updates, $35/Year
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscribe@googlegroups.com<android-developers%2Bunsubscribe@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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en