Sha256: 88d030b12267d85fa4f9d63fd73a76024a9feb3c5a1fb0cb6e26f60eaab5ba57
Contents?: true
Size: 1.01 KB
Versions: 37
Compression:
Stored size: 1.01 KB
Contents
package sh.calaba.instrumentationbackend.actions.preferences; import sh.calaba.instrumentationbackend.InstrumentationBackend; import sh.calaba.instrumentationbackend.Result; import sh.calaba.instrumentationbackend.actions.Action; import android.content.SharedPreferences; /** * Allows reading of SharedPreferences. * * See Ruby API docs for more info: * https://github.com/calabash/calabash-android/blob/master/documentation/ruby_api.md * * @author Juan Delgado (juan@ustwo.co.uk) */ public class GetPreferences implements Action { @Override public Result execute(String... args) { SharedPreferences preferences = null; try{ preferences = PreferencesUtils.getPreferencesFromArgs(args, InstrumentationBackend.instrumentation.getTargetContext()); } catch(Exception e){ return Result.fromThrowable(e); } Result result = Result.successResult(); PreferencesUtils.addPreferencesToResult(preferences, result); return result; } @Override public String key() { return "get_preferences"; } }
Version data entries
37 entries across 37 versions & 1 rubygems