Newest android Questions

Q&A for professional and enthusiast programmers

PagerView and adapter exeptions

I get IllegalStateException with adapterView plz help. This is my MainActivity class public class MainActivity extends AppCompatActivity implements NavigationView....

How to change line chart dataset with data from MySQL using MPAndroidChart

This is my first time with Android. I want to ask about a tutorial to create a line chart in Android using MPAndroidChart with date as x-axis and 1-5 scale as y-axis based on my JSON data. this is ...

Cannot Read From Sqlite Database in Android

I have been working with an App in which I have a sqlite database. I can insert data and I've checked that. But I cannot Read data from the same database. Here is the method to read data from database:...

Add a FragmentTabHost to an Existing Fragment Class

I've search for a while and have found pretty much this exact code that people say works, but for some reason it keeps calling a null object reference at this line: mTabHost.setup(getActivity(), ...

How i can retrieve this array of images from json?

I have his json and i need to retrieve array of images from images Variable.. this my json : { id: 215, title: " this is title", image: "1464958558.jpg", description: "description", images: "["...

How to get Y of an object during an animation

I have to get Y of an object during a translate. If I use object.getY (); it don't give me the real Y during animation.

Android SVG Animation draw half image only

Currently I am working on android Application. that contains An SVG images I used this SVG animated Library to drawing svg paths with animation. but it only draw the half image not the whole image ...

i want to calculate gauge in android but the logic i created is not working :/ any suggestion

the code is below , i trying to make a guage calculator when user enter in fields the calculation should perform according to user's input number , new variables should create and perform some ...

Unable to Start Activity showing have you declared this activity

package com.acer.syncmysql; import android.app.ProgressDialog; import android.content.Intent; import android.os.AsyncTask; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; ...

How to set proper font size Libgdx

I am creating my fonts at runtime using the FreeTypeFont extension. I saw here a way to match the font to the screen resolution: http://gamedev.stackexchange.com/questions/77658/how-to-match-font-...

android : Vitamio forward and revind option not working using remote of android box

i am working on android box app that show all new movies . i am using vitamio library but the problem is forward and revind option not working using remote only pause and play button is work. My code ...

MPAndroidChart: XAxis values not corresponding to Data values

I've a problem using MPAndroidChart: I have some entry data to display in a Bar Chart, but the xaxis labels aren't displaying on the position I want: I want to show them one per chart value, ...

Navigateable coordinate view

My goal is to create a view larger than the devices screen that the user can navigate in, and where i can position imageview based on a coordinate: I have tried creating a layout within a ...

Update ViewPager total pages and set current item without reloading

I'm sorry if the title is ambiguous as I don't know how to describe my problem in a short way. I'm using ViewPager with FragmentStatePagerAdapter to display a list of posts of a forum's thread. ...

Retrieving and Displaying data from Firebase

I'm currently learning about Java and Firebase. I've been trying to retrieve data from Firebase. I read through many docs and examples from Firebase and other solutions posted on stackoverflow but ...

It's possible to get the data of the music file that MediaPlayer is playing?

I want to create a component that can put effects on the song played and this obviously mean that I need to use its data, where by data I mean the singnal's amplitude, that is played buy MediaPlayer. ...

How to add copy to clipboard button in Android cardview?

I have created a CardView and want to add a button in that will copy the text content of Cardview to clipboard. Recycler Item with a button: <?xml version="1.0" encoding="utf-8"?> <...

BluetoothSocket Connect() throws IOException read failed, socket might closed

So I'm trying to connect an Android app to a raspberry Pi, the devices are paired and are trusted by I receive an error identical to the one found here: IOException: read failed, socket might closed - ...

Android app installed in Xiaomi Mi Redmi 3s device does not detect Bluetooth other devices but Micromax android devices does?

Android app installed in Xiaomi Mi Redmi 3s device does not detect Bluetooth on other devices but Micromax android devices does? The same piece of code for bluetooth is working in Micromax but not in ...

addIncomingCall in Android TelecomManager not doing anything

I'm trying to use the native Android incoming call UI. I've got a connectionService and I've succesfully registered a phone Account. But nothing at all happens after I call the method ...

marker error on null object reference [duplicate]

i cannot figure out the error please help. i want to add marker whenever location coordinate arrives from the FCM. i get the marker set on the position but also this error. The error is attepmt to ...

Synchronizing Async' actions (Java/android)

I have a JavaScriptInterface that I'm using to catch AJAX calls, then handle them in my native functions inside the activity and the back a certain response that I get asynchronously. I MUST wait for ...

Real time Database Firebase don't show root reference

enter image description here It don't show root reference in database. I also access my database. Anyone can help me?

Auto start video recording

I was using following code to start video recording public class Main2Activity extends AppCompatActivity { private Button record; @Override protected void onCreate(Bundle savedInstanceState) { ...

Integrating google analytics in my android game makes it crash before starting

hope you having a good day, a noob here trying to include analytics in his game following the google guide https://developers.google.com/analytics/devguides/collection/android/v4/ i finally managed to ...

Android: Is “Allow Unknown Sources?” shown in all Android versions?

when trying to install a non-playstore .apk on Android Lolipop there is a prompt allowing you to go directly into the phone settings and check the box "allow unknown sources". Is that true for all ...

How to store radibutton values in sql using onClickListener with attaching button to it?

What method I have to use for two radio buttons as strings(eg: gender). String --the error "string declaration is not allowed here" if(radioButton1.isSeleceted()) String temp = radioButton1....

Recyclerview some images will not show without setIsRecyclable(false)?

I have a recyclerview that shows some itens. Inside every item I have a imageview with a like buttom. I added setIsRecyclable(false) because some images was not appearing in my cardview when I ...

Is it possible to send notification from one phone to another using firebase?

How can I send a notification directly from one android phone to another using firebase messaging? (I don't have a separate backend server)

I am working on a simple pedometer app, and it has these errors, for the following code

package com.example.ritwik.letswalk; import android.content.Context; import android.hardware.Sensor; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android....

Please help me to optimize my algorithm in OpenCV in android.

I am trying to do a image process operation by using OpenCV (android). I want to merge two images into a image, like this : Image A and Image B are same size, and the result image is taking each ...

How to show a Notification for a scheduled Background Service in Android?

I'm working on an Android project for tracking attendance in lectures at universities, I need to add a feature that notifies the student if he/she exceeded the limit of allowed absences. As far as I ...

Android-How to hide JSON Array [on hold]

I create a web service in android. Its work fine.but the URL i used to create a web Service will show data as human readable.is there any way to create web service to overcome this problem?(i posted ...

OpenSSl library for Android

Where it is possible to download OpenSSL library for Android 7.0? From this subject I took for Android 6 Error "Could not load SSL library" on Android with TidHTTP

OnMapReadyCallback not calling

I'm working on google map v2. I implement OnMapReadyCallback in a custom map fragment but it's not trigger onMapReady once fragment start. my code: public class CustomMapFragment extends Fragment ...

text not getting displayed in a inflated layout android for some devices

I am having a confused scenario, U have inflated a layout and it works fine for few devices and the text does not show up for few devices. For Example: it works fine in Moto G3, but the same is not ...

when opening Main.axml in visual studio it is showing the below error CreateSession failed due to an internal error?

I have installed xamarin for visual studio manually,and path for sdk,ndk,jdk has been configured correctly but still iam getting this error No indirect rendering available java.lang....

How to add a date in my sqlLite database using a pickers?

I'm working an app and i have a sqlite database. I need to add a date in one column of my table in my database and i need to pass this date with a picker! How can I do that? How can I save this date ...

How to sort parent objects in JAVA with respect to their child elements in FIREBASE for android?

This is the Firebase database structure As shown in the above picture I want to sort the list items with respect to the date they were created. Can someone tell me how to do that! I am using Firebase ...

FCM messages not getting delivered

I have setup a FCM client on my Android app. When I am trying to push the notification from Firebase console, the console says that message is delivered. This is the log screenshot. But I am not ...

My application is not working after installing update of Android System WebView

There was a legacy cordova app which stored "data" in the browser local storage. The new version of this app is a native app which tried to access this "data" by accessing the local storage database. ...

Base64 Encoder Encodes Incorrectly

I am trying to upload a picture to a MySQLi server. To do so I made a table with the columns id which is an int and the image which is a LongBlob. I used the method: ByteArrayOutputStream baos = new ...

Android support screen sizes in inches

i'm building an android app that runs on an Android device one of the requirements to support screen sizes 5”, 7” and 10” ... i didn't find how to support screen size in inches how i can support ...

How to use Java 8 features in android?

I am looking to use Java 8 features in android studio.I have change jdk location in project setting but still not able to use stream API.

Youtube Player APi android enable context menu

Hello All please help me to get out with a solution. My problem is i want to enable context menu three dots on youtube player Fragment. but i'm unable to find any method for this. Thanks in advance. ...

Google analytics mobile data mixed

I had added google analytics long before. There are two accounts in google analytics (one for dev and other for live). All the data was coming correctly but suddenly all my live data are coming in ...

Echo acoustic when Android recording with background music playing

I am developing a App on Android. base function is recording with background music playing. 1. use ffmpeg to decode a mp3 file to PCM data(BG PCM), and play these data by AudioTrack(to Speaker). 2. ...

Multiple button for multiple java class

I'm currently making a app on Android Studio. I have a layout that contain multiple button and I create a java class for each button because I want each button to open a another layout and I used ...

Android Barcode Scanner displaying special characters

I'm working on an android app which has barcode scanning functionality. At times when a barcode is scanned, special characters are displayed within the barcode e.g. 012JPDK19L15%H What could possibly ...

How to access integer “iDay2” outside of function “onItemSelected” through the button?

setOnItemSelectedListener. ArrayList<String> ad_days = new ArrayList<String>(); int ad_endDays = 31; for (int i = 1; i <= ad_endDays; i++) { ...
Translating... 0%