Friday, October 24, 2014
   
Text Size
Login

Two icons created on Android

What?
If you're installing an app and it creates two icons:

Why?
I don't think I'll forget this one but I was stumped for a bit until I found it on the a forum: Stack Overflow: Android App Development.

How?
Basically don't have the following declared more than once in the AndroidManifest.xml

  1.  <intent-filter> 
  2.       <action android:name="android.intent.action.MAIN" /> 
  3.       <category android:name="android.intent.category.LAUNCHER" /> 
  4.  </intent-filter> 

MessageBox or AlertDialog in Android Java

What?
A quick article on how to display a OK/Cancel popup which I use as a message to the user for debug purposes.

Why?
I need a function in every programming language which can output to me (the developer) data that the program is dealing with.

How?
This displays a standard Ok/cancel message popup which you attach to some event

  1.  import android.app.AlertDialog; 
  2.  import android.content.DialogInterface; 
  3.   
  4.  new AlertDialog.Builder(this) 
  5.          .setTitle("Some Title") 
  6.          .setMessage("some message") 
  7.          .setPositiveButton("OK", new DialogInterface.OnClickListener() { 
  8.                  public void onClick(DialogInterface arg0, int arg1) { 
  9.                          // Some stuff to do when ok got clicked 
  10.                  } 
  11.          }) 
  12.          .setNegativeButton("cancel", new DialogInterface.OnClickListener() { 
  13.                  public void onClick(DialogInterface arg0, int arg1) { 
  14.                          // Some stuff to do when cancel got clicked 
  15.                  } 
  16.          }) 
  17.          .show(); 

Basic Android App using Google Maps and Current Location

Applies to:
  • Android Studio (Beta) 0.8.6
  • Google Android Maps API

What?
I am writing an app for a tablet running Android and wanted to include a Google Map. The following exercise focuses solely on creating an app which opens Google Maps at your current location.

How?
I couldn't find any instructions using the tools I had (Android Studio) which is why I've written this article.

Free Translator API using Google

What?
So this is a quick article to get your Google Translation services working with your website.

Why?
At time of print, Google now charge for every 2,000,000 characters (2 million) every month.

Microsoft's Bing has added itself to the fray pretending to offer free services but in the small print, you will find they too charge the same price.

How?

Windows 7 and Google Chrome incognito mode by default

Basically if you've just started using "incognito" mode with the Google Chrome web-browser, this article is just how to switch the quick launch shortcut (next to your start button).  All the articles I googled were windows vista so I thought I'd share one for windows 7 here.  I'm actually only saving you a click as you can just right-click on the google chrome icon and select "New Incognito Window".  This is just how to set it by default (useful if you do online banking, shopping, etc).

Latest Posts