标签: google-play-services

Google Maps区分用户移动和动画

我正在使用Google Maps API V2,我想知道是否有一种方法可以区分用户何时与地图交互以移动或缩放相机,以及何时调用animateCamera方法。

我想要做的是让用户将地图中心放在其上,直到他们放大或拖走地图为止,这时我想让用户完全控制。

我的问题是,当用户移动地图以及为地图设置动画时,都会调用onCameraChange。我该怎么解决?

android google-maps google-play-services

1
推荐指数
2
解决办法
1810
查看次数

实施Google Play游戏服务排行榜时,BaseGameUtils\bin丢失

我正在尝试实现此处Google Play Game Services找到的排行榜.我导入了库,使其成为库并将其添加到我的主项目中.但是有一点红色X和一个红色!在我的项目上(见下图).BaseGameUtils

在此输入图像描述

此外,它表示C:\Users\lyonsmg\Downloads\android-samples-master\BaseGameUtils\bin我的主要项目的Android Dependencies中缺少BibleTriviaLite(见下图).

在此输入图像描述

我究竟做错了什么?我能够google-play-services_lib正确导入但不能导入BaseGameUtils.我怎样才能解决这个问题?

java android bin google-play-services

1
推荐指数
1
解决办法
4012
查看次数

如何将apk分发给有限的用户.他们不能重新分发给别人?

如何将apk分发给有限的用户.他们不能重新分发给别人?

  • 一种方法是获取设备IMEI号码并发布到服务器以检查有效用户.但我试图限制Android代码本身,以避免服务器通信.
  • 另外,由于我不会在Google Play上发布应用,因此我无法添加Google Play许可证验证库.

android google-play-services

1
推荐指数
1
解决办法
1903
查看次数

GameHelper在应用程序启动时崩溃

所以,我想我说使用LibGDX会有所帮助.

码:

package com.fmeg.tapout.android;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import com.applifier.impact.android.ApplifierImpact;
import com.badlogic.gdx.backends.android.AndroidApplication;
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
import com.fmeg.tapout.ActionResolver;
import com.fmeg.tapout.TapoutGame;
import com.google.android.gms.games.Games;
import com.google.example.games.basegameutils.GameHelper;
import com.google.example.games.basegameutils.GameHelper.GameHelperListener;

public class AndroidLauncher extends AndroidApplication
    implements GameHelperListener, ActionResolver {

    private static final String EVERPLAY_GAME_ID = "14234";

    private GameHelper gameHelper;

    public AndroidLauncher() {

    }

    @Override
    protected void onCreate (Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();

        ApplifierImpact.setDebugMode(false);
        ApplifierImpact.setTestMode(false);
        ApplifierImpact impact = new ApplifierImpact((Activity)this, EVERPLAY_GAME_ID);
        ApplifierImpact.instance.changeActivity(this);

        gameHelper = new GameHelper(this, GameHelper.CLIENT_ALL);
        gameHelper.setup(this);

        initialize(new TapoutGame(impact, this), …
Run Code Online (Sandbox Code Playgroud)

java android libgdx google-play google-play-services

1
推荐指数
1
解决办法
2127
查看次数

android google play服务已过期

我正在尝试在我的活动中添加Google地图(我已经完成了),每当我继续活动时,我都会收到一条消息,说我需要更新我的Google Play服务(显然它们是)

此外,我正在使用一个真正的设备,我没有模仿任何东西.

这是我的AndroidManifest

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.soueuls.swipe" >

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.CAMERA" />

    <uses-feature
        android:name="android.hardware.camera"
        android:required="false" />

    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true" />

    <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=".AdministrationActivity"
            android:label="@string/title_activity_administration" >
        </activity>
        <activity
            android:name=".GroupActivity"
            android:label="@string/title_activity_group" >
        </activity>
        <activity
            android:name=".NewsActivity"
            android:label="@string/title_activity_news" >
        </activity>
        <activity
            android:name=".DiderotActivity"
            android:label="@string/title_activity_diderot" >
        </activity>
        <activity
            android:name=".MapActivity"
            android:label="@string/title_activity_map" >
        </activity>
        <activity
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.NoTitleBar"
            android:name=".CameraActivity"
            android:label="@string/title_activity_camera" …
Run Code Online (Sandbox Code Playgroud)

android google-maps google-play-services

1
推荐指数
1
解决办法
2408
查看次数

Google Play APK扩展文件如何运作?

编辑: 总之,Google Play APK扩展文件比我最初想象的要简单得多,也不那么复杂.我创建了一个Cordova插件,可以帮助我使用APK扩展文件.我的代码也可能对本机实现有用:https: //github.com/agamemnus/cordova-plugin-xapkreader


假设我使用扩展文件将APK上传到Google Play.

  • 我找不到任何可以更新或删除该扩展文件的地方.
  • 当我上传新的APK时,我不知道是否应该重新上传扩展文件.

我是否正确将扩展文件应用于用户当前的游戏和新安装?它没有任何意义!我需要一个流程图,一张图片,一个穴居人的图纸,任何东西!

以下是三个示例情况......结果如何?

情况1:

1)开发人员发布带有APK和扩展文件的应用程序.

2)用户A下载该应用程序.

3)开发者仅使用APK发布应用程序.

4)用户B下载应用程序.

用户B在#4之后是否有扩展文件?

用户A是否在#4之后拥有扩展文件?

情况2:

1)开发人员发布带有APK和扩展文件的应用程序.

2)用户A下载该应用程序.

3)开发人员使用APK和相同的扩展文件发布应用程序.

4)用户B下载应用程序.

用户B在#4之后是否有两个相同的扩展文件或一个扩展文件?

用户A在#4之后是否有两个相同的扩展文件或一个扩展文件?

情况3:

1)开发人员仅使用APK发布应用程序.

2)用户A下载该应用程序.

3)开发者使用APK和扩展文件发布应用程序.

4)用户B下载应用程序.

用户A是否有扩展文件?

android google-play cordova google-play-services

1
推荐指数
1
解决办法
3354
查看次数

Android应用内和虚拟货币?

我正在为Android和一些研究制作游戏的计划.但是当我必须处理虚拟货币时,我会陷入困境(实际上我不知道这是否是我需要的).

用户需要能够购买一些虚拟货币(在我的情况下是豆类)以及那些豆子购买升级或他想要或需要的任何东西.

我看到Facebook立即用他的API支持这个,但Google Play(尽管他们不解释如何做)似乎不支持这个功能.

我如何使用Google Play API实现这一目标?

问候!

android in-app-purchase google-play-services google-play-games

1
推荐指数
1
解决办法
1886
查看次数

无法连接到GoogleFit

我正在尝试连接到Googlefit但我收到一个奇怪的错误代码,如下所示

E/GooglePlayServicesUtil:意外的错误代码5005

有没有人对此有所了解.谢谢提前

google-play-services google-fit-sdk google-fit

1
推荐指数
1
解决办法
2526
查看次数

无法安装Android Play服务排行榜(BaseGameUtils)

我按照https://developers.google.com/games/services/android/init设置排行榜.所以在我的游戏项目中,我已经设置了google_play_services lib,因为它已经使用了AdMob.现在我需要所有的BaseGameUtils.但是上面链接中"设置游戏项目"部分中的步骤不起作用.让我告诉我做了什么:

  1. 打开https://github.com/playgameservices/android-basic-samples并按"下载ZIP".
  2. 提取zip并将文件夹导入到我的项目中.取消选择全部并仅选择BasicSamples/libraries/BaseGameUtils/src/main在我的项目中添加的main而不是BaseGameUtils.
  3. 右键单击main项目,在Properties->Android选定的部分Is Library和我的游戏项目中Properties->Android添加了参考main库部分.(请注意,如果您没有选择Is Library,则无法6. In the Library panel, click the Add button. 7.Select BaseGameUtils.按照教程中的指示执行步骤)
  4. 在我的包src目录中创建一个这样的新类:
import gms.common.api.*;

import com.google.example.games.basegameutils.BaseGameActivity;

public class MyGameActivity extends BaseGameActivity {
Run Code Online (Sandbox Code Playgroud)

但这两种进口都没有得到承认.如何设置?这应该是如此简单,但它是如此狡猾?

android leaderboard google-play-services

1
推荐指数
1
解决办法
2421
查看次数

添加播放服务时出现意外的顶级异常

我有一个项目需要使用Google Play服务库.但是当我将它添加到我的依赖项时,我收到以下错误:

意外的顶级例外

错误:任务':app:dexDebug'的执行失败.com.android.ide.common.internal.LoggedErrorException:无法运行命令:C:\ Eclipse\adt-bundle-windows-x86_64-20140702\sdk\build-tools\21.1.2\dx.bat --dex - no-optimize --output C:\ Users\Reigstad\Documents\secret-tyrion-android\Tyrion\app\build\intermediates\dex\debug --input-list = C:\ Users\Reigstad\Documents\secret-tyrion -android\Tyrion\app\build\intermediates\tmp\dex\debug\inputList.txt错误代码:2输出:UNEXPECTED TOP-LEVEL EXCEPTION:com.android.dex.DexIndexOverflowException:方法ID不在[0,0xffff]中: 65536 at com.android.dx.merge.DexMerger $ 6.updateIndex(DexMerger.java:502)com.android.dx.merge.DexMerger $ IdMerger.mergeSorted(DexMerger.java:283)at com.android.dx.merge .dexMerger.mergeMethodIds(DexMerger.java:491)at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:168)at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)at COM.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)位于com.android.dx.command.dexer.Main.runMonoDex(Main.java:30)3)com.android.dx.com上的com.android.dx.command.dexer.Main.run(Main.java:246)com.android.dx.com(Main.java:215) .command.Main.main(Main.java:106)>

我的build.gradle看起来像这样:

apply plugin: 'com.android.application'

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile 'com.facebook.android:facebook-android-sdk:3.21.1'
    compile 'com.squareup.retrofit:retrofit:1.9.0'
    compile 'org.immutables:gson:1.1.3'
    compile 'org.parceler:parceler:0.2.15'
    compile 'com.google.android.gms:play-services:6.5.87'
}

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.example.tyrion.tyrion"
        minSdkVersion 13
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false …
Run Code Online (Sandbox Code Playgroud)

android google-play-services build.gradle

1
推荐指数
1
解决办法
745
查看次数