小编use*_*727的帖子

google play geofence onHandleIntent

我正在开发今年发布的地理围栏的Android应用程序.

我的理解是当用户进入(或离开)围栏时它应该触发onHandleIntent方法然而,我很难触发onHandleIntent方法

我已经检查了3天才弄清楚,但我常常不能.

所以我需要任何人的帮助.

有我的代码,我真的希望有人能帮助我.

    ///// MainActivity

    package com.example.geofence;


    import java.util.ArrayList;
    import java.util.List;

    import android.app.PendingIntent;
    import android.content.BroadcastReceiver;
    import android.content.Context;
    import android.content.Intent;
    import android.content.IntentFilter;
    import android.os.Bundle;
    import android.support.v4.app.FragmentActivity;
    import android.support.v4.content.LocalBroadcastManager;
    import android.text.TextUtils;
    import android.util.Log;

    import android.widget.Toast;

    import com.google.android.gms.common.ConnectionResult;
    import com.google.android.gms.common.GooglePlayServicesClient.ConnectionCallbacks;
    import com.google.android.gms.common.GooglePlayServicesClient.OnConnectionFailedListener;
    import com.google.android.gms.common.GooglePlayServicesUtil;
    import com.google.android.gms.location.Geofence;
    import com.google.android.gms.location.LocationClient;
    import com.google.android.gms.location.LocationClient.OnAddGeofencesResultListener;

    import com.google.android.gms.location.LocationRequest;
    import com.google.android.gms.location.LocationStatusCodes;

    public class MainActivity extends FragmentActivity implements 
                                        ConnectionCallbacks, 
                                        OnConnectionFailedListener, 
                                        OnAddGeofencesResultListener
                                         {
    private IntentFilter mIntentFilter;
    private LocationClient locationClient;
    private LocationRequest locatRequest;

    private PendingIntent intent;
    private List<Geofence> mGeoList;
    private Context …
Run Code Online (Sandbox Code Playgroud)

android google-play-services

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

如何在AngularJs中使用没有特定名称的ng-repeat

我正在使用AngularJS开发网站.

我从服务器上抓取了json数据.我需要在桌子上显示它.

Json数据格式是

  { 
    {"a" :1,"b": 2,"c":3}, 
    {"a" :3,"b": 4,"c":5}, 
    {"a" :1,"b": 2,"c":3}
  }
Run Code Online (Sandbox Code Playgroud)

问题是每个括号的名称; a,b,c是来自服务器的动态数据,以便服务器人员可以更改名称.

有我的psedocode

    <tr ng-repeat = "jsonObj in jsonArray"> 
     <td ng-repeat = "name in jsonObj">{{name}} </td>
  </tr>
Run Code Online (Sandbox Code Playgroud)

它不起作用.我想我知道它不起作用.但我不知道如何在不知道json数组名称的情况下进行更改.
由于a,b,c是动态的,我不能只输入{{jsonObj.a}} {{jsonObj.b}}

我希望有人能帮助我解决这个问题.谢谢

javascript angularjs

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