MapView android - android

I have the Google Map API key and I have the Google Maps Android API v2 turend ON`
<uses-permission android:name="com.vogella.android.locationapi.maps.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" />`
But I am still not getting gray lines in the application.
any advice?
thanks in advance

This tutorial will guide you to right place...
Google map v2 tutorial
Tutorial 2

Related

In My Webview Upload Image Button Not Working But In Browser It's Working

In My Webview Upload Image Button Not Working But In Browser It's Working .Using WordPress file upload not working using flutter.rest all working fine
used all permissions
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE" >
</uses-permission>
<uses-permission
android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Do i need add something in main dart file

Xamarin CrossGeeks Geofence Plugin null reference exception

I am using the CrossGeeks Geofence plugin found here:
https://github.com/CrossGeeks/GeofencePlugin
Using the documentation on the home page and the sample found here to build a test app:
https://github.com/domaven/xamarin-plugins/tree/master/Samples/Geofence
I encounter this error when I try to start monitoring a region:
{System.NullReferenceException: Object reference not set to an instance of an object.
at Plugin.Geofence.GeofenceImplementation.RequestMonitoringStart () [0x00000] in <793ebe419a94494388f459127f8240ff>:0
at Plugin.Geofence.GeofenceImplementation.StartMonitoring (Plugin.Geofence.GeofenceCircularRegion region) [0x00061] in <793ebe419a94494388f459127f8240ff>:0
at GeoFenceApp.MainPageViewModel.StartStopMonitoring () [0x00027] in C:\Users\ctodd\source\repos\GeoFenceApp\GeoFenceApp\MainPageViewModel.cs:87 }
The CrossGeofence object itself is not null and neither is the _myRegion object:
screenshot of cross geofence object
screenshot of region object
I believe I am initialising things correctly according to the documentation and the sample.
I'm using the following permissions, even though I believe only fine_location, coarse_location, read_gservices and boot_completed are necessary:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
A google api key is necessary in the sample because a map is being displayed, but I don't need to display a map. Do I still need this key to access location services?
After the permissions, I'm really not sure what is causing the error, as I've tried to follow the documentation.

Getting Location Services Running Unity/Tango

I am building a simple app in Unity/Tango platform.
I am trying to get the location.
I followed the steps in this https://docs.unity3d.com/ScriptReference/LocationService.Start.html
So after 20 seconds wait it 'Timed out' and the Status is always 'initializing'.
The Input.location.lastData.latitude and Input.location.lastData.longitude is always zero.
In addition I have set this in the AndroidManifest.xml file:
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.location.gps" android:required="true" />
<uses-feature android:name="android.hardware.location" android:required="true" />
Any help would be appreciated.
-Thanks
Found the answer:
On Android devices, LocationService doesn’t work without setting “high accuracy” location mode in the system settings (“Settings” -> “Location” -> “Mode”).
Reference:
https://issuetracker.unity3d.com/issues/android-locationservice-doesnt-work-without-high-accuracy-mode

Android Uses-Feature VS. Uses-Permision Optimization

I have the following permissions explicitly requested in my manifest.
I would like to optimize store visibility by switching as many as possible of them to implicit 'uses-feature' declarations. I will also handle this additionally in code checking for features before I access them.
Internet access is the only thing that's truly required for my app, other features I can enable/disable conditionally based on hasFeatures().
Question:
Which of these permissions can I change?
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<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="com.android.vending.BILLING" />
<permission android:name="com.appName.supportmapfragment.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<uses-permission android:name="com.appName.supportmapfragment.permission.MAPS_RECEIVE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
Set required to 'false' if your app doesn't require something to run:
To control filtering, always explicitly declare hardware features in
elements, rather than relying on Google Play to
"discover" the requirements in elements. Then, if
you want to disable filtering for a particular feature, you can add a
android:required="false" attribute to the declaration.
http://developer.android.com/guide/topics/manifest/uses-permission-element.html (in the right-hand sidebar)
The documentation has this example:
<uses-feature android:name="android.hardware.camera" android:required="false" />

Android Map view does'nt work (white screen)

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.

Categories

Resources