当前位置: 首页>>代码示例>>Java>>正文


Java Parse.enableLocalDatastore方法代码示例

本文整理汇总了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);
}
 
开发者ID:AvijitGhosh82,项目名称:Madad_SOS,代码行数:17,代码来源:StartApp.java

示例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!");
                }
            }
        });
    }
 
开发者ID:rudsonlive,项目名称:ParseLiveo,代码行数:23,代码来源:ParsePushApp.java

示例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);
}
 
开发者ID:Antpachon,项目名称:RegLog,代码行数:17,代码来源:SampleApplication.java

示例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);
}
 
开发者ID:BehrouzRiahu,项目名称:Marketplace,代码行数:17,代码来源:StarterApplication.java

示例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);

}
 
开发者ID:Nyceane,项目名称:HackathonPADLS,代码行数:19,代码来源:StarterApplication.java

示例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.");
}
 
开发者ID:Aparoksha,项目名称:App_2016,代码行数:17,代码来源:parse_config.java

示例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());
//


	 }
 
开发者ID:rockgecko-development,项目名称:connectedteam-android,代码行数:24,代码来源:ConnectedApp.java

示例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();
    }
}
 
开发者ID:nitish-kasturia,项目名称:GitTracker,代码行数:23,代码来源:GitTracker.java

示例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);
        }
    });
}
 
开发者ID:sahildave,项目名称:Gazetti_Newspaper_Reader,代码行数:23,代码来源:StarterApplication.java

示例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);
}
 
开发者ID:FilipeAlbuquerque,项目名称:EletroFisio,代码行数:36,代码来源:StarterApplication.java

示例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());
	}
 
开发者ID:mangestudio,项目名称:GCSApp,代码行数:10,代码来源:ParseManager.java

示例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();
}
 
开发者ID:JavonDavis,项目名称:UWI-Research-Days-Android,代码行数:10,代码来源:ParseController.java

示例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());
	}
 
开发者ID:laoduDYM,项目名称:ChatDemoUI3.0,代码行数:10,代码来源:ParseManager.java

示例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);

}
 
开发者ID:sirvar,项目名称:roboscout,代码行数:32,代码来源:RedirectActivity.java

示例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);
}
 
开发者ID:fadelakin,项目名称:bitdate,代码行数:14,代码来源:BitDateApplication.java


注:本文中的com.parse.Parse.enableLocalDatastore方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。