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 - losh

Pages: 1
1
Resolved Questions / Re: Facebook
« on: July 08, 2013, 11:27:44 am »
I didn't write this...

Assuming you have created your facebook app and filled in all the correct data in the facebook developer website, you can continue to downloading the actual API and putting it somewhere you'll remember (preferably close to your project or haxe folders), extract everything from the zip file.
Now, create a file called 'include.nmml' at the root of the API folder with this code:
<?xml version="1.0" encoding="utf-8"?>
<project>

<java path="src" />
<java path="libs/android-support-v4.jar" />

</project>

And create a haxe file in that folder which will be responsible for all JNI communications (it's more comfortable to have one file responsible of all the operations).
And now you need to create the corresponding java file which will have all the functions called from JNI.
You also need to create a new MainActivity.java file for your app, which will include the full code from this tutorial (only the activity code is required):http://developers.facebook.com/docs/tutorials/androidsdk/3.0/scrump...

After you've created those files, you'll need to create the R.java file to put in src/com/facebook/android, which will be created from the facebook resources. You can create that file using aapt which can be found under your Android SDK folder, in platform-tools. Run the following command (where ANDROID_HOME is the location of your Android SDK folder, and DEV_HOME is the location of your project):
ANDROID_HOME/platform-tools/aapt
package
-v
-f
-m
-S DEV_HOME/res
-J DEV_HOME/src
-M DEV_HOME/AndroidManifest.xml
-I ANDROID_HOME/platforms/android-7/android.jar

More data about aapt can be found here:http://geosoft.no/development/android.html... and here:http://elinux.org/Android_aapt
You might also need to create the BuildConfig.java file if you don't have it, I have attached it. (you just need to change its extension because I couldn't upload it with the java extension)

Lastly, for the facebook folder, you need to go to the 'res\values' folder, and open the strings.xml file and add two lines:
<string name="app_name">NAME</string>
<string name="app_id">ID</string>

You can find your appID using the android keytool (make sure you have openssl installed) with the following command on windows:
keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore | openssl sha1 -binary | openssl base64

and the following command on OS X:
[quotekeytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64][/quote]

Now, you also need to create a new AndroidManifest.xml file that will override the existing haxe one, so it will include the facebook activity. The correct AndroidManifest.xml file is attached (built using the template AndroidManifest.xml).

Now that you're done with all of that, go to your application's nmml file to include all the files that we've added.
Add the following lines (change the path to the correct path to your android facebook API files and all the other files you've added and change 'xxxxxxx', 'yyyyy' to be your correct package name):
<include path="../facebook-android" if="android" />
<template path="../facebook-android/res" rename="res" if="android" />
<template path="AndroidManifest.xml" if="android" />
<template path="../facebook-android/src/MainActivity.java" rename="src/com/xxxxxx/yyyyyyy/MainActivity.java" if="android" />


I can help you though.

2
Completed / Re: Localization for iOS devices
« on: May 11, 2013, 09:25:16 am »
I am going to produce a game showing how this will work, but you cannot use this in iOS though...

Looking forward to the extension.

3
Jon, Shouldn't the time be written in minutes and seconds instead of just seconds?
It will be easier to understand.  ;)

Thanks,
Losh

4
Archives / Re: Can you GUYS please add STENCYL to sourceforge?
« on: March 28, 2013, 03:39:44 pm »
Jon is trying to make Stencyl 3.0 Open-source, by publishing the code to github.

5
Completed / Re: Language detection
« on: March 08, 2013, 03:23:59 pm »
Jon, will this be in some future update such as Stencyl 3.1 or maybe 3.0?

Thanks,
Loshan

6
Completed / Localization for iOS devices
« on: February 10, 2013, 01:47:17 pm »
[redacted]

7
Resolved Questions / Re: When is stencyl 3.0 arriving ?
« on: January 23, 2013, 02:32:11 pm »
I just bought Stencyl iOS Pro, and I looked forward to downloading the beta version of Stencyl, people are telling me to subscribe, I do not understand? Can someone guide me though the one by one steps?

Pages: 1