I am wondering: when an app is to be killed, does Android wait for the currently running function to return, or does Android stop it before it ends by itself?
I’ve seen quite a few questions on SO about Fragments and I still can’t seem to figure out if what I want to do is possible, and more so if my design pattern is just flawed and I need to re-work the entire process. Basically, like most questions that have been asked, I have an […]
I am developing an Android app. I want to determine the location of the device using its IP address. Where do I start? The links on Google APIs are not conclusive enough. Thanks.
edit: I need to use the keyboard, but it hides my EditText, I need it to scroll so the keyboard is not hiding it. I am using a Samsung tablet. My style: parent=”android:Theme.Holo.NoActionBar.Fullscreen” The EditText fields are in a scrollable view, like so: The fragment layout: <FrameLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_height=”match_parent” android:layout_width=”match_parent” android:paddingBottom=”@dimen/activity_vertical_margin” android:paddingLeft=”@dimen/activity_horizontal_margin” android:paddingRight=”@dimen/activity_horizontal_margin” android:paddingTop=”@dimen/activity_vertical_margin”> <ScrollView […]
Doing something in background and then updating UI is very hard to implement correctly in Android. It’s simply badly designed. Typical example is an AsyncTask that fetches something from the web and displays the result. There are 2 problems with this: The AsyncTask has a reference to Activity (because it needs to update its UI). […]
I’m developing an Android application and I want it to interact with headset button clicks. I’m testing it in a Nexus 5 with Android KitKat 4.4. I tried first with a simple headset (not wireless). The button event received was KEYCODE_HEADSETHOOK (79). I created a MEDIA_BUTTON receiver to handle its clicks: <receiver android:name=”com.example.mytest.SearchActivity$MediaButtonIntentReceiver”> <intent-filter> <intent-filter […]
When I use a RelativeLayout with either fill_parent or wrap_content as height and an element which specifies: android:layout_alignParentBottom=”true” it is ignored and it is aligned at the top. Setting the height of the RelativeLayout to an explicit value makes it work. Any clues?
I am trying to develop a client server TCP/IP application. I have a server running on my PC and the client app is running on the mobile. They both are in the same Wi-Fi network, but I cannot establish a connection between them. While debugging the client Android app showed the following error: 09-21 01:08:40.422: […]
In the example of image below: How can I make both the superscript and subscript numbers to be aligned to produce a common scientific notation like below in TextView? If there is a way using Spannable or ReplacementSpan I would like to see a working example. Thank you.
I am having issue when sending data from Service to Activity through Notification , I click a Notification an Activity get invoked but when i try to add some parameters through bundle i am not able to get the parameters in that called intent , I have gone through the link How to send parameters […]