In my Android Application I have a Google MapView Activity and I am facing the following Error:
MapView: Couldn't get connection factory client
At first: I have a right Maps Key and the Internetpermission and the Map is displaying fine on Emulator and Device. The thing that I am confused about is that although the map works, the above error displays.
On the Device sometimes the Map loads and displays correctly and 1 minute later, if start to zoom and pinch the map the map does not continue loading and throws the error.
If I switch off and on again the mobile network on the device the map works fine again.
Edit: my Manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="de.incowia.mobileschatzsuche"
android:versionCode="1"
android:versionName="2011.10.07">
<!-- We're supporting AndroidSDK 7 -->
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="7"/>
<!-- We need access to the internet for loading maps -->
<uses-permission android:name="android.permission.INTERNET"/>
<!-- We're using both, network and GPS -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<application android:icon="#drawable/icon" android:label="#string/app_name"
android:theme="#style/DefaultTheme">
<!-- 4 test -->
<uses-library android:name="android.test.runner" />
<!-- We're using Google Maps API -->
<uses-library android:required="true" android:name="com.google.android.maps" />
<!-- Dashboard -->
<activity android:name=".MobileSchatzsucheActivity" android:label="#string/app_name" android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Maps Activity -->
<activity android:name=".GoogleMapsActivity" />
<!-- Schatzliste Activity -->
<activity android:name=".SchatzlisteActivity" android:launchMode="singleTask"/>
<!-- Schatzdetails Activity -->
<activity android:name=".DetailsActivity"/>
<!-- MyTreasuresCoverFlowActivity -->
<activity android:name=".MyTreasuresCoverFlowActivity"/>
<!-- Preferences Activity-->
<activity android:name=".PreferencesActivity"
android:theme="#android:style/Theme"/>
<!-- FileBrowser Activity -->
<activity android:name=".FileBrowserActivity"
android:theme="#android:style/Theme"/>
</application>
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="de.incowia.mobileschatzsuche"
android:label="test test" />
</manifest>
Just try to give these Two Permission
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
Because when you zoom in/zoom out the Google map goes accordingly in/out, so for that we need to give such permission.
It will work then
Related
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.
I am trying to create a very simple QR input method in Android. Far from being actually runnable in "production", I am trying to run my custom QR keyboard application on my Nexus 6 device, at least to see where it will crash.
However, after deploying the APK to the device I cannot choose my custom input.
Following is the manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.zighinetto.qrkey" >
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature
android:name="android.hardware.camera"
android:required="true" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<service
android:name=".services.QrInputService"
android:enabled="true"
android:permission="android.permissions.BIND_INPUT_METHOD" >
<intent-filter>
<action android:name="android.view.InputMethod" />
</intent-filter>
<meta-data
android:name="android.view.im"
android:resource="#xml/ime" />
</service>
<activity
android:name=".ui.SettingsActivity"
android:label="#string/title_activity_settings" >
</activity>
</application>
</manifest>
And... ime.xml
<?xml version="1.0" encoding="utf-8"?>
<input-method
android:isDefault="true"
xmlns:android="http://schemas.android.com/apk/res/android">
</input-method>
So far I have:
- Enabled CAMERA permission because I need to use the camera
- Created the IME service and linked it to the BIND_INPUT_METHOD permission, so that only the system can bind to it
- NOT declared the BIND_INPUT_METHOD as permission used by my application, because only the system needs that permission.
I expect the new QR input service to be visible in Android's "Language and input" screen, however I cannot see it.
What is wrong in my manifest?
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.
When configuring a "Android Native App" in a Facebook app, they require the Android Class Name. If you created the Android APK from Unity3D, how do you know what class to use?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" package="--------------" android:versionName="1.02" android:versionCode="8">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
<application android:icon="#drawable/app_icon" android:label="#string/app_name" android:debuggable="true">
<activity android:name="com.unity3d.player.UnityPlayerProxyActivity" android:label="#string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="#string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:screenOrientation="landscape">
</activity>
<activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="#string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:screenOrientation="landscape">
<meta-data android:name="android.app.lib_name" android:value="unity" />
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
</activity>
<activity android:name="com.unity3d.player.VideoPlayer" android:label="#string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:screenOrientation="landscape">
</activity>
<!-- ACTIVITIES -->
<activity android:name="com.prime31.FacebookProxyActivity" />
<!-- META-DATA -->
</application>
<!-- PERMISSIONS -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-feature android:glEsVersion="0x00020000" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-feature android:name="android.hardware.sensor.accelerometer" />
<uses-feature android:name="android.hardware.touchscreen" />
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" />
</manifest>
This field should be your main activity (associated with MAIN and LAUNCHER). In this case, I think it would be com.unity3d.player.UnityPlayerProxyActivity.
This is mainly necessary if you use native deep links (so the FB app can create an intent that directly calls your activity). In that respect, any publicly accessible Activity in your app will do.
The main activity's tag should contain an intent-filter tag with the action android.intent.action.MAIN and the category android.intent.category.LAUNCHER.
Description of the intent-filter tag (from documentation):
Specifies the types of intents that an activity, service, or broadcast
receiver can respond to. An intent filter declares the capabilities of
its parent component — what an activity or service can do and what
types of broadcasts a receiver can handle. It opens the component to
receiving intents of the advertised type, while filtering out those
that are not meaningful for the component. Most of the contents of the
filter are described by its <action>, <category>, and <data>
subelements.
For a more detailed discussion of filters, see the separate Intents
and Intent Filters document, as well as the Intents Filters section in
the introduction.
The main activity of an Android application has an intent-filter with the category LAUNCHER which basically tells that the activity can "launch the app" (in other words, that it is the launcher/entry).
The activity tag should look something like this:
<activity android:name="ActivityClassName" android:label="Activity title">
<!-- The intent filter -->
<intent-filter>
<!-- The action -->
<action android:name="android.intent.action.MAIN"/>
<!-- The category -->
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
By looking at your AndroidManifest.xml, you can conclude that the main Activity of your app is the com.unity3d.player.UnityPlayerProxyActivity Activity, because it contains an intent-filter matching those criterias.
Good luck with your game!
Using "UnityPlayerProxyActivity" is no longer true for all unity versions. You may have to use "UnityPlayerActivity" instead.
Details:
If you export an Android project from unity you may find three classes in src:
UnityPlayerActivity
UnityPlayerNativeActivity
UnityPlayerProxyActivity
"UnityPlayerProxyActivity" and "UnityPlayerNativeActivity" have been deprecated since Unity 5.0 beta12, thus you have to use "UnityPlayerActivity" instead.
In Facebook type in:
[tld.yourdomain.game].UnityPlayerActivity
Replace the [...] part with your app specifics of course. Attention: If you have some plugins/extensions that fiddle around with your manifest, then this may be different.
UPDATE:
In newer Versions of the Facebook SDK for Unity (tested with 7.9.4) you can simply search for "FacebookSettings" in your Assets folder and it will tell you what Class Name to use ("com.facebook.unity.FBUnityDeepLinkingActivity" for example).
I want to use map activity in my application, I don't know how to deal with Google Map API v2.
How to generate an API key and All? Right now my application is not working with normal intent code.
Intent intent = new Intent(this,GeoMap.class);
startActivity(intent);
Android manifest entry like this
<uses-permission android:name="android.permission.INTERNET" />
<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_MOCK_LOCATION" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity android:name=".HomeTab" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".HomeActivity" />
<activity android:name=".SearchActivity" />
<activity android:name=".GeoMap" >
</activity>
</application>
</manifest>
please help me.
Thank you.
Before asking something I think you should check the FAQ.
When you ask something ask Google first,it should give you some answer.
Anyways check this step by step tutorial for MAP API V2: Google Maps API v2 for Android
And for obtaining an API Key this simple tool might help you:
JavaKeytoolGUI Beta 2