Making a Class and content of it inBack4App












0














I am new to programming and i am a student trying to make a program that saves username able to log in, and saves user inputs such as moneys etc. I have downloaded the template (https://www.back4app.com/docs/android/login-android-tutorial) and it work well. I have already made a Class inside the Parse Dashboard and able to login and do registers thanks to the layout. But I tried to import the class that i made in back4app but i dont know how I tried using "import com.parse.ParseClass" and It wont work for some reason. Can someone please tell me what do I need to do to make a object inside the class in back4app? and use it in the android studio.



EDIT also somebody told me that I should open this in the Android SDK. But isnt that like a plugin to the gradle? If it is then I already have it in my gradle



EDIT I tried this code that I created but it doesnt send any data to back4app or whatsoever. after the button is pressed thats it it doesnt record any data (I think)



package com.example.back4app.userregistrationexample.Class;



import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import com.example.back4app.userregistrationexample.R;
import com.parse.Parse;
import com.parse.ParseObject;

public class Home extends AppCompatActivity {

private EditText balanceView;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
Parse.initialize(new Parse.Configuration.Builder(this)
.applicationId(getString(R.string.back4app_app_id))
.clientKey(getString(R.string.back4app_client_key))
.server(getString(R.string.back4app_server_url))
.build()
);
balanceView = (EditText) findViewById(R.id.edt_balance);
final String currency = new String();

final Button addbalance = findViewById(R.id.btn_addbalance);
addbalance.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ParseObject balance = new ParseObject(currency);
balance.setObjectId(balanceView.getText().toString());
balance.saveInBackground();
}
});
}
}









share|improve this question
























  • Welcome to StackOverflow. Add your code which have you tried.
    – Abhay Koradiya
    Nov 3 at 7:57
















0














I am new to programming and i am a student trying to make a program that saves username able to log in, and saves user inputs such as moneys etc. I have downloaded the template (https://www.back4app.com/docs/android/login-android-tutorial) and it work well. I have already made a Class inside the Parse Dashboard and able to login and do registers thanks to the layout. But I tried to import the class that i made in back4app but i dont know how I tried using "import com.parse.ParseClass" and It wont work for some reason. Can someone please tell me what do I need to do to make a object inside the class in back4app? and use it in the android studio.



EDIT also somebody told me that I should open this in the Android SDK. But isnt that like a plugin to the gradle? If it is then I already have it in my gradle



EDIT I tried this code that I created but it doesnt send any data to back4app or whatsoever. after the button is pressed thats it it doesnt record any data (I think)



package com.example.back4app.userregistrationexample.Class;



import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import com.example.back4app.userregistrationexample.R;
import com.parse.Parse;
import com.parse.ParseObject;

public class Home extends AppCompatActivity {

private EditText balanceView;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
Parse.initialize(new Parse.Configuration.Builder(this)
.applicationId(getString(R.string.back4app_app_id))
.clientKey(getString(R.string.back4app_client_key))
.server(getString(R.string.back4app_server_url))
.build()
);
balanceView = (EditText) findViewById(R.id.edt_balance);
final String currency = new String();

final Button addbalance = findViewById(R.id.btn_addbalance);
addbalance.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ParseObject balance = new ParseObject(currency);
balance.setObjectId(balanceView.getText().toString());
balance.saveInBackground();
}
});
}
}









share|improve this question
























  • Welcome to StackOverflow. Add your code which have you tried.
    – Abhay Koradiya
    Nov 3 at 7:57














0












0








0







I am new to programming and i am a student trying to make a program that saves username able to log in, and saves user inputs such as moneys etc. I have downloaded the template (https://www.back4app.com/docs/android/login-android-tutorial) and it work well. I have already made a Class inside the Parse Dashboard and able to login and do registers thanks to the layout. But I tried to import the class that i made in back4app but i dont know how I tried using "import com.parse.ParseClass" and It wont work for some reason. Can someone please tell me what do I need to do to make a object inside the class in back4app? and use it in the android studio.



EDIT also somebody told me that I should open this in the Android SDK. But isnt that like a plugin to the gradle? If it is then I already have it in my gradle



EDIT I tried this code that I created but it doesnt send any data to back4app or whatsoever. after the button is pressed thats it it doesnt record any data (I think)



package com.example.back4app.userregistrationexample.Class;



import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import com.example.back4app.userregistrationexample.R;
import com.parse.Parse;
import com.parse.ParseObject;

public class Home extends AppCompatActivity {

private EditText balanceView;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
Parse.initialize(new Parse.Configuration.Builder(this)
.applicationId(getString(R.string.back4app_app_id))
.clientKey(getString(R.string.back4app_client_key))
.server(getString(R.string.back4app_server_url))
.build()
);
balanceView = (EditText) findViewById(R.id.edt_balance);
final String currency = new String();

final Button addbalance = findViewById(R.id.btn_addbalance);
addbalance.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ParseObject balance = new ParseObject(currency);
balance.setObjectId(balanceView.getText().toString());
balance.saveInBackground();
}
});
}
}









share|improve this question















I am new to programming and i am a student trying to make a program that saves username able to log in, and saves user inputs such as moneys etc. I have downloaded the template (https://www.back4app.com/docs/android/login-android-tutorial) and it work well. I have already made a Class inside the Parse Dashboard and able to login and do registers thanks to the layout. But I tried to import the class that i made in back4app but i dont know how I tried using "import com.parse.ParseClass" and It wont work for some reason. Can someone please tell me what do I need to do to make a object inside the class in back4app? and use it in the android studio.



EDIT also somebody told me that I should open this in the Android SDK. But isnt that like a plugin to the gradle? If it is then I already have it in my gradle



EDIT I tried this code that I created but it doesnt send any data to back4app or whatsoever. after the button is pressed thats it it doesnt record any data (I think)



package com.example.back4app.userregistrationexample.Class;



import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import com.example.back4app.userregistrationexample.R;
import com.parse.Parse;
import com.parse.ParseObject;

public class Home extends AppCompatActivity {

private EditText balanceView;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
Parse.initialize(new Parse.Configuration.Builder(this)
.applicationId(getString(R.string.back4app_app_id))
.clientKey(getString(R.string.back4app_client_key))
.server(getString(R.string.back4app_server_url))
.build()
);
balanceView = (EditText) findViewById(R.id.edt_balance);
final String currency = new String();

final Button addbalance = findViewById(R.id.btn_addbalance);
addbalance.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ParseObject balance = new ParseObject(currency);
balance.setObjectId(balanceView.getText().toString());
balance.saveInBackground();
}
});
}
}






android






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 3 at 10:12

























asked Nov 3 at 7:25









Riebyfe Edelweiss

11




11












  • Welcome to StackOverflow. Add your code which have you tried.
    – Abhay Koradiya
    Nov 3 at 7:57


















  • Welcome to StackOverflow. Add your code which have you tried.
    – Abhay Koradiya
    Nov 3 at 7:57
















Welcome to StackOverflow. Add your code which have you tried.
– Abhay Koradiya
Nov 3 at 7:57




Welcome to StackOverflow. Add your code which have you tried.
– Abhay Koradiya
Nov 3 at 7:57












1 Answer
1






active

oldest

votes


















0














I recommend you change your code to the below:



ParseObject balance = new ParseObject("nameOfYourClassHere");
balance.setObjectId(balanceView.getText().toString());
balance.saveInBackground();


Also, you can take a look at the official parse documentation:



https://docs.parseplatform.org/android/guide/



Then, I'll recommend you take a look at the Back4App guide below to learn how to CRUD objects:



https://www.back4app.com/docs/android/parse-objects/crud






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53129308%2fmaking-a-class-and-content-of-it-inback4app%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I recommend you change your code to the below:



    ParseObject balance = new ParseObject("nameOfYourClassHere");
    balance.setObjectId(balanceView.getText().toString());
    balance.saveInBackground();


    Also, you can take a look at the official parse documentation:



    https://docs.parseplatform.org/android/guide/



    Then, I'll recommend you take a look at the Back4App guide below to learn how to CRUD objects:



    https://www.back4app.com/docs/android/parse-objects/crud






    share|improve this answer


























      0














      I recommend you change your code to the below:



      ParseObject balance = new ParseObject("nameOfYourClassHere");
      balance.setObjectId(balanceView.getText().toString());
      balance.saveInBackground();


      Also, you can take a look at the official parse documentation:



      https://docs.parseplatform.org/android/guide/



      Then, I'll recommend you take a look at the Back4App guide below to learn how to CRUD objects:



      https://www.back4app.com/docs/android/parse-objects/crud






      share|improve this answer
























        0












        0








        0






        I recommend you change your code to the below:



        ParseObject balance = new ParseObject("nameOfYourClassHere");
        balance.setObjectId(balanceView.getText().toString());
        balance.saveInBackground();


        Also, you can take a look at the official parse documentation:



        https://docs.parseplatform.org/android/guide/



        Then, I'll recommend you take a look at the Back4App guide below to learn how to CRUD objects:



        https://www.back4app.com/docs/android/parse-objects/crud






        share|improve this answer












        I recommend you change your code to the below:



        ParseObject balance = new ParseObject("nameOfYourClassHere");
        balance.setObjectId(balanceView.getText().toString());
        balance.saveInBackground();


        Also, you can take a look at the official parse documentation:



        https://docs.parseplatform.org/android/guide/



        Then, I'll recommend you take a look at the Back4App guide below to learn how to CRUD objects:



        https://www.back4app.com/docs/android/parse-objects/crud







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 12 at 13:25









        nataliec

        16612




        16612






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53129308%2fmaking-a-class-and-content-of-it-inback4app%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Xamarin.iOS Cant Deploy on Iphone

            Glorious Revolution

            Dulmage-Mendelsohn matrix decomposition in Python