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

  • Home
  • SEARCH
  • 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 9062817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:50:03+00:00 2026-06-16T15:50:03+00:00

This is the error that I’m getting but I’m not getting any Quick Fixes

  • 0

This is the error that I’m getting but I’m not getting any Quick Fixes on how to fix it. It just gives me the error. I’m a newbie with fixing errors for an Android app.

The bit of code that is throwing the error:

Toast.makeText(CameraPreview2.this, "Cancelled!", Toast.LENGTH_LONG).show();

The error:

The method makeText(Context, CharSequence, int) in the type Toast is not
applicable for the arguments (CameraPreview2<detailLayout>, String, int) 

The full code is:

protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    // TODO Auto-generated method stub
    if (resultCode == RESULT_OK) {
        if (requestCode == 1) {
            uriVideo = data.getData();
            Toast.makeText(CameraPreview2.this, uriVideo.getPath(),
            Toast.LENGTH_LONG).show();
        }
    } else if (resultCode == RESULT_CANCELED) {
        uriVideo = null;
        Toast.makeText(CameraPreview2.this, "Cancelled!", Toast.LENGTH_LONG)
            .show();
    ...
  • 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-16T15:50:04+00:00Added an answer on June 16, 2026 at 3:50 pm

    Impossible to say with the little bit of code you posted but Toast.makeText(...) does take a Context (which typically is something like this or ClassName.this.) i’m not sure what you passed it but clearly it isn’t a Context.

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

Sidebar

Related Questions

I wrote this Ext js application but I keep getting this error that says
I'm not sure why I'm getting this error that's terminating my connection. I updated
I'm a newbie in boost.python and i'm getting this error that I would like
This is an error that my friend is getting when testing my app, but
How to fix this error that happens on Debian Linux using ssl commands with
Im getting this linker error that won't let me compile. It only happens on
This is probably a dum error that can be fixed in seconds but have
I see that many people get this error, but their situations all appear a
I am getting this error on a js function that sends an ajax request
I am getting this error that is related to ReportsViewer. I need to eliminate

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.