Newest android Questions

Q&A for professional and enthusiast programmers

Android app coding

I'm developing an Android app for inventory management. I have created a store list ana a shopping list and respective tables for them. Now, I want to automatically add items from store to shopping ...

android update record and requery

Developing an application that displays data retrieved from it's database in the initial screen. Users can edit the data via a separate edit screen. Exiting the edit screen returns the user to the ...

Geocoder, get country in Android, getFromLocation zero results

I need to get the country the user is in to display certain information, when the user travels abroad. Many methods to determine the country required a sim card, but this way didn't. So this is what i ...

Can't insert data from android application to external database

I'm new on android development, I want to create an application to insert data into a MySQL database. When I run (in physiqual mobile) I put data in editText but it shows "erreur champ manquant" (eng: ...

Unable to load image from sdcard to canvas

How can i load an image from sdcard to canvas. I tried this code and it is not working. Uri selectedImage = data.getData(); if (selectedImage == null) { Log.e(getString(R.string.app_name),...

Google Maps - Polygon - overlay text

is it possible to put a text into polygon class (https://developers.google.com/android/reference/com/google/android/gms/maps/model/Polygon) of google maps? Because if I could draw polygon that ...

Android application for smart TV remote control

I'm trying to develop small application for some task involving remote control on Smart TV. My Samsung TV is connected to the local network, and I need to control it from within android application. I ...

How to update wifi RSSI at fixed interval?

I have just started learning Android and i know that this question has been asked numerous times but i cant seem to find a suitable solution. I want to refresh the RSSI value of my networks. Now i ...

OnClickListener: Why I cannot access public methods of the object in ArrayAdapter? Any workaround?

Greetings from a greenhorn. This question is a bit long, sorry for that. My android app loads xml to the listview, then after clicking any listview item I want to pass some information to second ...

Is it possible to kill an app without invoking onPause()?

I understand that saving persistent data in the onPause() method is the safest route to saving the data because onStop() will not always be called. However, is it possible that an app is killed ...

Web services = best way for web and mobile app?

I want to create a web app (full AJAX), iOS and Android NATIVE applications with a MySQL database. I only know web services (RESTfull) but is it the best solution ?

Xamarin workingwithwebview Example

I am trying to execute the workingwithwebview example which is unmodified from the downloaded code and running in the 5" Kitkat 4.4 XXHDPI emulator that came installed on VS2015 Community. It blows ...

Getting Http status 400 in api 23 and below

I have to call one Rest API of GET request. When I used emulator of API 24 it working fine. but same code on my phone i.e API 23 and API 18 it give 400 status i.e. bad request. URL url = new URL(...

How to turn on Wifi Direct in android programmatically

I want to enable Wifi-Direct programmatically and get it's MAC addess to pass it to nearby devices to directly connect with it. I am able to get MAC address and pass it to other devices but it is not ...

How to mock an EditText in android using Mockito

I am trying to write a Unit Test for a validator of my android Application. The validator accepts as parameter EditText, therefore I need to mock it. However the mocking does not work, forcing the ...

How to send hidden SMS on android 6.0+ [duplicate]

I'm currently building an S.O.S android app which gets the user location and sends a previously saved message with location included to a list of predefined users. Is it possible to make the sent ...

Face Out line in camera

Hy. I am making an Android application where I need to take picture of user (face only). To get the best face image I need to add a face outline in camera preview so that user may adjust his face in ...

how to make a clickable custom URI and send it to mail?

How to make a custom URI likeupi://pay?pa=zeeshan@npci&pn=Zeeshan%Khan&mc=0000&tid=cxnkjcnkjdfdvjndkjfvn&tr=4894398cndhcd23&tn=Pay%to%rohit%stores&am=1010&cu=INR&refUrl=...

Android root view onClickListener is always triggered

I have a simple problem with views in Android. I have two view rootView and containerView, containerView is contained in rootView, but I don't understand why when I click on containerView rootView is ...

how to send POST data with form urlencoded?

i wanted to send POST data with form urlencoded. but how to do it? i always get 401 unauthorized error message here's some my code package com.myApps.myApps; import java.util.HashMap; import java....

starting android activity from a thread's inside thread.

This code is inside MainActivity class. Thread thread1 = new Thread(new Runnable() { @Override public void run() { Thread thread2 = new Thread(new ...

Read the incoming sms and pass the message body to android application

I am developing an android application in which I want to read the sms and pass the data to my application. I tried many ways but cant't figure it out. Here is what I am doing. Is something wrong in ...

Processing the penultimate number in Android

I want to take a number of edittext and the number one before the end of the process but how? I want to do with clicking processing. This means that the number penultimate special work to do. Thank ...

Unity game on android device crashes if bluetooth is on (i need it on for the gamepad)?

I have simple game - just some 3d landscape you can walk through using a bluetooth joystick for navigation. 9 out of 10 times the game doesn't even start on my android device. when it does start - ...

Android Custom View Fade/Delay Animation

I have quite easy class that draws circles. I'm giving the parameter, view calculates the rest. All I want to give some delay and fade effect for each during draw to canvas. I reviewed a few articles ...

Package not found with android library module

I created two different Android Library Module in my existing project. Now, when I am trying to run the app, it gives me an error saying that the said package doesn't exist in the project. This ...

How to get the national geographic photo of the day with jsoup in android

We need to take the photo from national geographic photo of the day for an android project. We are using jsoup to do it and it is working for other sites and photos we tried to get, but not with this ...

Read SMS on android phone using arduino uno via usb

is it possible to read/send sms on arduino phone using arduino UNO via usb? I searched but could not find anything.

How to ask data from firebase database again?

I am having an app with a Swipe-To-Refresh layout. When you scroll up in a Swipe-To-Refresh layout, data refreshes from the internet. (for those who don't know) My data source is Firebase. In my ...

connect android app to two servers [on hold]

I am working with neo4j and it allows to set a Rest api straight , but there are some operations that a would like to process through a backend I wrote in scala, so I would like to know if I can ...

How to upload SQLite data from my device to a remote server, and then download that data into a new separate SQLite database back on the device?

I have an SQLite database with data in it on my local device. I want to be able to send that data to a remote server. I then want to be able to download that data to another local database on my ...

on hiding some buttons(by user) inside android layout, buttons should appear symmetrical in proper order as stated -

I have a linear layout(vertical) inside it, I have 2 linear layouts (horizontal) both I have place buttons inside the linear layouts like - Button1 Botton2 Botton3 Button4 Botton5 Botton6 ...

Google Sign-in in an Cordova app

So I created a sign-in page with the help of this guide: https://developers.google.com/identity/sign-in/web/build-button It works just fine in any browser but not in Cordova. Normally it should open a ...

how to unit test android studio lib

I need to write some plain Java code and test it. Since I already have Android Studio installed on my machine and don't really want to install another IDE just to write some code, I decided to use ...

View Pager not Working

I have five activities . I have set a view pager in the first activity so that I can use the swipe. But the layout seems to be empty. MainActivity.java public class MainActivity extends ...

DatePicker in fragment

I have this fragment and I need to generate 2 datepicker when I press the buttons, one to start and another to finish the period of the dates, this info will be saved in the textview that are next to ...

Retrofit Library Post Method insert to database null values

Hi guys I wanna create user by using retrofit library and I have to use POST method, Actually I did everything, but User created without user's information in my mongodb database , So, User created ...

hashmap inside a hashmap?

I have an expandable listview, and for each child I need to have 4 "extras" or strings or whatever to call it: - childtitle - description - link1 - link2 followed by a tutorial, it was no problem to ...

Could not find class 'android.graphics.drawable.RippleDrawable

Android App closing unexpectedly and giving following error in log-cat. 01-22 00:33:58.470 8193-8193/? E/dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from ...

Adding averaging ratings of ratingbar into one ratingbar Android studio

How can I add up all rating giving to a user and put the average in one ratingbar in android studio? Something like below; Sorry for the bad quality, I had to remove the identity of the users. I ...

Android List View - On Click go to a website

Sorry if the question is a bit NEWSBIE type but I am not known to Android :( So I have The MainActivity.Java that populates a TextView. I fetch data from server using JSON and it gives parameters as ...

NavigationView menu item with heading issue

Inside my NavigationView menu I have these items. There are some items with heading which is having some issues I think because when I used android:checkableBehavior it's not affected or doesn't show ...

Importing a .zip File Into Android Studio

Could someone please give me a step-by-step guide on how to get the .zip file into am Android Studuo Project? I know you must unzip the .zip file, but don't know what to import. I have been searching ...

How to Parse JSON which contains the same key names

I have the following JSON: [ {"hex":"3443d3", "squawk":"4673", "flight":"VLG3014 ","lat":37.716344, "lon":-2.913646, "validposition":1, "altitude":35000,"vert_rate":0,"track":225, "validtrack":1,"...

Understanding buffer in OpenGLES android

I have this vertex shader that i'm use to rotate or translate the obj depending of state values. private final String vertexShader="" + "attribute vec4 vertex;" + "attribute vec4 ...

Volley Unexpected response code 401

i'm trying to make login with API. but it's still appear unexpected response code 401. i already put the override application/x-www-form-urlencoded. BasicNetwork.performRequest: Unexpected response ...

What's the most secure way to ensure one account per user in a cross-platform mobile app?

I'm working on a polling system, and I want to prevent people from making multiple accounts or generating accounts with a bot. It will have clients on iOS, Android, and web. How can I best protect the ...

greenDAO update and updateInTx not working

I'm using greenDAO 3.1 for one of my projects. Since I needed my id to be UUID I've decided to store it as ByteArray. Now the problem is I can't update my entities using update or updateInTx method ...

Streaming HLS througth WebRTC on Android?

I use to play HLS video ExoPlayer. And I want to do stream played video on other peers througth WebRTC DataChanel. I dont understund how to do it.

Show progressDialog in separate thread

I'm trying to set a large text in a EditText, the operation can take over 30 seconds so I use a ProgressDialog. It shows up, but there's no animation, and then disappears when the operation is done. ...
Translating... 0%