Get null instead of Boolean

I have a firebase database that looks like this: Query userQ = db.child("users").orderByChild("email").equalTo(email); userQ.addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(DataSnapshot data

Resize The inflated view does not work

I am trying to resize the inflated view but not working I am adding this view to AlertDialog LayoutInflater inflater = getActivity().getLayoutInflater(); View view = inflater.inflate(R.layout.popup_util, null,false); view.setLayoutParams(new Relative

how to recover below the server json data in Android?

how to retrieve below json data from server in android? can you please guide me with an example? how to get UserRole from the below url? are getting json array in response. You can get details

Does the FCM work well with AWS SNS?

I am developing a push notifications architecture for our app. I am planning to use AWS-SNS with APNS and GCM. Google now recommends to use FCM (Firebase Cloud Messaging) instead of GCM for new apps. I wanted to understand if FCM is compatible with S

not such a column: 498 (code 1):

I translated my app using android studio translation editor, i get this error when running my application on android phone using Arabic as its language: android.database.sqlite.SQLiteException: no such column: ٤۹۸ (code 1): , while compiling: SELECT

Android: ViewGroup.MarginLayoutParams does not work

I used this to set the margin programmatically, but it does not work, the margins are not applied. In the constructor: public TimeWindow(Context context, int pixels, int left, int top){ super(context); ViewGroup.MarginLayoutParams params = new ViewGr

Great background image on html page

I have a webpage that have some large images inside some divs that cover the background of the page. I however get some strange issue with the page on viewing the page on Android pad where the page is viewed in portrait (looks ok on landscape viewing

The number of download icons on the game store not appearing

I've published my Android game on Tuesday (5 days back) and still the downloads/Installs are not updated in the app page. However, the Dev console shows that there have been around 1500 installs. What is the issue? Is this normal? EDIT: Also, does th

Access to the Gps problem

I am trying to access GPS in my Mobile using the following code locationManager= (LocationManager)getSystemService(Context.LOCATION_SERVICE); Boolean isGPSEnabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER); loc1 =locationManage

Fragment does not open the second time android

I have a navigation drawer with menu HOME, SETTING, ABOUT US etc on a fragment. And only HOME has a swipe tab. On the start of the app, Home is opened, but after that whenever i click home again it shows error saying Home Fragment is not attached to

Android complex layout with scrollview

I got it from designer. Some unnecessary information has removed. Would anybody suggest me how can achieve this design exactly. From the aspect of android layout design here we need a VerticalScrollView/ListView and there are many HorizontalScrollVie

Admob interstitial ad not clickable

I created a Android Game and the issue i am using both Banner ad and a Interstitial ad 1) Banner ad shows while playing the game and 2) Interstitial Ad shows when player ends up winning a level but the problem i am facing is admob interstitial ad is

Do something when a phone call is received

I am trying to create an application that will perform different functions when a call is received. To make a small working example, I have made my class extend BroadcastReceiver and I have tried to get a toast notification to show up. import android

Why my thread does not work?

I make an app that can count down. But it doesn't work and it just shows 100 in textview. Here is my code: public class MainActivity extends Activity { private TextView textView; private Button start; Thread thread; @Override protected void onCreate(

Unable to trigger the SMS broadcast receiver in MIUI Rom

I have tested my code on Emulator as well as CM9 ROM. Everything works fine. But when I run my app on MIUI v3.6.28 Android Version 4.1.2 it doesn't trigger the SMS receiver. I searched around on StackOverflow but couldnt find suitable answer except o

Can not save a hashmap object to a file in android

I'm downloading lot of images from Internet and storing into a hashmap and showing in a ListView. I want to cache the images. For that, I am storing the Hashmap object into a file inside onDestroy() of my activity and getting back the object inside o

Android: transmitting data (extras) to a fragment

I'm new to Android programming and I'm having problems while passing an ArrayList of a Parcelable to a fragment. This is the Activity that is launched(working well!) where feedlist is an ArrayList of a parcelable Music. Intent in = new Intent(context

Revisions and specifications of the Google Play app

I'm looking for some information on the details shown in an app's page on the Google Play. User reviews Does a user get a chance to rate the app after each version change? Does the reviews has an expiration date? Can spam reviews be removed from the

Introduction to Android SQLite

I need to learn how to use databases for my application, so I have decided to go with vogella's tutorial as most of his other tutorials are very helpful. I just have a few questions to make sure my application will be compatible across devices. He me

Java Sockets - real-time transmission

i got this code form Android-er blogspot, big thanks for him to make me almost understand basic socket connections in java. So i got this client app on my android device, and computer with server running, but how could i make a loop in a client code,

Android problem putExtra

I have scoured SE and google and found what I thought were decent examples of how to implement putExtra() in tandem with getStringExtra(). The trouble I seem to be unable to resolve is that my putExtra data never appears to be getting retrieved from

Do OpenGL Sprite Points work on Android?

I'm developing on a Droid, version 2.1-update1. My supported GL extensions include GL_OES_point_sprite and GL_OES_point_size_array. I am unable to get point sprites to render. The code below throws UnsupportedOperationException from GLWrapperBase at

Put an object in the manager's message

I need to download an image from the internet, in a different thread, and then send that image object in the handler message, to the UI thread. I already have this: ... Message msg = Message.obtain(); Bundle b = new Bundle(); b.putParcelable("MyObjec

Android Runtime layout tutorial

Does anyone know how to perform or have a good reference for doing an activity layout at runtime in android? Here is the code for my activity. I'm sure I'm just neglecting to do something here: package; import; import

How to play ringtone / sound alarm in Android

I have been looking everywhere how to play a ringtone/alarm sound in Android. I press a button and I want to play a ringtone/alarm sound. I could not find an easy, straightforward sample. Yes, I already looked at Alarm clock source code... but it is