Tag: android-activity

Adding the same context menu to multiple activities

I’m trying to figure out how to include common pieces of code in multiple activities. More specifically, I have a context menu that I would like to include in several activities. I saw this, but just don’t understand how to extend to multiple activities. http://developer.android.com/guide/topics/ui/menus.html I have this set up as Menu.java public class Menu […]

android webview client activity indicator

I got the code for showing activity indicator in a webview. I checked more than one reference and still I couldn’t get it working. Can you please help me to debug my code below? The activity indicator is not coming with below code protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); this.getWindow().requestFeature(Window.FEATURE_PROGRESS); […]

How to put some delay in calling an activity from another activity?

I have an application in which I’m receiving a sms containing his location.On receiving sms it calls another activity to start and passes that location to that activity to plot it on the map.Before calling the second activity it shows a toast like notification on the screen but somehoe due to calling second activity that […]

Android causes Cordova apps to restart when using Cordova Camera and Capture plugins

It appears that there is a common failure that happens when Cordova apps are put in the background to use the Camera or Media Capture plugins… the Android activity service appears to look for memory to free up and kills the Cordova activity, so that when the user completes the capture task the app RESTARTS. […]

Starting Activity from Android-Library-Project

after a long search I couldn’t find any appropriate solution. I have a Android-Library Project with nearly all code for the application. From the main activity in the library project I start an Intent to en explicit Activity A. In my derived Project, which uses the library Project, I have extended this Activity A and […]

Android freezes when there is a NullPointerException in OnClickListener.onClick (other tasks cannot start)

I have a simple setup: CrashHandler – a class which implements Thread.UncaughtExceptionHandler; CrashActivity – an activity which can send user reports; MainActivity – the main app with which the user should interact. When there is an uncaught exception within the MainActivity or any of it’s threads, the CrashHandler intercepts it and creates a notification with […]

Adding SDK Activity in Qt for Android

Is there any way that we can add separate SDK (Java) Activity to the make process in Qt 5.2 for Android? I have Qt application that I’ve compiled for Android and I want to start my own SDK Activity from it, and I was wondering if I can include that activity in the current application.

Android PayPalActivity not Fullscreen

I’m trying to include a PayPal donate button in my app (launching it from an actionbar button), it does work as it should, but…it just shows the PayPalActivity as a very small popup, while it should be almost fullscreen by default! Let me explain better… I use the usual piece of code to start the […]

Android: how to prevent multiple instances of an activity to be launched from a widget?

Steps to reproduce the issue: the user launches my app (name of the root activity: “mainActivity”) => instance A of mainActivity he presses the home button (mainActivity running in background) he installs the widget relative to this app he clicks on the widget => a new instance of mainActivity (instance B) is displayed he clicks […]

Why does resuming an activity in android cause BadTokenException?

Folks – Can anyone explain this stack? Note that my code is nowhere on it. If you Google for any of these exceptions, everyone who has experiencing this issue was trying to create dialogs after an activity was terminated, which doesn’t seem to be the case here. It’s just a simple activity resume. I am […]

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