Sha256: 2ad9a255fb5065857641f2057851d0a4423fc06f4b53d30ef732a7c3a2ad039b

Contents?: true

Size: 1.39 KB

Versions: 13

Compression:

Stored size: 1.39 KB

Contents

package com.rho.notification;

import com.rho.notification.INotification;
import com.rho.notification.INotificationFactory;
import com.rho.notification.INotificationSingleton;
import com.rhomobile.rhodes.RhodesActivity;
import com.rhomobile.rhodes.extmanager.AbstractRhoListener;
import com.rhomobile.rhodes.extmanager.IRhoExtManager;
import com.rhomobile.rhodes.extmanager.IRhoListener;

public class NotificationFactory extends AbstractRhoListener implements INotificationFactory, IRhoListener
{
	private NotificationSingleton singleton;
	
	public NotificationFactory()
	{
	}
	
	@Override
	public INotificationSingleton getApiSingleton()
	{
		if(singleton == null) singleton = new NotificationSingleton();
		return singleton;
	}

	@Override
	public INotification getApiObject(String id)
	{
		return null;
	}

	@Override
	public void onPause(RhodesActivity activity)
	{
		if(singleton != null)
		{
			singleton.onPause();
		}
	}

	@Override
	public void onStop(RhodesActivity activity)
	{
		if(singleton != null)
		{
			singleton.onStop();
		}
	}

	@Override
	public void onDestroy(RhodesActivity activity)
	{
		if(singleton != null)
		{
			singleton.onDestroy();
		}
	}

    @Override
    public void onCreateApplication(IRhoExtManager extManager) {
        NotificationFactorySingleton.setInstance(this);
        extManager.addRhoListener(this);
    }
}

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
rhodes-6.2.0 lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationFactory.java
rhodes-6.0.11 lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationFactory.java
rhodes-5.5.18 lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationFactory.java
rhodes-5.5.17 lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationFactory.java
rhodes-5.5.15 lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationFactory.java
rhodes-5.5.0.22 lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationFactory.java
rhodes-5.5.2 lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationFactory.java
rhodes-5.5.0.7 lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationFactory.java
rhodes-5.5.0.3 lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationFactory.java
rhodes-5.5.0 lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationFactory.java
tauplatform-1.0.3 lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationFactory.java
tauplatform-1.0.2 lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationFactory.java
tauplatform-1.0.1 lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationFactory.java