Category : post

In our school project, we’re trying to create a login using a POST-request to our webserver in Android Studio, so we can check the username and password in our database etc. We’re, however, not very experienced in coding. We have this code to send data to our webserver. There are no problems while debugging, but ..

Read more

protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); listView= findViewById(R.id.liste); String showUrl = "https://xxxxxxxx.php?password="; final JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, showUrl, null, new Response.Listener<JSONObject>() { @Override public void onResponse(JSONObject response) { System.out.println(response.toString()); try { String a, b, c; JSONArray showarray = response.getJSONArray("showarray"); final ArrayList<String> arrayListim = new ArrayList<String>(); final ArrayAdapter<String> adaptor = new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_list_item_1, arrayListim); for ..

Read more

I want to create an application that allows a user to get information about his environment depending on his location. So I use the onLocationChanged(Location loc) function However I read that publishing a location on a remote server, can take some time, and could eventually block the execution of onLocationChanged(Location loc) Here’s my code, I’m ..

Read more

I’m trying to call my server test using Fuel.post with the header {"Message", "test"}. if the request work well the server return my "message". here is my fragment : class FragmentAuthSignIn : Fragment() { override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ): View? { val v: View = inflater.inflate(R.layout.fragment_auth_sign_in, container, false) (v.BtnLogin as ..

Read more

I am trying to set the date of a post in the firebase database in a "Text View", but I am having difficulties. Note: I am using RecyclerView. This is a part of my code in CommentAdapter public void onBindViewHolder(@NonNull final CommentAdapter.ImageViewHolder holder, final int position) { firebaseUser = FirebaseAuth.getInstance().getCurrentUser(); final Comment comment = mComment.get(position); ..

Read more