Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

Code Block
package de.spring.android.test;

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

import de.spring.mobile.ma.SpringMobileMA;
import de.spring.mobile.mb.SpringMobileMB;


import android.app.Activity;

public class MyActivity extends Activity {
	
	SpringMobileMA ma;
	SpringMobileMB mb;
	
	public MyActivity() {
		ma = new SpringMobileMA("site", "applicationname", getApplicationContext());
		mb = new SpringMobileMB("site", "applicationname", getApplicationContext());
	}
	
	/**
	 * @see android.app.Activity#onStart()
	 */
	@Override
	protected void onStart() {
		
		Map<String, Object> mapma = new HashMap<String, Object>();
		mapma.put(SpringMobileMA.VAR_ACTION, SpringMobileMA.APP_BACKGROUNDSTARTED);
    	ma.commit(mapma);
 
		Map<String, Object> mapmb = new HashMap<String, Object>();
		mapmb.put(SpringMobileMB.VAR_ACTION, SpringMobileMB.APP_BACKGROUNDSTARTED);
    	mb.commit(mapmb);
	}
 
	// more code ...
}