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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:05:14+00:00 2026-05-31T01:05:14+00:00

I am working on an android app that has two activities. One is the

  • 0

I am working on an android app that has two activities. One is the menu screen and the other is the one that the user actually uses once they have made a selection. The second activity does all of its processing in a worker thread. When I make the selection to move on to the second activity, it “flashes” the activity for about 100ms. I found some logs that look like they would tell me what I need to fix if I knew what they meant.

02-29 10:52:33.850: I/ActivityManager(1255): Starting activity: Intent { cmp=com.wcf.imageShare/.ImageShareActivity }
02-29 10:52:33.920: W/InputManagerService(1255): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@45c0a198 (uid=10097 pid=24918)
02-29 10:52:33.936: W/WindowManager(1255): No window to dispatch pointer action
02-29 10:52:33.952: I/ActivityManager(1255): Displayed activity com.wcf.imageShare/.ImageShareActivity: 96 ms (total 96 ms)
02-29 10:52:34.000: W/WindowManager(1255): No window to dispatch pointer action 1

The program itself is not crashing, it just takes me back to the menuview and displays my choices again. Here is the code I am using to switch activities

lstServers.setOnItemClickListener(new OnItemClickListener()
    {
        public  void onItemClick(AdapterView<?> parent, View view, int position, long id)
        {
            Beacon.activeServer = position;
            Intent uploadIntent = new Intent(inst,ImageShareActivity.class);
            inst.startActivity(uploadIntent);
        }
    });

inst holds the ‘this’ variable of the activity that the code is running in since I couldn’t reference it by using ‘this’

Here is the onCreate of the activity I am trying to switch to:

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    try
    {
        progBar = (ProgressBar)findViewById(R.id.progressbar_Horizontal);
        tv = (TextView)findViewById(R.id.prog_txt);
        btnCancel = (Button)findViewById(R.id.cancel);
        btnCancel.setOnClickListener(new OnClickListener()
        {
            public void onClick(View arg0) 
            {
                try {
                    uploaderThread.interrupt();
                    Uploader.CancelUpload();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
        uploaderThread.start();
    }
    catch(Exception e)
    {
        Log.d("Uploader ERROR",e.getMessage());
    }
}

And finally the part of the manifest file that has to do with the two activities.

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" android:debuggable="true">
        <activity
        android:name=".ImageShareActivity"
        android:label="@string/app_name"
        android:screenOrientation="portrait">
        </activity>
        <activity android:name=".ServerChoiceActivity"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.SEND"/>
                <data android:mimeType="image/*"/>
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
        </activity>
    </application>

Does anyone have any suggestions or know of something that I am missing?

Thanks

Nick Long

  • 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-31T01:05:16+00:00Added an answer on May 31, 2026 at 1:05 am

    Change this to this :

    lstServers.setOnItemClickListener(new OnItemClickListener()
        {
            public  void onItemClick(AdapterView<?> parent, View view, int position, long id)
            {
                Beacon.activeServer = position;
                Intent uploadIntent = new Intent(your_current_activty.this,ImageShareActivity.class);
                uploadIntent.startActivity();
            }
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're designing an Android app that has several activities which are working in a
I’m working on an android application that currently has two Activities, A and B,
I have an app that has two buttons – one for email & one
I'm working on an Android app that uses high-resolution GPS data. It's designed to
I'm working on an android app that has to send and receive information from
I'm working on an app that uses a custom class with other custom classes
I am working on an Android app that utilizes the Google Maps API MapView,
I'm working on an android app where I have only 2 activities... The first
I need a user account or two in my Android Emulator so that I
I'm working on an android app that writes and reads .PNG files from sdcard.

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.