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 …

javascript – Open android application from a web page-ThrowExceptions

Exception or error: I know that for opening android application from a link inside a web page we have to write the following in the AndroidManifest.xml: <intent-filter> <action android:name=”android.intent.action.VIEW”/> <category android:name=”android.intent.category.DEFAULT” /> <category android:name=”android.intent.category.BROWSABLE” /> <data android:scheme=”my_scheme” android:host=”my_host” /> </intent-filter> The problem is that I wrote it in the following way: <intent-filter> <action android:name=”my_action”/> <category …

java – Failure delivering result ResultInfo-ThrowExceptions

Exception or error: There are many people who have encountered the same error on stackoverflow, but I haven’t been able to find any relevant resolution in those posts. My MainActivity is starting a new activity (SecondActivity) with startActivityForResult(); SecondActivity then returns some data with onBackPressed(); and putExtra(); Extract from MainActivity.java: public void addNewNote(View v){ Intent …