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 determine if an application has been installed on an Android device while browsing a website?

Let's set the scene: I've got a website that needs to use JavaScript to determine whether my app is already installed on the android device it's currently being used on. If the app is installed, the page will display a link (with a custom ...

Implementing push notifications as a standalone feature in React Native

As I work on developing a React Native application, my goal is to create an npm package for FCM Notifications. This would allow me to easily incorporate the functionality into any project by simply providing the necessary information to the package, such a ...

Issue encountered during npm package installation

Every time I attempt to install browser-sync on my Windows command prompt, I encounter this error. Next, I decided to install weinre and faced a different error on the command prompt. Following the suggestion to check the error log at C:Windowssystem32 ...

When I exit an Android app that is currently running a CodeIgniter web application within the Android mobile browser, the CodeIgniter session remains active and does not properly

Hello there, I am currently working on developing a Mobile App with CodeIgniter and PhoneGap/Cordova. My application is designed to open a local static HTML file in the android web browser, followed by using window.open to redirect to an external URL on t ...

The recently released update to the Material Design website includes a fresh new layout, but I seem to be missing the implementation tab. Can anyone help me locate where it went

There used to be 5 tabs on the website - Overview, Specs, Guidelines, Implementation, and Accessibility. However, now there are only 4 tabs. I can't seem to locate the implementation tab in the updated design of the website. Where did it go? https:/ ...

The power of Ionic 2 combined with the Web Audio API

I am currently developing an Ionic 2 application that requires access to the user's microphone. When working on a web platform, I would typically use the following code snippet to obtain microphone access. navigator.getUserMedia = (navigator['ge ...

Decoding JSON in an Android mobile application

I'm a beginner with android and I have a `JSON` object. How can I parse my `JSONArray`? [ { "Men":, "shirts": [ { "name":"ABC", "image":"http://domain.com/image.jpg" }, ...

Encountering a memory issue when trying to parse a hefty JSON file using the Jackson library in an Android

Currently, I am facing a challenge with parsing a substantial JSON response from the server using the Jackson library. The size of the JSON file is approximately 7-8 MB. The error that I encountered while running the code snippet below: ObjectMapper mapp ...

Build failure in Cordova: support-v4.jar not found

I'm experiencing a build failure on android and after 3 hours of trying, I still can't figure out how to fix it. Here is the log that I got: ANDROID_HOME= C:\Users\User\AppData\Local\Android\Sdk JAVA_HOME=C:&bso ...

When extracting data, I am only receiving the initial row from the database, but I specifically require the latest row that was added in the database

I am working with a JSON data structure to fetch information from a database. However, the current implementation only retrieves the first row from the database whereas I specifically need to get the most recent row that was inserted. Here is my Java clas ...

What is the best way to send a multistring variable as a parameter to PHP?

How can I pass a string variable with multiple values (such as 1,2,3,4) into a PHP script through a URL parameter? Let's consider some PHP code connected to a MySQL server: $id_ = $_GET['id']; $q=mysql_query("SELECT * FROM brain WHERE bra ...

Getting a count value from the server and converting it into JSON format on an Android device

Seeking assistance with retrieving the number of rows from a server table using JSON parsing and PHP in an Android project. The PHP code shown below successfully fetches the value, but I am unsure about how to proceed with parsing the JSON data. Any guidan ...

The error message "E/Web Console(8272): Uncaught ReferenceError: functionName is not defined:1" popped up when trying to load web views within a

I'm working on incorporating webviews into a view pager. public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = null; v = inflater.inflate(R.layout.webview_layout ...

Troubleshooting Problem with Ionic Android Emulator

When using my app, I access an external API to retrieve data. The strange thing is that everything works fine on the browser and the built version, but when I try it on the emulator, the request gets rejected. However, when I test the app on an actual devi ...

Determine if an Android application has been installed using JavaScript or jQuery

I'm working on an Android app that is also accessible via a web browser. I want to add a banner prompting users to install the Android application if they haven't already. How can I use JavaScript or jQuery to detect if the user has the app insta ...

Having trouble executing a React Native project because of react-native-gesture-handler

After adding react-navigation and react-native-gesture-handler to my project, I encountered an error when running it with react-native run-android: What's the issue: Could not compile settings file 'C:\Users\pc\Desktop\GST ...

Unexpected behavior with the ion-datetime time picker on an Android device

I am encountering challenges with a Date and Time entry feature in my Angular/Ionic application that involves date pickers. When I tap on the Time field, the time picker opens. Everything works perfectly in my browser - I can select a time, spin the value ...

Generating a JSON array in PHP and decoding it in an Android app has encountered an error: org.json.JSONException is throwing an exception stating

I have been using the following PHP code to generate a JSON array: $jsonData = array(); $jsonTempData = array(); $count=0; $result = $link->query($sql); if ($result->num_rows > 0) { // output data of each row while($row = $result-& ...

Finding a specific number of records from an array of objects that also contain their own arrays can be achieved by using a combination of

I need a way to retrieve the last record from an ArrayList, but I'm facing a challenge because my ArrayList consists of a custom POJO class with its own array. This makes it difficult for me to determine the total number of records in the ArrayList. ...

Issues Persist with Updating mySQL Database using PHP

I've been attempting to insert location data into a MySQL database using my PHP server from the TripTracker Android App. However, despite trying different approaches in PHP, I have not been successful so far. Any assistance would be much appreciated. The i ...

Change a JSON String into an ArrayList to use in a Spinner

Received a JSON string from the server with the following values: {"server_response":[{"violation":"Driving with No Helmet"},{"violation":"Try"}]} Attempting to convert this JSON string into a String Array or ArrayList containing Driving with no Helmet a ...

Samsung devices exclusively showcase background in responsive design

I am encountering a major problem with my website design, specifically with its compatibility on mobile devices. To ensure its responsiveness, I have tested the design on my iPhone, iPad, and Windows Phone. Unfortunately, since I lack an Android device, I ...

A string was anticipated, however an object was encountered at line 3, column 4 in the document resulting in an

I recently implemented a post request method using Retrofit2, but I am facing an issue with the response that I receive. Expected a string but was BEGIN_OBJECT at line 3 column 4 path $.SUCCESS The expected response should look like: { "SUCCESS" ...

"Learn how to retrieve information from a MYSQL database and display it in an Android app

I need assistance with fetching data from a table and displaying it in an Android application. I have written a PHP file to retrieve the last record from my table and display it in a TextView in Android studio. Here is the PHP code: <?php require "con ...

Is there a way for me to see the changes I make in the react native source code reflected in the app

I have been making edits to the react native source code at this location: E:\project_name\node_modules\react-native\ReactAndroid\src\main\java\com\facebook\react\modules\statusbar\StatusBar ...

Creating and deploying a basic Angular2 application in cordova

I have a pre-existing app developed in Angular2, which is quite basic. Upon attempting to build it for Android using Cordova, the debug build successfully installs on the system but gets stuck at the loading stage. I am seeking guidance on how to ensure th ...

What are the steps to launch a React Native Application on Expo Client?

After creating an application using the command "react-native init MyProject" in Node.js, I am facing difficulties opening it on my physical Android device. Despite installing Expo Client and trying commands like "npm run start" and "react-native run and ...

The Cordova advanced HTTP POST request functionality is not functioning as expected

I'm currently in the process of connecting my backend to a cordova application, and at this early stage of development, I'm attempting to test it in the browser. Unfortunately, I'm facing an issue with the post request not working, as well as any api cal ...

What could be the reason my HTML5 application is not working offline on my android device?

Hello, I am encountering a problem and I could really use your assistance in figuring out what I am missing. There is a webpage that showcases numerous HTML5 mobile/web applications which can be found at For instance, let's look at this app where you can ...

How can we activate navigation on a mobile browser?

I am currently working on a small HTML5/JavaScript website designed to be accessed by mobile browsers on devices such as Android and iPhone. I am utilizing the geolocation feature of HTML5 to obtain the user's current location, but my goal is to then direc ...

Updating display following a Pop action using react-native-router-flux

I'm facing a major issue with my debut React Native application. I've dedicated several hours today to troubleshooting, but unfortunately, none of the solutions seem to work for me. The problem lies within two views: <Router> <Stac ...

Error message displayed when building a Cordova project: "Build Failed" due to issues

Encountering issues when attempting to build a Cordova project using cmd with Android 6.4.0 and also trying Android 7.1.0, but consistently getting a build failed message. The following error occurs after building the Cordova project: cordova build an ...

The networking feature stops functioning on Android devices after upgrading from Ionic 1.5.0 to 1.6.3

After upgrading from ionic 1.5.0 to 1.6.3 (the latest version), I noticed that networking ajax calls were no longer working on Android. I had to remove and re-add the android platform, and there seemed to be a change in the apk names from MainActivity-debu ...

Converting XML to Json with the help of Json-lib

Currently, I'm working on an Android project where I need to convert an XML document from a web source into JSON format. This is the approach I've taken: URL url; InputStream in; try { url = new URL("http://www.aemet.es/xml/municipios/localidad_4109 ...

What is the best way to load all Arraylists from the model function?

I am integrating the FlexibleAdapter library to retrieve data from a JSON API in my android studio project. public void createHolderSectionsDatabase(int size, int headers) { databaseType = DatabaseType.MODEL_HOLDERS; HeaderHolder header = null; ...

How can I store multiple objects of the same type within another object using serialization?

I'm trying to convert the JSON data below into a Kotlin data class for easier handling. I need a list of players, each represented as an object, but I'm struggling with serialization when dealing with objects of the same type. "Players" ...

The JSONObject encountered an exception as it could not find a value for the

Encountering the same old exception while developing my android application The 'message' key is missing in the JSON data I'm certain that the JSONObject I possess holds the desired information: View and analyze my JSON Object for bette ...

Older versions of Android, specifically Android 7 or lower, seem to encounter issues with Apis in React Native when utilizing axios. Fortunately, this problem doesn

For fetching the data, I utilized the 'axios' library. Surprisingly, it works flawlessly on newer Android devices (specifically Android 9 and 10). However, when it comes to older devices like Android 7 or earlier, a persistent Network Error occurs. The err ...

Use an EditText to capture user input, then pass the variables to a Webview by executing a javascript command

I'm currently working on a basic web application that aims to streamline the user experience by eliminating the need for repeated credential input upon website access (without saving passwords). After some exploration, I was able to identify and manip ...

Retrieve information from MySQL database to display in Android application

I am trying to retrieve data from a MySQL database using PHP and display it in an Android activity. I have coded it to pass a JSON Array, but I am encountering a problem connecting to the server because my database is located on a local server. Can someone ...

Is there a Unicode character substitution happening?

There are certain mobile browsers that appear to have trouble supporting all unicode characters, such as the down arrow icon like this: span.icon:after { content:"25be"; } Currently, no symbol is shown. Is there a way for me to identify this issue ...

Verify if the application is installed on the device through programmatic means

Some may argue that this question is duplicated, but I believe it's not. I have installed an app on the emulator and am currently running the following code to check if the app is available. If the app is indeed available, it returns true. See the co ...

Enhancing React Native experience by dynamically editing array elements

This code block defines the state of my program, including an array: this.state = { arr: [{ arrid: 0, arrEmail: '', arrName: '', arrPhone: '' }], id: 0, email: "", isChecked: true, name: "", phone: "", isOpen: false, edit ...

It seems like NativeScript is facing compatibility issues on Linux systems running Node.js version 11.1.0

Setting up NativeScript on my Arch Linux machine has been a bit of a challenge. When I try to run tns doctor, I keep getting the following error message: Support for Node.js 11.1.0 is not verified. NativeScript CLI might not install or run properly. Refe ...

Selecting an element from CSS using Jsoup

Is it possible to retrieve all images that do not have the first class attribute as "content.slide0"? In my example, I am utilizing the Jsoup library to display selectable elements in a WebView. Elements element = doc.select("HERE_SOLUTION"); <head ...

When a block reaches a certain height, the mat-chip-list in Angular Material is automatically shortened to fit. This feature is exclusive to

<div fxFlex="100" fxFlex.gt-sm="80" fxFlex.sm="100"> <div *ngFor="let permission of arrayOfObjectPermissions; let index = z" class="permissions-list"> <mat-card [title]=&qu ...

Exploring the Issue of Switch State Not Persisting in DropdownMenu in Jetpack Compose

Seeking assistance with creating a to-do app for Android incorporating Material 3 & Jetpack Compose. Need help in implementing a drop-down menu feature that enables users to filter tasks based on their specific "Category" preference using Switch. Here is a ...

The application experiences crashes when the tablet is rotated, happening while in the development stage

For my web-based Android application project, I am utilizing PhoneGap and Eclipse IDE on a Windows platform. My focus is specifically on Tablet development, more precisely on the Samsung Galaxy Tab 10.1. To develop, I use Eclipse and test the app on the ...

Is it still possible to utilize ref in React Native despite its deprecation?

I need help with updating my code that uses the ref attribute to show a custom alert. I received a warning about deprecation, so I'm looking for a replacement method or alternative solution. Can you provide some guidance on how to achieve this? <My ...

Unable to convert JSON data to char array due to a NumberFormatException while using editText

I am attempting to parse JSON on Android, and after parsing the JSON, I want to convert the inputted ID in Edittext to a char array. However, I am encountering a NumberFormatException. I don't think this is a silly question, but where could the prob ...

Struggling to understand what's causing this JSON parsing issue

Currently, I am facing a challenge in my Android application where I need to display JSON data from a Webserver in a ListView. While the app successfully receives the data, it encounters an issue when trying to process it for display. The specific error m ...

Implementing JSON Parsing to dynamically add markers on Google Maps by passing a tag in the URL

There is a URL where I need to parse some information, including latitude and longitude, and display them on a map. Parsing and adding markers to the map seem to work fine. However, the markers are not being displayed, only the map itself. Initially, I tho ...

Button react-native press following textInput within scroll view aware of keyboard movements

I'm currently facing an issue where I have a TextInput and a button nested inside a KeyboardAwareScrollView. The goal is for the user to input some text and then tap the button created using TouchableOpacity, which should send the inputted text forwar ...

Capacitor-enabled Ionic Audio Recording

Finally completed my chat app, but I am looking to enhance the voice messaging feature to be more in line with Messenger rather than a standard file.wav format. Any suggestions or ideas would be greatly appreciated! https://i.stack.imgur.com/soXZC.png Cu ...

Tips for troubleshooting common network errors in Volley

When attempting to access this function through WiFi, it works fine. However, when using a mobile network, I encounter the following error: D/Volley: [3641] BasicNetwork.logSlowRequests: HTTP response for request=<[ ] 0x95bac5ee NORMAL 14> * 2020-0 ...

Designing an architecture for a Java, Android, and database application - what will the final app's appearance be

I am currently working on a website where users need to complete tasks using an Android device: Fill out a simple HTML document. Sign the document on their Android device. Save the data entered into a database on the website. Some key points to consider ...

Error encountered during build: The specified resource value for <color> is invalid

Whenever I attempt to launch my Flutter App on a Pixel 5 Device, I encounter this error message: /Users/username/.gradle/caches/transforms-3/0ace7b4637c402760ef38d3581a65ee0/transformed/appcompat-1.4.2/res/values/values.xml:37:4: Invalid <color> for ...

When viewed through the Firefox browser on an Android device, the text on the webpage suddenly enlarg

I currently have the following content displayed on my website: <div style="font-size: 11px; line-height: 17px; text-align: left;"> <p>lorem ipsum etc etc</p> </div> Strangely, despite setting the font size to 11px, the te ...

Ways to utilize the image string obtained from the .getExtra method

I have successfully created a listview in my app and parsed JSON data into it, including images and text. Now I am facing an issue where I need to pass the image to another activity when the user clicks on it. I can easily pass text data using putExtra, bu ...

javascript/jquery: ensure Android device displays content in full-screen mode

Currently working on developing a web app specifically for an android device that needs to be displayed in fullscreen mode. I came across the code snippet above on stack overflow, which successfully activates fullscreen mode upon click event. However, I a ...

Step-By-Step Guide on Creating a Data Post Using HttpUrlConnection

Here is an AJAX code snippet I have: $.ajax({ url: 'http://www.whoisxmlapi.com/whoisserver/WhoisService', dataType: 'jsonp', type:'POST', data: { domainName: 'domaindomanin.com', outputFormat: 'json' }, success: fun ...

Developing a Web service in .NET 4.0 for fetching JSON data on Android devices

Currently, I am without any code at hand. My task involves building a webservice that can retrieve data from a database in JSON format to be used in an Android application. I'm feeling a bit lost on how to get started with this project. Any guidance or a ...

Managing JSON data with tab fragments on android devices

I am a beginner in the world of Android development and I am currently working on accessing JSON data for my project. The app consists of two tabs within a viewpager - the first tab displays information about events while the second tab contains a custom l ...

When attempting to tsudo npm install on Termux for Android, error code ENOSYS and error number 38 are encountered

I am developing a Node.js application and I want to run it on my Android device. To achieve this, I have installed Node.js using Termux. My Android device is rooted. However, when I try to run the command: tsudo npm install I encounter the following er ...

Reading JSON files from the www directory of an Android Phonegap application with AngularJS

I'm attempting to access a local JSON file within the www directory of my PhoneGap application. Unfortunately, I tried using the $resource service in Angular to load the file, but it was unsuccessful. $resource('/app/www/app/Commun/JSonFiles/: ...

Encountering an issue with GSON while attempting to convert an array of objects with

I'm trying to make a HTTP request using Retrofit that should return an array of objects, but unfortunately I'm encountering the following errors: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARR ...

LocalStorage in Angular application failing to function in Android web view

Working with Angular 4, I've developed a web application that stores the user security token in localStorage after login. The application uses this localStorage value to control the visibility of certain links, such as hiding the login button once th ...

What is the best way to extract a single String element from a List<MyList> Array list?

I have been working on implementing a RecyclerView where I retrieve data from an API in JSON format. To achieve this, I created two models - one for my RecyclerView data and the other for my calendar view. The data retrieval for the RecyclerView using a cu ...

Cricket score update features on the client side

Looking for assistance with client-side code development! I am currently working on an Android application using Ionic that involves live cricket scores. I have purchased a cricket API and understand how to connect to it using Node.js on the server side. ...

Experiencing a problem while attempting to start an Android React Native project

Whenever I try to execute the react-native run-android command, the following message appears: info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jetifier found 998 file(s) to forward-jetify. Using 12 wo ...

Press the Android Back button through code in React Native

Is there a way to simulate the pressing of the native Android back button within a React Native application, even if it is controlled elsewhere in the code? For instance, <Pressable onPress={nativeGoBack} /> The action triggered by this event is th ...

React Native is having issues with text cutting off during rendering

I have been developing an app using React Native, and everything seems to work fine on most devices. However, I have noticed that on some Honor and Samsung devices, the text is getting cut off suddenly. How can I address this issue? Here's an exampl ...

Parsing a multidimensional array using JSON arrays

My current challenge involves working with an array called jArray, which is structured as follows: {"users":[ { "user_id":6, "user_name":"Ted Vanderploeg", "email":"<a href="/cdn-cgi/l/email ...

Is there a way to adjust the StatusBar color or make it transparent on Android when working with NativeScript and Angular?

I am having trouble changing the StatusBar color in my NativeScript with Angular project. It currently appears as translucent black, darkening the background behind it. I want to either make it transparent or match the background color of the page. What I ...

React-Native Error: Invalid element type detected

While attempting to run my React Native app on my iPhone using Expo, I encountered an error displayed in a red background area. Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite ...