Skip to main content

Posts

Showing posts from 2014

Is Ruby Obsession Going Off Rails?

You can be forgiven if you thought Ruby on Rails is the only technology stack around these days. A quick glance at the number of sessions being held in recent months shows a huge number of Ruby on Rails sessions being held in the recent months in South East Asia alone: Read more here: https://medium.com/@S1lv3rd3m0n/962240ab4fd0

How To Reset Android Studio on Mac

Just in case you guys have trouble starting Android Studio for some unknown reason such as clearing the Mac OS cache using a third party tool, these are the steps to troubleshoot the problem. Step 1: Close Android Studio. Step 2: Remove all the directories that are related to Android Studio ~/Library/Application Support/AndroidStudioBeta ~/Library/Caches/ AndroidStudioBeta ~/Library/Logs/ AndroidStudioBeta ~/Library/Preferences/ AndroidStudioBeta Step 3: Start Android Studio Simple as that...

Android Wear Tutorial

So Android Wear is going to be announced in hours at the Google I/O 2014 event. To get started with Android Wear, follow these steps (You must sign up to the Android Wear Developer Preview, download the Android Wear Preview jar file and add the library to your project in order to continue): 1. Set up the Android Wear emulator after downloading the Android Wear System Image and related Android Wear packages from the Android SDK Manager 2. Start the emulator. 3. Download the Android Wear Preview app after opting in as a tester. 4. Use this command to connect the emulator to your phone via USB adb - d forward tcp : 5601 tcp : 5601 Simple Example of Wearable Notification 1. Create a sample notification using this template. Notice that I've wrapped up notificationBuilder with WearableNotifications.Builder. 2. NotificationManagerCompat is mandatory to ensure code compatibility with lower versions of Android. 3. NotificationCompat . Builder notificationBuilder =

Groovy Grails POST/GET Requests

Just a snippet of how to do GET/POST request in Groovy Grails. try{       HttpBuilder http = new HTTPBuilder('your URL here')       def postBody = [name: 'bob', title: 'construction worker']       http.post(body: postBody,                         requestContentType: ContentType.JSON) { resp, json ->                     //This is to assume everything is successful within this                         //closure                     println "response status " + resp.statusLine                     println "json response " + json                                      } }catch(HttpResponseException ex){         //handle your errors here }

How To Generate Signed APK using Gradle in Android Studio

So Android Studio doesn't encourage you to sign your APK the UI way using Android Studio, instead they're directing you to use Gradle to generate it (or in complex cases, there'll be a lot of APKs generated according to different build types and flavors) 1. Declare these inside the android bracket within the gradle file within your main Android project as shown below (while putting your keystore files in your project root directory): signingConfigs{         debug {             storeFile file("example.keystore")             storePassword "example"             keyAlias "example"             keyPassword "example"         }         release {             storeFile file("example-release.keystore")             storePassword "example"             keyAlias "example"             keyPassword "example"         } } buildTypes {         debug {            signingCo