code: @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          Log.i(TAG, "onCreate");
          setContentView(R.layout.main);
          application = (JoynrAndroidLocationProviderApplication) getApplication();
  
          application.setOutput(new Output() {
              TextView textView = (TextView) findViewById(R.id.progressoutput);
  
              @Override
              public void append(final String text) {
                  // Android prohibits access UI elements from outside the UI thread
                  // with "someUiElement".post(..) you can pass a runnable to the ui thread to modify UI content.
                  // see http://developer.android.com/guide/components/processes-and-threads.html
                  textView.post(new Runnable() {
                      @Override
                      public void run() {
                          textView.append(text);
                      }
                  });
              }
  
          });
  
      }
docs: Called when the activity is first created.
  
  @param savedInstanceState
  If the activity is being re-initialized after previously being shut down then this Bundle contains the
  data it most recently supplied in onSaveInstanceState(Bundle). <b>Note: Otherwise it is null.</b>