小编Bla*_*asd的帖子

PubNub安全反对某人逆向工程Android应用程序

我的应用程序使用硬编码的子键和pubkey初始化PubNub,然后订阅/发布到一个频道.如何阻止某人对我的应用进行逆向工程,收集子/ pub键并将垃圾信息发布到我的频道?

security android pubnub

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

我怎么知道Proguard警告我哪些课程?

我试图发布我的应用程序,ProGuard导致我的服务器代码出现各种错误,所以我进入了gradle控制台,看到了这个:

Note: there were 2 references to unknown classes.
  You should check your configuration for typos.
  (http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass)
Note: there were 26 unkept descriptor classes in kept class members.
  You should consider explicitly keeping the mentioned classes
  (using '-keep').
  (http://proguard.sourceforge.net/manual/troubleshooting.html#descriptorclass)
Note: there were 22 unresolved dynamic references to classes or interfaces.
  You should check if you need to specify additional program jars.
  (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass)
Note: there were 15 accesses to class members by means of introspection.
  You should consider explicitly keeping the …
Run Code Online (Sandbox Code Playgroud)

android proguard

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

当标准设置为高精度时,应用程序崩溃

我正在努力获得最高的定位精度,我从GPS供应商那里学到了这一点.我只需要获得一次位置,所以我不关心对电池寿命的影响.在我的功能代码中,位置似乎在完全不准确(1 + km)到非常准确(10m内)之间交替.在我的应用程序的测试中,我在手机上启用/禁用位置,打开/关闭wifi,打开/关闭数据.这只是为了试验,看看每个如何影响一般的准确性和应用程序.

以下代码是来自位置活动的onCreate方法:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.map_layout);

    mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map_fragment))
            .getMap();
    mMap.setMyLocationEnabled(true);
    locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
    Criteria criteria = new Criteria();

    //criteria.setAccuracy(Criteria.ACCURACY_HIGH);

    provider = locationManager.getBestProvider(criteria, true);

    mGoogleApiClient = new GoogleApiClient.Builder(this)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .addApi(LocationServices.API)
            .build();

    // Create the LocationRequest object
    mLocationRequest = LocationRequest.create()
            .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY)
            .setInterval(2 * 1000)        // 10 seconds, in milliseconds
            .setFastestInterval(1 * 1000); // 1 second, in milliseconds
}
Run Code Online (Sandbox Code Playgroud)

但是,当我添加该criteria.setAccuracy(Criteria.ACCURACY_HIGH);行时,我的应用程序崩溃了.

到底是怎么回事?

编辑:这是logcat错误:

E/AndroidRuntime: FATAL EXCEPTION: main    
E/AndroidRuntime: Process: com.locationget, PID: 16663 …
Run Code Online (Sandbox Code Playgroud)

android location google-maps

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

标签 统计

android ×3

google-maps ×1

location ×1

proguard ×1

pubnub ×1

security ×1