Questions tagged [android]

Android serves as Google's cutting-edge mobile operating system, empowering developers to create innovative digital devices like Smartphones, Tablets, Automobiles, TVs, Wearables, Glass, and IoT gadgets. To explore Android-related subjects, utilize Android-specific tags such as android-intent, android-activity, android-adapter, etc. Should you have any inquiries regarding the broader Android framework that aren't specifically about programming or development, this link will be your go-to resource: android.

No IOException was found in the variable e

Related Question: Exception is NULL always I'm facing an unusual issue involving an IOException object that I haven't been able to resolve. The code in question is as follows: try { // This section may not be critical, but it could be related to the ...

Efficiently handling the conversion from backslashes (\) to single

We are facing a challenge in producing a unique string format: "/Date()/". It is important to note that backslashes do not function as escape characters in this case; rather, they represent the literal string. Our .NET team member suggested using syntax ...

What are some alternative ways to link a local MongoDB database to my Android Studio application instead of using MongoLab?

Can someone please help me figure out how to connect my Android Studio project to a MongoDB database stored locally on my PC? I've been searching for solutions that don't involve using MLab, but I haven't had any luck. I've attempted f ...

Strange occurrences happen where objects are duplicated in the ArrayList when the debugger tool's 'step over' feature is used

Explaining this code is a bit challenging but it's designed to add items from a JSON array and display them on a ListView. The page refreshes using the onResume method that I have customized. public void onResume() { super.onResume(); if (a ...

Navigating back to the app after saving contacts can be achieved using React Native and the react-native-contacts library

I am currently utilizing the react-native-contacts library in my React Native application to save a contact. Prior to saving the contact, I request WRITE permission from Android. The process is successful; I open the contact form within my app and proce ...

Evaluating the performance of a Heroku free server under stress conditions

I'm currently working on an Android app that has a backend hosted on a Heroku free server. The current response time for serving requests is 2 seconds. I'm curious to know how many users it can handle simultaneously. I've searched through various Quora qu ...

The enduring resilience of intricate Java components (SQLite, Serialization, JSON) and the structured design of client-server applications

I'm currently working on an Android application that retrieves data from the internet, among other tasks. The project was initially started by someone else who is no longer part of the team. Now, I am tasked with converting it into a light client applicati ...

What is the best way to transform JSON into a Java object?

I am encountering an issue with loading the image while trying to convert a JSON into a JAVA Object from this specific link. Below is the code snippet I have been working on: // code snippet goes here Although everything seems to be functioning corre ...

What is the best way to decipher JSON using Java?

Currently in the midst of developing an Android test app that requires JSON test data parsing. The structure of the JSON data is as follows: {"id":1,"name":"Test Test","questions":[{"id":1,"test":1,"text":"Can you answer this question?","answers":[{"id": ...

Using @GET parameters with Android's retrofit

I have created an interface to fetch weather data from the OpenWeather API for the city of RZESZOW in the country POLAND. How can I pass query parameters for the user to input their desired city name and country in order to get the weather data? public in ...

Using StringRequest to post Volley with JSONObject in Android platform

I'm currently facing some confusion after asking a question regarding JSON decoding on the PHP side. My focus is on decoding a JSONObject posted from Android Volley using StringRequest. While I successfully created code for inserting data into MySql, I ove ...

Steps to generate a POJO class with a dynamic key

Is there a way to generate a pojo class based on the responses from the same URL provided below? RESPONSE 1: { "info": { "price": 1, "map": { "1": 1, "2": 2, ...

Issue encountered while trying to retrieve JSON data

I am currently using JSON in my application, but I encountered an error. Error: org.json.JSONException: Value {"date":"","shirota":"53.5254","dolgota":"49.1684","imei":"44fd02f38e4a5c0c"} of type org.json.JSONObject cannot be converted to JSONArray" This ...

Storing user credentials locally on PhoneGap for Android and sending them as JSON for notifications

Having previously developed simple apps using phonegap for android, I am now working on a project that requires status bar notifications from a background service per user. Utilizing the phonegap backgroundservice plugin, I have been successful in receivin ...

Strip the quotes from the JSON output

Need help removing double quotes from my JSON output. Here's the issue: [{"id":"1","nom":"Magasin Jardins 2","ville":"Paris","latlng":["36.85715,10.127245"]} I want to remove quotes from the latlng value to get this result: [36.85715,10.127245] He ...

I'm curious if there is a method to extract and retrieve color text information from JSON using Kotlin

I'm currently working on parsing and extracting data from JSON. However, I would like the respective color to be displayed instead of just the color name. For example: { "id": 1, "name": rose, "color ...

Leveraging the Yahoo Weather API

I have integrated the Yahoo Weather API and successfully retrieved data using the following link: Now, I am looking to implement this URL with Retrofit. Could you please guide me on how to dynamically change the city by passing a query? Thank you! ...

Struggling to execute JSON parsing with Klaxon and Anko's doAsync?

I am encountering an issue while attempting to parse a JSON-containing URL upon button click: button.setOnClickListener { doAsync{ val result = URL("http://date.jsontest.com/").readText() val parser ...

How to extract JSON data enclosed within HTML tags in Android application

My issue is slightly different than what I expected when I previously asked: Parse JSON to configure android application. I am receiving a JSON object from the server, and when I view it in the browser's source code, this is how it appears: JOSON.co ...

Title positioned between two buttons in the header

I am trying to add two menu buttons in my header, but the Hamburger menu button is not aligning to the left as expected. Currently, it looks like this: https://i.stack.imgur.com/s5ptT.png Below is the code snippet I am using: <ion-header> <io ...

What is the process for obtaining an AWS IoT device shadow on an Android app? I have been utilizing a REST API generated by AWS, however, I am unsure of how to include headers with this API

I have successfully implemented a web server in Node.js where a continuous script is running and the shadow will be updated based on user input. This link provides information on adding canonical headers. Should I include any additional headers if I am mi ...

The process of transforming a String response into an iterable entity

I'm currently working on an Android/Java app where I need to make a REST API call using the Volley library. Here's the code I have so far: RequestQueue queue = Volley.newRequestQueue(this); String url ="https://covid19datasl.herokuapp.com/countrie ...

Do I need to open Chrome if I want to switch web notifications to Android TWA?

Through the use of TWA technology, we were able to create an Android app that can open a PWA page without displaying an Address bar. Unfortunately, this setup presented a challenge. The absence of the Address bar made it difficult to switch web Push Noti ...

Unable to launch React Native project on emulator now

Something seems off with my App as it won't start up on my AS Emulator. Everything was running smoothly yesterday, but today it's not working - possibly due to me moving the npm and npm-cache folders, although they are configured correctly with n ...

How can NodeJS determine if the user on the client side is accessing the platform through a mobile browser or a mobile

After creating a basic REST api with NODE and EXPRESS, I now have a web app in the browser and a native mobile application. My next step is to determine whether an incoming request is from the web browser or the native app. I was able to successfully iden ...

Encountered a java.io.IOException while trying to run react-native on Android, resulting in failure

ERROR: The build process was unsuccessful due to an exception. What caused the issue: The task ':app:transformClassesAndResourcesWithProguardForDebug' execution failed. java.io.IOException: Unable to write [/home/user/Desktop/pratap/react-pr ...

I encountered difficulty in finding additional elements after selecting a value in the Android Date Picker

https://i.stack.imgur.com/fcrou.pnghttps://i.stack.imgur.com/EwsMH.pngWe are currently in the process of automating a mobile app using Selenium, Appium, and Java. While testing the mobile app (Android), I encountered an issue where after selecting a date ...

Using Gson to deserialize a Map<String, List<?>>

When working on my server, I first serialize data using the following code: Gson gson = new Gson(); Map<String, List<?>> resultMap = BackendUpdateManager.getInstance() .getUpdates(timeHolder, shopIdInt, buyerIdInt); gson.toJson(resultMap); ...

Base adapter class returning null when displaying JSON data in list view

Hello everyone, I've encountered an issue while trying to display a list of JSON data in a ListView. I have successfully fetched the data but am struggling to append it in the list. To display the data, I created a class that extends BaseAdapter. Howe ...

Strengthening the security of PHP using JSON

I'm working on a PHP script that receives data from an Android application. What security measures should I implement to ensure the safety of this script? Are functions like isset enough? <?php require ('config.php'); $connection=mysqli_connect($serve ...

What is the best way to refine spinner options according to the selection made in another spinner

I am facing an issue with my Spinners citySpinner, regionSpinner, and branchSpinner. I am able to populate the data in the spinners, but the problem arises when I select a region like UP from spinnerRegion. In this case, I only want to display cities relat ...

implementing HtmlSpanner with an appended css stylesheet

Using HtmlSpanner with CSS for TextView I recently discovered a library called HtmlSpanner that claims to assist in adding an HTML string with CSS to a TextView. However, I am struggling to locate any detailed documentation on how to achieve this, except ...

Animation glitches occurred following the update to Android Jelly Bean, appearing as duplicated animations on

I am currently working on developing an HTML5 app for Android using JQuery 1.1.0 and Phonegap 1.9.0. The app includes a small animation of a battery being drawn on the canvas and updating dynamically. This animation functioned perfectly on Android 4.0.4. ...

Please disable zoom functionality on the website specifically for Android devices

Is there a way to disable the zoom feature on our website specifically for Android phones/devices without affecting iPhones? Perhaps targeting the Chrome browser on Android would be sufficient, but we should also verify the mobile screen size. ...

What is the best way to organize a flatlist for rendering?

I'm struggling with separating some flat-lists into different components. How can I arrange the rendering of the flat-list like the sample form (Picture "Sample UI")? I've tried, but it's not working correctly as it renders flat list A first ...

Error Encountered During Building Apache Cordova Project in Visual Studio 2015

Encountering an issue when attempting to launch my cordova project on both an android device and android emulators. Currently utilizing visual studio 2015 In dire need of assistance! Error can be viewed in the image below: ...

Error interpreting the response string

After attempting to extract values from a response by parsing it into separate strings, I encountered some difficulties. The response text looks like this: response = "Data1{ key1='4722**********6', key2='2107', key3=value{ ...

Parsing JSON arrays within another array without a key in Android can be done in a

I'm a newcomer to JSON and I've encountered some challenges with parsing a JSON array named "genres". Currently, it is functioning as an object but the display is not ideal. My goal is to have the "genres" display as Drama, Musical instead of [" ...

Error: Unexpected data type encountered. Expected an array but found a string instead at line 1, column 2

I have tried multiple suggestions from similar questions but none of them have helped. How can I successfully execute this test? @Test fun isJsonCorrectPersonConvert() { val gson = GsonBuilder().create() val json = gson.toJson("[{"Id":2,"Text ...

What is the procedure for inserting multiple rows into a MySQL database using JSON data from an Android

I am facing a challenge with inserting multiple rows into a MySQL database from Android. Currently, I only know how to insert one row. Here is the PHP script snippet: $r=mysql_query($sql); if(!$r) echo "Error in query: ".mysql_error(); mysql_close(); ...

Adding a JSON array to a ListView

I am new to Java programming language, so please forgive any obvious or silly mistakes I may have made. I am working on an activity in which I retrieve a JSON encoded string from a PHP file and display it in a simple list view. However, I am encountering ...

Transforming a JSONArray into a regular Array

I transformed a regular array of user-defined objects into a JSON Array. Now I'm wondering how to convert the JSONArray back to a normal array of the same type. In order to accomplish this, I am utilizing Json for shared preference in an Android applicatio ...

Obtain the raw JSON URL from the web

Is there a website that can provide me with a constant URL for my JSON code so that I can edit it and see the changes reflected live on the same link? Currently, when I try to edit JSON code on gist.github.com, the URL of the raw format changes. Any sugg ...

I'm looking to access the Yahoo Weather API data through the JSON object's channel -> item -> forecast -> {day1} {day2} {day3} {day4} {day5}. How can I do this retrieval?

I attempted to access the forecast data but encountered issues, specifically a NullPointerException and sometimes crashes. This is because I am unable to retrieve the data from item -> forecast -> {data}. Within the Item class: condition = new ...

utilizing the json format for communication between an Android application and a servlet

Is it possible to transfer data in JSON format from an Android client to a servlet? If yes, what are the benefits of using JSON for this purpose? ...

unable to display friends' names in chat

Can someone assist me with an issue I'm facing in my chat application? Whenever I try to display a friend's name on the chat, the app crashes. If I remove the part where the friend's name is displayed, the messages show up fine. However, as soon as I add t ...

Encountering difficulties in sending image data to server using Retrofit

Currently, I am facing challenges in sending an image to the server through retrofit. While the server can receive what I send, there seems to be an issue when I test it with Postman, as it displays something unexpected. Let me walk you through my data fir ...

Gson parser failing to parse JSON data

Below is a JSON string that I am working with: [{"BranchID":1,"SecurityCode1":13,"SecurityCode2":14,"PrintHeight":10,"PrintWidth":10,"Active":true}] This is the code snippet I am using to parse the JSON data: Type t = new TypeToken<List<Setting&g ...

Alerts created with the AlertController in Ionic 4 Angular are not displaying the message when the

After creating a reliable alert service for my Ionic 4 project, I encountered an issue when building the release version of the app. Despite functioning perfectly in other environments like "ionic serve" and "ionic cordova emulate", the message part of the ...

Building an Ionic app from a .git repository on your local machine: A step-by-step guide

Trying to set up Moodle's ionic mobile app on my local machine using Windows and following these steps: cd project-directory ionic platform add android Encountered an error in the command prompt: throw err; ^ Error: Cannot find module 'plist' Th ...

Gson Library: transform JSON containing null array field into an empty array

Is there a way to instruct GSON to create an empty array instead of setting it to null when a JSON with an array field has a NULL value? Are there any specific properties or flags that can be used for this purpose? ...

Link Android with Python

I am working on an Android application that captures images and also have Python code for extracting image features. I am looking to connect these two components so that the Python code can receive images from the Android application. I have heard about bu ...

Unable to retrieve Google Maps route on Android device

After discovering the route between two latitude and longitude values on Google Maps using "Get Directions," everything appears accurately. However, when attempting to use the same directions in an Android mobile application, only the destination marker ...

Loading Google Books JSON data into a ListView

Currently, I am utilizing the Google Books API to search for books. However, I am encountering an issue when trying to populate my ListView with the searched books as it is throwing an error specifically in the onPostExecute method, but I am unable to iden ...

Unable to retrieve device UUID using capacitor/device on Android

I'm currently attempting to obtain the UUID of my devices so that I can send targeted notifications via Firebase. My front end and back end are connected, enabling the back end to send notifications to the front end using Firebase. However, all I am able t ...

Decoding a JSON array containing multiple JSON objects into an ArrayList of org.json.JSONObject instances using Gson

I have a JSON string that looks like this: { "r": [ { "pic": "1.jpg", "name": "Name1" }, { "pic": "2.jpg", "name": "Name2" }, { "pic": "3.jpg", "name": "Name3" } ] } My goal is to convert it ...

The transparency feature using rgba is not supported in the Chrome browser for Android

Have you noticed the transparency effect in certain divs using the rgba CSS property? Strangely, Chrome on my ASUS tablet and Samsung S3 mini Galaxy smartphone does not seem to support this feature. Surprisingly, Internet Explorer does! Any insights on w ...

How can we make it possible for the app to be sent to the background using a button within the application?

Can the app be minimized to the background using a button within the application? Some applications achieve this by minimizing when the exit option is pressed, rather than closing completely... I am looking to implement this feature in my Ionic app or th ...

Selecting Map Types on Android Google Maps through the Floating Action Button (FAB) menu

Is there a way to create a visually appealing menu for changing the map type, similar to the one on Google Maps? This menu should appear when clicking the layers FAB. I'm unsure if it's a custom FAB menu or if it animates and opens a fragment. https://i.s ...

Transmit data in JSON format from an Android device to a PHP server using the POST method and HttpURLConnection

I'm having trouble establishing a connection between my Android app and WampServer on the local network. Fetching data from the server has been successful, but I face an issue when attempting to send data to the server. I've implemented a Service for com ...

Switching input types in Android WebView: From Numeric to Password

I am facing an issue with my webview. In the webview, I have three input types: Number Text Password The problem is that when I switch from the number input field to the password input field, the numeric keyboard opens up instead of the qwerty keyboard. ...

Storing Data Efficiently and Parsing JSON

I'm inquiring about assistance regarding what I believe is tied to caching during JSON object parsing. Currently, I am conducting benchmark tests on different deserializing libraries such as Gson, Kotlin-serialization, and Immutables. I have a json-format ...

Creating a Back Handler in a React Native Stack Navigator for seamless navigation

Is there a way in React Native Stack Navigator to navigate back to previous pages from some screens and disable the ability to go back from others? I've tried using Back Handler, but it doesn't seem to be working. How can I achieve this functionality? ...

Android Studio encountered an unexpected object instead of an array at line 1, column 2 while attempting to execute a Retrofit request

Despite searching for a solution with Retrofit2 and following an online tutorial, I am still facing the same issue. The code worked fine in the tutorial but when I tried it on my own endpoint, I encountered the exception: java.lang.IllegalStateException: E ...

Transferring information from an Android device

I am having trouble sending data from an Android device to PHP. Despite my attempts, I am unable to identify the mistake I have made. How can I rectify this issue? Below is the snippet of the Android code that I have implemented: public class php_connect ...

Can I deactivate JavaScript on my website directly from my server settings?

I'm currently attempting to link my Android application to a PHP script hosted on a free server. However, when my app tries to access the page, I receive an HTML message stating that JavaScript is disabled and needs to be enabled in order to view the ...

Parsing Json in Android does not provide any results

I have a JSON parsing Class structured like this: public class JSONParser { static InputStream is = null; static JSONObject jObj = null; static String json = ""; public JSONParser() { } // method to fetch json from URL // using HTTP POST or GET method ...

String Representation of Android View IDs

As I work on creating a Class that will populate my layouts with data from a JSON Schema, I am encountering a challenge. The JSON includes definitions such as { type: "checkbox", label: "Label text", value: true, id: "liquids" }. While rendering the UI is ...

What types of events can be used to trigger the start of HTML5 audio playback in mobile Chrome?

When it comes to mobile browsers, Audio elements require user action before play can start. The click event usually satisfies this requirement, but touchstart doesn't seem to be an acceptable initiating event in Chrome on Android or iOS. (Refer below ...

Ways to update and retrieve information from a JSON feed on an Android device

I am utilizing a JSON feed obtained from the following URL. This JSON feed contains 20 fields that I parse through to extract all the data. However, after displaying these 20 fields in a listview, I now need to retrieve more data from the JSON feed. To ac ...

A Python Guide: Converting TimeZones to CountryNames or CountryCodes

Is there a faster and more efficient option than the code I'm currently using to extract the name of a country from the name of a city? I want to be able to convert a timezone like 'Europe/Istanbul' to ...

Is it possible to develop Hybrid Apps specifically for Windows Tablets/Surface devices?

We have created a Hybrid App for Android devices and made it compatible with Windows by using Adobe PhoneGap Build to generate a .XAP package from the existing Source Code. We believe that this .XAP package can easily be deployed on a Windows Mobile devic ...

Unlocking the secrets: Monitoring hardware keys in a react-native app

Currently, I am exploring a project that requires taking photos with a selfie stick. However, during my testing with the selfie stick, it only seems to trigger the volume up button. Now, I am looking for a way to detect the volume up button press or any ...

Creating an efficient post request using retrofit

Currently, I am delving into the world of Retrofit as it appears to provide solutions to many of the challenges I face with JSON requests and their handling. It is clear that interfaces play a key role in defining the methods utilized, particularly when m ...

This webpage is optimized for all browsers, with the exception of the Android Browser that may display fonts with larger sizes

When developing my webpage, I made sure it was compatible with all major browsers and even optimized it for mobile browsers. However, I overlooked testing the page on Android browser (specifically Android 4.2) and encountered some issues. The viewport set ...