Tag: android-activity

How to add a hyperlink into a Preference Screen (PreferenceActivity)

I would like to add three hyperlinks a Preference screen, which makes use of the PreferenceActivity if possible. Can I do this, if so, could someone provide support? Many thanks,

How open new activity clicking an item in listview?

I can’t start a new activity clicking over an item in my listview. I want that onItemClick can open the ApkInfoActivity.. Actually when i click nothing happen. protected void onItemClick(ListView l, View v, int position, long id, AdapterView<?> parent) { super.onListItemClick(l, v, position, id); final ApplicationInfo app = applist.get(position); PackageInfo packageInfo = (PackageInfo) parent.getItemAtPosition(position); AppDataActivity […]

Update tabs from a tab's activity in a Android TabHost

I have a TabActivity and am going to have 3 or 4 tabs. In TabA, I would like to have an ExpandableListView, which will list products. I would like TabC to act as a sort of “shopping cart”, probably with a ListView of itself. Is there a way to interact with the TabHost from the […]

Difference between singleTask and singleInstance

I did not find any thread on StackOverflow that answer my question. I have already seen this Android singletop singleinstance and singletask but that question is related to his project scenario. What are the differences between singleTask and singleInstance?? I have read the docs but could not understand.. I have read this thread also Android […]

How to provide and handle deep links in cordova / phonegap applications

Hi I would like to know of a Cordova / Phonegap plugin or way to expose and handle deep-links in my Sencha Touch / Cordova App So far I am able to deep-link into other applications lets say open Google Play to a specific app detail page. Using this plugin https://github.com/code4jhon/org.apache.cordova.startapp So what I would […]

Android: Setting onClickListener to a Part of text in a TextView – Issue

I am trying to recognise hashtags in my TextView and make them clickable such that I can take the user to another View when they click on the Hashtag. I managed to identify Hashtags in the TextView using Pattern Matching and they appear colored in Runtime. However, I need to make the Hashtag clickable. Here’s […]

Closing activities stack after a button click

In my app, I start an eight step “wizard” from my landing page in which data is passed from step 1 all the way to step 8. For keeping the data intact while still in between steps, I am not calling finish() on either of the activities. However, when all the steps are complete, is […]

Service and a BroadCastReceiver

I have seen several examples of how to implement a BroadCastReceiver, but how should I implement a Service that has to react to some pending Intent (for example incoming phone call)… Actually I was wondering about the same “problem” but in an Activity.. You obviously have a class which extends a Service or an Activity) […]

How to specify which activity starts on app launch?

I have an app with 3 different activities in it. When I launch the app one of the activities always starts first. But I want a differnt activity to start before the one that is currnetly starting first. How would I change this to make a differnet activity start first?

Determine backstack fragment empty state in android

My application structure look like: SplashActivity -> MainActivity -> (switching between many fragments) What I expect: finish application from main activity when fragment back stack count is zero. Here is my try: In SplashAcitivty public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getIntent().getBooleanExtra(“exit”, false)) { finish(); } } In MainActivity: @Override public void onBackPressed() { // […]

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