Java 类com.parse.Parse 实例源码
项目:AshaNetApp
文件:AshaNetApp.java
@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);
}
}
项目:WatsiAndroidApp
文件:ParseLoginActivity.java
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;
}
项目:PhotoShare
文件:PrsApplication.java
@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);
}
项目:My-Sheep
文件:ParseApplication.java
@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);
}
项目:UCOmove
文件:UCOmoveApplication.java
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);
}
项目:ParseLiveo
文件:ParsePushApp.java
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!");
}
}
});
}
项目:RegLog
文件:SampleApplication.java
@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);
}
项目:Madad_SOS
文件:StartApp.java
@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);
}
项目:Marketplace
文件:StarterApplication.java
@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);
}
项目:note.cntxt
文件:MyApplication.java
@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();
}
项目:langren
文件:MainApplication.java
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);
}
项目:HackathonPADLS
文件:StarterApplication.java
@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);
}
项目:App_2016
文件:parse_config.java
@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.");
}
项目:Snapchat-parse
文件:StarterApplication.java
@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);
}
项目:androidMobileDeviceManager
文件:BootstrapApplication.java
@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);
}
项目:libertacao-android
文件:ParseLoginActivity.java
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;
}
项目:libertacao-android
文件:ParseLoginActivity.java
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;
}
项目:libertacao-android
文件:MyApp.java
private void setupParse() {
Parse.initialize(this, getString(R.string.parse_app_id), getString(R.string.parse_client_key));
ParseFacebookUtils.initialize(this);
if(ParseUser.getCurrentUser() != null && !UserPreferences.isUserAssociatedWithInstallation()) {
// This should be done only once
ParseInstallation currentInstallation = ParseInstallation.getCurrentInstallation();
currentInstallation.put("user", ParseUser.getCurrentUser());
currentInstallation.saveInBackground(new SaveCallback() {
@Override
public void done(ParseException e) {
if(e != null) {
Timber.d("Error when trying to associate user with installation: " + e.getLocalizedMessage());
} else {
Timber.d("User successfully associated with installation");
UserPreferences.setUserAssociatedWithInstallation();
}
}
});
}
}
项目:GitTracker
文件:GitTracker.java
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();
}
}
项目:androidClient
文件:Burrd.java
@Override
public void onCreate() {
super.onCreate();
// Enable Local Datastore.
Parse.enableLocalDatastore(this);
// Setup Model objects
ParseObject.registerSubclass(DealModel.class);
ParseObject.registerSubclass(RestaurantModel.class);
// Production Database
//Parse.initialize(this, "2TR1bOpjpFL8Wm7a7TXcbuoFCyJRB0VdSOXnf8tB", "hY2oFPc3k8RJLsZIsadM1Me0JS1ndnwRwim104WK");
// Setup Parse db connection
Parse.initialize(this, "zjbuJvWrvzgdpDvRnHejLD008hLGf6zHua5nCGvq", "7DegaPYh670uARgycPIDmt6yQgM2x6XvRDo5o6vI");
DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder()
.cacheInMemory(true)
.cacheOnDisk(true)
.build();
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this)
.defaultDisplayImageOptions(defaultOptions)
.build();
ImageLoader.getInstance().init(config);
}
项目:WordCamp-Android
文件:MyApplication.java
@Override
public void onCreate() {
super.onCreate();
ParseCrashReporting.enable(this);
Parse.initialize(this, BuildConfig.PARSE_APPKEY,
BuildConfig.PARSE_TOKEN);
ParsePush.subscribeInBackground("wc", new SaveCallback() {
@Override
public void done(ParseException e) {
if (e == null) {
Log.e("push", "successfully subscribed to the broadcast channel.");
} else {
Log.e("push", "failed to subscribe for push", e);
}
}
});
}
项目:seglio
文件:Biblio.java
@Override
public void onCreate()
{
super.onCreate();
Parse.initialize(new Parse.Configuration.Builder(this).applicationId(getResources().getString(R.string.app_id)).clientKey(getResources().getString(R.string.client_key)).server("https://parseapi.back4app.com").build());
ParseInstallation installation = ParseInstallation.getCurrentInstallation();
installation.put("GCMSenderId", "644469506430");
installation.saveInBackground();
FacebookSdk.sdkInitialize(this);
printHashkey();
nitems.add(new NavigationItem(R.drawable.search, "Search"));
nitems.add(new NavigationItem(R.drawable.recent,"Recent"));
nitems.add(new NavigationItem(R.drawable.npost,"Post"));
litems.add(new NavigationItem(R.drawable.myposts, "My Posts"));
//litems.add(new NavigationItem(R.drawable.star,"My Bookmarks"));
}
项目:SyncNotes
文件:ParseLoginActivity.java
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;
}
项目:ClassDiscuss
文件:ChannelsTest.java
public void setUp() {
context = this.getInstrumentation().getTargetContext().getApplicationContext();
String YOUR_APPLICATION_ID = "OuWwbxVpRVfWh0v3jHEvYeKuuNijBd6M1fVBlkWA";
String YOUR_CLIENT_KEY = "pYhzGaediLuDVUgQmkuMDkA1DUdKIBtzSziLBdnQ";
Parse.initialize(context, YOUR_APPLICATION_ID, YOUR_CLIENT_KEY);
String loginUser = "vsawyer1";
ParseUser.logInInBackground(loginUser, loginUser, new LogInCallback() {
@Override
public void done(ParseUser parseUser, com.parse.ParseException e) {
}
});
channels.addChannel("CMPUT 101");
channels.addChannel("CMPUT 102");
}
项目:ClassDiscuss
文件:OtherUsersTest.java
public void setUp() {
context = this.getInstrumentation().getTargetContext().getApplicationContext();
String YOUR_APPLICATION_ID = "OuWwbxVpRVfWh0v3jHEvYeKuuNijBd6M1fVBlkWA";
String YOUR_CLIENT_KEY = "pYhzGaediLuDVUgQmkuMDkA1DUdKIBtzSziLBdnQ";
Parse.initialize(context, YOUR_APPLICATION_ID, YOUR_CLIENT_KEY);
String loginUser = "nbui";
ParseUser.logInInBackground(loginUser, loginUser, new LogInCallback() {
public void done(ParseUser user, ParseException e) {
}
});
String name = "Dave";
String name1 = "Sara";
double latitude = 20;
double longitude =10;
double latitude1 = 21;
double longitude1 =11;
String Channels= "CMPUT101=active&CMPUT102=unActive";
Bitmap pic = BitmapFactory.decodeResource(context.getResources(), R.drawable.ic_noimage);
users.updateOtherUsersInfo(name, latitude1, longitude1, Channels, pic);
users.updateOtherUsersInfo(name1, latitude, longitude, Channels, pic);
}
项目:hojenaoapp
文件:HojeNaoApplication.java
@Override
public void onCreate() {
super.onCreate();
// Enable Local Datastore.
Parse.enableLocalDatastore(this);
// Add your initialization code here
Parse.initialize(this, "N9AKD8DZNDCbWl400vyBSRgVyIbwFSFtvkf6pMNs", "zlm4CWwK59AVxL2TsL67ytNPIplTXvxUnObEJ84h");
ClockDatabaseHelper clockDatabaseHelper = new ClockDatabaseHelper(getApplicationContext());
List<AlarmClock> alarmClocks = clockDatabaseHelper.recuperarListAlarmes();
for(AlarmClock alarmClock : alarmClocks){
AlarmUtil.configureAlarm(alarmClock,getApplicationContext(),true);
}
}
项目:sensorama
文件:MainActivity.java
private void parseBootstrap() {
try {
Thread.sleep(3000);
} catch(InterruptedException ex) {
Thread.currentThread().interrupt();
}
ParseAnalytics.trackAppOpenedInBackground(getIntent());
Parse.setLogLevel(Parse.LOG_LEVEL_DEBUG);
for (int i = 0; i < 1; i++) {
System.out.print("XXX wrinting" + i);
ParseObject testObject = new ParseObject("TestObject");
testObject.put("foo", "bar");
testObject.saveInBackground();
}
Map<String, String> dimensions = new HashMap<String, String>();
// What type of news is this?
dimensions.put("category", "politics");
// Is it a weekday or the weekend?
dimensions.put("dayType", "weekday");
// Send the dimensions to Parse along with the 'read' event
ParseAnalytics.trackEventInBackground("read", dimensions);
}
项目:AutoTimeHelper
文件:ParseLoginActivity.java
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;
}
项目:AutoTimeHelper
文件:Registration.java
@Override
protected void onCreate(Bundle savedInstanceState) {
Log.e(AppConstants.MY_TAG, "start onCreate");
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_reg);
Parse.initialize(this, "WznVOUle48rO59oeYjf0e4zuVf7m7DESc5F5G1W6",
"PnuKImXNUNK6yFEXgj4r9bjcw6c0hVBo8aMLiFgk");
etEmail = (EditText) findViewById(R.id.etEmail2);
etNick = (EditText) findViewById(R.id.etNick2);
etPhoneNumber = (EditText) findViewById(R.id.etPhoneNumber);
btnActivityReg = (Button) findViewById(R.id.btnActivityReg);
btnActivityReg.setOnClickListener(this);
}
项目:AutoTimeHelper
文件:Login.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_loginmain);
Parse.initialize(this, "WznVOUle48rO59oeYjf0e4zuVf7m7DESc5F5G1W6",
"PnuKImXNUNK6yFEXgj4r9bjcw6c0hVBo8aMLiFgk");
etEmail = (EditText) findViewById(R.id.etEmail);
etNick = (EditText) findViewById(R.id.etNick);
btnLogin = (Button) findViewById(R.id.btnLogin);
btnLogin.setOnClickListener(this);
btnReg = (Button) findViewById(R.id.btnReg);
btnReg.setOnClickListener(this);
handler = new Handler() {
public void handleMessage(android.os.Message msg) {
Toast.makeText(Login.this, "Please wait", Toast.LENGTH_SHORT)
.show();
login();
}
};
}
项目:connectedteam-android
文件:ConnectedApp.java
@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());
//
}
项目:RxParse
文件:RxParseApplication.java
@Override
public void onCreate() {
super.onCreate();
//Timber.plant(new Timber.DebugTree());
//ParseACL defaultACL = new ParseACL();
//ParseACL.setDefaultACL(defaultACL, true);
//Parse.enableLocalDatastore(getApplicationContext());
Parse.initialize(this, getString(R.string.parse_app_id), getString(R.string.parse_client_key));
//ParseInstallation.getCurrentInstallation().saveInBackground();
//ParseFacebookUtils.initialize(getString(R.string.app_id));
//
//ParseInstallation.getCurrentInstallation().saveInBackground();
Fresco.initialize(this);
}
项目:RxParse
文件:RxParseApplication.java
@Override
public void onCreate() {
super.onCreate();
//Timber.plant(new Timber.DebugTree());
//ParseACL defaultACL = new ParseACL();
//ParseACL.setDefaultACL(defaultACL, true);
//Parse.enableLocalDatastore(getApplicationContext());
Parse.initialize(this, getString(R.string.parse_app_id), getString(R.string.parse_client_key));
//ParseInstallation.getCurrentInstallation().saveInBackground();
//ParseFacebookUtils.initialize(getString(R.string.app_id));
//
//ParseInstallation.getCurrentInstallation().saveInBackground();
Fresco.initialize(this);
}
项目:AnyWall
文件:Application.java
@Override
public void onCreate() {
super.onCreate();
ParseObject.registerSubclass(AnywallPost.class);
// Enable Local Datastore.
Parse.enableLocalDatastore(this);
Parse.initialize(this, "pky8sZPYZY5DzyRAGFXFep8pU0MubVDAHYvSlBnm", "zdETW2V9TprpkGfXQJ2JXP1qY6BnEmvdWY841Ojm");
// Parse.initialize(this, "YOUR_PARSE_APPLICATION_ID", "YOUR_PARSE_CLIENT_KEY");
preferences = getSharedPreferences("com.parse.anywall", Context.MODE_PRIVATE);
configHelper = new ConfigHelper();
configHelper.fetchConfigIfNeeded();
}
项目:HMS3310
文件:MainActivity.java
@Override
protected void onCreate(Bundle savedInstanceState)
{
// Enable Local Datastore.
Parse.enableLocalDatastore(this);
Parse.initialize(this, "cJNtcpbBye411pXYhnIUtQVeLBMQMKbWZ5CoNb5D", "XNe6Tbiwhlu15tmbsN4Ac7IFg7ENcpLP2cuJw5pU");
ParseObject testObject = new ParseObject("TestObject");
testObject.put("foo", "bar");
testObject.saveInBackground();
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
}
项目:Makadu_Android
文件:ParseApplication.java
@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);
}
项目:android_example_todo
文件:ToDoApp.java
@Override
public void onCreate() {
super.onCreate();
// Register _ToDo_ class to use with Parse functions
ParseObject.registerSubclass(ParseToDo.class);
ParseObject.registerSubclass(ParseProject.class);
// initializing Parse account with App ID and Client ID
Parse.initialize(this, ParseKeys.APPLICATION_ID,
ParseKeys.CLIENT_KEY);
JSONObject o = new JSONObject();
// initialize SharedPreferences
mSharedPreferencesUserSettings = getSharedPreferences(SHARED_PREFS_USER_SETTINGS, MODE_MULTI_PROCESS);
Utils.setAppContext(getApplicationContext());
}
项目:Nefete
文件:NefeteApp.java
@Override public void onCreate() {
super.onCreate();
Parse.initialize(this, "aTAL8FkWWQRG2bsilzCzwQpVMY2YCK8skFryZIFa", "vLefUWhxBk12E8X4oighFYt25iGnMYRTUP58RDJg");
ParseFacebookUtils.initialize(getString(R.string.app_id));
PushService.setDefaultPushCallback(this, ViewActivity.class);
ParseInstallation.getCurrentInstallation().saveInBackground();
if (BuildConfig.DEBUG) {
Timber.plant(new DebugTree());
} else {
// TODO Crashlytics.start(this);
// TODO Timber.plant(new CrashlyticsTree());
}
applicationGraph = ObjectGraph.create(getModules().toArray());
}