activity

Social Networking Style Notifications System in Rails

Hi, I am building a social network from the ground up in rails and I am wanting to set up a face-book style notification system for displaying new messages, friend requests, etc... in a visual appealing and UI friendly manner. What's the best way to go about this? I am thinking of using acts_as_state_machine but it seems a bit out of da...

user’s activity history in android

Hi All, I am new to Android development. I want to make an app, wherin I want to access following Logs: call log, message log, app usage log, media log, ... Logging data per activity: ex) call log: call direction, phone number, call duration, location, ... Are there any APIS available to achieve above mentioned Thanks in advance ...

Android pages Activity or Layout?

My app Consists an intro page with "Start", "About", etc.. I managed to create a functional version of the app by having the "Start" button call a new layout in which a new onclick listener is defined. This doesn't seem clean to me that I@m defining a new onClick listener for each Layout I use and wonder how the correct way would be t...

what difference have ListActivity between Activity???

I need to change Activity to ListActivity. But I can't start my project... do ı need change manifest.xml for it?? Or how can I change screen from Activity to ListActivity? Is there any difference to startActivity(new Intent(this, list.class)) ? 10-05 17:34:54.722: ERROR/AndroidRuntime(11550): java.lang.RuntimeException: Unable to star...

Advice on structuring a service, activity, thread

Hi, can someone please help me? I would like to write a program which uses a service to periodically update a text view on an activity. I do this by having ActivityA with a 2 buttons to start/stop my service. In the service I run a timer which triggers every second. From here I need to have this launch and update a text view on Activi...

Application With Multiple Activities and Single Launcher

I have an application which has multiple activities associated with it. When the user clicks on the launcher icon I want the last used activity of the application to be shown. What's the best way to accomplish this? ...

android activity cannot bind to service

Hi, I managed to connect an activity to a service and it runs ok. This is my first activity in the application. However, if i progress (with or without binding to the service in the first activity), the next activity (resides in a tab) will not bind to the service. note that if i make the trouble-making activity to be my first in the a...

How to be notified when foreground (top) activity (application) changes

I want to write a service for Android platform that is notified when the current foreground activity changes. Basically the service should do some tasks only when the top activity changes. Is there any way to subscribe and to be notified when this kind of event occurs ? Or there is no possibility and the service should poll from time t...

(best) Ways to deliver control messages to custom content provider

The android content provider has methods for the normal suspects {insert, delete, query, update} but if I want to send control messages there is no obvious mechanism. Suppose one of the tables managed by the needs to be reset, cleared and reloaded. How can this be done? I have several approaches each of them seems a bit hackish. 1) cre...

Android: How can I get the current foreground activity (from a service)?

Is there a native android way to get a reference to the currently running Activity from a service? I have a service running on the background, and I would like to update my current Activity when an event occurs (in the service). Is there a easy way to do that (like the one I suggested above)? ...

finish() not finishing my activity.

Hi, in my Android app I've got two activities, lets say A and B. A is the main activity, and it calls Activity B like so: Intent myIntent = new Intent(getBaseContext(), B.class); A.this.startActivity(myIntent); And this works fine. The back button on the phone works to return to activity A, but I want to put a button on the UI as well...

How to listen to a closed activity from a widget? (onActivityResult is only in Activity)

I have a widget that launches an activity, but when the activity finishes using the finish() I don't know how my widget can know about it since I can't override onActivityResult() which seems like the only way to listen when an activity closes... Anyone know of another way to listen for when an Activity closes when it is a widget that ...

Tracking user's activity

HI I am intereseted in developing an application, which will track user's activities on phone like 1.calls 2.messages 3.Packet data 4.GPS Usages 5.Media Usage 6.Apps usage Please let me know if there is a way to achieve these. ...

Common tasks in Activities methods - how to organize them?

I have some common actions fired in onPause() and onResume() methods. (Like registering and unregistering BroadcatsReceivers) Now I put them in abstract classes and extend Activity classes. After creating some abstract classes with common actions I end up with situation when I can't extend Activity because of Java's lack of multiple in...

Efficiency of Parcelable for inproc communication

I want to pass a huge object (e.g. Bitmap) from one activity to another inside one process. If I put it into the Bundle like Parcelable, will Android really serialize the object or pass it by reference? ...

Android: How do I reset/clear application preferences during unit testing?

I want to start with a consistent test environment so I need to reset/clear my preferences. Here's the SetUp for test I have so far. It's not reporting any errors, and my tests pass, but the preferences are not being cleared. I'm testing the "MainMenu" activity, but I temporarily switch to the OptionScreen activity (which extends Andr...

Android, get icons of running activities?

I've got a list of running processes from ActivityManager.RunningAppProcessInfo, like this: ActivityManager am = (ActivityManager) getSystemService(Service.ACTIVITY_SERVICE); List<ActivityManager.RunningAppProcessInfo> processes; processes = am.getRunningAppProcesses(); for(ActivityManager.RunningAppProcessInfo info: process...

Disable MapView if it is not supported

Hi, I've an application with multiple activities. One activity is a MapActivity. Can I disable MapActivity when it is not supported by the device and let the user install the application and get remaining activities or should I develop two versions of the application (one with MapActivity and another without it)? ...

Variables and Multiple Activities

How can I make a variable or object available to multiple activities or restarts of the same one. ...

Navigating through multiple activities.

I have 2 Activities A and B. Now these are my objectives. When I'm in B and if I press the Home button, the state of the Activity should be saved. (No problem with this.) When I start B from A after step 1 a new instance of B should be created (i.e) Previous state should be discarded. But in Step 2 the state of B still prevails. How ...