Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8092467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:17:22+00:00 2026-06-05T20:17:22+00:00

So i have this activity : public class settings_dock extends Activity { AlertDialog alert;

  • 0

So i have this activity :

public class settings_dock extends Activity {

    AlertDialog alert;


    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.settings); 


        //Weather settings
        ListView listView = (ListView) findViewById(R.id.settings);
        String[] values = new String[] { "Enable/Disable","Configure Item 1","Configure Item 2","Configure Item 3","Configure Item 4"};




        ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
                android.R.layout.simple_list_item_1, android.R.id.text1, values);

            // Assign adapter to ListView
            listView.setAdapter(adapter);

        listView.setOnItemClickListener(new OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view,
                int position, long id) {
                if(position == 0)
                {

                    final CharSequence[] items = {"Enabled", "Disabled"};

                    AlertDialog.Builder builder = new AlertDialog.Builder(settings_dock.this);
                    builder.setTitle("The Dock is ....");



                    SharedPreferences dock = app.getContext().getSharedPreferences("dock",app.getContext().MODE_WORLD_READABLE);

                    builder.setSingleChoiceItems(items,dock.getInt("enabled_disabled",-1), new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int item) {

                            SharedPreferences dock = app.getContext().getSharedPreferences("dock",app.getContext().MODE_WORLD_READABLE);
                             SharedPreferences.Editor prefsEditor = dock.edit();
                             prefsEditor.putInt("enabled_disabled",item);
                             prefsEditor.commit();
                             alert.dismiss();
                             if(item == 0)
                             {

                             }
                            if(item == 1)
                                {

                                }


                        }
                    });
                    alert = builder.create();
                    alert.show();
                }
                if(position == 1)
                {
                    Intent in=new Intent(settings_dock.this,set_dock.class);
                    in.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                    in.putExtra("dock_location",1);

                }
                if(position == 2)
                {
                    Intent in=new Intent(settings_dock.this,set_dock.class);
                    in.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                    in.putExtra("dock_location",2);
                }
                if(position == 3)
                {
                    Intent in=new Intent(settings_dock.this,set_dock.class);
                    in.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                    in.putExtra("dock_location",3);
                }
                if(position == 4)
                {
                    Intent in=new Intent(settings_dock.this,set_dock.class);
                    in.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                    in.putExtra("dock_location",4);
                }


            }
        });
    }

}

and I am trying to launch a intent as you can see
but simplay nothing happens not even a error in logcat
The intent to launch is lusted in my manifest

I am realy puzzeld right now 🙁

m
edit :
manifest :

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="org.alexander.fuchs.lockscreen"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="8" />

    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.INTERNET"/>


    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >

        <activity
            android:name=".app"
            android:label="@string/app_name"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
            android:excludeFromRecents="true"
            android:clearTaskOnLaunch="true"> 
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <receiver android:name="boot">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
                <category android:name="android.intent.category.HOME" />
            </intent-filter>
        </receiver>

        <service
        android:name="lockservice" 
        android:process=":lockscreen" 
        android:icon="@drawable/ic_launcher"
        android:label="Lockscreen">
        </service>

        <activity
            android:name=".weather_update"
            android:theme="@android:style/Theme.Translucent">

        </activity>
        <activity
            android:name=".restart_service"
            android:theme="@android:style/Theme.Translucent">

        </activity>
        <activity
            android:name=".settings">

        </activity>
        <activity
            android:name=".settings_weather">

        </activity>
        <activity
            android:name=".settings_general">

        </activity>
        <activity
            android:name=".settings_dock">

        </activity>
        <activity
            android:name=".settings_personalisation">

        </activity>
        <activity
            android:name=".set_dock"
            android:theme="@android:style/Theme.Dialog"
            android:screenOrientation="portrait">

        </activity>

    </application>

</manifest>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T20:17:23+00:00Added an answer on June 5, 2026 at 8:17 pm

    You haven’t called:

    startActivity(in);
    

    Hopefully this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code for my soundboard, public class soundboardActivity extends Activity { View
I have a spinner, and I do this public class Settings extends Activity {
My main class look like this: public class Soundboard extends Activity { SharedPreferences preferences;
I have a problem with my activity. This is my onCreate: case NORMAL: game
Hi All I have the following code: enter code here public class XMPPClient extends
In my main activity, I have: Intent settings_intent = new Intent(this, SettingsActivity.class); settings_intent.putExtra(SomeID, some_int);
I have a class Drawview: public class DrawView extends View { private ColorBall[] colorballs
I have an imageview that should be changed on click public class Settings extends
Have following setup: MainActivity class - extends activity MyLayout class - extends View Prefs
I have created a class for working with SharedPreferences . In my Activity ,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.