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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:05:28+00:00 2026-06-18T02:05:28+00:00

I want to develop an application which contains map features and runs on the

  • 0

I want to develop an application which contains map features and runs on the Android OS.
My question is how can this app run on Android devices without the Google maps library?

For example,
there is an activity which contains some fragments, one of the fragment including the map feature. In this case, the activity ‘MUST’ extends MapActivity which is in maps library. This is no problem on devices with GMS, but how about devices without GMS ?

First, I add an attribute ‘required=”false”‘ for maps library in AndroidManifest.xml

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

And have the activity not use the map fragment if there is no maps library in device.
But the activity extends MapActivity, and MapActivity is in the maps library.
How can this activity extend MapActivity when the devices have the maps library and extend Activity when devices do not ?

  • 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-18T02:05:29+00:00Added an answer on June 18, 2026 at 2:05 am

    You could implement this by having two different classes one extending MapFragment, and one extending Fragment or Activity and then checking for the availability of Google Play Services.

    If you plan on using Google Maps V2 (and you should since V1 will stop working in March) there is a way to check if Google Play services are available http://developer.android.com/google/play-services/setup.html

    Once you have established if Google Play services are available you can either instantiate the activity that extends MapFragment or the one that extends Activity.

    Of course the common functionality will be shared between classes, and in this case you will have to do it through composition since inheritance is unavailable.

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

Sidebar

Related Questions

I want to develop an Android application which can run on all ,screen type
i want to develop android application in which runs in my pc and connects
I am newbie in android .i want to develop an application which has the
I want to develop a mobile application which can work in GPS/GPRS based phones.
I want to develop an android application which allow to me to track and
I want to develop an application in C# which can access sharepoint data without
I want to develop generalized application which can works with all type of databases
I want to develop an android NFC based application in which I want to
I want to develop a application which will continue to run in background for
I want to develop an application in which, if i open the app, it

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.