activity

Accessing SharedPreferences through static methods

Hello, I have some information stored as SharedPreferences. I need to access that information from outsite an Activity (in from a domain model class). So I created a static method in an Activity which I only use to get the shared preferences. This is giving me some problems, since apparently it is not possible to call the method "getSh...

How to hide activity GUI in android 2.2

Hi all, I have an activity here. I want to click a button and then hide the activity GUI. That is, GUI is needed and you can hide it by clicking a "Hide App" button. How can i implement this "Hide App"? Somebody help! Thanks in advance! ...

How to go to a specific activity?

How my application is structured... Class A extends Activity { Button cButton = (Button) findViewById(...); Button dButton = (Button) findViewById(...); //invoked when cButton is clicked methodButtonC() { //Here I want to go to the activity of class C and this is how I have tried to solve it... Inten...

InArgument IEnumerable

How to transfer IEnumerable value into InArgument in CodeActivity in Workflow public sealed class CreateInterview : CodeActivity<int> { public InArgument<List<InterviewerList>> InterviewerLists { get; set; } protected override int Execute(CodeActivityContext context) { var interviewerLists = context.GetValue(this.In...

Activity events on startActivity

Is there any event triggered on an activity when I call startActivity("activity_id", myIntent); If the Activity exists already. I pass a parameter to the activity via i.putExtra("someID", someSerializableObject ); and would like to call a method to refresh a WebView. Right now, the call on startActivity brings the activity in...

ActivityGroup not handling back key for ListActivity

I am using an ActivityGroup to spawn multiple activities and switch views from within the same tab in a TabActivity. When I press the back key this method is called inside my ActivityGroup public void back() { if(history.size() > 0) { history.remove(history.size()-1); if (history.size() > 0) ...

Showing multiple activities on one screen?

Hi there, I have an interesting problem and I was looking for a solution; Hoping that someone here can help me out. (I did read through related questions on this topic but they have solutions which are not relevant to my situation). Details are: I have two activities. One is a simple list view to list available audio tracks. Another ...

Android Splash screen for "Application" class

Hi, I have an Android app where I've extended the base Application class in order to set up some global variables. public class MyApplication extends Application { private ArrayList<ModelClass> master_list; // global variable 1 private DataBaseHelper db_helper; // global variable 2 @Override public void onCreate() { super.onCre...

How do I set the behavior for an inflated view?

I have an audio player toolbar activity that has a corresponding layout file. I need this player to show up at the bottom of another activity. I use a ViewStub and inflate the audio toolbar's layout file in the stub. How do I access the buttons, etc on this inflated view and how do I set their behavior? The docs on ViewStub did not me...

Windows Workflow Delay Activity Behavior

I feel my question is somewhat straight forward, but I've added some details of my problem in the "Background Info" section in case it is too vague. Question How does the WorkflowServiceHost determine that a persisted activity, that is Idle due to Delay, has reached the Delay timeout? Does it load it into memory and check every so oft...

android: response from market activity

Hi I am trying to make an app that opens android market page of selected app & lets user download it.I have used below intent to open market. Intent intent = new Intent (Intent.ACTION_VIEW); intent.setData (Uri.parse ("market://details?id=" + PackageName )); intent.setFlags (Intent.FLAG_ACTIVITY_NEW_TASK); startActivityFor...

how does a service return result to an activity

hi, i seem to have a classic task, yet i can't find any examples on how to do it. i want to download something. well i call a web service and get a response... but its pretty much the same. in order to do this i have an activity that starts a service that spawns a thread that does the job. now i would like to use the data i got in th...

Android: Multiple Activities and OnDestroy Question

I have a few dozen activities: 1-Main, 1-Animation, 10-Other's and it's sub-sets of more activities (couple of dozen). From the Main, you can go to any of the Others via buttons. The Others call sub-set activities and they call the Animation activity. Each of the activities, including sub-sets and Animation, has a button to return...

Sending information with Intent.putExtra

Hello! I have an array of integers in the activity A: int array[] = {1,2,3}; And i want to send that variable to the activity B, so i create a new intent and use the putExtra method: Intent i = new Intent(A.this, B.class); i.putExtra("numbers", array); startActivity(i); In the activity B i get the info: Bundle extras = getIntent(...

startActivity() from BroadcastReceiver

I'm trying to autostart my nightclock app on charging using the following BroadcastReceiver implemented in the onPause() method: BroadcastReceiver test = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { unregisterReceiver(this); Intent i = new Intent(context, NightClock....

How to handle Android activity lifecycle on wake up (alarm app)

I'm having a couple of problems with an alarm app I am developing. The first thing that I think is a bit weird is that when an alarm goes of and wakes the phone up. These things happend. oncreate onresume onpause onresume Why are they run in that order? The last two should not be called? And this is what's causes me big trouble, b...

How to switch beteen Multiple Activities in Android

Hi, I am Having 8 Screenns.I have prepared 8 Activities for that. In First Activity I have given this code To Switch from Ist Activity to IInd On Image Button gives On Clickpublic void onClick(View v) { Intent myIntent = new Intent(v.getContext(), Activity2.class); v.getContext().startActivity(myIntent); }); What to do to Switch ...

Can I update a list view in one activity while im in another activity?

Hello. I currently have a tab layout with 2 tabs, one tab with a list view and one with the option make strings so I can add them in the list view. Both tabs have their own activity because this made the code much more structured, and I dont have to repeat my self later. Lets say im in the tab that offer me to create an string, and i p...

Android: To ensure none of the Views are focused when an Activity opens?

Hi, I have 2 activities, A1 and A2. My application opens in Activity A1. None of the views in A1 are focused at startup, until I use the arrow keys to navigate through the views. A button press in A1 launches activity A2. When A2 opens, the first Button in A2 is focused by default. I do not want this happen. What I want is when A2 o...

user’s activity history in iPhone

Hi All, I am new to iphone 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, ... Privacy policy (logging policy, using policy of the log data, user consent policy...