Android Application Framework

by Sreehari » Wed, 24 Jun 2009 21:17:11 GMT


Sponsored Links
 Hi Experts,
      Could anybody please send me some details of application
framework stack in android os especially windows manager,activity
manager,location manager and notification manger?


Thanks in advance,
Sreehari
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Other Threads

1. Activity Not Finishing

All,

I seem to have an issue that should be fairly easy for you guys to
figure out. I'm using an alertdialog to present the user with 4
options to create shortcuts on the launcher main screen. The problem
I'm running into is when I select the shortcut I want the dialog goes
away, and the shortcut is not created until I hit the back button. So
something is either failing to finish or it's waiting. My code is
below. If anyone could help that would be awesome.

package com.skittles.widget;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.os.Parcelable;
import android.widget.TextView;

import com.raue.rebootwidget.R;

public class LauncherShortcuts1 extends Activity {

    private static final String EXTRA_KEY =
"com.example.android.apis.app.LauncherShortcuts";

    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);

        // Resolve the intent

        final Intent intent = getIntent();
        final String action = intent.getAction();

        // If the intent is a request to create a shortcut, we'll do
that and exit

        String[] items={"Shortcut1",
"Shortcut2","Shortcut3","Shortcut4"};
        new AlertDialog.Builder(LauncherShortcuts1.this)
        .setCancelable(false)
        .setTitle("Select Shortcut")
        .setItems(items, new DialogInterface.OnClickListener() {

                public void onClick(DialogInterface dialog, int which) {

                         if (which == 1) {

                                if 
(Intent.ACTION_CREATE_SHORTCUT.equals(action)) {
                                    setupShortcut();
                                    finish();
                                    return;
                                }


                         }
                }})
        .show();


        setContentView(R.layout.configure);

        TextView intentInfo = (TextView)
findViewById(R.id.button_two);
       String info = intent.toString();
        String extra = intent.getStringExtra(EXTRA_KEY);
        if (extra != null) {
            info = info + " " + extra;
        }
        intentInfo.setText(info);

    }

    private void setupShortcut() {
        // First, set up the shortcut intent.  For this example, we
simply create an intent that
        // will bring us directly back to this activity.  A more
typical implementation would use a
        // data Uri in order to display a more specific result, or a
custom action in order to
        // launch a specific operation.

        Intent shortcutIntent = new Intent(Intent.ACTION_MAIN);
        shortcutIntent.setClassName(this,
PoweroffActivity.class.getName());
        shortcutIntent.putExtra(EXTRA_KEY, "ApiDemos Provided This
Shortcut");

        // Then, set up the container intent (the response to the
caller)

        Intent intent = new Intent();
        intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
        intent.putExtra(Intent.EXTRA_SHORTCUT_NAME,
getString(R.string.shortcut1));
        Parcelable iconResource =
Intent.ShortcutIconResource.fromContext(this,  R.drawable.shortcut);
        intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE,
iconResource);

        // Now, return the result to the launcher

        setResult(RESULT_OK, intent);
    }

}

-- 

2. UPDATE SOLD Wts HTC DESIRE HARGA MURAH

Thanks semuanya udah sold ke ownernya yes mobile. Tunggu barang Harga gila 
selanjutnya ya.Hehehe.
-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

-- 
"Indonesian Android Community [id-android]" 

3. Handling Orientation Changes in AppWidgets

4. Default video player application:rotation problem

5. Linpack apk

6. Restart sendiri

7. OOT: owner selingkuh euy