package com.kidozen.examples.services;

import kidozen.client.KZApplication;
import kidozen.client.ServiceEvent;
import kidozen.client.ServiceEventListener;
import android.util.Log;

public enum SharedKidozen {
	INSTANCE;
	private KZApplication application;
	
	static String TENANT = "http://kidodemo.dev.kidozen.com/";
	static String APP ="demo";
	static String USER ="armonia@kidozen.com";
	static String PASS ="pass";
	private static String TAG = "SharedKidozen";
	private static final Object lock = new Object();

	
	public static KZApplication Application() throws Exception {
			synchronized (lock) {
				INSTANCE.application = new KZApplication(TENANT,APP, true, new ServiceEventListener() {
					@Override
					public void onFinish(ServiceEvent e) {
						if (e.StatusCode==200) {
							lock.notify();
						}
					}
				});
			}
			
			INSTANCE.application.Authenticate("Kidozen", USER, PASS, new ServiceEventListener() {
				@Override
				public void onFinish(ServiceEvent e) {
					if (e.StatusCode==200) {
						Log.d(TAG, "AUTH Finish: " + e.Body);
					}
				}
			});
			
			return INSTANCE.application;
	}

}
@@ -289,33 +289,14 @@
 p://
-kidodemo.dev.kidozen.com/
+tenant
 %22;%0A%09
@@ -348,15 +348,18 @@
 R =%22
-armonia
+your user 
 @kid
@@ -395,12 +395,19 @@
 S =%22
-pass
+your secret
 %22;%0A%09

update 3 commit