BASIC

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.


Messages - Dabz

Pages: 1 2 [3] 4 5 ... 7
31
Beta Tests / Re: Android - Beta SDK
« on: 2011-Apr-25 »
Quote
Sounds like a device must be connected to compile then

I can compile for an AVD, I've done it... I've tested all screen resolutions under the emulator, plus, a running a 160DPI version of Nags... If I couldnt run a GLBasic app in the emulator, then I wouldnt of mentioned it... I'm probably the biggest fan og GLBasic+Android, I want it in... No questions, I've sent Gernot the APK file and everything... This does work on my machine!!!

Quote
You shouldnt need Eclipse... Anyone trying to build their app using it is wrong!

How so?

Because I've never need to use Eclipse for GLBasic apps... Eclipse is an unzip and be done IDE, as far as I know, it doesnt touch the registry, it makes no assumptions of work places... Its basically WYSIWYG.... This is why... You dont need it!

Dabz



32
Beta Tests / Re: Android - Beta SDK
« on: 2011-Apr-24 »
You shouldnt need Eclipse... Anyone trying to build their app using it is wrong!

Dabz

33
Beta Tests / Re: Android - Beta SDK
« on: 2011-Apr-24 »
Okay, for those it doesnt work, can you please subject you OS specs/device...

Dabz

34
Beta Tests / Re: Android - Beta SDK
« on: 2011-Apr-24 »
Quote
As for the packaging, after I compile in glb then I open as an existing java android project and run it from eclipse with the device and emulator.

Eclipse.... You dont need Eclipse installed!?!

EDIT: Just reading everything

Dabz

35
Beta Tests / Re: Android - Beta SDK
« on: 2011-Apr-24 »
Its been a right nightmare for you hasnt it... chin up though! ;)

Dabz

36
Beta Tests / Re: Android - Beta SDK
« on: 2011-Apr-24 »
Quote
try to avoid spaces and brackets in you path - line 472 call the dex executable - works for me on windows 7 64 bit with jdk32 bit installed in c:\Programme

Code: GLBasic [Select]
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_25
 

Maybe?

Dabz

37
Tutorials / Re: How to sign Android apps
« on: 2011-Apr-24 »
Well, they could, but you only need one key, it only takes 2 mins to sign an app using the command line too, so no need for additional tools imo!

Even better still you could get Ant to do the grunt when building, but, its horses for courses really.

Dabz

38
Tutorials / How to sign Android apps
« on: 2011-Apr-24 »
Looks like Android is in, so, here's a quick rundown on how to sign apk files for Android in regards to GLBasic:-

1) First, build you app for Android

2) Create a folder called "keytools" and make a folder in that called "keys"  (I create the keytools folder in my root GLBasic project folder)

3) Navigate to your {App_Project_Root}/android/bin directory and copy the file glbasic-debug.apk to your keytools folder

The glbasic-debug.apk file has already been signed with a default key, which is no good when releasing stuff on the Android Market (It wont be accepted), so, we need to remove the debug key and add our own

4) To unsign it, we need to remove a few files from the apk package, the apk file is just a zip file really, so, you need to explore the package using a archive utility, I use 7-zip.

5) When exploring the package, there is a folder in the root of the package called 'META-INF', go into that folder and there should be three files... MANIFEST.MF, CERT.SF and CERT.RSA... Remove these three files and your package will be unsigned.

6) Open command prompt (cmd.exe)

7) Navigate to your keytools folder
8} Type the following (Make sure your Java paths are correct, if not, use whole paths to the Java tools used below):-
9)keytool -genkey -alias mykey.keystore -keyalg RSA -validity 20000 -keystore keys/mykey.keystore

Then following the questions...

10) Type the following: jarsigner -verbose -keystore keys/mykey.keystore -signedjar glbasic-signed.apk glbasic-debug.apk mykey.keystore

11) You apk file should now be correctly signed.

Dabz

Original instructions provided by therevills here: http://www.indiecodez.com/forum/index.php/topic,109.0.html, and I just updated them for GLBasic! :)

39
Beta Tests / Re: Android - Beta SDK
« on: 2011-Apr-24 »
Quote
o luck with Windows XP in a Virtual Machine either :

Oh, your running on a VM, mines in Bootcamp so is a proper installation.

Dabz

40
Beta Tests / Re: Android - Beta SDK
« on: 2011-Apr-23 »
Nope, I havent installed the NDK... And yep, 2.2 is the one!

Dabz

41
Beta Tests / Re: Android - Beta SDK
« on: 2011-Apr-23 »
Right, managed to get the resolution to shift up a bit by editing t the AndroidManifest.xml file:-

Code: GLBasic [Select]
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.denathorngames.nagsheeddarts"
      android:versionCode="1"
      android:versionName="1.0">
          <supports-screens android:resizeable="false"
                  android:smallScreens="true"
                  android:normalScreens="true"
                  android:largeScreens="true"
                  android:anyDensity="false" />
    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8" />
        <uses-permission android:name="android.permission.INTERNET" />
    <application android:label="@string/app_name" android:icon="@drawable/icon" android:debuggable="true">
        <activity android:name="org.libsdl.app.SDLActivity" android:label="@string/app_name" android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>
 

Note this line:-

Code: GLBasic [Select]
android:anyDensity="false"
 

This makes Android scale the application, though, its not the general 'done thing', but works on my HTC Desire... The proper way is to scale everything up, but, that would mean changing loads of code, redoing my LoadBMP images etc etc

I'll get something up, push it about on a few devices and see whats what! :)

But, overall, it works well for me (apart from mp3's not playing, though, I will try OGG), and I must say, brilliant job!  :good:

Dabz

EDIT: Tried .ogg, it plays the file, sorta, I say sorta because you can hear the music, but its barely audible behind what I can only describe as machine gun fire! :)


42
Beta Tests / Re: Android - Beta SDK
« on: 2011-Apr-23 »
Well, at least we know whats wrong... I had a feeling it had something do to with the USB cable, but I never realized you couldnt plug one in! :D

Anyway, what you've done isnt wasted, you can still build them...

Create a AVD (Android emulator) and get it running, then, try and build the project again... On my machine, when the phone is disconnected but the emulator is running, the application gets shunted onto the AVD (Note: Some stuff may not work as expected on an AVD as it does on hardware, this doesnt just apply to GLBasic apps, it happens even with native stuff)

Then, if its possible, you can just manually move the APK package that's  built onto your device and install it from there for actual testing on hardware (You may need to manually sign the app with keytool/jarsigner first)... That is, if its possible for you to do this.

Thing is though while testing, on the AVD, the application runs perfectly in a sense that my app is stretched to fit the screen, whereas on my actual device, its not, also, the colour parameter for DrawRect looks like its ignored on the AVD (Stays white) but works as expected on the device.

Dabz

43
Beta Tests / Re: Android - Beta SDK
« on: 2011-Apr-23 »
Right, with the USB plugged in, can you go to Apps->Settings->Applications

Then check if the these are ticked:-

- Unknown Sources                                       <---- Probably doesnt matter as the app gets signed as a debug app, but switch it on regardless
- Development->USB debugging                   <---- Important

Dabz

44
Beta Tests / Re: Android - Beta SDK
« on: 2011-Apr-23 »
Ah, I've just tried to build an app without the USB cable plugged in to my phone and received this error:-

BUILD FAILED
C:\Program Files\GLBasic_beta\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:639: The following error occurred while executing this line:
C:\Program Files\GLBasic_beta\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:271: exec returned: 1

Dabz


45
Beta Tests / Re: Android - Beta SDK
« on: 2011-Apr-23 »
Quote
No, still fails

Bugger!

Basically, what you've done is what I've done, I literally have done nothing different that springs to mind, but, going off Google, it does look like its something to do with the SDK, but the answer isnt on there!?!

So, last thing I can think of is that by any chance could someone try this on Windows 7 32bit (Or Windows 7 64bit) to see what results they get... As I'm running XPSP3 and all seems well!

Dabz


Pages: 1 2 [3] 4 5 ... 7