Android Open Source - radioExpresWidget My Activity

From Project

Back to project page radioExpresWidget.


The source code is released under:

GNU General Public License

If you think the Android project radioExpresWidget listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.hustaty.radioexpres.widget;
/*from w  w w. j  a  va  2s . c om*/
import android.os.Bundle;
import android.util.Log;

import android.widget.TextView;
import com.hustaty.radioexpres.widget.exception.RadioExpresException;
import com.hustaty.radioexpres.widget.http.MyHttpClient;
import com.hustaty.radioexpres.widget.model.Kml;
import com.hustaty.radioexpres.widget.model.Placemark;
import com.hustaty.radioexpres.widget.receiver.AlarmManagerBroadcastReceiver;
import com.hustaty.radioexpres.widget.util.LogUtil;


public class MyActivity extends Activity
  // logger entry
  private final static String LOG_TAG = MyActivity.class.getName();

  /** Called when the activity is first created. */
  public void onCreate(Bundle savedInstanceState)

    MyHttpClient myHttpClient = new MyHttpClient(this);

    try {
      Kml kml = myHttpClient.getTrafficInformation(true);
      TextView t = (TextView)findViewById(;
//      Placemark placemark = kml.getDocument().getPlacemarkList().get(0);
    } catch (IOException e) {
      Log.e(LOG_TAG, "#onReceive(): " + e.getMessage());
    } catch (RadioExpresException e) {
      Log.e(LOG_TAG, "#onReceive(): " + e.getMessage());

    try {
      AlarmManagerBroadcastReceiver alarmManagerBroadcastReceiver = new AlarmManagerBroadcastReceiver();
      Log.d(LOG_TAG, "#onCreate(): cancelling and setting Alarms");
      LogUtil.appendLog(LOG_TAG + "#onCreate():  cancelling and setting Alarms");
    } catch (Exception e) {
      Log.e(LOG_TAG, e.getMessage());
      LogUtil.appendLog(LOG_TAG + "#onCreate(): " + e.getMessage());


Java Source Code List