JetBoy Sample Question

by Hamed3d » Thu, 06 Aug 2009 01:18:35 GMT


Sponsored Links
 Hi there,

I have a question regarding the Jeyboy game that comes with the SDK. I
noticed the game runs in Landscape mode which is cool. I looked at the
code but I can;t find the command that forced the game to be played in
landscape mode.
I wrote a simple code that draws a image but I want it to be always on
Landscape mode.How can I do it?

Hope someone helps me out here.

Thanks,


--~--~---------~--~----~------------~-------~--~----~



JetBoy Sample Question

by Hamed3d » Thu, 06 Aug 2009 01:27:44 GMT


 I found the answer. it is being done in manifest:

 android:screenOrientation=["unspecified" | "user" | "behind" |
                                     "landscape" | "portrait" |
                                     "sensor" | "nonsensor"]

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


JetBoy Sample Question

by cellurl » Thu, 06 Aug 2009 21:01:50 GMT


 This tutorial shows how to make the switch from landscape to portrait.

 http://kronox.org/documentacion/Hello_Android.pdf 

-jim





--~--~---------~--~----~------------~-------~--~----~



JetBoy Sample Question

by Stefan Novak » Thu, 06 Aug 2009 21:13:33 GMT


 Jim - thanks for that link!  It looks like a terrific resource!







-- 
Stefan Novak

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. ERROR: Application requires API version 6. Device API version is 5 (Android 2.0)

My development system:  Windows 7 64-bit, 4GB RAM, 2.1 Dual Core
notebook

Eclipse development issue:

I've updated the needed bits for Android development with Eclipse for
Java.  However, I do not choose to use the emulator, I prefer testing
on my Droid mobile phone.

When I try to "Run" my application in the Eclipse IDE it shows an
error of "ERROR: Application requires API version 6. Device API
version is 5 (Android 2.0)"

Also in the Android Device Chooser dialog there is a red "X" in the
Target column.

Is this something to do with the USB drivers?  If so, I've already
tried pointing the Device Manager to pickup any new drivers from "C:
\android-sdk-windows\usb_driver" on my system, where they reside.

Further ideas are welcomed and would be most appreciated.  I'm a new
developer and am really looking forward to the possibilities with the
Android platform.

-- 

2. Problem in accessing ConnectionManager.getAllNetworkInfo()

Hi guys,

I am writing 1 application which has one service class. This service
class uses ConnectionManager.getAllNetworkInfo() api to access network
related info.
But if I use this api i get error like
01-04 20:05:58.243: WARN/System.err(711): java.lang.SecurityException:
ConnectivityService: Neither user 10023 nor current process has
android.permission.ACCESS_NETWORK_STATE.

Declaration of Service in manifest is as follows

<service android:name="com.abc.xyz.MyService">
                <intent-filter>
                     <action
android:name="com.abc.xyz.IMyServiceListener" />
                </intent-filter>
</service>

Also have included <uses-permission
android:name="android.permission.ACESS_NETWORK_STATE" />  in manifest.

Tried using same permission tag in service tag but of no use.

The way I am starting this service in activity is
        private void startService() {
                try {
                startService(new Intent(this, MyService.class));
                    bindService(new Intent(IMyServiceListener.class.getName()),
mConnection, Context.BIND_AUTO_CREATE);

                } catch (Throwable th) {
                }
        }

        public IPushServiceListener mService = null;

   private ServiceConnection mConnection = new ServiceConnection() {
         //@override
        public void onServiceConnected(ComponentName className, IBinder
service) {
                mService = IMyServiceListener.Stub.asInterface(service);
        }

         //@override
                public void onServiceDisconnected(ComponentName name) {
                mService = null;
                }
   };

   Now the MyService class code where I am accessing
ConnectionManager.getAllNetworkInfo()

   public static void IsConnectable() {
                ConnectivityManager cm = (ConnectivityManager) _instance.get
().getSystemService(CONNECTIVITY_SERVICE); //I am getting error here
                NetworkInfo infos[] = cm.getAllNetworkInfo();

                for (NetworkInfo info : infos) {
                        //TODO: any action can be taken;
                }
        }

        May be I am missing something here..Anybody knows what I am doing
wrong? Or what else needs to add/remove in/from code to make it
working?


Thanks in advance

-- 

3. Solved WTA: Start up screen blink

4. New in android developement

5. Question concerning List view's getCheckedItemPositions() method

6. Blank screen displayed after downloading from Android Browser.

7. Two onCreate (and onDestroy) invocations on orientation chag