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
5 views

Software Design: Calculating distance to a location in Server or App?

I am new to mobile development and I undertook some freelance work. Now I am required to display a page with top N nearest places. I am wondering what the best way of going about this is, from my ...
0
votes
0answers
2 views

How connect my exist gradle with react native project?

when i download gradle file from here then where put this zip file? Tried to put in .gradle folder and then type react-native run-android so again download gradle file from above website but i ...
0
votes
0answers
5 views

Retain custom bool value set by OnClick event across swipes with SwipeAdapter

Im using a SwipeAdapter to populate a Fragment on an Activity. I want to hide certain items on the Fragment when I tap on the Screen.| Like "Testing flashcards" Problem is, every time is swipe, my "...
0
votes
0answers
5 views

volley server error when siging up a user

I'm trying to sign up a user using volley library but it keeps giving me Volley server error i've seen many solutions most of them i don't understand public void signUpUser (View v) { String ...
0
votes
0answers
3 views

Is there a way to set the inital value of textformfield with data from cloud firestore without the displayed data being enclosed in braces?

I'm retrieving data from firestore and setting the inital value of the textformfield with this data. I am able to get the data, However the data displayed is enclosed in braces and have tried to use ...
0
votes
0answers
6 views

Is it possible for my app to request permission to use resources from a third party app, not the basic android apps

I need an app that reads the messages from fb messenger and reacts to certain key words. Before i start i need to know if its even possible to get permission to read(not save) messages from fb. Of ...
0
votes
0answers
5 views

Blocking the Application class via runBlocking kotlin

I have a confusion about how Dispatchers work in Kotlin In my Application class if i write the following in onCreate() runBlocking (Dispatchers.IO){ delay(10000) } The ...
0
votes
0answers
3 views

How to send command linux from one device to another conneted via usb otg?

I made application which should send linux command to another device, when are together connected via ust otg. How can i send my command to another device? I made communication, and i can read for ...
0
votes
0answers
6 views

Android Studio “Function should activate only when i say ”Hello Bob“ ”

I want to program an app for android! My Question: If my app is open, I only want to proceed if I tell my app via microphone "Hello Bob". So like "Hello Google" and then a window appears, I want the ...
0
votes
0answers
4 views

Need assistance compiling libvncserver with libgcrypt

I'm recompiling libvncserver to ensure an android app has 64 bit native libraries. When building without gcrypt it works fine, but I need gcrypt in order to support certain devices. I ran cmake ...
0
votes
1answer
11 views

How do I releaze authorization function for android app?

I'm trying to releaze function for authorization my android app. I know there are many similar questions, but I'm interesting exectly to get function witch return "success" or "fauilure". ...
0
votes
0answers
4 views

Control window console from android

I was wondering if there is a way to control cmd from android app via wireless connection. I would like to push cmd command from android app and run the commands on the pc
0
votes
0answers
8 views

How to set RecyclerView Position with Firebase Adapter?

Since a long time i tried to pagination with firebase in recyclerview. And might be this is solution. Here i have method displayAllUserPost(); which run in first onCreate and then run at Bottom of ...
-2
votes
0answers
13 views

Handling HTTP errors with the new Retrofit 2.6.0 Coroutines support

I recently updated to Retrofit 2.6.0 to get native support for coroutines instead of having to use a custom Adapter class, like this: @GET("/my_super_cool_endpoint/") suspend fun getSuperCoolData(): ...
0
votes
0answers
6 views

Fragment Transitions via BottomNavigationView and Nav Graph

I use navGraph in android with bottomNavigationView and I want to change default transition when clicking navigation items. I created actions like <action android:id="@+id/...
0
votes
0answers
8 views

How to run exportJar task for multiple modules

I'm trying to run exportJar task for an Android app. The problem is that the app contains two modules. I followed this tutorial and I manage to properly import plugin that I made, the issue is that ...
0
votes
0answers
13 views

Intent object is null after capturing image from default camera app and results in error in onActivityresult [duplicate]

I am trying to capture image from default camera app of the system. But after clicking the image when my onActivityResult() method runs it shows intent object to be null. can anybody tell me what is ...
0
votes
0answers
8 views

POST fragment added items

Hello Dear Stackoverflow users! I've got a question for you about how to pass my items from fragment (shopping cart) to another fragment (order summary) and POST to my backend. I already made the ...
1
vote
0answers
19 views

How can i set a limit question for my code

how do i set a limit question for it public void setQuestion() { Random rand = new Random(); int value1 = rand.nextInt(100-10) + 10; int value2 = rand.nextInt(20-2) + 2; ...
0
votes
0answers
6 views

Compressor is abstract; cannot be instantiated

Trying to compress an image using a repository https://github.com/zetbaitsu/Compressor. I am following a tutorial video https://www.youtube.com/watch?v=fdkTWOJCY5c&t=915s I have added the ...
0
votes
0answers
4 views

How to investigate why gradle build is using cached resource ids

If have a gradle (5.4.1) project (plugin 3.4.1) with two flavors (main and other) using the same sourceSets. I've come across an issue when renaming a resource id (in a layout XML). Here are the ...
0
votes
1answer
10 views

React Native not Linking Modules with Android Studio

I recently had to start over with a backup for my Android Studio files for my React Native project. When I did that however, all of my modules became unlinked. File Directory Without Linked Modules (...
0
votes
0answers
8 views

HttpClient instance with HttpClientBuilder.create().build() doesn't work

I have a problem with HttpClient object instance. Using DefaultHttpClient (deprecated) constructor my app works but when I replace it with HttpClientBuilder.create().build(), this crash. This is the ...
0
votes
0answers
8 views

I want show Modal Bottom Sheet when I click the marker on Google Map Flutter

class Peta extends StatefulWidget { _PetaState createState() => _PetaState();} class _PetaState extends State<Peta> { Completer<GoogleMapController> _controller = Completer(); ...
0
votes
0answers
8 views

Run different quantity observables sequentially

I have a method like this public void loadData(String city) { mWeatherDataSource.getWeatherData(city) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers....
0
votes
0answers
8 views

Android RIL function of isInEmulator();

While Implementing RIL I have seen these line, I am newbie to development, Can somebody explain me what it does? inEmulator = isInEmulator(); if(inEmulator) { pthread_mutex_lock(&s_writeMutex); ...
0
votes
0answers
11 views

How can I set the height for a row header to match the largest cell contained in an Android TableView?

My app uses the TableView component (com.everencoskum.tableview). We have a new requirement which will cause the height of cells within the table to expand based on the data contained within the cell. ...
0
votes
0answers
8 views

Referencing Local File, How to Receive Resources.NotFoundException?

Given the following example (below) that will load a json file locally. Is there a chance of Resources.NotFoundException? If you reference a file that does not exist you receive a compile error. ...
0
votes
0answers
12 views

android: draw text in center of imageview

I would like to draw text onto a Bitmap, in center of the Bitmap. The codes are as follows: Code: public static ImageView getBallwithText(Activity act, String isSpecial, String text, String ...
0
votes
2answers
24 views

How can I create a time counter in android studio?

I'm trying to put a timer that begins at 0 on my app, and counts from 0 (seconds) changing from (1... 13... 59... 1:19, etc), and then ends pauses, or stops when the game ends. I want to be able to ...
0
votes
0answers
7 views

Compare JSONobject Arraylist with string array

I want to compare ArrayList to String[ ] and find matching and unmatching values and add matched jsonobject with true value of any key and unmatched with false value of key. For Example: String[] ...
-1
votes
2answers
23 views

I want to fill an arrayList with the integers between 2 numbers

I am trying to store an arrayList that contains all integers between two numbers that the user inputs in edit texts that I can access later. i've tried mostly to go with an if statement. but can ...
0
votes
1answer
6 views

Expected BEGIN_ARRAY but was STRING but JSON is correct

I have searched the other related questions but am not able to find my answers. This is my JSON: named appointments.json [ { "title": "Primary Care", "text": "Schedule a Primary Care ...
0
votes
0answers
9 views

How to run GATT command in Android

I'm developing an Android application for read/write data for a BLE device. The specification of the device has mentioned one service UUID and two feature UUIDs. Service UUID: 0xFFF0 TX UUID: 0xFFF6, ...
-1
votes
0answers
13 views

Android 9 doesn't show images in the list anymore

As a beginner, I've made a simple app just to practice my android skills (Android Studio, API 28). It's a list of products (image + text) and I've used RecyclerView for that. Links from my images (...
0
votes
0answers
6 views

dnsjava library return “no records found”

I'm using dnsjava in my android project "android studio" I have imported the library. But when I run the code I'm getting "no records found" does anyone face this? I found a post here that talks about ...
0
votes
1answer
6 views

Restrict user to drag view out of the layout in android drag drop

I have one ondraglistener I drop views on this listener by Onlongclick views but the problem am trying to solve is I want to restrict the view to be placed out of the layout view, it can't be placed ...
0
votes
0answers
11 views

When do we use method fail() in android testing?

In tutorial for testing android have found the method fail() which is from Asserts. So in which scenario this method could be useful?
0
votes
1answer
12 views

How to evaluate Checkboxpreference?

I want to evaluate checkboxpreference, tried some method from here but non of it worked. I need to get the value in the OnSharedPreferenceChangeListener, but not in PreferenceActivity. It gives an ...
-3
votes
0answers
17 views

How do I implement the user url feature like in Sarahah/Satat.me

I'm making an anonymous feedback android app. Can someone explain me how to implement the feature where user is assigned with an url and when someone clicks on it, anyone can chat with that specific ...
-4
votes
0answers
17 views

É seguro guardar a Chave do Servidor do Firebase no Realtime Database do Firebase? [on hold]

Estou fazendo um processo de envio de notificação no android studio e sei que não é seguro deixar a Chave do Servidor do Firebase Cloud Messaging no código fonte diretamente, então será que seria ...
-2
votes
0answers
15 views

I want to falling images using android phone gravity or any other sensor

I want at my splash Screen logo images of my android app will falling along the my device let suppose i move the device left right or in direction the images will fall on that side like gravity
0
votes
1answer
14 views

how to prevent double (or more) tap on viewpager

I have a viewpager where each page, if clicked, starts an activity. Now, it happens that if I click several times on a page before the activity starts, more activities are opened with the same page. ...
0
votes
0answers
11 views

Android app selectively displays Google maps

I'm having a strange issue with Google maps. We use them in our app to show some user trips and display those on the map with markers. The problem is some of the production apps don't display the map, ...
0
votes
1answer
12 views

Android localisation

After changing the language in the current activity when I press the back button in the action bar the language change is not reflected in the activity in the backstack. I am not understanding what's ...
0
votes
0answers
9 views

why can i request my local Arduino server by browser http, but not by my java Android-app http?

I am new in Android I let a simple server run on my ArduinoMega answering requests for sensor data. If I request by any internet browser from LAN/WLAN/phone to the Arduino, I get an answer as I ...
0
votes
1answer
16 views

Error: package android.util does not exist

I am trying to compile my java code, so I first convert it to .class, then to .dex and finally to smali, this has always worked, except for now as I am using the method Log.e() instead of System.out....
0
votes
1answer
18 views

Disable “don't ask again” radio button that appears if users deny permissions a second time

My app requires permissions in order to run. If users deny permissions on the initial run it will close. If they run the app a second time and deny permissions again, the third time they attempt to ...
0
votes
0answers
13 views

Where to put JAXB dependency for compiling Android Databinding on Java 11?

I am using Android Data Binding, and while things were simple it was working very well. However, once I added a BindingAdapter annotation, my project stopped building in Android Studio with an error ...
-1
votes
1answer
25 views

problem in FragmentHome.this how to fix it

Problem in FragmentHome.this as in Activity it accepts ActivityName.this but in fragment it shows problem I have tried getContext and getActivity is shows error I wasn to pass value to recycle view ...