當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。