Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts
Saturday, March 3, 2012
Android sdk vs AndEngine vs libGDX
As the title says, soon I will begin to work on a game for android, so I decided to do a little test between Android SDK, AndEngine and libGDX. The results left me so amazed that I decided to put a video on youtube, hope you enjoy.
Friday, December 16, 2011
Saving files to External Storage in Android
Just a
snippet of code for android that can help some of my friends.
String FILENAME = "myfile.txt";
boolean externalStorageMounted = false;
boolean externalStorageWriteable = false;
String state = Environment.getExternalStorageState();
if (Environment.MEDIA_MOUNTED.equals(state)) {
externalStorageMounted = true;
externalStorageWriteable = true;
} else if (Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {
externalStorageMounted = true;
externalStorageWriteable = false;
} else {
externalStorageMounted = false;
externalStorageWriteable = false;
}
if (externalStorageMounted && externalStorageWriteable) {
File dbfile = new File(Environment.getExternalStorageDirectory(), FILENAME);
FileOutputStream fos = new FileOutputStream(dbfile, true);
//Do anything with fos
try {
if (fos != null)
fos.close();
} catch (IOException e) {
e.printStackTrace();
}
}
Ok, almost done, but not yet.Open your AndroidManifest.xml and add the following line<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
or using graphical interface: Permissions -> Add... -> android.permission.WRITE_EXTERNAL_STORAGE
And everything ready.
Wednesday, December 14, 2011
Recently a friend of mine told me about an attempt to put Android 4.0 on Samsung GT540, it seemed too unrealistic but it is perfectly true, here is the link to the blog of the person who is attempting such a feat.
http://aosp.mikegapinski.cba.pl/?page_id=14
And to give a special touch, a video too.
http://aosp.mikegapinski.cba.pl/?page_id=14
And to give a special touch, a video too.
If someone wants to try, do not forget to leave some feedback about this experience :)
Subscribe to:
Posts (Atom)