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 6713697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:24:39+00:00 2026-05-26T08:24:39+00:00

I am trying to go back to a previous activity using intents. The problem

  • 0

I am trying to go back to a previous activity using intents.

The problem I have is with my main page, it is the page that launches the app so when I try to put the name android.intent.action.MAIN as my intent, it gives me the option to open all the apps.

What should I do to fix this? How can I rename my activity name?

Thanks

Here is my Manifest

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.AssaultAlarm.full" android:versionCode="1"
    android:versionName="1.0">
    <uses-sdk android:minSdkVersion="5" />
    <uses-permission android:name="android.permission.SEND_SMS" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
     <uses-permission android:name="android.permission.READ_CONTACTS" />
    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".AssaultAlarmActivity"
            android:screenOrientation="portrait" android:theme="@android:style/Theme.NoTitleBar"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".Info" android:screenOrientation="portrait"
            android:theme="@android:style/Theme.NoTitleBar" android:label="@string/app_name">
            <intent-filter>
                <action android:name="com.AssaultAlarm.INFO" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity android:name=".Settings" android:screenOrientation="portrait" android:permission="android.permission.READ_CONTACTS"
            android:theme="@android:style/Theme.NoTitleBar" android:label="@string/app_name">
            <intent-filter>
                <action android:name="com.AssaultAlarm.SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
    </application>
</manifest>

This is how I want to call it

Intent info = new Intent("AssaultAlarmActivity.class");
            startActivity(info);
  • 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-05-26T08:24:39+00:00Added an answer on May 26, 2026 at 8:24 am

    If you want to go to previous activity you can just finish current activity. You will automatically go to previous activity in stack but if you want to go specific activity you can use following.

    Why you are not using explicit intent.

    Intent info = new Intent(CallingActivity.this,AssaultAlarmActivity.class);
    startActivity(info);
    

    If you don’t want to use explicit intent you may add new intent filter for your activity

        <activity android:name=".AssaultAlarmActivity"
            android:screenOrientation="portrait" android:theme="@android:style/Theme.NoTitleBar"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
                <action android:name="MyAction" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
    

    and

    Intent info = new Intent("MyAction");
                startActivity(info);
    

    If you want to rename your activity you will do it as follow

        <activity-alias android:name="AlternateName"
            android:targetActivity=".AssaultAlarmActivity"
        />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In trying to solve the ajax back button problem I have found the Really
Trying to create my first iPhone app that would play back audio. When I
In JQuery Mobile I am using changePage() to redirect back to a previous page,
Using Forms Authentication in ASP.NET MVC when trying to log back into a site,
I'm trying to put a Message back into an MSMQ when an exception is
I was trying to change my default/main/startup (whatever you call it) activity by editing
I'm trying to use url_for(:back) to create a redirect leading back to a previous
With my application, I am trying to revert the project back to a previous
I'm trying to get some code working that a previous developer has written. Yep,
In my application I have only one activity and I am using ViewAnimator for

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.