Tag: android

How to fill each side of a cube with different textures on OpenGL ES 1.1?

Please, I need tutorials/code examples of how to fill each side of a cube with different textures on OpenGL ES 1.1 I found a lot of tutorials but none of them explain clearly how to put different textures in each face and none of them gives easy code examples of how to do it. My […]

Activity Creator

What is the Activity Creator in Android?

Write a string to a file

I want to write something to a file. I found this code: private void writeToFile(String data) { try { OutputStreamWriter outputStreamWriter = new OutputStreamWriter(context.openFileOutput(“config.txt”, Context.MODE_PRIVATE)); outputStreamWriter.write(data); outputStreamWriter.close(); } catch (IOException e) { Log.e(“Exception”, “File write failed: ” + e.toString()); } } The code seems very logical, but I can’t find the config.txt file in my […]

How to build Qt5 for Android?

I have a server running Ubuntu 12.04 LTS. I would like to put the server to use building Qt5 for the Android ARMv6 platform. How does one go about doing this on a headless server?

Sorting an array of filenames containing strings with numbers

For my project I need to download a zip file from an FTP server, which releases a new zip about 13 times a year. I need to download the latest file following the server’s naming convention: Prefix + release number (one or two digits) + year (two digits) + suffix + “.zip” for instance: ALFP1016F.zip […]

Android EditText with word-wrap but no hard returns

If I set SingleLine=true on an EditText widget, I get a single-line edit control that doesn’t allow hard returns to be inserted by the user (clicking Enter moves to the next field instead of inserting a new line). If I don’t set SingleLine=true, the user can insert hard returns. If I set layout_height=”wrap_content”, the EditText […]

Cleanly binding/unbinding to a Service in an Application

I have an Android application that is binding to a persistent service (once started with startService()). The service is an integral part of the application and thus is used in almost every Activity. Hence I want to bind to the service just once (instead of binding/unbinding in every Activity) and keep the binding during the […]

Passing JSON data in get request as request body

Hi i have to send a get request to an url http://onemoredemo.appspot.com/group?authToken=access_token&authMethod=oauth with request body contains json object as shown below. {“goupid”:”some_variable” } Here is a section of java code for sending get request: URL url1=new URL(“http://onemoredemo.appspot.com/group?authToken=”+access_token+”&authMethod=oauth”); conn=(HttpURLConnection) url1.openConnection(); conn.addRequestProperty(“Content-type”, “application/x-www-form-urlencoded”); conn.setRequestMethod(“GET”); conn.setDoOutput(true); JSONObject jj=new JSONObject(); HttpGet get; get. jj.put(“groupid”, “testing@iritesh.com”); conn.addRequestProperty(“Content-TYpe”, “application/json”); conn.getOutputStream().write(jj.toString().getBytes()); conn.connect(); […]

Java annotation execute a method within the annotation declaration(usage for android)

I’m fairly new to the annotation terms. I have read some sources and came to the conclusion that non answered my question. Perhaps I googled using the wrong search. Perhaps I overlook, or mayhbe im just clueless.. Anyway here is the deal. I am busy writing an application that requires “role validation”. To do this […]

Using Skia in Android NDK

Is it true that android.graphics.* depends on the native Skia library? If so, is it possible to access the Skia library in my native C/C++ codes?

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.