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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:38:44+00:00 2026-05-14T18:38:44+00:00

I noticed a lot of Android functions have a parameter that you can pass

  • 0

I noticed a lot of Android functions have a parameter that you can pass in that’s a bitmask, for different options, like on PendingIntent, you can pass in things like you can call getActivity() with PendingIntent.FLAG_CANCEL_CURRENT|PendingIntent.FLAG_NO_CREATE.

I’m wondering how I can create a function that has a parameter like this?

  • 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-14T18:38:45+00:00Added an answer on May 14, 2026 at 6:38 pm
    public static final int FLAG_1 = 1<<0; // 0x01
    public static final int FLAG_2 = 1<<1; // 0x02
    public static final int FLAG_3 = 1<<2; // 0x04
    public static final int FLAG_4 = 1<<3; // 0x08
    
    public void myFlagsFunction( int flags ) {
      if ( 0 != ( flags & FLAG_1 ) ) {
        // do stuff
      }
      if ( 0 != ( flags & FLAG_2 ) ) {
        // do stuff
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I noticed in a lot of scripts ( like phpbb ) that some functions
I have noticed that a lot of Pod has blank lines between the lines
I've noticed a lot of Microsoft sites have the *.MSPX extension. While I'm very
I've noticed that boost.asio has a lot of examples involving sockets, serial ports, and
I noticed that my Designer.vb file of one of my forms has a lot
I noticed that you can call Queue.Synchronize to get a thread-safe queue object, but
(Newbie to Java, old time C# guy.) I have noticed a lot of the
I noticed a lot of ASP .Net sites does not have the URL ending
I've noticed that a lot of the time when i search something on Google,
I've noticed on viewing the source of my Rails app that a lot of

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.