Showing posts with label apk. Show all posts
Showing posts with label apk. Show all posts

Sunday, July 10, 2011

Whew...

Ok, finally got all the bugs worked out (hopefully) and I have published the update to the Android Marketplace.

Lots of good stuff in this update too...
  • Fixed not sending issue on some devices!
  • Fixed battery issue on some devices!
  • Major overhaul in how incoming numbers are handled
  • Fixed crash involving screen orientation change while update dialog is showing
  • Fixed crash related to empty outgoing responses
  • Added two new auto response categories and response values
    • Bad Mood
    • Theater
  • A ton of code enhancements and bug fixes!

You can find the latest version here...
SMS Text Auto Responder FREE

and as always if you would like you can always help by purchasing my donate version on the Android Marketplace...
SMS Text Auto Responder DONATE

Wednesday, June 22, 2011

Simple communication between two different applications

Recently, I faced a problem where I needed two different applications to communicate a simple message between each other. I searched around and found many questions regarding this problem. However, there were a lot of vague answers as well.

I figured I would write this in case someone else faced a similar issue and needed a starting point to work from.

Here was the issue I faced:

  1. The user opens TestAppOne and there is a check to see if TestAppTwo exists.
  2. For this example we will say that TRUE is returned.
  3. Since TestAppTwo exists we open it using startActivityForResult(Intent, int).
  4. When the user is done with TestAppTwo they click a button which sends them back to TestAppOne with the resultCode
  5. Call finish() on TestAppTwo.

 


class TestAppOne extends Activity { 
 //... 
 
 private final void startOtherApp() { 
  //... 
  
  // Here we pass "1" to TestAppTwo 
  this.startActivityForResult(intent, 1); 
  
  //... 
 } 
 
 @Override protected void onActivityResult(int pRequestCode, int pResultCode, Intent pData) { 
  super.onActivityResult(pRequestCode, pResultCode, pData); 
  
  // Check the result code that was sent from the calling activity 
  if( pResultCode == 1 ) { 
   // The result was successfully sent and received 
  } else { 
   // There is something wrong 
  } 
 } 
} 

class TestAppTwo extends Activity { 
 //... 
 
 private void someMethod() { 
  //... 
  
  // Set the result here to be passed back to TestAppOne 
  this.setResult(1); 
  this.finish();
 } 
} 

 

Credits go to:
Android Developer Reference
Let's Share Some Thoughts
Android Forums