本文整理汇总了Java中com.parse.Parse.enableLocalDatastore方法的典型用法代码示例。如果您正苦于以下问题:Java Parse.enableLocalDatastore方法的具体用法?Java Parse.enableLocalDatastore怎么用?Java Parse.enableLocalDatastore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.parse.Parse
的用法示例。
在下文中一共展示了Parse.enableLocalDatastore方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.parse.Parse; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
// Enable Local Datastore.
Parse.enableLocalDatastore(this);
// Add your initialization code here
Parse.initialize(this);
ParseInstallation.getCurrentInstallation().saveInBackground();
ParseACL defaultACL = new ParseACL();
// Optionally enable public read access.
defaultACL.setPublicReadAccess(true);
ParseACL.setDefaultACL(defaultACL, true);
}
示例2: setUpParse
import com.parse.Parse; //导入方法依赖的package包/类
public static void setUpParse(Context context) {
Parse.enableLocalDatastore(context);
Parse.initialize(context, "SUA_APPLICATION_ID", "SUA CLIENT_KEY");
ParseInstallation.getCurrentInstallation().saveInBackground();
ParseUser.enableAutomaticUser();
ParseACL defaultACL = new ParseACL();
defaultACL.setPublicReadAccess(true);
defaultACL.setPublicWriteAccess(true);
ParsePush.subscribeInBackground(Constants.CHANNEL, new SaveCallback() {
@Override
public void done(ParseException error) {
if (error == null) {
Log.i(Constants.TAG, "Successfully subscribed to Parse!");
}else{
Log.i(Constants.TAG, "Error subscribed to Parse!");
}
}
});
}
示例3: onCreate
import com.parse.Parse; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
//If using Parse.com
Parse.enableLocalDatastore(this);
//TODO Customize parse_app_id & parse_client_key values in strings
Parse.initialize(this);
//If Using Firebase.
Firebase.setAndroidContext(this);
//General Firebase reference used allong all your app
mFireBaseRef = new Firebase("https://<YOUR-FIREBASE-APP>.firebaseio.com/");
//Use that same reference to perform login and register with Reglog.
RegLog.setFirebaseReference(mFireBaseRef);
}
示例4: onCreate
import com.parse.Parse; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
// Enable Local Datastore.
Parse.enableLocalDatastore(this);
// Add your initialization code here
Parse.initialize(this);
ParseUser.enableAutomaticUser();
ParseACL defaultACL = new ParseACL();
// Optionally enable public read access.
// defaultACL.setPublicReadAccess(true);
ParseACL.setDefaultACL(defaultACL, true);
}
示例5: onCreate
import com.parse.Parse; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
// Enable Local Datastore.
Parse.enableLocalDatastore(this);
// Add your initialization code here
Parse.initialize(this, "COLFRcv3xi8naPtnDUHK4QwXpY8E49t9OuBYzKmN", "NJsKhQZ9pSJXPQ1EnMdzptxWxvLyzAp4AihbEdVp");
ParseInstallation.getCurrentInstallation().saveInBackground();
ParseUser.enableAutomaticUser();
ParseACL defaultACL = new ParseACL();
// Optionally enable public read access.
// defaultACL.setPublicReadAccess(true);
ParseACL.setDefaultACL(defaultACL, true);
}
示例6: onCreate
import com.parse.Parse; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Parse.enableLocalDatastore(this);
Parse.initialize(this, "b6M7rAxtdYoUgGMgGkzmYmpDWiN2T6M8c2RTJ5Zg", "Xsqyd44kUtgiOMMvwP8gyVjmdZLvXLxuynmGqqNX");
ParsePush.subscribeInBackground("Apro_2016", new SaveCallback() {
@Override
public void done(ParseException e) {
Log.e(TAG, "Successfully subscribed to Parse!");
}
});
Log.d(TAG, "not rgtd.");
}
示例7: onCreate
import com.parse.Parse; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
instance=this;
doAppUpdates();
mErrorReporter = new ErrorReporter(this);
// Enable Local Datastore.
Parse.enableLocalDatastore(this);
// Add your initialization code here
Parse.initialize(this, getString(R.string.parse_application_key), getString(R.string.parse_clientid));
// ParseACL defaultACL = new ParseACL();
// Optionally enable public read access.
// defaultACL.setPublicReadAccess(true);
// ParseACL.setDefaultACL(defaultACL, true);
Session.Instantiate(getApplicationContext());
//
}
示例8: GitTracker
import com.parse.Parse; //导入方法依赖的package包/类
private GitTracker(Context context, String accessToken, String repoName, String parseAppId, String parseClientId) {
this.mContext = context;
this.mAccessToken = accessToken;
this.mRepoName = repoName;
Parse.enableLocalDatastore(mContext);
Parse.initialize(mContext, parseAppId, parseClientId);
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread thread, Throwable exception) {
handleUncaughtException(exception);
}
});
//Search for old stack traces and upload
try {
uploadStackTraces();
} catch (IOException e) {
e.printStackTrace();
}
}
示例9: onCreate
import com.parse.Parse; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Parse.enableLocalDatastore(this);
Parse.initialize(this, Constants.getConstant(this, R.string.PARSE_APP_ID),
Constants.getConstant(this, R.string.PARSE_CLIENT_KEY));
Fabric.with(this, new Crashlytics());
Crashlytics.getInstance().setDebugMode(false);
Crashlytics.log(Log.INFO, StarterApplication.class.getName(), "Starting Application - " + System.currentTimeMillis());
NewsCatFileUtil.getInstance(this);
UserPrefUtil.getInstance(this);
ParseConfig.getInBackground(new ConfigCallback() {
@Override
public void done(ParseConfig config, ParseException e) {
ConfigService.getInstance();
ConfigService.getInstance().setInstance(StarterApplication.this);
}
});
}
示例10: onCreate
import com.parse.Parse; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
// Habilite armazenamento local.
Parse.enableLocalDatastore(this);
// Codigo de configuração do App
Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())
.applicationId("ZWxldHJvZmlzaW9AZ21haWwuY29t")
.clientKey(null)
.server("http://eletrofisio.herokuapp.com/parse/")
.build()
);
/*// Teste de configuração do App
ParseObject pontuacao = new ParseObject("Pontuacao");
pontuacao.put("pontos", 500);
pontuacao.saveInBackground(new SaveCallback() {
public void done(ParseException e) {
if (e == null) {
Log.i("TesteExecucao", "Salvo com sucesso!!!");
} else {
Log.i("TesteExecucao", "Falha ao salvar os dados!!!");
}
}
});*/
//ParseUser.enableAutomaticUser();
ParseACL defaultACL = new ParseACL();
// Optionally enable public read access.
defaultACL.setPublicReadAccess(true);
//ParseACL.setDefaultACL(defaultACL, true);
}
示例11: onInit
import com.parse.Parse; //导入方法依赖的package包/类
public void onInit(Context context) {
Context appContext = context.getApplicationContext();
Parse.enableLocalDatastore(appContext);
// Parse.initialize(context, ParseAppID, ParseClientKey);
Parse.initialize(new Parse.Configuration.Builder(appContext)
.applicationId(ParseAppID)
.server(parseServer)
.build());
}
示例12: onCreate
import com.parse.Parse; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Parse.enableLocalDatastore(this);
ParseObject.registerSubclass(Event.class);
ParseObject.registerSubclass(Faculty.class);
Parse.initialize(this);
initializeDeviceId();
}
示例13: onInit
import com.parse.Parse; //导入方法依赖的package包/类
public void onInit(Context context) {
this.appContext = context.getApplicationContext();
Parse.enableLocalDatastore(appContext);
Parse.initialize(context, ParseAppID, ParseClientKey);
// Parse.initialize(new Parse.Configuration.Builder(appContext)
// .applicationId(ParseAppID)
// .server("http://114.215.141.221:1337/parse/")
// .build());
}
示例14: onCreate
import com.parse.Parse; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_redirect);
// Initialize Parse
try {
Parse.enableLocalDatastore(this);
Parse.initialize(this, "hL3tRVlLb2ru2fc3CEVkzWKNyXnR2eBuprD1eTTC", "Bp10SKAGT7Q2CK60qeHiLeH5dGqqTQobezET46GF");
} catch (RuntimeException re) {
Log.v("Parse", "Unable to initialize");
}
sessionManager = new SessionManager(getApplicationContext());
Class activity;
if (sessionManager.isLoggedIn()) {
// Open main screen
activity = TeamListActivity.class;
} else {
// Open login screen
activity = LoginActivity.class;
}
// Start new activity and finish this
startActivity(new Intent(this, activity));
finish();
overridePendingTransition(0, 0);
}
示例15: onCreate
import com.parse.Parse; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
// parse stuff
// Enable Local Datastore.
Parse.enableLocalDatastore(this);
Parse.initialize(this, "GxjbG5WjErNyikhLsG4Dmb276txlYmCsJg1onPgi", "keo5ziWIgz5txlDXqi4Xxx3DiVxcN1afaJzWNoa9");
ParseFacebookUtils.initialize(this);
// firebase stuff
Firebase.setAndroidContext(this);
}