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.

What is the best way to conceal the Material Bottom App Bar when the child fragment within the Coordinator Layout is being scrolled?

I am puzzled by why the app:hideOnScroll="true" attribute is not functioning as expected in my scenario, where I intend for my BottomAppBar to disappear when scrolling. My goal is to achieve a behavior similar to what is shown in this video: Hide bottom ap ...

Error: The value entered for the 'end_time' column in row 1 is outside of the acceptable range

My current scenario involves sending a JSON payload from an Android device to a web-service. The JSON includes two fields, namely startTime and endTime. Both startTime and endTime are of type Long in the DTO classes on both the client and server sides. How ...

The compilation of debug Java with Javac in CordovaLib is not being done incrementally

I am currently in the process of setting up Ionic on my new computer, but I have encountered an issue while trying to build a Cordova Android project that I can't seem to resolve. The software and versions I am using include: NodeJS v6.9.1 npm ...

Enhance your Proguard and Gson skills by transforming variable names within an arraylist

During debugging, my code works perfectly fine. However, when I release my apk with Proguard 5, it obfuscates my variables. As a result, the string generated after "Jsonifying" is also obfuscated, causing issues with my PHP script. Here's an example of my ...

Exploring ways to retrieve information stored in localStorage within an android mobile application

I am currently developing an Android App using phonegap. The app is a simple game that generates random numbers for math problems. If the user answers correctly, their score increases, but if they lose, their name and current score are saved in localStor ...

Guide to sending FCM notifications with node.js specifically to a specific package name

I have been working diligently on a project that heavily relies on Firebase. I have successfully implemented all the necessary Firebase functionalities for the consumer app and admin app, except for FCM (Firebase Cloud Messaging). My goal is to notify the ...

While Ajax POST is functional on desktop, it does not seem to work on Phonegap applications or Android

I am facing an issue with a global function that does not seem to work properly in the PhoneGap Desktop app or Chrome Mobile on Android. Surprisingly, it works perfectly fine only in the Chrome PC version. The function is called using an onClick event, a ...

Utilizing Android JSON ajaxQuery for HTTP POST Requests

Is there a way to utilize the Android AJAX query for sending an HTTP POST request with parameters? String url = "http://www.mysitecom/MyService.asmx/GetJson"; // I need to include a string parameter in this query and send it via HTTP POST a ...

What steps should you follow to launch a react-native app from Android Studio while also setting the --mode= flag?

When trying to launch my RN application from Android Studio, it runs fine with react-native run-android command. However, I need to use react-native run-android --mode=stagingdebug instead of just react-native run-android. Is there a way to accomplish thi ...

Identifying an Android device using Javascript or jQuery

Is there a way to identify an Android device for styling a mobile website? I want to add specific CSS styles for users on the Android platform. Appreciate any help! ...

What is the best way to identify when the soft-keyboard is hidden in the Android browser

Having trouble with the Android Webkit browser and need to manually detect when the soft-keyboard is hidden by pressing the button in the top right corner. https://i.stack.imgur.com/x11Vp.jpg In the image above, pressing the button hides the soft keyboar ...

Issues with the AndroidDriver Selenium library and the inability to parse the AndroidManifest.xml file are causing problems

Trying to execute the sample test provided at https://code.google.com/p/selenium/wiki/AndroidDriver#Run_the_Tests on an Android emulator (Mac) is causing issues during the test run. After setting up an emulator and installing the WebDriver APK, creating a ...

Is there a way to display a cradled FAB in a bottom app bar exclusively for one specific fragment?

I have implemented a BottomAppBar in my app and I am looking to display a cradled FloatingActionButton only for a specific fragment. I want the button to appear exclusively in that particular fragment. Within my activity_main.xml file, there is a Frame th ...

Incorporating Google Maps and Firebase Cloud Messaging into a single React Native application

Attempting to implement both Google Maps and FCM in a single React Native project has proven challenging. Initially adding FCM went smoothly, but upon integrating Google Maps, an error surfaced: https://i.stack.imgur.com/katfd.png After extensive research ...

What is the best way to parse JSON data received from an Android device using PHP?

I am having an issue with my android emulator where it is sending a request to a PHP script to access MySQL data. I have checked the PHP script by manually giving values to the SQL query and I can retrieve the data in my Android emulator. However, I am fac ...

Utilizing JSON for Server Communication in Android

I recently landed a position at an IT firm where I'll be working on Android development. I'm currently struggling with choosing what specific topics to focus on in this area. The server side is using JSON objects, so I'm seeking advice on what areas of exp ...

Although PhoneGap resolution remains consistent, the outcomes may vary

I seem to be facing a similar issue as discussed in this post on Stack Overflow: Screen Resolution On A PhoneGap App My problem is that I have both an iPad and an Android tablet, both with a resolution of 1024 pixels across. However, while my screen displ ...

RecyclerView is skipping the layout as there is no adapter attached. This issue is occurring with the android

I am currently working on developing a real-time chat application for Android using a Node.js server and Socket.io. Below is the code snippet for the ChatBoxActivity: public class ChatBoxActivity extends AppCompatActivity { // Code details here } Her ...

Displaying JSON Array in ListView - Merging

Although this question has been asked before, my code has some variations which are causing confusion regarding where I need to make changes. My goal is to extract data ("fest_name") and store it in an ArrayList called "festivals", and then display it i ...

Android JSON to POJO deserializer with support for polymorphic classes

I'm facing an issue with REST and Android. The problem arises when working with a transport object within the context of a Human class that has Male and Female subclasses. My goal is to use JSON as the transport medium for the human object. Typically, ...

Transmitting JSON data to a server through a POST request with name-value pairs

I have been trying to send a JSON Post request to the server using the following URL: Request Structure: {"requestdata":{"password":"abc","devicetype":"phone","username":"<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3859554 ...

Ways to eliminate the white background gap between pages on ionic

While developing an app using Ionic, I encountered a strange issue. Everything runs smoothly on a browser, but when testing the app on an Android 5 device, I noticed a white background appearing between pages. The app loads correctly with the custom splas ...

The React Native Android app encountered an error loading the JS bundle: updates made to index.android.js are not reflecting in the generated APK file

Setting up a react-native android project on my Windows machine has been successful so far. To run the project, I use the command react-native run-android and then the installed apk is generated on my phone. After making some changes in the index.android. ...

HTML 5 File selection on iOS and Android using Cordova/Phonegap

I attempted to utilize the camera in a PhoneGap app using the HTML5 input tag as shown below. Create a new project through CLI Add iOS and Android platforms Incorporate the camera plugin Build for both devices Run on iPhone 5 with iOS 7.1.2 and Samsung N ...

What is the best method to extract a specific value from a JSON object?

I have parsed a JSON file to extract data such as "Floor", "flat_no", and "Flat_id". Here is an example of the JSON structure: { "results": [ { "Flat_id": "1", "cat": "2", "Flat_no": "101", "Floor": "1", "Flat_t ...

Having difficulties with OkHttp's inability to successfully post data to

I'm facing an issue with my app. It is supposed to send three values (Name, Email, and Password) from text boxes etName, etEmail, and etPassword respectively to the database. However, it seems like nothing is being sent. As a beginner in Android developmen ...

Tips for extracting data from a nested JSON object while utilizing GSON library on Android

Here is an example of how my JSON response appears: [{"order":-1,"artist":[{"name":"Hey"}]},...] I am seeking guidance on how to extract the name from the artist object using GSON. Initially, I attempted to achieve this task utilizing the following code ...

Using JSON communication with React Native websockets

I'm currently facing a challenge in setting up a Websocket client that communicates with a web server using JSON. Unfortunately, I haven't been able to find any useful examples online. The only code snippet I stumbled upon is : var ws = new Web ...

I have successfully implemented ngCordova local notifications, but now I am looking for a way to make it trigger for each individual

Is there a way to trigger a notification on every logged-in user's mobile device when a value is changed and saved in Firebase? Currently, I am able to send a local notification using ngCordova when a user enters text in an ionicPopup with textarea. H ...

Developing a personalized collection of top picks and syncing them across multiple

Currently, I am in the process of developing a favorites list using a custom listview. ----------------------------------- <Item_Name> <favorite button> ----------------------------------- On the listView, there is an onItemClickListener. ...

Modifying HTML code within a WebView (Monodroid) explained

WebView webView = FindViewById<WebView>(Resource.Id.webView1); webView.HorizontalScrollBarEnabled = false; webView.LoadUrl("res.htm"); I am looking for a way to modify certain parts of HTML code in my file and display it using webView without actual ...

The spacing between elements is too wide, preventing me from adjusting the image upwards

Currently, I am working on designing a screen layout for my app, and no matter what I do, I am unable to successfully align all the elements as intended. Can anyone guide me on where I might be going wrong? Column( modifier = Modifier, verticalArra ...

The conversion of java.lang.String to JSONObject is not possible

Can anyone help me with retrieving specific data from the server using this code? public String URL_ITEMS = "http://getdoctor.comlu.com/aa.php?name=Naveed"; private static final String TAG_FIXTURE = "checker"; private static final String TAG_MATCHID = "d ...

Enhancing User Experience on Android Devices: Automatic Website Zoom-In Feature for Responsive Design

For the first time, I am delving into creating a responsive website design. I seem to be encountering difficulties when it comes to smartphones. I have been using the following meta-tag to ensure that the website loads "zoomed in". (I found this method on ...

The execution of onPostExecute(JSONObject json) does not occur

I am facing an issue with a registration fragment in my application. The fragment is responsible for sending registration details to a database, and although the data is successfully sent, the progress dialog does not dismiss as expected. I suspect that th ...

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 ...

Ensuring Unique CSS for Diverse Devices: A User-Agent Driven Approach

I am facing multiple challenges and working towards finding solutions. I have developed a webpage and now I want to redirect the link to the CSS file based on the user agent. `<script type="text/css" src="style.css"> </script>` However, inst ...

Using Retrofit 2 in Android to parse a JSON array containing numerous objects

In my project, I am utilizing retrofit 2 for networking tasks. Parsing json object responses from the server is working perfectly, but now I need to parse a json array that has the following structure: [ { "id_asset": 1, "id_category": ...

Notify users at scheduled time using Firebase and Cloud functions

I have developed a unique platform that allows fitness coaches to effectively communicate and share workout plans with their clients. However, I am looking to further enhance this platform by introducing a new feature: the ability for coaches to configure ...

When displaying JSON data in an Android app, the ListView is only displaying a single row

I am working on displaying JSON data in a ListView within an Android app. I am able to retrieve the JSON data successfully, but when attempting to display it in the ListView, only one row is showing up. Additionally, I want each row’s data to be shown in ...

The SyntaxError is triggered by the React-Native FlatList component

As a newcomer to React Native, I am facing an issue with refreshing the component to load city names stored in async storage. The error occurs when I utilize the FlatList component for the first time. The specific error message I encountered is: SyntaxE ...

Employ the Jackson JSON library without utilizing annotations

I am working with a package that includes an xsd file used to generate shared classes for our server and client applications, containing XML annotations. One of the clients is an Android App, and I need to use these classes for JSON deserialization as well ...

Transferring information from Android application to PHP server

I am currently running a PHP form on a WAMP server within a local network. However, when attempting to run the file, I encounter an error as shown in the screenshot. My goal is to send data from my Android app to the PHP form. Additionally, the Android app ...

Dealing with null values from JSON when a list view row is clicked: Tips and suggestions

My knowledge of Java is limited, but I managed to pull data from an API to a list view successfully. However, when trying to display more details upon clicking on an item in the list view, I encountered errors related to handling null results in my text vi ...

Passing the JSON object located at the selected index within a listview to the next activity in my android application

Hello everyone, I need some help with a coding issue I'm facing. I have been searching for a solution to this problem but haven't been successful so far. In theory, I know that I should use i.putExtra("jsonArray", jArray.toString()); in my inte ...

Utilizing an Android application to control and modify online content

In the past, I was familiar with Selenium and WebDriver, which allowed for manipulating webpage elements like Textfields and Buttons through code. However, I'm uncertain if these tools are still available or relevant today. For instance, imagine I ha ...

Having trouble parsing a JSON Array containing sub arrays and objects

I am facing an issue with parsing the JSON data. I have tried accessing the JSON array in my MainActivity code, but unfortunately, I am unable to retrieve the details from the first element. Even after logging the arrayList returned from postExecute, it st ...

The element type provided is not valid: it should be a string for built-in components or a class/function for composite components. However, an object was received instead. - React Native

After conducting extensive research, I have been unable to find a solution as to why this issue persists. Can anyone shed some light on what the error might be referring to? Error: Element type is invalid: expected a string (for built-in components) or a c ...

Issue encountered while parsing the JsonArray

Hi, I have encountered an issue while parsing a JSON data. Here is the link to the JSON data that I'm working with. Currently, I am trying to parse the JSON array for images so that I can display them in a recycler view using Picasso library. However, whe ...

Create with API-19 using [email protected]

After installing Cordova using npm, I discovered that the latest version of cordova-android available is 4.1.1. I proceeded to create a project using "cordova create" and added a platform. However, when attempting to build the project, the build process fa ...

Graphics distorting on android devices when implementing createjs and canvas technology

I have a question regarding the performance of my game that I'm developing to work on both desktop browsers and mobile devices. Using HTML5 and CreateJs, most of the game is being drawn on a canvas element. While everything runs smoothly on a standar ...

Why is the 3D CSS transform (translateZ) feature malfunctioning on Android 4.0.3?

I have this HTML code that is functioning well on Chrome, Safari, and Mobile Safari. However, when testing it on Android 4.0.3, the translateZ property does not seem to have any desired effect on the div element. While everything else works as expected, ...

Is it possible to implement JSON in place of SQLite for my Android application?

Currently, I am working on a basic android application that includes an activity dedicated to showcasing data extracted from a few tables in an online mySQL database. These tables are fairly straightforward and will not exceed 100 rows. In order for the a ...

Guide on transforming JSON lines that have been escaped into a collection of beans

Java POJO: import android.os.Parcel; import android.os.Parcelable; import com.gongzelong.duolingowordsearch.utils.ParcelableUtils; import com.google.gson.annotations.SerializedName; import java.util.List; public class WordSearch implements Parcelable ...

Understanding the process of parsing JSON data in an Android application

I have the following JSON to parse. Currently, I am parsing it using multiple if else loops. Is there a more efficient and standard way to parse this JSON format? Any help would be greatly appreciated. JSON: { "Info": { "DeviceInfo": { ...

Mistakes While Running Cordova Commands (Maka-CLI Application on an Android Device)

Recently, I attempted to launch a Maka-CLI web application on my Android device using the command "maka run android-device". Unfortunately, I encountered an error that persists and displays the following message: => Errors executing Cordova commands: Whi ...

Exploring the Android JSON object

After downloading a JSON file, I found the following structure: { "options": { "toolbar": "1", "full": "1", "exit": "0", "about": "0" }, "general": { "versioncontrol": "1.0" }, "companydetails": ...

Working with JSON parsing in Gson or Jackson when a field can have two distinct types

My JSON data includes a field that contains two different types. "fields":[{"value":"ZIELONE OKO"},{"value":{"@nil":"true"}}] I am struggling with deserializing these values. The model class I am using has the following structure: private String value; ...

React navigator appears stuck and unable to navigate between screens

I encounter an issue where my app closes when I press the switch screen button, but there is no error output displayed. I have checked for any version discrepancies and found no problem. The function I implemented for the button is functioning as expected ...

"Creating mobile apps with Cordova using Vue framework, running on Android Virtual

After following a tutorial, I successfully created my own Android Cordova app using this plugin: https://www.npmjs.com/package/vue-cli-plugin-cordova I stored all the images for my app in the public folder. The structure of my project folder is as follows ...

Creating virtual hover effects on Android browsers for touch events

My Wordpress website is currently utilizing Superfish 1.5.4 to display menu items. The menu on my site includes several main menu items, which are clickable pages, and hovering over these main items should reveal sub-menu options. When I hover over a mai ...

Navigate to a hyperlink using an HTML tag on an Android device

Hi there, I have an HTML string that includes a tag with a href attribute. After setting this HTML string in a text view on Android, I want only the tag with the href attribute to be clickable and redirect to the appropriate link. Can someone please advise ...

Trouble with closing windows in the in-app browser on Android devices

Is there a method to successfully close the in-app browser? Despite window.close working on iOS devices, it is not effective on Android. I have experimented with alternatives like window.top.close and window.open("", "_self") window.close, but none have ...

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 ...

Discovering strings within strings on the Android platform

In my current project, I am dealing with a lengthy JSON text that contains movie titles. I need to extract these titles from the following pattern: ((((((( .","title":" AND ","type":" ))))))) After researching other solutions, I came across one appro ...

An Effective Solution for Resolving the 'Use JsonReader.setLenient(true) to Accept Invalid JSON at Line 1 Column 1 Path $' Issue in Android Studio

I'm facing an issue while attempting to send a POST request to an API. The error message I receive is: To fix the problem, you can use JsonReader.setLenient(true) method in order to accept malformed JSON at line 1 column 1 path $. Is there anyone who k ...

`Enhancing existing systems - extracting data from a JSON response`

i want to retrieve a JSON object from the following link: http://link/json and here is my JSON data: {"as":"AS48159 Telecommunication Infrastructure Company","city":"Ahvāz","country":"Iran","countryCode":"IR","isp":"Information Technology Company (ITC) ...

Issues with jQuery requests not working properly on the mobile application

Creating a mobile application for Android devices using Intel XDK has been a rewarding experience so far. I have been testing my PHP code on an emulator and local development server (127.0.0.1) through AJAX methods such as $.ajax(), $.post(), and $.get(). ...

Experiencing receiving a null value for an XML-formatted string following the process of

I am new to android development and I am currently working on a project where I need to call a webservice that returns a JSON string as a response. This JSON string contains an XML formatted string as one of the entries. String jsoncontent=restTemplate.ge ...

How can an AngularJS/Ionic mobile application incorporate an external JavaScript script?

Can external JavaScript scripts be executed in an AngularJS/Ionic mobile app, particularly on non-jailbroken iOS devices? We are considering creating a launcher version of our app that downloads the required scripts and then installs and runs them. I have ...

Load different tab contents in a view pager without having to fetch them again

I am using a view pager within a tabLayout to display content sourced from JSON data. Each page on the view pager contains different content, and I'm trying to figure out how to extract each page's content just once. Is there a method to achieve ...

Utilizing Json and Gson for Android Development

Could someone please explain the distinction between JSON and GSON to me? I keep coming across the term GSON while researching JSON, but I'm not sure how they differ. I'm confused about the specific differences between the two. Additionally, I've encount ...

Having trouble with Cordova, Angular, and PushPlugin? Your callback isn't firing

While searching for solutions, I noticed various similar items but none were quite the same context as mine (Angular specifically, not using Ionic). My Cordova version is 5.0.0 (confirmed through 'cordova --version' in CMD showing 5.0.0, and in t ...

Using an ArrayList to display a RecyclerView Adapter populated with JSON data

I'm currently working on developing an Adapter for a RecyclerView that is being displayed using an ArrayList. However, I have a question regarding the public RecyclerViewHolder located at the bottom of the code. Should I include the ArrayList in it, o ...

Create custom styles for Android applications using CSS or themes programmatically

As I work on developing an application, I am interested in implementing a unique approach... To retrieve a CSS file from the server and apply it to the activity layout. To create a string file for styling or theming and integrating it into the layout. I ...