Vala for Android?-ThrowExceptions

Exception or error: Is it possible to write a Vala application and get it to run on an Android device? How to solve: With the new NDK, you can write UI applications in C/C++ as well. As long as you have a C ABI, you can call anything from Vala you want, provided you have …

android – Main difference between Manifest and Programmatic registering of BroadcastReceiver-ThrowExceptions

Exception or error: I am trying to understand the main differences between registering a BroadcastReceiver in the Manifest and registering it programmatically… My understanding is basically as follows (would appreciate someone correcting my points if I am missing something). Registered in Manifest: The OS will magically find and instantiate your class if needed, calling the …

Using "android:textAppearance" on TextView/EditText fails, but "style" works-ThrowExceptions

Exception or error: This is a sample TextView in XML, which will properly apply the style TextContactContactName to the TextView. <TextView android:id=”@+id/name” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_toRightOf=”@id/photo” android:layout_alignTop=”@id/photo” android:paddingLeft=”10dp” android:text=”First Last” style=”@style/TextContactContactName” /> Now, I have some other things to set on this element, which are not text related. As such I tried to move the TextContactContactName …

Android – ListView doesn't receive OnItemClick for textview with clickable links-ThrowExceptions

Exception or error: I have a ListView that contains a TextView in each row besides a number of other views. The TextView renders html content which may contain links. The below code appears in the list adapter. m_textview.setMovementMethod(LinkMovementMethod.getInstance()); m_textview.setText(Html.fromHtml(myhtmlcontent)); This causes the listview to no longer receive on click events though. I decided to put …

android – Application context for SharedPreferences?-ThrowExceptions

Exception or error: Can I use ApplicationContext for working with SharedPreferences and starting, for example, RemoteService? Logically, I think that I can. Are there any nuances in such an approach? How to solve: as Gunnar Karlsson mentioned ContextWrapper’s getApplicationContext() usage its pretty clear that you should only use Activity or Service Context to register/unregister your …

xml – Android: How to fill RelativeLayout to full width of screen?-ThrowExceptions

Exception or error: I am creating an Android app which has a main RelativeLayout and some LinearLayout within it. Now i have this problem. When dragging items to the editor, e.g. a LinearLayout, it doesn’t fit to the full width of the screen. How can I make this possible? This is my XML: <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” …

android – Google Play Services version 5.2.08 too recent for my device-ThrowExceptions

Exception or error: I use this method to check the availability of play services: private boolean checkPlayServices() { int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this); if (status != ConnectionResult.SUCCESS) { if (GooglePlayServicesUtil.isUserRecoverableError(status)) { showErrorDialog(status); } else { Toast.makeText(this, “This device is not supported.”, Toast.LENGTH_LONG).show(); finish(); } return false; } return true; } status is now set to 2 …

android – Installing HAXM on osx Yosemite-ThrowExceptions

Exception or error: I’m following the instructions to install Intel HAXM on OS X. https://software.intel.com/en-us/android/articles/installation-instructions-for-intel-hardware-accelerated-execution-manager-mac-os-x These instructions say to install the driver, and once it’s done run kextstat | grep intel to see if it’s installed. If not, then run sudo kextload –b com.intel.kext.intelhaxm. However, at least on OS X Yosemite, I get the following …