Newest android Questions

Q&A for professional and enthusiast programmers

android How to Change Layout on orientation change with retaining state like youtube app?

How can a layout be changed with orientation change like the youtube app does ? It seems like a RecyclerView that changes the item layout when in landscape mode, how can this be done ( I believe the ...

Show certain text in TextView Single Line

For example, this is the original string s Google Android Gmail Youtube Apple iOS <TextView android:id="@+id/text" android:layout_width="match_parent" android:...

Input programmatically text in fields in webview after load page

I have some issue about WebView. I have some page. This page have two input fields. We can input some text in field when the page is loading. But, can I set this fields after loading? For example, ...

Latence of ormlite actions

I'm working on a soap webservice, i'm sending data collected in database, so in the process, I'm doing updates on my object to know if each process in the full process are done. Now i'm using ormLite ...

Fuse on android

I'm trying to use FUSE to mount a virtual FS on a rooted android. I've compiled a simple program that mounts a readonly virtual FS containing a single file (hello) containing the contents Hello world. ...

Cannot initialize UART service on Android

I am developing mobile app which working with sensor, that use UART. Example from official github page works perfect, but code extracted from doesnt work. Only thing that i have changed, is a device ...

How to Stream TV channel into your Android application?

I have been streaming videos on my Android App that are on Server But I want to Stream videos that are currently running on the TV channels as live. If there is any way i can run live videos of TV ...

How to implement Root detection for android application?

How to implement Root detection for android application? And how we check the root detection functionality in either android device/simulator , if we don't have any rooted device Thanks in advance!!!...

Android TextView Marquee Programaticly

I am attempting to display a list of textviews but need them to all Marquee, have some code Activity (XML) somewhere that Marquee's, but don't think I can use it here. LinearLayout layout = (...

Class name is marked as 'not covered' while running code coverage in Android Studio

I have tried AndroidStudio's code coverage feature and I have met a strange issue: It is marks the tested class's name as 'not covered' code. How is that possible? Is that a bug? Picture here: As ...

Anonymous login is not triggering onAuthStateChanged callback

I'm logging in my users anonymously if they are not logged in, but the onAuthStateChanged callback is not being triggered. Additionally, whenever I try to use mAuth.getCurrentUser().getUid(), it gives ...

compare two hashtable values and put results into an arraylist

I'm a little stuck with the way I want to compare and collect data from hash tables that I am creating. The code is a little messy as I am now getting a little confused on where to go next, I ...

Firebase Data Model Structure Guidance

I'm building a Android Application and using Firebase as the Database. The reason for using Firebase is 1. NoSQL scalability 2. Integration with Android & apps. The app is a workout tracker. Users ...

Getting 'Cannot read property 'listRegistrationsByTag' of undefined' from Microsoft.WindowsAzure.MobileServices.Push.RegisterAsync, what is happening?

This is a Xamarin.Forms app running on Android based on the Azure getting started Mobile App example. Trying to register a device's id for notification services. Originally I was getting unauthorized,...

Take phone number by NFC or another communication protocol

In my company we have information tablets for our clients (Galaxy Tab S2), and it will be very useful to take phone number by NFC, but without installing some application on the user side. Is it ...

ask camera detect object color and show color name

I'm developing an android application name: color scanner application for COLOR BLINDNESS PEOPLE. I'm stuck on how to call the camera scan the object and get the color of object. I have been read all ...

How to define an audience with event count>0

Hi everyone I am trying to configure Firebase for android and iOS platform and I am having some issues creating audience using event count and parameter. For ex, I'am trying to create an audience with ...

How to align 2 views in one layout , so one at most top and the other one on the most bottom

I have a linear layout on my view it has 2 view inside it , one "button" and one "frameLayout" making the gravity : "top" for the parent layout , positioning the 2 inside views on the most top ...

Mosby MVI - How to retry intents?

I'm using the Mosby MVI library for a demo app that performs simple CRUD operations on a Restful API using Retrofit2 in my Interactor. I constructed the ViewStates very similar as in the sample App, ...

Google Location Services getLastLocation gets null when launching app for the first time

So i want to display my latitude and longitude of the position, however it shows me only when i launch the app again. When i install the app, and launch it for the first time there is no position ...

Read all the datas setted in my object

I would like to read all the responses I have set in my object. This is my object : public class Reponses { private String id; private String reponse; public Reponses(String id, String ...

How to check application is white list in MI security permission autostart

I am building an android application where I am using some services. My services get close when application is close in some custom android OS like MI. Then I figure out we have to push our ...

ListView is reloading its items each time I scroll which I dont want

I created a list view in android and I want to do something like each time I click on a list item it has to toggle its colour between red and green.I achieved this but the problem is that each time I ...

Smooth animateLayoutChanges animation

I am trying to slid a view from the bottom of the screen and collapse another view a little everything will fit correctly. I have managed to do that with the attribute animateLayoutChanges and 2 ...

Sqlite connection Leaked in android studio despite everything is closed

from two days I'm trying to solve my issue i'd referred to every Solutions discussed over here and did all possibility, still it keeps on showing Sql connection is leaked. due to this application is ...

Android app link multiple intent filter hosts and manifest merge not working

I am working with build variants and want to capture additional links based on the variant. I want all variants to capture links from host one so I have declared an intent-filter in my main ...

Activity loosing data after coming back from Camera Activity

I have an app where I should fill data on some edittexts or spinners. After that I have some buttons where I should take some pictures, sometimes there's 2 or 3 pictures. Im using a Camera Intent. ...

Why Android SDK path has to set in Qt Andriod device?

I am little bit confused with SDK path in qt for mobile. I know Qt is based on Android NDK (C++). Then why we need to set path of SDK in tools->options->device->android->sdk path. Is SDK is based on ...

Web View double tap

I have a layout which consist of formulas,its basically html codes displayed in webview. I made the webView.getSettings().setBuiltInZoomControls(true); But I dont want the zoom buttons, just the pinch ...

Problems showing TextView at the bottom of a ImageView inside a LinearLayout

I need to put a Layout inside a LinearLayout dynamically, when I'm trying with a TextView at the bottom of a ImageView (that's the Layout that I want to put inside the Linear), the ImageView it's not ...

Updating organization name in android contacts programmatically

I am trying to update the organization name in a single contact but it is not worked for me, I am using following code ops.add(ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI) ...

BUILD FAILED: configuration of task ':packageDebug' (Visual Studio)

I've encountered this build error and don't seem to get it fixed, the plugins I have are the default whitelist from Visual Studio, geolocation and compat which comes with geolocation. I'm trying to ...

Error while re-installing app on the device

I use the emulator for the development and then once the build is in stable position, i make a APK and install it on my device for testing purpose (app-debug.apk) this has been working fine for ...

Communicate to SafeNet Prime 8840 SD Card via Android Kernel

i want to communicate via Android Kernel with the Gemalto SafeNet Prime 8840 SD Card. But i have no clue where i should start, do you have any tips or Tutorials i can look at ? I found the SEEK for ...

What happens to data in buffer on AudioTrack.write()

Here is some code that I'm using to generate a continuous sine wave in android studio. The whole thing runs within a thread. My question is: when I call audio.write(), what happens to any data that ...

I can't get the same animation between activity and fragments

For animation between fragment I'm using the folder anim with the translate tag like this, I got 4 files : slide in from left <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http:...

Multiselect does not fire change events on mobile devices when clicking the option

First, the code: $('#residentialobject-filter-form-modal select, #residentialproject-filter-form-modal select').on('change', function (e) { if ($(this).val() == null || $(this).val() == '' || $....

Realtime Xamarin Tesseract detection

I am attempting to use tesseract in Xamarin.Forms for text character recognition on images. On Android, I've implemented the logic using the steps below; Grabbitmaps of the TextureView. Convert ...

How to let ImageView partial overlap with 2 Buttons?

I would like to achieve below result i.e. one imageview in between and overlap with 2 buttons, but I have no luck after few days of trying and searching. Many thank if you can help on this. <...

how put data from SQlite database into a Recyclerview

hello can anyone help in this problem. what i want is to display my data in my sqlite database into a recyclerview but im getting errors. here my code: fragment activity public class pet_tab ...

Android getSupportFragmentManager().findFragmentById() returns null sometimes

I'm developing ad android application and after an http call I'm using a ResultReceiver to get the result in my MainActivity. I read many articles about this problem but none of them was specific to ...

Use a video as a texture in OpenGL ES 2

I need to play a video and use its frames as a texture for an OpenGL object. For this purpose I used a MediaPlayer and a SurfaceTexture. The first thing I create the texture: int[] textureObjectIds =...

Account and Data sharing between apps in android

I am developing an application in android. Now there is another variant of the app need to be developed. The requirement is that if the user is logged-In in one application and comes to the sign in ...

How to use a YouTube player view in a fragment

i currently develop app that get the items of playlist and display it in a listview in a fragment and it should if i click an item of the list open another fragment in the same activity with youtube ...

Android Preference Dialog - control music volume by hardware buttons

This code can be used for a Dialog to make hardware buttons control musicVolume rather than callVolume: dialog.setVolumeControlStream(AudioManager.STREAM_MUSIC) But how can this be applied to a ...

ffmpeg webm encode for low powered devices

I try to encode my video with alpha channel for android device: ffmpeg -i "Comp.avi" -c:v libvpx -pix_fmt yuva420p -metadata:s:v:0 alpha_mode="1" output.webm The result is pretty good, but I have ...

GoogleApiClient stops to work properly after GPS turned on/off

I'm trying to implement abstract Activity, whose inheritants would be able to get Location data. I'm strictly following this guide, that seems pretty straightforward. But after all I have a few ...

I get error in the AndroidManifest.xml file when i try to run my code on my phone.

I am a beginner working on a small project. Every time I tried to run the code, it ended up with this error. I have already tried cleaning the project and rebuilding it as well. Please help me.

Android Circle Animation

I'm trying to create an animation which gets a percentage value (0-100) and stretches a thick line in a curve according to the value, where 100% is a full circle, 50% is half a circle and so on. I've ...

How to stack push notifications in android ?? and there by displaying only one notificationicon for all the notification

i am dealing with push notifications . stuck with a challenge . Wen i get multiple notifications, it is flooded in the status bar . i need a solution where only one icon is displayed in the status bar ...
Translating... 0%