@Override
 public void onCreate() {
   super.onCreate();
   // Enable Local Datastore.
   Parse.enableLocalDatastore(this);
   Parse.initialize(this, "KEY for APP", "KEY");
 }
 public static void initializeParseWithApplication(Application app) {
   String appId = getStringByKey(app, "parse_app_id");
   String clientKey = getStringByKey(app, "parse_client_key");
   Parse.enableLocalDatastore(app);
   Log.d(TAG, "Initializing with parse_app_id: " + appId + " and parse_client_key:" + clientKey);
   Parse.initialize(app, appId, clientKey);
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_splash_screen);

    Parse.enableLocalDatastore(this);
    Parse.initialize(
        this,
        "7vSyv24nR2necel9ZHAQhWHkYkRhqTcEZ7jIzBHM",
        "XoFRVbEFvjAlElvdoWJMdEu8TziEb5JXcLulpwti");
    ParseUser.enableRevocableSessionInBackground();
    ParseObject.registerSubclass(Message.class);

    new Handler()
        .postDelayed(
            new Runnable() {
              @Override
              public void run() {
                Intent i = new Intent(SplashScreen.this, MainActivity.class);
                startActivity(i);
                finish();
              }
            },
            SPLASH_TIME_OUT);
  }
  @Override
  public void onCreate() {
    super.onCreate();
    // Register your parse models here
    ParseObject.registerSubclass(Address.class);
    ParseObject.registerSubclass(Gym.class);
    ParseObject.registerSubclass(Message.class);
    ParseObject.registerSubclass(SimpleUser.class);
    ParseObject.registerSubclass(Trainer.class);
    ParseObject.registerSubclass(Review.class);
    ParseObject.registerSubclass(TrainerSlots.class);
    ParseObject.registerSubclass(BlockedSlots.class);
    Parse.enableLocalDatastore(this);
    Parse.initialize(this, APPLICATION_ID, CLIENT_KEY);

    ParsePush.subscribeInBackground(
        "",
        new SaveCallback() {
          @Override
          public void done(ParseException e) {
            if (e == null) {
              Log.d("com.parse.push", "successfully subscribed to the broadcast channel.");
              PushService.setDefaultPushCallback(
                  getBaseContext(),
                  ChatActivity.class); // change the class where u want to go after clicking on noti
              ParseInstallation.getCurrentInstallation().saveInBackground();
            } else {
              Log.e("com.parse.push", "failed to subscribe for push", e);
            }
          }
        });

    FacebookSdk.sdkInitialize(getApplicationContext());
  }
 private void initParse() {
   Parse.enableLocalDatastore(this);
   Parse.initialize(
       this,
       "iYp5DMTOJHG4PRFqwXDG35dfquBL2nCjq0wTnFhQ",
       "OzTIYKiuPtsfyQ0Mzphj7mwAVRf44t55P4nwDWug");
 }
 @Override
 public void onCreate() {
   super.onCreate();
   Parse.enableLocalDatastore(this);
   Parse.initialize(this, GlobalConstants.PARSE_APP_ID, GlobalConstants.PARSE_CLIENT_KEY);
   ParseFacebookUtils.initialize(this);
 }
  /**
   * Called when the application is starting, before any activity, service, or receiver objects
   * (excluding content providers) have been created. Implementations should be as quick as possible
   * (for example using lazy initialization of state) since the time spent in this function directly
   * impacts the performance of starting the first activity, service, or receiver in a process. If
   * you override this method, be sure to call super.onCreate().
   */
  @Override
  public void onCreate() {
    super.onCreate();

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

    Parse.initialize(this, APPLICATION_ID, CLIENT_KEY);
  }
 @Override
 public void onCreate() {
   super.onCreate();
   Parse.enableLocalDatastore(this);
   Parse.initialize(
       this,
       "Mqklk5SAQ8Ly56ELccHXsHZR0zWO6clNXgVEVJCx",
       "qDIKbeShJJ1aNzy2PDYiifwfiCbxts9IXg5yxF7H");
 }
Exemple #9
0
 @Override
 public void onCreate() {
   super.onCreate();
   Parse.enableLocalDatastore(this);
   Parse.initialize(
       this,
       "jlsX029F3w8oAtalZNVISW4ePBl4MUcqZdk2Imns",
       "AaIx1BIJQB2tlIxXhNlEgiWOHwIfsOJAlxk8R7kL");
 }
  @Override
  public void onCreate() {
    // Enable Local Datastore.
    Parse.enableLocalDatastore(this);

    Parse.initialize(
        this,
        "HcI2m7OpUO5NopVxBh5R56MM1AaRAKDP0iRIm3BM",
        "GGmKc7OP4uCpYurOahRY7pWbRC3oIFkdBVsHWunj");
  }
Exemple #11
0
  @Override
  public void onCreate() {
    super.onCreate();
    // Enable Local Datastore.
    Parse.enableLocalDatastore(this);

    Parse.initialize(
        this,
        "W02sSJLKjOYpfwGvhnoQnCcEBWE9YaUpyiDo9NDk",
        "mZ4MosRswpsWuxQ2MWu0EOQthayTkyNixAlNS9zr");
  }
Exemple #12
0
 @Override
 public void onCreate() {
   super.onCreate();
   Parse.enableLocalDatastore(this);
   // Parse.initialize(this, "cSsOJ7LrGXXp06GTCLErgrIcbDZO9FatypbVh6jN",
   // "gZrJlTlNjOJ4qsRYYrluqtkEWCbdto0j64PPvT3I");
   Parse.initialize(
       this,
       "gIpNJkEksy2Z4OAoEnHYLglRtK1tvRBeqllMUO7v",
       "m4tFy2KfZXS53avmSlWbGplhAf6D472k5AA17Tx1");
 }
Exemple #13
0
  @Override
  public void onCreate() {
    super.onCreate();
    // Enable Local Datastore.
    Parse.enableLocalDatastore(this);

    Parse.initialize(
        this,
        "VfjkTB5LnYj46Pb38sWrwun6o5jTOJfC2iKAG3Uf",
        "ZwXix5SI8p93s3FlBZegLMEytb73ma6zKR3oGE51");

    ParseInstallation.getCurrentInstallation().saveInBackground();
  }
  @Override
  public void onCreate() {
    super.onCreate();
    // Enable Local Datastore.
    Parse.enableLocalDatastore(this);

    Parse.initialize(
        this,
        "hiN9EO2DV0yHWLoBevqB3ROD4g8V25wwFi4h0uXe",
        "R1UN9xkqW9eUQDBbTRdU6j1JUn3hroWwACem7jjG");

    ParseInstallation.getCurrentInstallation().saveInBackground();
  }
 @Override
 public void onCreate() {
   super.onCreate();
   Parse.enableLocalDatastore(this);
   ParseObject.registerSubclass(Circle.class);
   ParseObject.registerSubclass(UserCircle.class);
   ParseObject.registerSubclass(Friend.class);
   FacebookSdk.sdkInitialize(getApplicationContext());
   Parse.initialize(
       this,
       "Bugsei9yjtBNjH51JSerSEniB895r1zLA3NwFDUO",
       "ilswrJMAc26LQCRptGaMn5XiH5uVTIHrkfLP82W3");
   ParseFacebookUtils.initialize(this);
 }
Exemple #16
0
  @Override
  public void onCreate() {
    super.onCreate();

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

    Parse.initialize(
        this,
        "lbCQLdZ8rXghMiZGCuEpIxvj88Pt5HhXqJ4D4PU0",
        "Yr8YMze4dltTmGbDTwBJ01iByOiaHC7OBnGHIz2e");
    //		 PushService.setDefaultPushCallback(this, ChatListActivity.class
    //		    		);
    ParseInstallation.getCurrentInstallation().saveInBackground();
  }
Exemple #17
0
  @Override
  public void onCreate() {
    super.onCreate();

    // Initialize Parse SDK
    Log.d(TAG, "Initializing Parse SDK");
    // Enable Local Datastore.
    Parse.enableLocalDatastore(this);
    Parse.initialize(
        this,
        "q7kS8LbOzzkfTmwWHm7W2I2F6Ly0fYQtNyOvlwR1",
        "4D5RIxEj9OcXQw38uNjbxORvlMI6yZ1cSTsBvEKx");

    GuidTool GT = new GuidTool(ZionBobApp.this);
  }
  @Override
  public void onCreate() {
    super.onCreate();

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

    // Initialization code here
    Parse.initialize(this);

    ParseUser.enableAutomaticUser();
    ParseACL defaultACL = new ParseACL();
    // Optionally enable public read access.
    // defaultACL.setPublicReadAccess(true);
    ParseACL.setDefaultACL(defaultACL, true);
  }
  // See: http://stackoverflow.com/q/30135858
  @Override
  public void onCreate() {
    super.onCreate();

    ParseObject.registerSubclass(Album.class);
    ParseObject.registerSubclass(Photo.class);
    ParseObject.registerSubclass(Comment.class);
    ParseObject.registerSubclass(Feed.class);

    Parse.enableLocalDatastore(this);
    Parse.initialize(
        this,
        "JKF0NbqkkyhUFhelLkqQhjbUMeMeqveLPwfcpbvv",
        "90ig345UBcaoriqawpM7iYfrnRueWqNlLYYGL70C");
    ParseFacebookUtils.initialize(this);
  }
Exemple #20
0
  @Override
  public void onCreate() {
    super.onCreate();
    ParseCrashReporting.enable(this);
    Parse.enableLocalDatastore(this);
    Parse.initialize(this, getString(R.string.ApplicationID), getString(R.string.Client_ID));
    // This allows read access to all objects
    PushService.setDefaultPushCallback(this, LoginActivity.class);
    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);
  }
Exemple #21
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    Parse.enableLocalDatastore(this);
    Parse.initialize(
        this,
        "BOiMs1Hj1bSLyLb1p3IHAtRtjQpE4wvOHUtUjnyX",
        "DCYjcPjkyyHg21qN0MOsrKjso0dTVkdB1Gf8AcEH");

    DataOperator dataOperator = DataOperator.getDataOperator();
    dataOperator.loadRestaurantLists();
    // dataOperator.cleanAllLocalData();
    // dataOperator.createTestData();

  }
  @Override
  public void onCreate() {
    super.onCreate();

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

    // Add your initialization code here
    Parse.initialize(
        this,
        "nn1ws1fOCe0X5qjc4AeZUhiyLyqv4grd2VKHZH7W",
        "pBx1g78sn4icaH0ROV8GQ8RurNt5rUDC39BheFwv");

    ParseUser.enableAutomaticUser();
    ParseACL defaultACL = new ParseACL();
    // Optionally enable public read access.
    // defaultACL.setPublicReadAccess(true);
    ParseACL.setDefaultACL(defaultACL, true);
  }
Exemple #23
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    // create connection to parse database
    Parse.enableLocalDatastore(getApplicationContext());
    Parse.initialize(
        getApplicationContext(),
        "MEd9C5XGBe2Lab1n4CsOb03GGs5Qc4A5zlJuuacM",
        "EKlRqaNIp2tGJNz8G2jXehH41fdgMS1fQifCObJB");

    // determining which screen to go to by checking if a user is logged in
    Intent intent =
        (ParseHandler.getParseHandler().isUserLoggedIn())
            ? new Intent(this, ViewMenuActivity.class)
            : new Intent(this, LoginActivity.class);
    startActivity(intent);
  }
  @Override
  public void onCreate() {
    super.onCreate();

    Foreground.init(this);

    myMediaPlayer = new MediaPlayer();
    myMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);

    geoSans = Typeface.createFromAsset(this.getAssets(), "cardenio.ttf");
    geoSansBold = Typeface.createFromAsset(this.getAssets(), "cardeniobold.ttf");
    caviar = Typeface.createFromAsset(this.getAssets(), "lane.ttf");
    icons = Typeface.createFromAsset(this.getAssets(), "Flaticon.ttf");
    // Parse
    Parse.enableLocalDatastore(this);
    Parse.initialize(
        this,
        "VrCJhCigE2n6CAXcYilfkw4hsEuvNkiK6MVXfJAC",
        "D4ctM4xMjtScCmFSW7xMSBqv49Hw8YbMJslbnYO5");
    // Parse.setLogLevel(Parse.LOG_LEVEL_VERBOSE);
  }
  @Override
  public void onCreate() {
    super.onCreate();

    // add Doa subclass
    ParseObject.registerSubclass(Doa.class);

    // Add your initialization code here
    Parse.enableLocalDatastore(getApplicationContext());
    Parse.initialize(
        this,
        "HoDPEWhNYvfC4O0pkRUQmQfFYKXbQzP1Hs6wqv4X",
        "JMcCJIJs7EKOOHV0gsPw7t6QJkiQgiSGWeeK7qKU");

    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);
  }
  @Override
  public void onCreate() {
    super.onCreate();
    Parse.enableLocalDatastore(this);
    ParseObject.registerSubclass(ChatMessage.class);
    Parse.initialize(this, APPLICATION_ID, CLIENT_KEY);

    DisplayImageOptions defaultOptions =
        new DisplayImageOptions.Builder()
            .cacheOnDisk(true)
            .cacheInMemory(true)
            .imageScaleType(ImageScaleType.EXACTLY)
            .displayer(new FadeInBitmapDisplayer(300))
            .build();

    ImageLoaderConfiguration config =
        new ImageLoaderConfiguration.Builder(getApplicationContext())
            .defaultDisplayImageOptions(defaultOptions)
            .memoryCache(new WeakMemoryCache())
            .diskCacheSize(100 * 1024 * 1024)
            .build();

    ImageLoader.getInstance().init(config);
  }
 @Override
 public void onCreate() {
   super.onCreate();
   Parse.enableLocalDatastore(this);
   Parse.initialize(this);
 }
 public void onInit(Context context) {
   this.appContext = context.getApplicationContext();
   Parse.enableLocalDatastore(appContext);
   Parse.initialize(context, ParseAppID, ParseClientKey);
 }
  @Override
  public void onCreate() {
    super.onCreate();

    Parse.enableLocalDatastore(getApplicationContext());

    // Add your initialization code here
    Parse.initialize(
        this,
        "3auP8OKsyBVdwDFFhQ7bAINSFldjA0zYrrSiKjIx",
        "FE0F9uUocCMzPiSyMl0UoEWDT1tdzYs3MOcQwp3O");

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

    //   PushService.setDefaultPushCallback(this, MainActivity.class);

    ParseInstallation.getCurrentInstallation().saveInBackground();

    ParseQuery<ParseObject> queryDrinks = new ParseQuery<>("ls_drinks");
    queryDrinks.setLimit(200);

    queryDrinks.findInBackground(
        new FindCallback<ParseObject>() {
          public void done(final List<ParseObject> object, ParseException e) {
            // Remove the previously cached results.
            ParseObject.unpinAllInBackground(
                "ls_drinks",
                new DeleteCallback() {
                  public void done(ParseException e) {
                    // Cache the new results.
                    ParseObject.pinAllInBackground("ls_drinks", object);
                  }
                });
          }
        });

    ParseQuery<ParseObject> queryMenu = new ParseQuery<>("ls_menu");
    // Locate the column named "day" in Parse.com and order list
    // by ascending

    queryMenu.findInBackground(
        new FindCallback<ParseObject>() {
          public void done(final List<ParseObject> object, ParseException e) {
            // Remove the previously cached results.
            ParseObject.unpinAllInBackground(
                "ls_menu",
                new DeleteCallback() {
                  public void done(ParseException e) {
                    // Cache the new results.
                    ParseObject.pinAllInBackground("ls_menu", object);
                  }
                });
          }
        });

    ParseQuery<ParseObject> queryReviews = new ParseQuery<>("ls_reviews");
    // Locate the column named "day" in Parse.com and order list
    // by ascending

    queryReviews.findInBackground(
        new FindCallback<ParseObject>() {
          public void done(final List<ParseObject> object, ParseException e) {
            // Remove the previously cached results.
            ParseObject.unpinAllInBackground(
                "ls_reviews",
                new DeleteCallback() {
                  public void done(ParseException e) {
                    // Cache the new results.
                    ParseObject.pinAllInBackground("ls_reviews", object);
                  }
                });
          }
        });

    ParseQuery<ParseObject> queryGroups = new ParseQuery<>("ls_groups");
    // Locate the column named "day" in Parse.com and order list
    // by ascending

    queryGroups.findInBackground(
        new FindCallback<ParseObject>() {
          public void done(final List<ParseObject> object, ParseException e) {
            // Remove the previously cached results.
            ParseObject.unpinAllInBackground(
                "ls_groups",
                new DeleteCallback() {
                  public void done(ParseException e) {
                    // Cache the new results.
                    ParseObject.pinAllInBackground("ls_groups", object);
                  }
                });
          }
        });

    Log.d(TAG, "App started up");

    BeaconManager beaconManager = BeaconManager.getInstanceForApplication(this);

    beaconManager
        .getBeaconParsers()
        .add(
            new BeaconParser()
                .setBeaconLayout("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24,d:25-25"));

    String blueUUID = "b7d1027d-6788-416e-994f-ea11075f1765";

    Region region =
        new Region("comapps.com.lakewoodsmokehouse", Identifier.parse(blueUUID), null, null);

    regionBootstrap = new RegionBootstrap(this, region);

    BeaconManager.setDebug(true);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_journalcreate);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);

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

    Parse.initialize(
        this,
        "GDqpaudUzxIubXTzJTXko0i062wWxqLK1AJSzD2K",
        "KHiJQsUdQYQcZVtxTCuFM6MmbQGKcIGEW1idXmC0");

    // Parse test
    // ParseObject testObject = new ParseObject("TestObject");
    // testObject.put("foo", "bar");
    // testObject.saveInBackground();

    final EditText jTitle = (EditText) findViewById(R.id.journal_title);
    final EditText jCompose = (EditText) findViewById(R.id.journal_compose);
    final Button btnSave = (Button) findViewById(R.id.btn_save_journal);
    menu1 = (FloatingActionMenu) findViewById(R.id.menu1);
    fab1 = (com.github.clans.fab.FloatingActionButton) findViewById(R.id.fab1);
    fab2 = (com.github.clans.fab.FloatingActionButton) findViewById(R.id.fab2);
    fab3 = (com.github.clans.fab.FloatingActionButton) findViewById(R.id.fab3);

    // Text to string
    journalTitle = jTitle.getText().toString();
    journalCompose = jCompose.getText().toString();

    // Click listeners

    fab1.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            Snackbar.make(v, "Reminder dialog pop up", Snackbar.LENGTH_SHORT)
                .setAction("Setup", null)
                .show();
          }
        });
    fab2.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            Intent view = new Intent(Journalcreate.this, Journal.class);
            startActivity(view);
          }
        });
    fab3.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            Intent create = new Intent(Journalcreate.this, Natahome.class);
            startActivity(create);
          }
        });

    // journal save button
    btnSave.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            ParseObject journalObject = new ParseObject("journal");
            journalObject.put("JournalTitle", journalTitle);
            journalObject.put("JournalBody", journalCompose);
            journalObject.saveInBackground();

            Snackbar.make(v, "Journal saved to Parse", Snackbar.LENGTH_LONG).show();
          }
        });
  }