Telegram 客户端开源 - 如何更改项目名称
Telegram Client Open Source - How to change Project Name
我已经编译了 Telegram APK 并在我的手机上进行了测试。 运行 很好。除了单击要发送的位置图标(地图)时,显示空白。
但如果跟进真实发送,它会显示完整,以便另一方可以看到地图。
有介意的请指教
这是 AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.telegram.messenger"
android:installLocation="auto">
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
<uses-feature android:name="android.hardware.location.network" android:required="false" />
<uses-feature android:name="android.hardware.location" android:required="false" />
<uses-feature android:name="android.hardware.LOCATION" android:required="false" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="org.telegram.messenger.permission.MAPS_RECEIVE"/>
<uses-permission android:name="org.telegram.messenger.permission.C2D_MESSAGE" />
<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" />
<permission android:name="org.telegram.messenger.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<permission android:name="org.telegram.messenger.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<application
android:allowBackup="false"
android:icon="@drawable/ic_launcher"
android:label="@string/AppName"
android:theme="@style/Theme.TMessages.Start"
android:name=".ApplicationLoader"
android:hardwareAccelerated="@bool/useHardwareAcceleration"
android:largeHeap="true">
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyCTNmNqbWovP9ETcAob98YlrfOQEAC0CJ4" />
<activity android:name="net.hockeyapp.android.UpdateActivity" />
<receiver
android:name="org.telegram.android.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="org.telegram.messenger" />
</intent-filter>
</receiver>
<uses-library android:name="com.google.android.maps" android:required="false"/>
</application>
</manifest>
根据我从评论中了解到您的问题,您必须使用您用于构建 apk 的计算机中的密钥库创建 Google Maps API Key
。
- 转到 Google API Console 并创建一个项目。转到
APIs
并启用 Google Maps API for Android
.
获取您用于构建 apk 的密钥库的 SHA1
字符串。对于默认 android 调试密钥,使用类似如下的内容:
keytool -list -v -keystore ~/.android/debug.keystore
使用 Google API 控制台和您的应用程序包名称创建 API Key
。
最后一步在您的应用中使用这个生成的 API 密钥。
就是这样。
我已经编译了 Telegram APK 并在我的手机上进行了测试。 运行 很好。除了单击要发送的位置图标(地图)时,显示空白。
但如果跟进真实发送,它会显示完整,以便另一方可以看到地图。
有介意的请指教
这是 AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.telegram.messenger"
android:installLocation="auto">
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
<uses-feature android:name="android.hardware.location.network" android:required="false" />
<uses-feature android:name="android.hardware.location" android:required="false" />
<uses-feature android:name="android.hardware.LOCATION" android:required="false" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="org.telegram.messenger.permission.MAPS_RECEIVE"/>
<uses-permission android:name="org.telegram.messenger.permission.C2D_MESSAGE" />
<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" />
<permission android:name="org.telegram.messenger.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<permission android:name="org.telegram.messenger.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<application
android:allowBackup="false"
android:icon="@drawable/ic_launcher"
android:label="@string/AppName"
android:theme="@style/Theme.TMessages.Start"
android:name=".ApplicationLoader"
android:hardwareAccelerated="@bool/useHardwareAcceleration"
android:largeHeap="true">
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyCTNmNqbWovP9ETcAob98YlrfOQEAC0CJ4" />
<activity android:name="net.hockeyapp.android.UpdateActivity" />
<receiver
android:name="org.telegram.android.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="org.telegram.messenger" />
</intent-filter>
</receiver>
<uses-library android:name="com.google.android.maps" android:required="false"/>
</application>
</manifest>
根据我从评论中了解到您的问题,您必须使用您用于构建 apk 的计算机中的密钥库创建 Google Maps API Key
。
- 转到 Google API Console 并创建一个项目。转到
APIs
并启用Google Maps API for Android
. 获取您用于构建 apk 的密钥库的
SHA1
字符串。对于默认 android 调试密钥,使用类似如下的内容:keytool -list -v -keystore ~/.android/debug.keystore
使用 Google API 控制台和您的应用程序包名称创建
API Key
。最后一步在您的应用中使用这个生成的 API 密钥。
就是这样。