Android Map view does'nt work (white screen) - android

I devleop an app which one of its abilities is to view a map and display nearby places (does not matter really what it displays).
for my convenience - i coded it in separate project.
after i copied the code (with all of the resources) to the main app, and tried to display the map, I could not see the map at all. instead, i saw default white screen.
I generated the suitable keys (API and server) for every project, and enabled the needed API's (seperately):
BigQuery API.
Debuglet Controller API.
Google Cloud Logging API.
Google Cloud SQL.
Google Cloud Storage.
Google Cloud Storage JSON API.
Google Maps Android API v2.
Google Maps Geolocation API.
Google Places API for Android.
Google Places API Web Service.
and this is my androidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<uses-sdk android:minSdkVersion="16"
android:maxSdkVersion="22"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.NETWORK" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<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-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<application
android:allowBackup="true"
android:icon="#mipmap/icon_mykehila"
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>
....
....
....
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/google_maps_key" />
<activity
android:name=".Maps.MapsActivity"
android:label="#string/title_activity_maps" >
</activity>
...
....
</application>
The weirdest thing is that it works perfectly on the small app, but not on the main app when I try to run it from there.
What can it be?

The only way to solve it was to Edit allowed android applications in the console to "Any application allowed".
I don't know why but this was the only way.

Related

camera and storage permissions isn't working in the webiew

I'm loading my website in webview. And inside that website also contains two buttons "Take photo" and "Upload". In the browser on the phone it works perfectly. As in, the "Take photo" button lets you take a photo, and the "Upload" button lets you upload a photo. But inside my app, it doesn't seem to do anything. And I know this has something to do with permissions. Here's my code:
AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_favicon_1144_rounded"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/Theme.Test2">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I haven't changed my MainActivity.kt at all, but if you want, I can edit this question and add it in.
This is not possible. From android app webview, you can not get access to device's permissions.

React Native Deep Linking Application Not Opening

I followed all the steps from both the articles mentioned below
https://hackernoon.com/react-native-deep-linking-for-ios-and-android-d33abfba7ef3
https://medium.com/react-native-training/deep-linking-your-react-native-app-d87c39a1ad5e
After the app gets installed on my phone, I tried opening the app from the browser by giving the URL as peopleapp://people/1 format. Instead of opening the app, the browser opens Google search to search for the above.
I Used this application to open my Application by using my App Link(https://play.google.com/store/apps/details?id=com.manoj.dlt&hl=en_US) it's working.
But how to open the application from browser or from another application Using my App Link ?
Anyone has idea, how to solve this issue ?
Here is my Total AndroidManifest Code`
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:name=".MainApplication"
android:allowBackup="false"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:label="#string/app_name"
android:windowSoftInputMode="adjustResize"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="filter_react_native">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="whizzard" android:host="article" />
</intent-filter>
</activity>
</application>
`
My Link is whizzard://article
As per google docs:
The functionality has changed slightly in Chrome for Android, versions 25 and later. It is no longer possible to launch an Android app by setting an iframe's src attribute. For example, navigating an iframe to a URI with a custom scheme such as paulsawesomeapp:// will not work even if the user has the appropriate app installed. Instead, you should implement a user gesture to launch the app via a custom scheme, or use the “intent:”.
You can read more about how intents work here. However, the tutorial you followed, for deeplinking will work on other browsers which are not chrome or chrome based.

Here Maps screen on Nokia X device shows a white screen with logo only

I have followed all steps mentioned in the porting guide for V1.
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<meta-data
android:name="com.here.android.maps.appid"
android:value="id here" />
<meta-data
android:name="com.here.android.maps.apptoken"
android:value="token here" />
<uses-library
android:name="com.google.android.maps"
android:required="false" />
<uses-library
android:name="com.here.android"
android:required="false" />
<activity
android:name=".ui.maps.HereLocationsActivity"
android:launchMode="singleTop"
android:hardwareAccelerated="true"
android:theme="#android:style/Theme.Holo"
android:screenOrientation="portrait" >
</activity>
I have added hardwareAcceleration to application tag as well.
It shows location markers properly without map tiles.
What could be the issuw. I am testing on a Nokia X device without SD card.
Any help would be appreciated.
the minSdkVersion should be also changed to be 11, you do need to set the Id & token to values reserved for you
As well as do add following permissions as well:
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.ACCESS_WIFI_STATE
Also do try zooming out, could indeed be that you are located in a area which is shown in white and having full zoom there..
Basically it should be black if the initialization fails, and it should be blue if there is no tiles (or you are at sea), white background thus would indeed be inddicating something else going wrong.
Do also make sure you have enabled location, and have working mobile internet. Would also suggest opening HERE maps app, and downlaoding the maps tiles for the same location used in the app, thus you could see that how it is supposed to look like.

Google's geofence app not working

I have downloaded a Geofence Sample Application form here but it is not working .I have replaced actions in GeofenceUtils class by putting app package name e.g com.example.android.geofence.ACTION_CONNECTION_ERROR is replaced by com.geofencesample.ACTION_CONNECTION_ERROR , here com.geofencesample is my app package name .I have put all the possible permissions regarding Location in manifest file , here is my manifest file .
MANIFEST FILE :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.geofencesample"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<!--
Requests address-level location access, which is usually
necessary for geofencing
-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/title_activity_geofence"
android:theme="#style/AppTheme" >
<activity
android:name="com.geofencesample.MainActivity"
android:label="#string/title_activity_geofence" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<!--
This activity should be linked to the app's Launcher icon
-->
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:name="com.geofencesample.ReceiveTransitionsIntentService"
android:exported="true" >
</service>
</application>
</manifest>
I am passing lattitude , logitude and radius(10m) of geofence through UI , After clicking on "Register geofence" button I am entering and exiting from geofence but nothing happens . I am not getting any notification or any vibrate alert (I have added it in MainActivity$GeofenceSampleReceiver.handleGeofenceTransition) . Which suitable fix should I do .
Any help will be appreciated .
I have tested it using proper radius and app package name .Now App is working ,but in some cases it gives false entry notification . I am using Mock Locations provider app so that I can test it by keeping himself at a place . Still I am not getting proper notification .

How to specify hardware requirement through code?

I have an android application which has a provision to controls calls ie, allow or block specific incoming & outgoing phone calls.Here is part of manifest file.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="xxxx.xxxxxx.xxxxxxx"
android:installLocation="internalOnly"
android:versionCode="1"
android:versionName="1.0" >
<uses-feature
android:name="android.hardware.telephony"
android:required="false" />
<uses-feature
android:name="android.hardware.location"
android:required="false" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" />
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application>
</activities>
</services>
<receiver android:name="xxxx.xxxx.ReceiverOutGoingCall" >
<intent-filter>
<action android:name="android.intent.action.NEW_OUTGOING_CALL" />
</intent-filter>
</receiver>
<receiver android:name="xxxx.xxxx.ReceiverIncomingCall" >
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE" />
</intent-filter>
</receiver>
</application>
</manifest>
This application does not show for some devices in Google play.After a long time search I understood that it is due to <uses-feature> hardware requirements. No i want to remove the required hardware features for phone calls from manifest and check them from code.
Some tablets which does not have a Phone Call functionality does not show my application.So i want to make my application available to these tablets which lacks the required hardware.How can i achieve this?
Thanks in Advance
Some permissions automatically impy feature requirements.
This is what the API Guides says:
"For any of the permissions below, you can disable filtering based on the implied feature by explicitly declaring the implied feature explicitly, in a element, with an android:required="false" attribute."
Your permissions impliy the features android.hardware.wifi, android.hardware.location.network, android.hardware.location.gps, android.hardware.location and android.hardware.telephony.
You set only two of them to android:required="false". So you might try to set the other permissions to not required, too.
Unfortunately, there isn't a way to add permissions after the application is installed. Perhaps you can release 2 APKs. One for mobile devices and one for tablets.
Try this code to check if phone functionality is available :
public static boolean isTablet(Context context) {
TelephonyManager manager = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
return manager.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE;
}

Categories

Resources