Questions tagged [android]

Android is Google's mobile operating system, used for programming or developing digital devices (Smartphones, Tablets, Automobiles, TVs, Wear, Glass, IoT). For topics related to Android, use Android-specific tags such as android-intent, android-activity, android-adapter and etc. For questions other than development or programming, but related to the Android framework, use this link: https://android.stackexchange.com.

0
votes
0answers
2 views

How to use ViewPorts to scale ImageButtons for different resolutions in libgdx?

I am new to the libgdx framework trying to make a game but the problem here is i don't know how to scale the ImageButton for different screen sizes it looks big on desktop but looking small on the ...
1
vote
0answers
5 views

Add objects to an arraylist from within inner class

I am writing an app to fetch data from my online database using a callback function to a recyclerview in my fragment. As you will see in my code below I have tried to show all the relevant pieces of ...
0
votes
0answers
6 views

FCM PUSH NOTIFICATION dosen´t work on Android 4.4

I have an application then when compile for android 8.0 works perfectly,get the notification in the notification center of the mobile.. But if compile for android 4.4 doesn't work ,(do not get the ...
0
votes
0answers
8 views

How to save ListView position?

I have custom ListView I just want to save scrolling position if the user want to go back to list view activity I tried a lot of answers here and none of them work for me. Here is my code. lst = ...
0
votes
0answers
9 views

Params for login not posting via REST using Volley

I'm trying to get my Demo Login Android Application to login via REST on my server with a login.php app which queries the local MySQL Database on the server. When I run the REST Query from Insomnia, ...
0
votes
0answers
6 views

what's the situation when WMS call addAppWindowToTokenListLocked

There is a task with {ActivityA,ActivityB}.ActivityB is int the top of the task, if i start ActivityB again in ActivityB and its launchMode is standard.Would WMS put the windowToken of new Activity ...
0
votes
0answers
11 views

I don't know about increasing the speech recognition time in android's speech recognizer

"Hello, I'm Korean and I'm not good at English. But I'm developing android application using the speech recognizer in Google API and I want to increase the recognition time but When I click the button ...
0
votes
1answer
6 views

How to make the probability of a element being selected twice lower?

This code selects a random number from 1-27 and assigns that number to a index. Random A = new Random(); int picture = A.nextInt(27); driver.findElement(By.xpath("//android.widget.RelativeLayout[@...
0
votes
0answers
12 views

Sending an arrayList to custom adapter increases its size in fragment

There is something I don't get here .I have a listView with a custom adapter ,I sent to the adapter an ArrayList assigned it in the constructor and in the getView method changed its value then its ...
0
votes
0answers
7 views

Request Denied - autocompleteFragment

I got into a problem with autocompleteFragment, all works fine except when i click the search box and i type a single letter. Error pops up in logcat and closes my application: 2019-03-23 02:53:39....
0
votes
1answer
12 views

Android Application Memory Usage with Google Maps & Memory Limits

I'm relatively new to programming and am building an app for practice/fun, but I'm having trouble understanding memory usage in Android (even after 12 hours of research). I've created an Android app ...
0
votes
0answers
12 views

How can I properly and permanently hide the status and navigation bars on Android?

I'm building an app for Android (6.0, but I can change it if necessary), and having trouble getting the status and navigation bars to hide properly. I've followed every online suggestion I can find, ...
0
votes
0answers
8 views

Is there any way to update android app using phpmyadmin server?

Is it possible for an android application to check and update itself from phpmyadmin server?
0
votes
0answers
6 views

Date format changing on RTL devices?

I have a date field that is presented great on LTR devices (android 7.1.1) The issue is that on RTL devices the date field content is mirrored So on US devices the date will appear normally : 03/14/...
0
votes
0answers
14 views

How to import class and android.support.v7.widget.CardView in eclips NOT in Android studio

I need to know to to import class and android.support.v7.widget.CardView in eclipse NOT in Android studio. I tried to find the build.gradle in eclipse but not found there Exception details are ...
0
votes
0answers
13 views

LayoutParams overwrite themselves

I'm developing a little game and I need to give different ImageViews different LayoutParams. Therefore I created an array ConstraintLayoutParams. After changing the properties of the layoutparams ...
1
vote
0answers
14 views

Why is my onActivityResult() always returning false?

Im trying to set up google sign in for my app but it keeps failing, i click on a button, get a popup, select account and a Toast pops up telling me that sign in failed. Any ways i can fix this? The ...
1
vote
1answer
13 views

Error:Failed to resolve: com.squareup.sdk

So I'm trying to set up the Square Reader SDK through android studio, and I run across this error when trying to complete the 3rd step in "Configure the build dependencies" I'm following through the ...
0
votes
0answers
9 views

How to create a touch event in a fragment for add/delete nodes(with grathstream)?

I'm creating an application that creates graphs (nodes and edges), I wanted to implement a touch method to create the node, but I'm having difficulty, because when I touch the canvas to add the node ...
0
votes
0answers
13 views

Android- Context menu not showing over selected menu item in list view

I'm working on a notepad app, and I'm having trouble with the context menus. The app has files/folders, so I have two separate context menus (one for files, one for folders). I got the menu to show ...
0
votes
0answers
8 views

Get column from another entity using foreign keys in Room

I have two different entities. One has two references to the other one and I need to get a attribute of the reference. my_main_table.primary_type is a foreign key of types._id and my_main_table....
0
votes
0answers
11 views

Drawable Shape padding vs. View padding?

I have a RadioButton which uses a drawable shape as the value for it's background attribute: android:background="@drawable/secondary_button" <RadioButton android:text="Male" ...
-3
votes
0answers
11 views

Do you need to install the android app created when developed to fill in a form?

I am new at starting to develop an android app to fill in forms. I need to create an app in order to let another android devices to fill in the form without installing the app, is this possible? Is ...
0
votes
1answer
13 views

Programmatically draw vector drawable / SVG on to screen

I'm trying to programmatically draw an SVG on to the screen. The code below is what I've tried, when I run the program nothing shows up. public MainView(Context context) { hexagon = ...
0
votes
0answers
13 views

AutocompleteSupportFragment.setPlaceFields crushes App on start

First,i'd like to say that i'm new in this "Programming world", but I've been struggling with autocompleteFragment by google Places, i'm trying to implement autocompleteFragment in my app, but after ...
0
votes
1answer
13 views

Android Studio is not recognizing Keystore alias while generating signed apk

I am getting this error everytime I tried to generate my signed apk through Android Studio: No key with alias 'Operator_keystore' found in keystore PATH/OrderOperator_keystore Previously I ...
0
votes
0answers
15 views

How can I generate both Android and pure Java libraries from a single code base?

I am working with a codebase that is Java bindings for a native library. From this single codebase I would like to generate: jars for several Android ABIs jars for x86 on Windows, Mac and a Linux ...
0
votes
1answer
12 views

Google Places API AutcompleteSupportFragment not requesting focus

I am using the autocomplete support fragment from the Google Places API and am facing a small issue. When I click on the search button (Shown in 1). I am able to see image 2. But what I want to see ...
0
votes
0answers
5 views

windowManager.getDefaultDisplay().getMode() always returns the highest resolution mode on my Samsung S9

Samsung S9 has 3 display modes. I try out all of them and expect the display.getMode() api to return the active mode of display. However this api always returns the highest resolution mode which is ...
0
votes
1answer
24 views

I'm trying to use a variable when setting image resource in android studio

public void showRideInfo(int id){ String ride ="ride" + id; image.setImageResource(R.drawable.ride); } I am trying to set an image to the result of what is passed into the method. So the ...
0
votes
0answers
10 views

How to connect Android device as Jenkins slave to execute automatic tests

I am trying to execute automatic tests using robotframework + appium + Jenkins. My biggest problem is to set up the necessary infrastructure. I have a Windows VM (slave) with 4GB RAM but the emulator ...
0
votes
0answers
12 views

How to add content to programmatically generated linearlayout

I need to generate some tiles (vertical LinearLayout) dynamically. Inside each tile, there will be an image on the left and some text like Temperature, Humidity and Status to the right. The image, ...
0
votes
0answers
9 views

Phantom images on SurfaceView if app comes to forground again before onPause completes

I am writing a game for Android using the Java for the user interface and C++ with the NDK for the render thread. It uses Vulkan if available and otherwise uses OpenGL ES. This bug occurs in OpenGL ...
0
votes
1answer
16 views

Converting android java project to android kotlin project

I have decided a few weeks ago to start converting my existing app (I wrote it in java) to kotlin. I converted only one activity and I wanted to check the functionality before I will move forward and ...
0
votes
1answer
5 views

Where is the APK file created when building with Ionic 4 and Capacitor?

I would like to get the APK file so I can install it manually rather than running through android studio. If I search in the android directory I can see a few and the most likely is: [project]\android\...
0
votes
0answers
9 views

How to capture when user clicks on microphone on soft keyboard

I want to display a volumizer to show the volume of sound after user clicks on EditText field and clicks on mic button on the soft keyboard. I got the volumizer to work using MediaRecorder. But not ...
0
votes
1answer
13 views

ERROR: Failed to resolve: com.google.firebase:firebase-core:16.1.0

While trying to connect Google Firebase to my Android Studio project, I keep getting "ERROR: failed to resolve: com.google.firebase:firebase-core:16.1.0" whenever I try to sync my project. I've seen ...
0
votes
0answers
16 views

How can I determine what causes app to stop running

My app compiles without issue, other than a warning about cursor deprecation, and is deployed and runs correctly but stops after a few minutes and asks 'open app again?'. It reopens correctly. The ...
0
votes
0answers
9 views

Glide ModelLoader that loads either from local or remote

I have a custom Glide model to calculate the center crop for image. The same model is used for getting images from server and also from local storage. Here's the model interface: interface ...
0
votes
0answers
11 views

Setting system clock in Android [on hold]

I have written an Android 5.1 application on a rooted tablet. Now I would like to set the system clock of the tablet from time to time using pool.ntp.org (similar as ClockSync does). How can this be ...
0
votes
2answers
23 views

How to select a random element by its index?

Lets say I have five elements in an android app with their own respective index driver.findElement(By.xpath("//android.widget.FrameLayout[@index='0']/android.widget.ImageView[@index='0']")).click(); ...
0
votes
0answers
13 views

onBindViewHolder execute first ViewHolder only

I have three ViewHolders CardViewHolder, TitleViewHolder, GridViewHolder, for switching between it when user choose a specific layout, everything working good expect when I trying to switch to Title ...
-2
votes
1answer
32 views

how to select from sql?

I have a sql statment in my app (basic4android) which is: <i>"SELECT * FROM `TempCodes` WHERE `Code` ='" & TempCode & "'"</i> after running this and sending to php file i get ...
0
votes
0answers
17 views

Transparent white toolbar like new Gmail

In the new Gmail app, in the mail activity. The toolbar is white, and when you scroll down, the text appears under the toolbar (the toolbar is part transparent). When I've tried to do this with alpha ...
0
votes
0answers
10 views

Broadcastreceiver to receive notice of server disconnection on Android

I'm doing an application type TCP Client on Android, everything works ok but I need a Broadcastreceiver to notify me when the server is turned off or disconnected, please can someone tell me how to do....
0
votes
1answer
19 views

How do i pass JSON data between 2 fragments?

I am retrieving my JSON as follows : myResponse.java : public List<Repo> getData() { return data; } public void setData(List<Repo> data) { this.data = data; ...
0
votes
0answers
13 views

Gps gap problem in fused location provider

I am developing a GPS monitoring application but I am having problems receiving the GPS updates when the application is running on background. During the route the GPS stops updating and only starts ...
0
votes
0answers
19 views

It is possible to keep track of the visited URLs on an Android or iOS device?

I have an idea to create an application on Android and iOS that tracks the number of times a user visits a website. I want to know when a user enters a website, for example google, twitter, or ...
-1
votes
0answers
17 views

WebView doesn't appear the same on small screen

The app that I've made has a webview which displays a website. The webview works well but some parts off of the content in webview are cut off on small size devices. Here is an image https://imgur....
0
votes
1answer
32 views

What's the best way of making single app with different logic depending on the user's role?

Let's say we have two user roles: Reader Writer Now i need to allow users to create posts with role writer. Reader role can only read and mark it's read. They have same entry point with almost same ...

http://mssss.yulina-kosm.ru