gt:                 && keyCode == KeyEvent.KEYCODE_BACK
context: package de.jakobhaubold.tools.unierlangentechfak;
  
  import java.io.BufferedReader;
  import java.io.IOException;
  import java.io.InputStreamReader;
  import java.net.MalformedURLException;
  import java.net.URL;
  
  import com.google.ads.AdRequest;
  import com.google.ads.AdSize;
  import com.google.ads.AdView;
  import com.google.analytics.tracking.android.EasyTracker;
  
  import android.app.Activity;
  import android.app.PendingIntent;
  import android.content.Intent;
  import android.net.Uri;
  import android.os.Bundle;
  import android.util.Log;
  import android.view.KeyEvent;
  import android.view.Menu;
  import android.view.MenuInflater;
  import android.view.MenuItem;
  import android.view.View;
  import android.widget.Button;
  import android.widget.FrameLayout;
  import android.widget.RelativeLayout;
  import android.widget.TextView;
  import android.widget.Toast;
  
  import de.jakobhaubold.tools.unierlangennuernberg.*;
  import de.sigfood.SigfoodActivity;
  public class HomeActivity extends Activity {
      public String a = "";
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.dashboard_layout);
          
        
          class AlertThread implements Runnable
          {
            @Override public void run()
            {System.out.println("1");
          	  try {
                    // Create a URL for the desired page
                    URL url = new URL("http://moving-animations.de/Alert.txt");
                    System.out.println("2");
                    // Read all the text returned by the server
                    BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
                    System.out.println("21");
                    String str;
                    
                    System.out.println("22");
                    while ((str = in.readLine()) != null) {
                  	 a+=str; System.out.println("c1");  // str is one line of text; readLine() strips the newline character(s)
                    }
                    System.out.println("23");
                    System.out.println(a);
                   
                    try {
  					in.close();
  					System.out.println("24324");
  				} catch (Exception e) {
  					// TODO Auto-generated catch block
  					e.printStackTrace();
  				}
                   
                System.out.println(str);
          	  } catch (MalformedURLException e) {System.out.println("3");
                } catch (IOException e) {System.out.println("4");
                }catch (NullPointerException e) {System.out.println("5");} 
            }}
          Thread t1 = new Thread( new AlertThread() );
          t1.start();
          
        
          // Campus Yusuf News button
          Button btn_news = (Button) findViewById(R.id.btn_news);
          
          
          // Dashboard Friends button
          Button btn_mensa = (Button) findViewById(R.id.btn_mensa);
          
  
          // Dashboard Places button
          Button btn_chat = (Button) findViewById(R.id.btn_chat);
          
          
          
          // Dashboard Photos button
          Button btn_doener = (Button) findViewById(R.id.btn_doener);
          
          /**
           * Handling all button click events
           * */
          
          
          
          
          // Listening to News Feed button click
          btn_news.setOnClickListener(new View.OnClickListener() {
  			
  			@Override
  			public void onClick(View view) {
  				// Launching News Feed Screen
  				Intent i = new Intent(getApplicationContext(), NewsActivity.class);
  				startActivity(i);
  			}
  		});
          
          
         // Listening Friends button click
          btn_mensa.setOnClickListener(new View.OnClickListener() {
  			
  			@Override
  			public void onClick(View view) {
  				// Launching News Feed Screen
  				Intent i = new Intent(getApplicationContext(), SigfoodActivity.class);
  				startActivity(i);
  			}
  		});
          
          // Listening Messages button click
          
          
          // Listening to Places button click
          btn_chat.setOnClickListener(new View.OnClickListener() {
  			
  			@Override
  			public void onClick(View view) {
  				// Launching News Feed Screen
  				Intent i = new Intent(getApplicationContext(), CouponActivity.class);
  				startActivity(i);
  			}
  		});
          
          
          
          
          
          // Listening to Photos button click
          btn_doener.setOnClickListener(new View.OnClickListener() {
  			
  			@Override
  			public void onClick(View view) {
  				
  	        	Intent startActivityIntent = new Intent(getApplicationContext(), RadioActivity.class); 
  	            String service_notification = null;
  	        	startActivityIntent.putExtra("NotificationMessage", service_notification);
  	            startActivityIntent.putExtra("flag", 1);
  	            startActivityIntent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
  	            startActivity(startActivityIntent);
  			}
  		});
          
          try {
  			t1.join();
  		} catch (InterruptedException e) {
  			// TODO Auto-generated catch block
  			e.printStackTrace();
  		}
          TextView t = (TextView) findViewById(R.id.AlertText);
          t.setText(a);
         
      }
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          MenuInflater inflater=getMenuInflater();
          inflater.inflate(R.menu.start, menu);
          return super.onCreateOptionsMenu(menu);
  
      }
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          switch(item.getItemId())
          {
         
          case R.id.btn_about:
          	
          	Intent i = new Intent(getApplicationContext(), AboutActivity.class);
  			startActivity(i);
              break;
              
  case R.id.btn_radio:
  	Intent pp = new Intent(getApplicationContext(), BiblioActivity.class);
  	startActivity(pp);
  	
      
  	
  	
  	
  	
  	//Intent q = new Intent(getApplicationContext(), RadioActivity.class);
  	
              break;
              
  
  
         
          	
          
          	
          case R.id.btn_spotted:
  
          	Intent x = new Intent(getApplicationContext(), Spotted.class);
          	startActivity(x);
          	break;
          
      case R.id.btn_links:
  
      	Intent f = new Intent(getApplicationContext(), SitesActivity.class);
      	startActivity(f);
      	break;
      
          }
          return true;
          
      }
      public void fb_Click(View v) {
      	Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.facebook.com/pages/Campus-Yusuf/526332420791226"));
      	startActivity(myIntent);
      }
      public void optionsClick(View v) {
          
      	openOptionsMenu();
      }
      
      @Override
      public boolean onKeyDown(int keyCode, KeyEvent event)  {
          if (Integer.parseInt(android.os.Build.VERSION.SDK) < 5
  