Versions Compared

Key

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

...

In the following example the library of the markets MA is integrated. The header file is needed:

  • SpringMASpring.h

Code Block
#import "TestApp.h"

#import "SpringMASpring.h"

@implementation TestApp3AppDelegate

@synthesize window = _window;
@synthesize tabBarController = _tabBarController;


SpringMASpring *springMAspring;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

{

    // --- MA ---------------------------------------------------------------------------------

    springMAspring = [[SpringMASpring alloc] initWithSiteAndApplication:@"site" application:@"applicationName"];


    NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:MA_SPRING_APP_STARTED, MA_SPRING_VAR_ACTION,nil];

    [springMAspring commit:dict];



    self.window.rootViewController = self.tabBarController;

    [self.window makeKeyAndVisible];

    return YES;
}


// ... more code 

...

In the following example the library of themarkets MA is integrated. The corresponding java Class in jar file is needed:

  • de.spring.mobile.ma.SpringMASpringMobile

 

Code Block
package de.spring.android.test;

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

import de.spring.mobile.ma.SpringMobileMASpringMobile;


import android.app.Activity;

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