小编Ami*_*oda的帖子

在静态代码中的应用购买错误

我正在使用当前代码购买来调用购买意图

Bundle buyIntentBundle = mService.getBuyIntent(3, pContext.getPackageName(), "android.test.canceled", "inapp", "bGoa+V7g/yqDXv");
Set<String> allKeys = buyIntentBundle.keySet();
Object  responseCode= buyIntentBundle.get("RESPONSE_CODE");
Object  intent= buyIntentBundle.get("BUY_INTENT");
Log.i(TAG,"buyIntentBundle"+buyIntentBundle.keySet()+"responseCode"+responseCode+"intent"+intent);
PendingIntent pendingIntent = buyIntentBundle.getParcelable("BUY_INTENT");
if (pendingIntent != null) {
    pContext.startIntentSenderForResult(pendingIntent.getIntentSender(), 2013, new Intent(), Integer.valueOf(0), Integer.valueOf(0),Integer.valueOf(0));
}
Run Code Online (Sandbox Code Playgroud)

现在onActivityResult我正在检查

if (requestCode == 2013) {           
    Log.i(TAG, "onactivity result called inside request code");
    int responseCode = intent.getIntExtra("RESPONSE_CODE", 0);
    String purchaseData = intent.getStringExtra("INAPP_PURCHASE_DATA");
    String dataSignature = intent.getStringExtra("INAPP_DATA_SIGNATURE");      
    if (responseCode == Constants.BILLING_RESPONSE_RESULT_OK) {
    try {
        JSONObject jo = new JSONObject(purchaseData);
        String sku = jo.getString("productId");
        Toast.makeText(pContext, "You …
Run Code Online (Sandbox Code Playgroud)

android in-app-purchase android-intent in-app-billing android-billing

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

Android wifi获得连接Wifi的频率

我有ScanResults,从那里我可以有SSID,BSSID,所有wifi的频率.

List<ScanResult> results = wifi.getScanResults();
Run Code Online (Sandbox Code Playgroud)

此外,我有连接的无线信息所以从那里我也有连接的SSID和连接的wifi的BSSID.

WifiManager wifi;
WifiInfo info;
wifi = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE);
info = wifi.getConnectionInfo();
Run Code Online (Sandbox Code Playgroud)

现在我只想拥有连接的wifi的频率,但是当我检查SSID和BSSID时,它们对于2个网络可以是相同的.现在我如何才能找到连接Wifi的频率.

也是从那个wifi我想有相应的频道没有.

我找到了一张桌子

频道编号低频率频率(GHZ)中心频率(GHZ)上频率(GHZ)

1 2401 2412 2423

2 2404 2417 2428

3 2411 2422 2433

4 2416 2427 2438

5 2421 2432 2443

6 2426 2437 2448

7 2431 2442 2453

8 2436 2447 2458

9 2441 2452 2463

10 2451 2457 2468

11 2451 2462 2473

12 2456 2467 2478

13 2461 2472 2483

14 2473 2484 2495

想知道sdk是否总是提供这个表的中心频率,还有其他频率如5Ghz等?

android android-wifi

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

拖放在phonegap-android中

我正在尝试使用phonegap-android拖放图像.

当我在mozilla firefox浏览器中运行代码然后代码运行很好,我能够拖动任何图像,但当我在phonegap android 2.1update中运行该代码,然后我无法拖动它,甚至无法点击它.

任何人都可以告诉我什么是错的. http://www.devarticles.com/c/a/JavaScript/Building-DragandDrop-DIVs-Developing-a-Basic-Script/ 我用来拖放

plzz帮我解决..

Thnks

javascript android cordova

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