I've just gotten my google maps application to not crash on startup, but now, when it opens, it just shows a grey/white background and buttons for zooming. I searched the web and I found that this may be a problem with my API-key, so I got a new key from google, but this didn't work either.
Here's a screenshot of how it looks.
link to image (I'm a new user, so I couldn't post a picture here)
Here's my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.androidbasic12"
android:versionCode="1"
android:versionName="1.0"
>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<permission
android:name="come.example.androidbasics12.permission.MAPS_RECIEVE"
android:protectionLevel="signature"/>
<uses-permission
android:name="com.example.androidbasics12.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/new_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<!-- First xml to be loaded -->
<activity
android:name="com.example.androidbasic12.MainActivity"
android:label="#string/app_name"
android:launchMode="singleInstance"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Opens main menu after splash has loaded -->
<activity
android:name=".myMenu"
android:label="#string/app_name"
android:screenOrientation="portrait"> >
<intent-filter>
<action android:name="com.example.androidbasic12.CLEARSCREEN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- Opens test -->
<activity
android:name=".tutOne"
android:label="#string/app_name"
android:screenOrientation="portrait"> >
<intent-filter>
<action android:name="com.example.androidbasic12.TUTONE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- Opens map page -->
<activity
android:name=".map"
android:label="#string/app_name"
android:screenOrientation="portrait"> >
<intent-filter>
<action android:name="com.example.androidbasic12.MAPS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyBcMOBc8WVLUIRUfs0Zgap3cnhwm4dWLag"/>
</application>
</manifest>
Anyone got any tips for this?
I've got the same problem as you, everything worked ok on emulator but on the real device it was gray surface with zoom buttons.
Then I tried other devices and it works. All other phones have original (stock) firmware, only I have one with custom firmware.
lease first check that everything works fine on emulator, then check on the device with stock firmware and let us know the result.
The problem may not be with your API key, but the authorized apps in the API console. Make sure you registered the correct key(s) and package names with the Google API console. Specifically, if you are compiling and launching directly from eclipse, you are probably signing in debug mode. If so, you need to add your debug key hash + package name to the allowed applications in the API console.
Related
I have uploaded an App on Google Play Store. I able to download it in mobile phone but it is not available for Tablets.
When i try to download it in Tablet its shows an error something like "This app is only design for phones"
Please help me.. what have i done wrong??
Here is my AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.AnTim.mediteam"
android:versionCode="3"
android:versionName="1.2" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="8" />
<uses-feature
android:name="android.hardware.telephony"
android:required="false" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<permission
android:name="com.AnTim.mediteam.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.AnTim.mediteam.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:name="com.AnTim.mediteam.Controller"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.AnTim.mediteam.MainActivity"
android:configChanges="orientation|keyboardHidden"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.DELETE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="com.idrivecare.familypro" />
</intent-filter>
</activity>
<activity
android:name="com.AnTim.mediteam.Internet_connection"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.AnTim.mediteam.Internet"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.AnTim.mediteam.Preference"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.AnTim.mediteam.GuestMenu"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.AnTim.mediteam.Privacy"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.AnTim.mediteam.Terms"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.AnTim.mediteam.Forgot_password"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.AnTim.mediteam.Registration"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.AnTim.mediteam.Sucessfull_register"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.AnTim.mediteam.Patient_menu"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.AnTim.mediteam.Web"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.AnTim.mediteam.Best_doctor"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<receiver
android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<!-- Receives the actual messages. -->
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<!-- Receives the registration id. -->
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.AnTim.mediteam" />
</intent-filter>
</receiver>
<service android:name="com.AnTim.mediteam.GCMIntentService" />
</application>
According to this:
http://arstechnica.com/gadgets/2013/11/google-play-rolls-out-designed-for-phones-tag-of-shame-on-tablets/
"Apps that don't include certain tablet enhancements will display a "designed for phones" tag on the tablet version of the Play Store, making users with tablets less likely to install them."
I guess this is the reason why you get this message. You probably didn't include those "tablet enhancements"
Your app uses feature "android.hardware.telephony". If the tablet doesn't have the dialer and a data network the app will not be compatible in that device.
I know I'm slightly late, but better late than never.
As suggested by #SauravGhimire it was the telephony access that broke compatibility.
This would be true if required = true. However, your code specifies required = false:
<uses-feature
android:name="android.hardware.telephony"
android:required="false" />
This shows that the app uses telephony on compatible devices, and on devices that doesn't have telephony access, your app has something set up that doesn't use telephony on unsupported devices. This would mean you maintain support for tablets.
The screen sizes supported would help Google Play see that you have added support somehow for tablets. AFAIK, declaring that tag and not adding special layouts doesn't show designed for tablets, nor does it show designed for phones. This is the point where your app supports both phones and tablets, but isn't specifically designed to take advantage of the extra room on tablets.
As #Hans1984 said, you may not receive installs if your app gets a "designed for phones label".
Not sure how this worked in 2015, but now you can download apps even if they are designed for phones. The "designed for phones" tag is just a way that tablet users can be "warned" that this app may not be as good on a tablet as on a phone.
I have downloaded "designed for phone" apps on my tablet, and I have done it on android 5, 6 and 7 without any problems. Maybe some devices have a warning like that (or some don't). Could also be a problem with the custom permission you have (com.AnTim.mediteam.permission.C2D_MESSAGE)
It is very hard to say why exactly you got the error, but you have done everything in the right way that should prevent the "designed for phones" label, and (assuming you don't have special tablet layouts) you will nto get the "designed for tablets" label either (the last label means it is also designed for tablets, that there is special support for it. There is also support for phones). Could be that an older version (beta/alpha/production (old version)) didn't support it and you tried to download too soon. Google Play needs a lot of time to process updates. Adding layouts for tablets is also a fix for this.
I'm pretty new to android development. I created a project using android studio, and chose my first activity to be a login activity. After changing some basic stuff in the layout/trying to add some functionality in java, thought I'd do a test run. While trying to build apk and install the app, it installs fine on my phone but AIDE (A development android app) says that no launcher activity is found. Here's my manifest file:
<!-- To auto-complete the email text field in the login form with the user's emails -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".LoginActivity"
android:label="#string/app_name"
android:windowSoftInputMode="adjustResize|stateVisible" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.categor.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
So what am I missing? I've searched a lot but I ant find an answer that applies to my scenario. Any help would be appreciated. Thanks
<category android:name="android.intent.categor.LAUNCHER" />
It Should be
<category android:name="android.intent.category.LAUNCHER" />
I am trying to add Voice Capabilities in Android Wear and following below URL
https://developer.android.com/training/wearables/apps/voice.html
Here is my manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.demowearapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-feature android:name="android.hardware.type.watch" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-sdk
android:minSdkVersion="20"
android:targetSdkVersion="20" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".TaxiActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.google.android.gms.actions.RESERVE_TAXI_RESERVATION" />
</intent-filter>
</activity>
</application>
</manifest>
But when i am trying below voice commands in my LG G watch it doesn't open my activity...it just showing Google search results
"OK Google, get me a taxi"
"OK Google, call me a car"
Thanks.
The wearable doesn't know this is a wear app. Wear apps need this in their manifest: <uses-feature android:name="android.hardware.type.watch" />
Had the same problem. The solution was to add the category android.intent.category.DEFAULT to the intent filter:
<activity android:name=".TaxiActivity" android:label="#string/app_name">
<intent-filter>
<action android:name="com.google.android.gms.actions.RESERVE_TAXI_RESERVATION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
If you open the Android Wear app on the phone you can verify that your app is available under "Call a car" beneath "Voice actions".
For non-English speakers still having problems using the voice command you should double check the language used for voice commands on your device. Change it to English and try it out. If that still doesn't work you can try changing the device's language to English also.
I'm debugging using my Samsung Galaxy S5 and every time I run it through Android Studio it works fine and it pops up the app, but then when I click out of it it doesn't show in all of my apps like other apps I've installed to my device. The app will show in my task manager after I close out of it but it still won't show in all of my apps. Really could use some help on this one, thanks.
This is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="us.bisonsoftware.tab" >
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="Husky Athletics"
android:theme="#style/CustomActionBarTheme">
<activity
android:name=".TabBarExample"
android:label="Husky Athletics"
android:icon="#drawable/ic_launcher">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<data android:scheme="geo"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".FirstTab" />
<activity android:name=".SecondTab" />
<activity android:name=".ThirdTab" />
</application>
<uses-permission android:name="android.permission.INTERNET" ></uses-permission>
<uses-permission android:name="android.permission.CALL_PHONE"></uses-permission>
Try to make your activity name complete like this:
<activity
android:name="com.example.myapp.TabBarExample"
... >
</activity>
I dont know your package name. You have to fill it by yourself.
I have been able to create a *.apk file from my code, place the file
in IIS, and download it onto a number of Android phones. Upon the
install, the application works exactly as expected.
However, after a phone is rebooted, the application name is changed to
the fully-qualified Java class name of the activity in the menu (so
"MyActivity" becomes "com.mycompany.MyActivity"), and when I try to go
to Menu > Settings, I get an error that causes android to force close
my application.
Looking into DDMS, I see that I get an error indicating that it can
not find my Preferences activity, despite the fact upon initial
install, it works properly.
I'm using Eclipse on Windows XP, and have several Android devices at
my disposal to test with.
Any idea what's going on?
AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.company.app"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="#drawable/logo" android:label="#string/app_name"> <!--android:debuggable="true">-->
<activity android:name="com.company.app.ActivityMain"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.company.app.Preferences"
android:label="#string/app_settings">
<intent-filter>
<category android:name="android.intent.category.PREFERENCE"></category>
<action android:name="android.intent.action.MAIN"></action>
</intent-filter>
</activity>
<service android:name="com.company.app.Service"></service>
</application>
<uses-sdk android:minSdkVersion="3" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
</manifest>
So I finally got this to work. I think that the package installer on the HTC Hero (and maybe the HTC Droid Eris) has some issues.
I uninstalled my application from the phone, changed the name of my main activity, and re-deployed it onto the Hero. I started to immediately get a "Force Close." I connected the device to DDMS and looked at the error. It was still looking for my old activity name. I factory reset the device and reinstalled the same package (with the updated name) and everything works as expected.
So it seems that the package installer is caching some part of the old manifest or something, not really sure what exactly is going on there. I may play with it some more if I get time.
I don't know if someone else could verify this problem, maybe it's something that should be taken up with HTC?
try to use this manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.company.app"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="#drawable/logo" android:label="#string/app_name"> <!--android:debuggable="true">-->
<activity android:name=".ActivityMain"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Preferences"
android:label="#string/app_settings">
<intent-filter>
<category android:name="android.intent.category.PREFERENCE"></category>
<action android:name="android.intent.action.MAIN"></action>
</intent-filter>
</activity>
<service android:name=".Service"></service>
</application>
<uses-sdk android:minSdkVersion="3" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
</manifest>