當前位置: 首頁>>代碼示例>>Java>>正文


Java Parse類代碼示例

本文整理匯總了Java中com.parse.Parse的典型用法代碼示例。如果您正苦於以下問題:Java Parse類的具體用法?Java Parse怎麽用?Java Parse使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Parse類屬於com.parse包,在下文中一共展示了Parse類的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: onCreate

import com.parse.Parse; //導入依賴的package包/類
@Override
public void onCreate() {
    Log.d("DEBUG", "Creating TypeMaps");
    typeMaps = new TypeMaps();
    super.onCreate();
    CalligraphyConfig.initDefault
        ("Gotham-Light.ttf", R.attr.fontPath);
    LineNumberReader lnr = new LineNumberReader
        (new InputStreamReader
         (getResources().openRawResource(R.raw.keys)));

    registerClasses();

    String parseClientKey;

    try {
        parseAppId = lnr.readLine();
        parseClientKey = lnr.readLine();

        Parse.initialize(this, parseAppId, parseClientKey);
        Log.d("DEBUG", "Successfully initialized");
    }
    catch (IOException ioe) {
        Log.e("DEBUG", "Failed to read keys", ioe);
    }
}
 
開發者ID:samv,項目名稱:AshaNetApp,代碼行數:27,代碼來源:AshaNetApp.java

示例3: getMergedOptions

import com.parse.Parse; //導入依賴的package包/類
private Bundle getMergedOptions() {
  // Read activity metadata from AndroidManifest.xml
  ActivityInfo activityInfo = null;
  try {
    activityInfo = getPackageManager().getActivityInfo(
        this.getComponentName(), PackageManager.GET_META_DATA);
  } catch (NameNotFoundException e) {
    if (Parse.getLogLevel() <= Parse.LOG_LEVEL_ERROR &&
        Log.isLoggable(LOG_TAG, Log.WARN)) {
      Log.w(LOG_TAG, e.getMessage());
    }
  }

  // The options specified in the Intent (from ParseLoginBuilder) will
  // override any duplicate options specified in the activity metadata
  Bundle mergedOptions = new Bundle();
  if (activityInfo != null && activityInfo.metaData != null) {
    mergedOptions.putAll(activityInfo.metaData);
  }
  if (getIntent().getExtras() != null) {
    mergedOptions.putAll(getIntent().getExtras());
  }

  return mergedOptions;
}
 
開發者ID:rutvijkumarshah,項目名稱:WatsiAndroidApp,代碼行數:26,代碼來源:ParseLoginActivity.java

示例4: onCreate

import com.parse.Parse; //導入依賴的package包/類
@Override
public void onCreate() {
	super.onCreate();

	ParseObject.registerSubclass(PrsPhoto.class);

	/*
	 * Fill in this section with your Parse credentials
	 */
	Parse.initialize(this, "VgUmqfwmveatEK77VKqejESUi9g2YTiLd5ARi5Zv", "rZOccIO0y35BMrfv599RyclrNo5QT308WRCLkTnY");

	// annonymous user
	ParseUser.enableAutomaticUser();

	/*
	 * For more information on app security and Parse ACL:
	 * https://www.parse.com/docs/android_guide#security-recommendations
	 */
	ParseACL defaultACL = new ParseACL();

	defaultACL.setPublicReadAccess(true);

	ParseACL.setDefaultACL(defaultACL, true);
}
 
開發者ID:triestpa,項目名稱:PhotoShare,代碼行數:25,代碼來源:PrsApplication.java

示例5: onCreate

import com.parse.Parse; //導入依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    ParseObject.registerSubclass(Kid.class);
    ParseObject.registerSubclass(Visit.class);
    ParseObject.registerSubclass(Attendance.class);
    Parse.initialize(new  Parse.Configuration.Builder(this)
            .applicationId("PARSE applicationId to be added here")
            .clientKey("Parse Client Id to be added here")
            .server("Parse server address to be added here").enableLocalDataStore().build());

    ParseUser.enableAutomaticUser();
    ParseACL defaultACL = new ParseACL();
    defaultACL.setPublicReadAccess(true);
    defaultACL.setPublicWriteAccess(true);
    ParseACL.setDefaultACL(defaultACL, true);
}
 
開發者ID:amir511,項目名稱:My-Sheep,代碼行數:18,代碼來源:ParseApplication.java

示例6: setupParse

import com.parse.Parse; //導入依賴的package包/類
private void setupParse() {
    Parse.initialize(this);

    Parse.setLogLevel(
            BuildConfig.DEBUG ?
                    Parse.LOG_LEVEL_VERBOSE :
                    Parse.LOG_LEVEL_NONE);

    ParseInstallation parseInstallation = ParseInstallation.getCurrentInstallation();
    parseInstallation.increment("uses");
    parseInstallation.saveInBackground();

    ParsePush.subscribeInBackground("");
    ParsePush.subscribeInBackground("general");
    ParsePush.subscribeInBackground("warning");
    ParsePush.subscribeInBackground("news");

    ParseLocation.registerSubclass(ParseLocation.class);
    Schedule.registerSubclass(Schedule.class);
    Price.registerSubclass(Price.class);
    New.registerSubclass(New.class);
}
 
開發者ID:Gnzlt,項目名稱:UCOmove,代碼行數:23,代碼來源:UCOmoveApplication.java

示例7: 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

示例8: 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

示例9: 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

示例10: onCreate

import com.parse.Parse; //導入依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();

    ParseObject.registerSubclass(Organization.class);
    ParseObject.registerSubclass(UserBeacon.class);
    ParseObject.registerSubclass(CustomUser.class);
    ParseObject.registerSubclass(Note.class);

    Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())
            .applicationId(Parse_appID)
            .clientKey(null)
            .addNetworkInterceptor(new ParseLogInterceptor())
            .enableLocalDataStore() //enable local datastore within initialization since hosted elsewhere
            .server("http://estinote.herokuapp.com/parse/") // The trailing slash is important.
    .build()
    );

    //scan();
}
 
開發者ID:donniepropst,項目名稱:note.cntxt,代碼行數:21,代碼來源:MyApplication.java

示例11: init

import com.parse.Parse; //導入依賴的package包/類
public void init() {

        MainApplication.ServerHost = getSharedPreferences("ip",MODE_PRIVATE).getString("ip",null);

        if(MainApplication.ServerHost==null)
            MainApplication.ServerHost = Constants.ServerHost;
        Fresco.initialize(getApplicationContext());

        ParseObject.registerSubclass(UserInfo.class);
        Parse.initialize(new Parse.Configuration.Builder(this)
                .applicationId("langrensha")
                .clientKey("")
                .server(Constants.makeNewIpAddress(MainApplication.ServerHost) + "/parse")
                .enableLocalDataStore()
                .build()
        );


        initSocket();

        SoundEffectManager.init(this);
    }
 
開發者ID:whu-iss-jack,項目名稱:langren,代碼行數:23,代碼來源:MainApplication.java

示例12: 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

示例13: 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

示例14: onCreate

import com.parse.Parse; //導入依賴的package包/類
@Override
  public void onCreate() {
      super.onCreate();

      instance = this;

      // Perform injection
      Injector.init(getRootModule(), this);
      // Enable Local Datastore.
     // Parse.enableLocalDatastore(this);
ParseObject.registerSubclass(Device.class);
      // Add your initialization code here
Parse.initialize(this, "qKYdojVtMPjHxhNMJZ8sIlPVdKJQZYlFcaPfhKts", "lgrLheiLQXSX5v58d3XMxgBsethavM2aQMnE27m8");
ParseUser.enableRevocableSessionInBackground();
ParseUser.enableAutomaticUser();
      ParseACL defaultACL = new ParseACL();
      // Optionally enable public read access.
       defaultACL.setPublicReadAccess(true);
defaultACL.setPublicWriteAccess(true);
      ParseACL.setDefaultACL(defaultACL, true);


  }
 
開發者ID:pagesjaunes,項目名稱:androidMobileDeviceManager,代碼行數:24,代碼來源:BootstrapApplication.java

示例15: getMergedOptions

import com.parse.Parse; //導入依賴的package包/類
private Bundle getMergedOptions() {
    // Read activity metadata from AndroidManifest.xml
    ActivityInfo activityInfo = null;
    try {
        activityInfo = getPackageManager().getActivityInfo(
                this.getComponentName(), PackageManager.GET_META_DATA);
    } catch (NameNotFoundException e) {
        if (Parse.getLogLevel() <= Parse.LOG_LEVEL_ERROR &&
                Log.isLoggable("ParseLoginActivity", Log.WARN)) {
            Log.w("ParseLoginActivity", e.getMessage());
        }
    }

    // The options specified in the Intent (from ParseLoginBuilder) will
    // override any duplicate options specified in the activity metadata
    Bundle mergedOptions = new Bundle();
    if (activityInfo != null && activityInfo.metaData != null) {
        mergedOptions.putAll(activityInfo.metaData);
    }
    if (getIntent().getExtras() != null) {
        mergedOptions.putAll(getIntent().getExtras());
    }

    return mergedOptions;
}
 
開發者ID:LibertACAO,項目名稱:libertacao-android,代碼行數:26,代碼來源:ParseLoginActivity.java


注:本文中的com.parse.Parse類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。