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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:53:00+00:00 2026-06-04T03:53:00+00:00

i am attempting to implement a built in controller that is part of the

  • 0

i am attempting to implement a built in controller that is part of the scoreloop library. the documentation states:

Basic Usage:

To invoke the TOS dialog if it was not accepted previously, the following code may be used:

 final TermsOfServiceController controller = new TermsOfServiceController(new TermsOfServiceControllerObserver() {
 @Override
 public void termsOfServiceControllerDidFinish(final TermsOfServiceController controller, final Boolean accepted) {
    if(accepted != null) {
        // we have conclusive result.
        if(accepted) {
            // user did accept
        }
        else {
            // user did reject
        }
    }
 }
 });
 controller.query(activity);

but when i paste this into my code i get the following syntax errors:

Syntax error on token(s), misplaced construct(s)
Syntax error on token "activity", VariableDeclaratorId expected after this token

am i using this incorrectly? how and where would this be used any ideas?

EDIT: after moving the statement to the method where i want to show the dialog i now get the following error:

new error

  • 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-04T03:53:01+00:00Added an answer on June 4, 2026 at 3:53 am

    You seem to be calling controller.query(activity) in a class body where a declaration is expected. Move the statement controller.query(activity) to a method where you would like to show the dialog.

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

Sidebar

Related Questions

I'm attempting to implement OpenID with ASP.NET MVC (Yeah, we haven't heard that one
I am attempting to implement a function that sorts a randomly generated vector using
I am attempting to implement TrialPay/Offerwall/Dealspot on a Facebook app. In their documentation they
I am attempting to create something along the lines of How to Implement Basic
I'm attempting to implement a phpBB library into Kohana. I have created a vendor
I'm attempting to implement a dialog for a user to choose several of many
I'm attempting to implement a Microsoft Pivot viewer within my application, I've decided that
I am attempting to implement an extension table structure for some stats that I
I'm attempting to implement the atomic library from the C++0x draft. Specifically, I'm implementing
I'm attempting to implement a progress bar with a textbox on top that also

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.