Newest android Questions

Q&A for professional and enthusiast programmers

How do i add Add themoviedb.org API key in root/local.properties?

Here is the link to the GIT Hub project https://github.com/esoxjem/MovieGuide

Add fragment into react-native view

long story short. I'm trying to create a native module for an react-native project for AndroidPay. Integration of AndroidPay is possible only using fragments (which are in final "Buy with AndroidPay" ...

How to retrieve data between two different dates in SQLite database [duplicate]

How can I find the data between two dates in sqlite database? I have two date picker and button and on button click i want the data between the two selected dates

getting updated values from the parent activity

i am working on a project where i have to test some wifi rssi values that i am calculating in parent activity.... but for testing i have created a new activity which is launched by pressing of a ...

How to freeze header when its reaches top in android

Here is the full story behind my question. I have following situation . when the user start scrolling toward up, header should freeze when its reaches top like shown as below how can i implement ...

Correct way of referencing external header/source files with Android.mk

i'm making a 3D app that needs the GLM lib. My NDK directory contains the GLM lib source code so I try to link it by using : LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../../../../Android/SDK/ndk-bundle/...

Android service repeat after every 12 hours

I am developing an app that uses a service that repeats every 12 hours. What should I do. Please help.

Do we need to explicitly set the predefined user properties for Facebook Analytics?

I am using Facebook Analytics in my Android app and I have a use case where I need the user's city in Facebook Analytics. Facebook Android SDK provides a set a of predefined user properties which ...

onRequestPermissionsResult never gets called in fragment [duplicate]

Below code is working fine in Activity but I cannot make it work inside a Fragment. The onRequestPermissionsResult is never gets called. There is a requestPermissions function in API level 23 (...

Fatal exception android [duplicate]

Some times my android application force stops.I dont know why it happens.I'm getting this fatal exception in my application.Can anyone help me ! stacktrace Fatal Exception: java.lang....

Capture Data From User and Send Directly on Email Address in Android Studio

I have to take data from user and on-submit button i have to send that data on predefined email address this is my fields which i want to send directly on email

Multiple MIME types (for images and pdfs) are not working in RedMI Note (Android 6.0)

Inetnt pickIntent = new Intent(Intent.ACTION_OPEN_DOCUMENT); pickIntent.addCategory(Intent.CATEGORY_OPENABLE); String [] mimeTypes = {"image/*", "application/pdf"}; // ...

How do you launch the daydream VR play store in android?

The daydream application has a manifest with an activity defining intent filters as follow <activity android:theme="@ref/0x7f0e00c6" android:name="com.google.android.apps.vr....

How do I change results of Google Cloud Vision API in Android

Right now I am using the sample Google Cloud Vision API for Android: https://github.com/GoogleCloudPlatform/cloud-vision/tree/master/android/CloudVision How do I alter the results I get, so it only ...

ffmpeg on android exception

I want to create project with two parts: RTSP local stream RTSP local player I use next library ffmpeg At first, initialize ffmpeg: private void runFFMPEG() { fFmpeg = FFmpeg.getInstance(this);...

Android Studio service stops after phone locked

My service stops after 15-20 minutes but when i unlock the phone it starts again. How can i make it work even when phone sleeps. I added this to my service oncreate method PowerManager pm = (...

How to recieve data message in fcm while using c#?

Hello friends this may be dumb question but I have searched a lot but couldn't find the solution for this. I'm getting message in onMessageReceived while receiving notification. Let me explain clearly,...

Android: Native heap inspection and DDMS

To get Android native heap inspection working with DDMS, I had found I had to use the standalone DDMS as per ANDROID_HOME/tools/ddms. After one of the last Android SDK updates, however, there is no ...

ArrayList gets empty after first snapshot

I'm working with firebase in a android application and something strange ocurred, in my example I need two snapshots, 1 to get the users inside a list ( I use this snapshot to fill a arraylist of ...

USB host mode. UsbDevice is always in status attached even when I dettached it

I'm making an application that communicate with a UsbDevice in USB host mode. I used the BroadcastReceiver to detect the connection, so when device attached, the communication begins and my app gets ...

where can i find all the xml namespaces URIs in android?

Since there are different namespaces like tools, android and so on: xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://...

Can I use Instagram on my Linux desktop?

I do a lot of DSLR photography and need to know if there's a good way to get these photos (mainly stored on my desktop hard drive), uploaded to Instagram. One thing I've thought is that I might be ...

how to change Android reside menu item's textsize?

I used Android reside menu. But this menu items are very big for my application, I want to set smaller item. How can i do this. Thanks for you attention!

Applying physics to Android View objects

I currently have an android application that utilises the native android views for the UI (e.g. imageviews/buttons etc) Although this app is not a game, nor requires any heavy graphics or OpenGL, I ...

How to test size of a TextView with RoboElectric

My test below uses Roboelectric to test a fragment. I want to check that when a search icon is pressed, some views go away and the EditText view grows to a non-zero width. My implementation works, but ...

Invalid item position recyclerview Onsrolllistener inside viewpager

I have this fragment within a view pager. I add an Onscrolllistener, and seems doesn't work properly when I switch between the pages. This Works perfectly, but when I switch pages and back to this ...

Android - Make app login, case sensitive

I am building a native Android app. I have a login page which is not case sensitive. Example: both password's Admin and admin will allow the user to login. This should not be possible. The login is ...

Hide safari iphone and android browser navigation

In my ecommerce sending the user to an online editor in the same web. I would like this editor to see full screen on iphone safari and chrome android browsers. How can I hide this with css, html or ...

Why still having Permission Denied in Android with file 777 permission

I try to read/write a file data_quizz.xml situated in /data/data/com.my.package.app/files/data_quizz.xml. Using other topic I used adb to make /data and all subfolders in the data_quizz.xml path 777. ...

I can't get the progress dialog Here What is the reson for it?

android.view.WindowLeaked: Activity lib.library.benefits.Activityhas leaked window DecorView@7019a7c[] that was originally added here ...

I couldn't find the webpage to set the customized redirect url for Android Oauth authentication function on Google Console

I tried to use AppAuth to do oauth work for the Google Drive access, need a customized redirect url like "com.mysample.myoauth2test:/oauth2callback", so the workflow can jump back to my application ...

xamarin android progress dialog crashes in android version below lolipop on show method

loginButton.click += delegate { ProgressDialog progress = new ProgressDialog(Application.Context, Resource.Style.CustomAlertDialogStyle); progress.SetMessage(" Please wait..."); progress....

Repository data cache management with RxJava and switchIfEmpty()

I have two fragments using a common Repository. I'm trying to implement a cache management system for this Repository. The idea is : One of the fragment is loaded, it calls the getData() method, ...

On orientation change activity is killed and getContext() returns null

I have an activity with ViewPager and FragmentPagerAdapter with 4 fragments which works as a wizard.It all works well until orientation change when getContext() in the second fragment returns null and ...

How to connect to my http://*.dev web server from Android Emulator

What can I do in Android emulator to connect it to my virtual hosts web server page at http://*.dev . i'm working on laravel project runned by valet dnsmasq .. in Browser it work very well e.x http:/...

nativescript-social-login does not work whith geolocation

In my project I work with angular and the social login plugin is not compatible with geolocation. On build a project for android give me an error with the message: "Multiple dex files define Lcom/...

ListView Generated from SQLite onClickListener() to take me to another activity based on where i clicked

I'm creating an android app. In this app, I have a ListView populated with data from SQLite. I am trying to add an onClickEventListener to each row of the ListView so that when a menu item is ...

Bluetooth advertising from Arduino to my application

I have an app and an Arduino board connected to it some sensors which collect data to send it through bluetooth (which is also connected to the Arduino) to the Android application. I want the ...

Unable to find explicit activity class {}; have you declared this activity in your AndroidManifest.xml,my android manifest file read like this

<-- I m getting this fatal error which occurred while trying to upload pictures for my app in the android studio.please help get rid of this error.whats the best solution? the error is: Unable ...

ActivityNotFoundException - Send Intent between two apps

I am trying to send an intent from the MainActivity of App A to the MainActivity of App B and then bring the App B to the front but when starting the App A I am getting the following error: Caused ...

How to automatically detect the BPM of a MP3 file?

I want to write a java/android app which can analyze a song (mp3 file), and detect its bpm (and later act as a metronome while the song is playing, so you can hear the original song + metronome). I ...

Issue to resume Android Activity programmatically from background

I tried to resume Android Activity programmatically from the background but when I press the home button the activity goes background after five seconds the activity launch again. working well with ...

Android studio is not launching

I installed android studio in windows 7 32 bit operating system, For this i installed jdk and set the path and JAVA_HOME,JDK_HOME. In path variable it starts from %SystemRoot%\system32; When am i ...

Print info from msql database not working

I have a loop that gets the information from a database, and creates a button. It will successfully create buttons for all the rows in a database, until I delete a row from a database, then it doesn't ...

How can I call the MainActivity in a method that recalls fragments?

In MainActivity I have the following method that launches fragments. @Override public void onNavigationItemSelected(MenuItem item) { int id = item.id; Fragment fragmentToShow = null; if (...

Android studio through Multi Dex error in my project

I tried to run my app in ANdroid Studio but I have this error : Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/loopj/android/http/...

How to show json data in Listview with Retrofit2

I'm a newbie about Android programming :( I have no idea to set Listview for show data How to Show data in Listview. MainActivity.java public class MainActivity extends AppCompatActivity { ...

How to use gradle dependancy hosted on a private github repo protected by 2 Two-factor authentication?

Our company code hosted on a private github repos and our cradentials use Two-factor authentication. so I need username and password plus "Authenticator" mobile app. I created an Android liberary ...

Adding module dependency after using NDK in android studio

i am creating an AAR Library to be distributed which contains openCV in C++. once i try to create the module and try to add dependency to the app the module cannot be "Seen" and give me an error. i ...

Is Android Logcat limited to 4096 characters per output call? [duplicate]

I'm creating a StringBuilder with it's initial capacity to be 8192 and appending lines to fill it with a little under 6000 characters in this case. When I write the StringBuilder.toString() value out ...
Translating... 0%