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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:36:15+00:00 2026-06-11T14:36:15+00:00

I am building an app that has multiple useful functionalities. One activity uses google

  • 0

I am building an app that has multiple useful functionalities. One activity uses google maps. Can I make it so that users can use this functionality if they wish, but exclude it from older phones that cant use it (similar to how a video game can be played online or offline)? The real reason im confused is because i have to declare this in the manifest for the entire app (is there a way for me to just exclude a certain activity if users dont have map functionality?). I also will be requiring gps for the map activity, but i dont want to limit this app to only phones with these advanced functionalities since the other activities are much less complex.

  • 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-11T14:36:16+00:00Added an answer on June 11, 2026 at 2:36 pm

    The real reason im confused is because i have to declare this in the manifest for the entire app (is there a way for me to just exclude a certain activity if users dont have map functionality?)

    You can put android:required="false" in your <uses-library> element. Then, at runtime, check to see if MapActivity exists. If it does, you have the Google Maps SDK add-on, and you can launch your MapActivity subclass. If MapActivity does not exist, do something else.

    Here is a sample project that demonstrates this: https://github.com/commonsguy/cw-omnibus/tree/master/Maps/NooYawkMapless

    The manifest has:

    <uses-library android:name="com.google.android.maps" android:required="false" />
    

    and the launcher activity is:

    package com.commonsware.android.maps;
    
    import android.app.Activity;
    import android.content.Intent;
    import android.os.Bundle;
    import android.widget.Toast;
    
    public class MapDetector extends Activity {
      @Override
      public void onCreate(Bundle instanceState) {
        super.onCreate(instanceState);
    
        try {
          Class.forName("com.google.android.maps.MapActivity");
          startActivity(new Intent(this, NooYawk.class));
        }
        catch (Exception e) {
          Toast
                .makeText(this,
                           "Google Maps are not available -- sorry!",
                           Toast.LENGTH_LONG)
                .show();
        }
    
        finish();
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building an app that currently has 3 ViewControllers. One of them is used
I'm building an app that has a main Activity that takes advantage of the
I am building an app that has two types of users: regular users (have
I am building a app that has a javascript layer on top that uses
I need some advice. I’m building an app that has a sequence of 4
I'm building a Rails app that has Etsy.com style functionality. In other words, it's
I am building an iPad app that has a split view controller. Is it
I'm building a new web app that has a requirement to generate an internal
I am building a FB canvas app that has share functionality, my plan is
The app I'm currently building has the requirement that the app has to prevent

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.