Android Open Source - texting Robo Small Application






From Project

Back to project page texting.

License

The source code is released under:

Free to use, distribute, do anything.

If you think the Android project texting 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.skk.texting.di;
//from  w  ww . j  a v a 2  s  .  c o m
import com.google.inject.Key;
import com.sony.smallapp.SmallApplication;
import roboguice.RoboGuice;
import roboguice.context.event.OnCreateEvent;
import roboguice.context.event.OnDestroyEvent;
import roboguice.context.event.OnStartEvent;
import roboguice.event.EventManager;
import roboguice.inject.RoboInjector;
import roboguice.util.RoboContext;

import java.util.HashMap;
import java.util.Map;

public class RoboSmallApplication extends SmallApplication implements RoboContext {
    protected EventManager eventManager;
    protected HashMap<Key<?>,Object> scopedObjects = new HashMap<Key<?>, Object>();

    @Override
    protected void onCreate() {
        final RoboInjector injector = RoboGuice.getInjector(this);
        eventManager = injector.getInstance(EventManager.class);
        injector.injectMembers(this);
        super.onCreate();
        eventManager.fire(new OnCreateEvent<SmallApplication>(this, null));
    }


    @Override
    protected void onStart() {
        super.onStart();
        eventManager.fire(new OnStartEvent<SmallApplication>(this));
    }


    //TODO: Need to override onStop()

    @Override
    protected void onDestroy() {
        try {
            eventManager.fire(new OnDestroyEvent<SmallApplication>(this));
        } finally {
            try {
                RoboGuice.destroyInjector(this);
            } finally {
                super.onDestroy();
            }
        }
    }


    @Override
    public Map<Key<?>, Object> getScopedObjectMap() {
        return scopedObjects;
    }

}




Java Source Code List

com.skk.texting.ApplicationStart.java
com.skk.texting.TextingApplication.java
com.skk.texting.adaptor.ContactsAdaptor.java
com.skk.texting.adaptor.ConversationAdaptor.java
com.skk.texting.adaptor.TextMessageAdaptor.java
com.skk.texting.adaptor.view.ViewHolder.java
com.skk.texting.adaptor.view.ViewType.java
com.skk.texting.async.AsyncCursorUpdate.java
com.skk.texting.async.BackgroundTask.java
com.skk.texting.constants.ApplicationConstants.java
com.skk.texting.constants.TextMessageConstants.java
com.skk.texting.customview.CustomRelativeLayout.java
com.skk.texting.di.RoboSmallApplication.java
com.skk.texting.domain.ConversationRepository.java
com.skk.texting.domain.Conversation.java
com.skk.texting.domain.Person.java
com.skk.texting.domain.TextMessage.java
com.skk.texting.eventdata.EmptyEventData.java
com.skk.texting.eventdata.IncomingSmsData.java
com.skk.texting.eventdata.RepliedSms.java
com.skk.texting.evented.EventData.java
com.skk.texting.evented.EventHandler.java
com.skk.texting.evented.EventRepository.java
com.skk.texting.evented.Event.java
com.skk.texting.evented.HandleEvent.java
com.skk.texting.factory.PersonFactory.java
com.skk.texting.gesture.MotionEventRecorder.java
com.skk.texting.gesture.OnSwipeGestureHandler.java
com.skk.texting.gesture.SwipeGestureHandler.java
com.skk.texting.gesture.SwipeGestureListener.java
com.skk.texting.listener.IncomingSmsListener.java
com.skk.texting.listener.ListItemClickListener.java
com.skk.texting.viewwrapper.AllContactsWrapper.java
com.skk.texting.viewwrapper.HeaderWrapper.java
com.skk.texting.viewwrapper.MessageConsoleWrapper.java
com.skk.texting.viewwrapper.TextMessagesView.java