Android Open Source - Amppercent7 Launch Me






From Project

Back to project page Amppercent7.

License

The source code is released under:

GNU General Public License

If you think the Android project Amppercent7 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 my.amppercent.project;
/*w  w  w.  j a v a 2s.  c om*/
import my.amppercent.types.State;
import my.amppercent.types.myNotification;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

/**
 * Classe necessaria ad effettuare la gestione dell'azione scatenata
 * dall'utente, a partire dalla pressione della notifica. Serve unicamente per
 * decidere se inviare un broadcast oppure attivare l'attivit con un Intent, in
 * base alla visualizzazione delle Activity.
 * 
 * @author jack
 * 
 */
public class LaunchMe extends Activity {

  public static Intent copy(Intent from, Intent to) {
    return to;
  }

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

    boolean test = false;

    super.onCreate(savedInstanceState);
    Intent i = getIntent();
    String action = i.getAction();
    Intent j;
    Class<?> cls = null;
    Log.d("LaunchMe", "okhere");

    if ((action.equals(myNotification.BROADCAST_CHAT_REQ_STRING))) {
      test = (State.main_is_visible || State.main_is_active);
      cls = Amppercent4Activity.class;
      Log.d("LaunghMe", "CHAT");
    } else if ((action.equals(myNotification.FILE_REQUEST_STRING))) {
      test = State.manager_in;
      cls = DownloadManager.class;
      Log.d("LaunghMe", "FILE_REQUEST");
    } else
      finish();

    // Se il servizio di destinazione  visibile, allora gli invio un
    // broadcast, altrimenti gli lancio un intent
    if (!test) {
      Log.d("LaunchMe", "visibility = false");
      j = new Intent(this, cls);
    } else {
      Log.d("LaunchMe", "visibility = true");
      j = new Intent();
    }
    // Ricopio i dati ricevuti
    j.putExtras(i.getExtras());

    j.setAction(action);
    if (test)
      sendBroadcast(j);
    else
      startActivity(j);

    Log.d("LaunchMe", "ok");
    finish();

  }

}




Java Source Code List

my.amppercent.adapters.AdapterChat.java
my.amppercent.adapters.AdapterElems.java
my.amppercent.adapters.AdapterIM.java
my.amppercent.adapters.AdapterUStatus.java
my.amppercent.adapters.ListViewAdapting.java
my.amppercent.adapters.ListView_XUser.java
my.amppercent.chatrequest.AvailabilitySettings.java
my.amppercent.chatrequest.SelectConnActivity.java
my.amppercent.chatrequest.connActivity.java
my.amppercent.chatrequest.serverActivity.java
my.amppercent.chattables.UberChat.java
my.amppercent.chattables.XConnect.java
my.amppercent.chattables.XRoster.java
my.amppercent.chattables.myChat.java
my.amppercent.project.Amppercent4Activity.java
my.amppercent.project.DownloadManager.java
my.amppercent.project.IBindRemoteService.java
my.amppercent.project.LaunchMe.java
my.amppercent.project.PrefActive.java
my.amppercent.project.TabFragment.java
my.amppercent.project.TextEntryActivity.java
my.amppercent.remoteservice.IFMessage.java
my.amppercent.remoteservice.IntentManage.java
my.amppercent.remoteservice.XUser.java
my.amppercent.remoteservice.chatAdapter.java
my.amppercent.types.Couple.java
my.amppercent.types.State.java
my.amppercent.types.myATask.java
my.amppercent.types.myNotification.java
my.amppercent.types.myYesNoDialog.java
my.amppercent.types.newActivity.java
org.jivesoftware.smackx.filetransfer.myOutgoingFileTransfer.java