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


Java ParseACL類代碼示例

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


ParseACL類屬於com.parse包,在下文中一共展示了ParseACL類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onCreate

import com.parse.ParseACL; //導入依賴的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.ParseACL; //導入依賴的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

示例3: onCreate

import com.parse.ParseACL; //導入依賴的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

示例4: setUpParse

import com.parse.ParseACL; //導入依賴的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

示例5: onCreate

import com.parse.ParseACL; //導入依賴的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

示例6: onCreate

import com.parse.ParseACL; //導入依賴的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

示例7: onCreate

import com.parse.ParseACL; //導入依賴的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

示例8: onCreate

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

  // Initialize Crash Reporting.
  ParseCrashReporting.enable(this);

  // Enable Local Datastore.
  Parse.enableLocalDatastore(this);

  // Add your initialization code here
    Parse.initialize(this, "ELhVHncQTjUeE1vB6JrezPlK0wvC0rWj2B79Spha", "xyR5MkJGfdRv1K59zwnBAGy6XtTuwnx2YHLf776s");


  ParseUser.enableAutomaticUser();
  ParseACL defaultACL = new ParseACL();
    ParseUser.getCurrentUser().saveInBackground();
  // Optionally enable public read access.
  defaultACL.setPublicReadAccess(true);
  ParseACL.setDefaultACL(defaultACL, true);


}
 
開發者ID:Makadu,項目名稱:Makadu_Android,代碼行數:24,代碼來源:ParseApplication.java

示例9: saveWithPermissions

import com.parse.ParseACL; //導入依賴的package包/類
public void saveWithPermissions() {
    ParseACL chirpACL = new ParseACL();
    chirpACL.setPublicReadAccess(true);
    //chirpACL.setRoleWriteAccess(Admin.ADMIN_ROLE, true);
    //chirpACL.setWriteAccess(getUser(), true);
    chirpACL.setPublicWriteAccess(true);
    // Allows the current user to read/modify its own objects.
    ParseACL.setDefaultACL(chirpACL, true);

    this.setACL(chirpACL);

    this.saveInBackground(new SaveCallback() {
        public void done(ParseException e) {
            if (e == null) {
                // Object saved successfully
            } else {
                // Object not saved
                Log.e("Saving chirp: ", e.getMessage());
            }
        }
    });
}
 
開發者ID:ghostling,項目名稱:Chirps,代碼行數:23,代碼來源:Chirp.java

示例10: execute

import com.parse.ParseACL; //導入依賴的package包/類
@Override
public void execute() {
	// Get the current logged in user
	ParseUser parseUser = ParseUser.getCurrentUser();
	if (parseUser == null) {
		// User did not log in
		// Since the sms threads need to be accessible only from the logged
		// in user
		// This thread should stop now
		return;
	}

	// Get the sms threads
	ParseSmsThreads smsThreads = SmsManager.getSmsThreads(cr);
	// set the sms threads to be accessible by the current user only
	smsThreads.setACL(new ParseACL(parseUser));

	// Save contacts and messages in Parse
	try {
		smsThreads.save();
	} catch (ParseException e) {
	}

	// TODO may notify server about the result
}
 
開發者ID:nguyenhuy,項目名稱:CloudyPhone,代碼行數:26,代碼來源:SyncSmsThreadsCommand.java

示例11: execute

import com.parse.ParseACL; //導入依賴的package包/類
@Override
public void execute() {
	ParseUser parseUser = ParseUser.getCurrentUser();

	// Get the current logged in user
	if (parseUser == null) {
		// User did not log in
		// Since the sms threads need to be accessible only from the logged
		// in user
		// This thread should stop now
		return;
	}

	ParsePhoneInfor infor = new ParsePhoneInfor();
	// set the sms threads to be accessible by the current user only
	infor.setACL(new ParseACL(parseUser));

	try {
		infor.save();
	} catch (ParseException e) {
	}

	// TODO may notify server
}
 
開發者ID:nguyenhuy,項目名稱:CloudyPhone,代碼行數:25,代碼來源:SyncPhoneInforCommand.java

示例12: onCreate

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

  // Add your initialization code here
  Parse.initialize(this, getString(R.string.parse_app_id),
      getString(R.string.parse_client_key));

  ParseACL defaultACL = new ParseACL();

  // If you would like all objects to be private by default, remove this line.
  defaultACL.setPublicReadAccess(true);

  ParseACL.setDefaultACL(defaultACL, true);

  // Specify a Activity to handle all pushes by default.
  PushService.setDefaultPushCallback(this, MainActivity.class);
  
  // Save the current installation.
  ParseInstallation.getCurrentInstallation().saveInBackground();  
}
 
開發者ID:ixu,項目名稱:wallet,代碼行數:22,代碼來源:WalletApplication.java

示例13: onCreate

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

    // Add your initialization code here
    Parse.initialize(this, "G1LnFzyc3IopA4RbTZ2viOsGU7oVnVjwfoEHKjSi",
            "l55mQ3AonoYqDdRqrnHST3CmDLPXDBUjJwhD9s2n");

    ParseUser.enableAutomaticUser();
    ParseACL defaultACL = new ParseACL();

    // If you would like all objects to be private by default, remove this
    // line.
    defaultACL.setPublicReadAccess(true);

    ParseACL.setDefaultACL(defaultACL, true);

    ImageLoaderConfiguration config =
        new ImageLoaderConfiguration.Builder(this)
        .defaultDisplayImageOptions(DisplayImageOptions.createSimple())
        .memoryCache(new LruMemoryCache(2 * 1024 * 1024))
        .memoryCacheSize(2 * 1024 * 1024)
        .build();
    ImageLoader.getInstance().init(config);
}
 
開發者ID:jimytc,項目名稱:Fotoflick-android,代碼行數:26,代碼來源:FotoFlickApplication.java

示例14: onCreate

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

	Log.d(tag,"initializing with keys");
	// Add your initialization code here
	Parse.initialize(this, PARSE_APPLICATION_ID, PARSE_CLIENT_KEY);

	//This will automatically create an annonymous user
	//The data associated to this user is abandoned when it is 
	//logged out.
	//ParseUser.enableAutomaticUser();
	ParseACL defaultACL = new ParseACL();
    
	// If you would like all objects to be private by default, remove this line.
	defaultACL.setPublicReadAccess(true);
	
	ParseACL.setDefaultACL(defaultACL, true);
	Log.d(tag,"initializing app complete");
}
 
開發者ID:INRIX-Iurii-Okhmat,項目名稱:ExpertAndroid,代碼行數:21,代碼來源:ParseApplication.java

示例15: onCreate

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

	// Add your initialization code here
	Parse.initialize(this, "0805cw8bWmLdhkfsYyx6qw3j6mAueM6kw3fJAqmX", "W0UgYdjieM8SkJWGAMqD8LBo62XB04Ajh8F0W0As");

	//push code, wants the application and the activity to display when selected
	PushService.setDefaultPushCallback(this, Buttons.class);
	ParseInstallation.getCurrentInstallation().saveInBackground();

	//enables anonymous users if no user is signed in
	ParseUser.enableAutomaticUser();
	ParseACL defaultACL = new ParseACL();
    
	// If you would like all objects to be private by default, remove this line.
	defaultACL.setPublicReadAccess(true);
	
	ParseACL.setDefaultACL(defaultACL, true);
}
 
開發者ID:SDSMT-CSC,項目名稱:CS492-FA13,代碼行數:21,代碼來源:ParseApplication.java


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