...
Code Block | ||
---|---|---|
| ||
SpringMobile spring = new ("app","TestApp",getApplicationContext()); spring.setTimeout(30); // in seconds |
Advise for Implementation when using Android 3.0 and higher Versions
Note |
---|
Note: Starting from Android 3.0Since Android 3.0 network accesses are not allowed from the main thread anymore. Thus, the Spring.commit () method must be calledin different is achieved in a background thread. For this reason, please keep the initialization and usage of Spring lib in your main UI thread, Spring lib will not block your GUI display. Otherwise background thread conflict pops. |
Code Block | ||
---|---|---|
| ||
class CommitTask extends AsyncTask<Map<String,Object>, Void, Void> {
protected Void doInBackground(Map<String,Object>... params) {
if(params.length != 1)
throw new IllegalArgumentException("one parameter expected");
spring.commit(params[0]);
return null;
}
} |
...
might pop up. |
Implementation Blackberry
...