Questions tagged [android-asynctask]

Inquiries regarding android.os.AsyncTask can be directed here.

The AsyncTask encountered an error while performing the doInBackground() function

Greetings! I am currently utilizing the AsyncTask to fetch data from PHP files. However, upon running the application, I encounter the following error: List<Online_Messages_item> o; public class RequestPostsTask extends AsyncTask<Void, Void, Bool ...

Utilizing SharedPreferences within an AsyncTask class to showcase information

I'm facing a challenge here. I need to access a SharedPreferences value within an AsyncTask class to display JSON data, but I'm encountering an issue. Whenever I try to access it, I get the error message "JSON parsing error : No Value lokasi". Below is my ...

"Lost and Found Hub" app integrating ViewPager, Fragment navigation, ListView display, and JSON data storage

I am developing an application for a lost property office. The app is designed with four tabs, and each tab should showcase announcements uploaded by users. When a user clicks on an item, a new activity opens to provide more details (similar to a news feed ...

Application errors occur when unable to execute AsyncTask

I am facing an issue with my app related to the AsyncTask. The AsyncTask is implemented in the SplashScreenActivity.java file and is responsible for downloading data using JSON for the MainActivity while displaying the splash screen. However, if the intern ...

Encountering issues when trying to connect Android to MySQL using PHP and establish a connection

I have been working on an app that displays MySQL table data in a card layout within an Android app. Here is the connection code snippet from my MainActivity.java: private void load_data_from_server(final int id) { AsyncTask<Integer,Void,Void> ...

Loading Fragments with Android's AsyncTask

I am currently working on implementing a JSON-populated listview in an Android fragment. The app crashes while running the AsyncTask portion, and I'm having trouble understanding the cause of the issue. I am following a tutorial that was originally in ...

Tips for importing data into a single fragment on an Android device

I have a requirement to display 3 fragments in my Activity, where each fragment should load data from a json. However, the issue I am facing is that all fragments are displaying the same set of data instead of each fragment showing relevant data (e.g., art ...

Using PHP to update MySQL on Android by sending data in JSON format

I attempted to create an activity that would update a MySQL database. Here is the code for the web server: <?php //error_reporting(0); require_once('db_config.php'); if($conn){ $sql = "UPDATE order_detail SET order_status ='co ...