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, not intent, android-activity, not activity, android-adapter, ...
1,131,141 questions
0
votes
0answers
3 views
Create custom android keyboard with keys that have one charcter above another
I need help getting a custom android keyboard to have keys with one
character above the other, like the stock samsung keyboard.
I understand i need to use ondraw, import.graphics.x and so on, ...
0
votes
0answers
3 views
button does not appear in design view android studio
Building an android app. The idea is to open a second activity.
When building get an error class interface or enum expected where it says Activity { Button button ... and also where it says void
I ...
0
votes
0answers
2 views
Use getter/setter to save/access variable extracted from JSON in Android with Volley
I need stract data from a json, idVideo variable is saved in setter from Video class, then i have other method for acces with getter but the value is always null.
Code from method extract data JSON:
...
0
votes
0answers
4 views
How to know when the phone connects to a WiFi network
I've been looking for a way to know when my Android smartphone connects to a WiFi network and IS READY to connect to a certain server to exchange data.
I have already tried setting a broadcast ...
0
votes
0answers
6 views
React Native: blob.data undefined file access api on android
React native now supports blobs https://github.com/facebook/react-native/releases/tag/v0.54.0
I cannot make them work on Android.
axios({
method: 'GET',
url: imageUrl,
responseType:...
0
votes
0answers
5 views
Issue to pass JSON string from fragment to adapter
I am a newbie to android Development, I was trying to implement a list view with items, by which when an item clicked it should display another list view with lists of specific items, I used JSON ...
0
votes
0answers
4 views
Read Data Structure value binded to Bluetooth LE Descriptor in Android
I am writing an android app which reads the data sent from an arm processor over BLE (with characteristics and descriptors). in the hardware part I am using the function below :
tBleStatus ...
0
votes
1answer
8 views
How to use Dagger2 in Android to inject activity objects easier?
On Android, When using Dagger2, I have to call the following line on every activities that uses apiService:
@Inject
public ApiService apiService;
@Override
protected void onCreate(Bundle ...
0
votes
0answers
5 views
Options available for cloud resource and DRM management for mobile app
As a straw man, consider a mobile car racing game (on iOS and Android). Each car could be a separate purchase. Each race track could be a separate purchase. Users could download or delete any of their ...
0
votes
0answers
3 views
Prevent flickering on camera preview update
I am using the frames that I receive from a USB camera (Using the UVCCamera library) and I apply a blur effect using RenderScript. The frame format is NV21. The blur effect created by RenderScript ...
0
votes
0answers
6 views
How to add a Linear Layout dinamically to Fragment [duplicate]
Im working with fragments and adding dinamically stuff to it.
What Im trying to do is adding a relative layout inside the fragment.
The relative layout has some width , height and a drawable.
It ...
0
votes
2answers
13 views
Firebase storage, cannot get download url successfully. (Android)
this is my code so far.
public void getimage() {
FirebaseStorage storagi = FirebaseStorage.getInstance();
StorageReference imagerefi = storagi.getReference();
userimage = (ImageView) ...
0
votes
0answers
5 views
Override not working on onNewTask() in FirebaseMessagingService
I've just installed Firebase in my Android app to enable push notifications. I confirmed it's working by sending a push notification from the Firebase console to all devices running the app. Now I'm ...
0
votes
0answers
9 views
How can i use different slot to make a call in Android Studio
need help to make an application who let me make a call with any slot for dual sim devices in android Studio .
0
votes
0answers
3 views
Ionic Image Resizer not working on Android Oreo
Recently I've been having issues using the Image Resizer plugin from Ionic 3. As the title says, it does not work on devices that run Android Oreo. I've tried on older versions, like Nougat 7.0, and ...
0
votes
0answers
14 views
scheduleAtFixedRate doesn't repeat runnable [duplicate]
It's my first attempt to create an action in activity, which should repeat periodically.
My snippet looks like this
private void setBackground(final ConstraintLayout mainActivityLayout) {
//...
0
votes
0answers
15 views
Trying to change a state
The following code is a tool bar that has a star icon that will allow a user to favourite a song.
const songFavIcon = (props) => {
const { state, goBack, color, size, fetch, ...
-1
votes
4answers
30 views
Superclass and class having the same method
I have a superclass called Base, that implements two functions:
protected void callSomething() {
doSomething();
}
protected void doSomething() { }
The second class only exists because I need it....
0
votes
1answer
8 views
Freshly created ionic3 app not working on android device
I have created a new Ionic 3 app, i haven't touched it yet, it works fine on browser however when i tried to build and run it on a actual android device, the generated apk output is always
"Couldn'...
0
votes
1answer
16 views
Notifications oreo api 26 - were working perfectly, now they're not
thanks for your time.
I had notifications working perfectly after implementing channels etc,
but then they suddenly stopped working. I'm wondering is it the dependencies or something?
Notification ...
0
votes
0answers
20 views
Create image files which don't appear in galley
I'm creating some image files from bitmaps in my android app and I don't like them to be shown in device gallery. Just like Telegram that saves images in Telegram folder but they never show up in ...
-1
votes
2answers
25 views
Android - How can I create layout as per image attached for different screens?
Android - How can I create layout as per image attached for different screens?
0
votes
0answers
12 views
Elastic data won't display properly in android
I have created an elastic index with products
And every product has a
Category, Sub category, Sub Sub Category.
I have hardcoded name of all Category, Sub Category and Sub Sub category in my ...
-3
votes
0answers
19 views
How to fix “Expecting a top level declaration” in Android studio
How do I fix the error of "Expecting a top level declaration" in Android studio activity_main
0
votes
2answers
23 views
NullPointerException for LatLng GPS location
I am using Google Maps to obtain my current location and display a red marker on my location. So far it only the mMap.setMyLocation(true); works for my location. I am getting NullPointerException for ...
0
votes
0answers
6 views
Phonegap InAppBrowser Socket.io not working after restarting Android App
I built an Android App on build.phonegap.com
Socket server: EC2 on AWS
Client code:
var socket;
socket = io('wss://mydomain.com:3000/my-namespace', {
query: userName
});
Success Way 1:
Socket ...
-1
votes
0answers
15 views
Finding location by area code - Android Studio
Okay, I'm very basic on computer programming and even more new to Android Studio, but it's becoming a tinker time project of mine.. here is the issue.
I want to build an app where someone can enter a ...
0
votes
0answers
12 views
build failed Google io 2018 (iosched)
Download the project of Google IO 2018 (iosched), try to compile it in Android Studio 3.3 Canary 7, also the probe in 3.2 RC1. But I get the following error:
error: resource style/TextAppearance....
0
votes
0answers
5 views
Fresco library not loading imagi on api 26
public void LoadImageByFresco(SimpleDraweeView sdView, String url) {
{
try {
String BASE_URL = ApiConfiguration.BASE_URL_STAGING;
if (SessionManager.AppProperties....
0
votes
0answers
14 views
Xamarin Plugin Geolocator not working on Xamarin Forms android
I have installed the following nuget:
Xamarin.Forms.Maps Version => 3.1.0.697729
Plugin.CurrentActivity => 2.1.0.4
Xam.Plugin.Geolocator => 4.5.0.6
Plugin.Permissions => 3.0.0.12
I have the ...
0
votes
0answers
10 views
Android Logic Based On Multiple Live Data Values
I am using the Android data binding library to make reactive views with LiveData
I make a repo request for a list of jobs
var jobsRequest: LiveData<Resource<List<Job>>>
= ...
0
votes
0answers
15 views
Socket send buffer queue stuck in Samsung
I'm developing an Qt Android app that sends UDP audio packets every 10 ms. In some devices like Google Pixel 2 it works fine and data arrives to the server on time. However in Samsung devices like S8 ...
0
votes
4answers
29 views
Best way to dynamically render different views in Android?
I am relatively new to Android development and I am confused on what would be the best way to dynamically render different views in Android.
I have an activity that searches through a database of ...
0
votes
0answers
7 views
Error cordova build android
Tengo que hacer una modificacion a una app hibrida existente, esta construida con ionic y cordova, y la abren desde visual studio 2015. Pero al ejecutar "cordova build android", estoy obteniendo el ...
0
votes
0answers
13 views
Getting the caller ID in Android 9
I have been using the following code in a BroadcastReceiver to get
the caller ID of incoming calls:
@Override
public void onReceive(Context aContext, Intent aIntent) {
String action = aIntent....
-1
votes
1answer
28 views
database created on emulator but not on device
in the following class i have created methods to create and manipulate the database
package com.ashish.testquiz2;
import android.content.Context;
import android.database.Cursor;
import android....
0
votes
1answer
25 views
LinearLayout color changing (Smooth animation)
I have a LinearLayout with an initial background (lets say : #ff4455) and I want the background color to change to another value when clicking a buttonin Smooth way (FADE) .. How to do that ..
NOTE :...
0
votes
0answers
12 views
Error creating a new Native-Application (Android) in Visual Studio 2017
I just installed Visual Studio 2017 latest and included Visual c++ cross-platform for Android. The installation was successful. After installation I created a new project Native-Activity Application (...
0
votes
3answers
33 views
Cannot return string from function Kotlin/Android Studio
I have a button that calls a function:
btnRegistrationRegister.setOnClickListener {
val email = etRegistrationEmail.text.toString()
val password = etRegistrationPassword.text....
0
votes
0answers
9 views
Appium isn’t able to detect activities from my app
This is an issue I had using Appium from a Mac on Android.
Appium isn’t able to detect activities from my app. It was detecting these fine with another version of this app, and I’ve confirmed with ...
1
vote
1answer
21 views
How to get RadioGroup checked state in Recyclerview?
Before asking this question I have searched for it, there are plenty of solutions for it but that are not what I want.
I have a RecyclerView with a RadioGroup with 3 Buttons . I want to get the ...
-3
votes
0answers
18 views
Which app creator would you recommend me for my project?
I am planning to create an app for my local community (I am collaborating for a disabled people "ONG" in Barcelona). The idea for my app would be a platform (with assigned users and passwords) with ...
0
votes
1answer
28 views
Button not responding when clicked
I am new to Android Programming and I wanted to make a simple app where the user would enter there name and after they click the button, it would say Hello (name of person). Also the button will ...
2
votes
1answer
39 views
Reduce space between menu items
I have the following menu:
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:title="@string/...
0
votes
1answer
37 views
Refactoring of switch statement calling other functions
I've a big switch statement in my fragment class. Each case call other functions that for example download an Image and display It, or inflate a layout and show It. Is It a bad pratice? I've read that ...
-1
votes
1answer
23 views
layout_alignParentBottom to LinearLayout not showing in screen
I am making form in my application in fragment. My parent view is RelativeLayout and in that i have ScrollView and Linearlayout. Scrollview contails form and LinearLayout contains Buttons to submit ...
0
votes
1answer
22 views
Interstitial Ad not loading
Okay this is embarrassing but I have been trying to load interstitial ad and it just does not load and I don't understand why even the logcat does not say anything. I have used the same code in two ...
-1
votes
0answers
8 views
Display dynamic text instead of 3D object in vuforia android sample after image recognition?
What I want to do is display text instead of 3D object in vuforia sample after image recognition. Like if I scan a shoe image, it should display the name of the shoe, brand and shoe details in real ...
0
votes
1answer
43 views
Can not read any text file
First of all, I would like you to say that I am quite new here and I'm also a beginner in Android Studio and Java.
My problem/question is:
I have an App in Android Studio which should write a string ...
0
votes
0answers
18 views
How to only update new data from firebase android?
I new with Firebase , and also have a problem. I have RecyclerView, it does run great until I'm adding new child on the realtimedatabase.
The data that I adding is accumulate or doubled. Example I ...