Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - garry4all

#1
Sooo it was much easier than what I did. I reverted my changes and just set android:targetSdkVersion to 10 in both projects.
The blue theme is lost in the game selection screen, but a menu button appears in the navigation bar, as you can see in this screenshot

Here's the modified apk, I'm confident it will work on your device.
#2
What you are referring to is the Navigation Bar (Home, Back, etc), located at the bottom.
The Action Bar is always located at the top of the screen.
I'll see if I can send you my apk later in the day
#3
Quote from: Joseph DiPerla on Thu 25/04/2013 04:26:17
I believe that if you replace the target Android SDK to be 14 or higher, it will show a soft key menu button, which would then allow you to pop up the keyboard. That has to be done in the Android Manifest file of the source code. I will try re-compiling the sources I have to see if that would do the trick.

I tried this with no luck, my tablet already has 4 buttons in the navigation bar (home, back, recent apps, screenshot) so the menu button never appears.

Quote from: Joseph DiPerla on Thu 25/04/2013 04:26:17
EDIT:

Actually, JJS, if you change the Keycode_Back to perform this this:

Code: AGS
if ((key == KeyEvent.KEYCODE_BACK) && ((ev.getFlags() & 0x80) > 0)) // FLAG_LONG_PRESS
				{
					ignoreNextActionUp_Back = true;
					openOptionsMenu();
				}


in dispatchKeyEvent in AGSEngine.java, it should allow you to longpress the back button on screen and pop up the menu which has all the options we need: Toggle Keyboard, Exit Game, F Keys, etc... That would then allow the game to work on Nexus 7/10, ASUS and Kindle devices or other devices without hardware keys.

And this doesn't work either because the call to openOptionsMenu() does nothing if the activity doesn't have an ActionBar (as explained here: http://blog.perpetumdesign.com/2011/08/strange-case-of-dr-action-and-mr-bar.html)

So, Cubbie, a temporary workaround I did for this is to make the ActionBar visible and show the menu options in it:
In AgsEngine.onCreate delete line 76
Code: AGS
//		requestWindowFeature(Window.FEATURE_NO_TITLE);


And add these lines just before and after the setContentView
Code: AGS

		getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
		
		setContentView(R.layout.loading);
		
		displayActionBar();


Method displayActionBar:

Code: AGS

	@TargetApi(11)
	private void displayActionBar() {
		if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
			final ActionBar actionBar = getActionBar();
	        actionBar.setDisplayShowHomeEnabled(true);
		}
	}


Finally, in ingame.xml, add the following to the three menu items (@+id/toggle_keyboard, @+id/keys, @+id/exitgame)
Code: AGS

 android:showAsAction="always"


When running the games, they will not be fullscreen, you'll see the ActionBar, but at least they are playable.

There might be other ways to solve this but for the moment is all I could find. Hope this helps.
#4
I tried to build the Android libraries with ndk-build and I get the following error.

C:/android-ndk-r8e/build/core/add-application.mk:128: Android NDK: WARNING: APP_
PLATFORM android-14 is larger than android:minSdkVersion 4 in jni/../AndroidMani
fest.xml
Install        : libagsengine.so => jni/../libs/armeabi/libagsengine.so
Install        : libpe.so => jni/../libs/armeabi/libpe.so
Install        : libags_snowrain.so => jni/../libs/armeabi/libags_snowrain.so
Install        : libagsblend.so => jni/../libs/armeabi/libagsblend.so
Install        : libagsflashlight.so => jni/../libs/armeabi/libagsflashlight.so
make: *** No rule to make target `jni/../jni/../../../Engine/../Plugins/agslua/a
gslua/agslua/agslua_autogen.cpp', needed by `obj/local/armeabi/objs/agslua/__/Pl
ugins/agslua/agslua/agslua/agslua_autogen.o'.  Stop.

I was finally able to extract the libraries from the apk, but I would like to know why the ndk-build didn't work.

Thanks.
#5
Hi, first of all let me congratulate and thank u 4 the wonderful work u did.
Npw, I'm testing the aandroid port in a galaxy tab 2, which doesnt have a physical menu button. So I cannot save, load, etc.
Do you have any plan on modifying that to use the button bar that android 4 devices have ?
Thanks
#6
AGS Games in Production / Re: Kathy Rain
Thu 18/04/2013 17:24:10
Hey, this game looks great, the screenshots reminded me of the millennium trilogy.
Keep up the good work.
SMF spam blocked by CleanTalk