Tag: android-intent

Exception when I run my application from Eclipse

I’ve been having this problem for almost 2 months now and can’t figure it out. The problem is that if my application is running and I run (reinstall) my application from Eclipse, I get an error message indicating that my application has crashed ‘Unfortunately, has stopped.’. I notice that it also occurs when I run […]

java.lang.RuntimeException: Handler (android.os.Handler) sending message to a Handler on a dead thread

in my app I’m using IntentService for sending SMS. @Override protected void onHandleIntent(Intent intent) { Bundle data = intent.getExtras(); String[] recipients = null; String message = getString(R.string.unknown_event); String name = getString(R.string.app_name); if (data != null && data.containsKey(Constants.Services.RECIPIENTS)) { recipients = data.getStringArray(Constants.Services.RECIPIENTS); name = data.getString(Constants.Services.NAME); message = data.getString(Constants.Services.MESSAGE); for (int i = 0; i < recipients.length; […]

Android – SMS Broadcast receiver

I have been trying to get this program to work but so far having no luck. I cannot find where I am doing wrong. I’m not sure if there’s something wrong with the code, or debugging. I’m trying to be notified if a new SMS arrives. Here is my program: package Technicaljar.SMSBroadcastReceiver; import android.content.BroadcastReceiver; import […]

More efficient way of updating UI from Service than intents?

I currently have a Service in Android that is a sample VOIP client so it listens out for SIP messages and if it recieves one it starts up an Activity screen with UI components. Then the following SIP messages determine what the Activity is to display on the screen. For example if its an incoming […]

Android – Switch Tabs from within an Activity within a tab

Currently I have a TabHost implemented with 3 tabs each containing a separate activity. My question is how do I switch between tabs from within one of the activities that is located inside the tab host. I’ve looked everywhere and have been unsuccessful in finding a real answer to this problem.

Using a broadcast intent/broadcast receiver to send messages from a service to an activity

So I understand (I think) about broadcast intents and receiving messages to them. So now, my problem/what I can’t work out is how to send a message from the onReceive method of a receiver to an activity. Lets say I have a receiver as such: public class ReceiveMessages extends BroadcastReceiver { @Override public void onReceive(Context […]

Android Intent Context Confusing

Can somebody explain this to me please : Intent intent = new Intent(Context, AlarmReceiver.class); I never understood and I seriously think I never will if somebody doesn’t try to explain this to me in depth. This whole context thing is so confusing to me. Sometimes it works like this : Intent intent = new Intent(getBaseContext(), […]

What are the possible intent types for intent.setType(type)?

I was searching about how to send an email from my app and I came across this topic: how to send email from my android app it solves the problem adding a type to his action send: i.setType(“message/rfc822”); That works for me too, I can send my email and it’s great. I was just wondering […]

Otto vs LocalBroadcast:

I am a huge fan of open source contributions square has done to the Android community and was looking into their latest contribution Otto (event bus ) http://square.github.io/otto/ Digging deeper I see that Otto uses reflection and there is no ordered broadcast ( a pattern where a unconsumed message is handed down from one receiver […]

getView returning null when fragment has been created from an activity

I have a working tablet application which I am now trying to make work on phones too. On a table there is two fragments on the screen a list fragment and a details fragment. When on a phone the list fragment appears and creates a new activity when a list item is pressed. This activity […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.