小编Qui*_*don的帖子

亚马逊网络服务工作示例

我已经搜索了高低,试图让产品广告API工作 - 我已经尝试了很多来自这些论坛和互联网的例子,但它不起作用.有一些关于修改WSDL的讨论,但也不起作用.

这是我去过的地方:
https://affiliate-program.amazon.com/gp/advertising/api/detail/main.html
http://aws.amazon.com/code/Product-Advertising-API/3941
http ://aws.amazon.com/code/Product-Advertising-API/2609
http://flyingpies.wordpress.com/2009/08/13/signing-amazon-product-advertising-api-cwcf-part-2/*

*这是最好的教程,直到AWS改变WSDL,没有关于如何部署的例子 - 我实际上开始怀疑他们是否在发布之前测试他们的东西!

谁能请我指出一个有效的C#示例?

编辑
我也知道
https://affiliate-program.amazon.com/gp/advertising/api/detail/main.html上 发布的信息,
这意味着我知道每次搜索都必须包含AssociateTag.

c# amazon-web-services

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

Mac上的Ripple(0.9.19)和BB10 WebWorks SDK 2.0.0.54

我无法使用安装在默认位置的SDK来构建Ripple.我收到错误消息"哦Snap!构建请求失败并显示消息:./ Appliclications/BlackBerry/BB10 WebWorks SDK 2.0.0.54不是有效路径"(编辑:此问题已通过删除'.'而得到修复 - 请稍等错误如下) - 但这是安装SDK的地方.

我在这里遵循这个教程:http://www.patrickcatanzariti.com/2013/01/my-guide-to-developing-a-blackberry-html5-webworks-mobile-app/

但我没有成功.我还尝试将./Documents/Virtual Machines中的BlackBerry10Simulator-BB10_2_0X-1791文件夹复制到该文件夹​​中,在尝试构建时仍然遇到相同的错误,以及编辑设置时出现的另一个错误:"找不到模拟器"

有没有人使用这个版本的Ripple和BB10?

编辑

我已将平台更改为BlackBerry 10 Webworks.现在错误出现在命令行上:

检查输出路径/用户/用户名/开发/ BlackBerry/BB_Output/
路径已存在
运行zip in/Users/username/Development/BlackBerry/Blackberry/BlackBerry
exec - "zip"-r"/ Users/username/Development/BlackBerry/BB_Output /Output.zip"*
out:添加:BlackBerry.zip
out :(存储0%)
     添加:config.xml(收缩63%)
     添加:css /(存储0%)
     添加:css/app.css(收缩82%) )
     添加:images /(存储0%)
     添加:images/image1.png
输出:(缩小0%)
     添加:images/Image3.png
输出:(存储0%)
     添加:images/smallImage.png
输出:(存储0) %)
     添加:images/Thumbs.db
out :(收缩28%)
     添加:js/
out :(存储0%)
     添加:js/jquery-1.10.2.min.js
out :(收缩65%)
     添加:js /jquery.soap.js
out :( 缩减69%)
     添加:js/msisdn.js
out :(收缩66%)
     添加:js/panic.js …

ripple blackberry-webworks

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

Android POS打印机ESC/POS

所以我一直在为蓝牙打印机编写Android应用程序,我已经意识到这实际上是ESC/POS标准:http://nicholas.piasecki.name/blog/wp-content/uploads/2009/12 /ESC-POS-Command-Guide.pdf

现在我用于打印机的文档是这些命令的有限子集,可在此处找到: https://dl.dropboxusercontent.com/u/88265006/%E4%BA%A7%E5%93%81/Printer的%20user%20manual/SP-MP-300-Technical%20Manual.pdf

        private void initPrinter() {
            byte[] init = new byte[2];
            init[0] = 0x1B;
            init[1] = 0x40;
            mService.write(init);
        }

        private void printText(String message){
            byte[] send;
            try{
                send = message.getBytes("UTF8");
            }
            catch(UnsupportedEncodingException e){
                send = "Error".getBytes();
            }
            initPrinter();
            mService.write(send);
        }
Run Code Online (Sandbox Code Playgroud)

我可以连接到打印机,用"ESC @"命令初始化它,我可以用上面的命令编写,但我似乎无法获得任何条形码的任何"视觉"效果.这是我尝试使用1D EAN13代码(0000000000000):

        byte[] height = new byte[3];
        height[0] = 0x1D;
        height[1] = 0x68;
        height[2] = (byte)30;
        //height[3] = 0;

        byte[] width = new byte[3];
        width[0] = 0x1D;
        width[1] = 0x77;
        width[2] = (byte)3;

        byte[] …
Run Code Online (Sandbox Code Playgroud)

printing android bluetooth

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

Android Things:设置屏幕分辨率

我有一个小屏幕连接到我的Raspberry Pi并根据屏幕的文档:

将图像写入TF卡并将以下行附加到位于TF卡根目录的config.txt文件中:

max_usb_current=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
Run Code Online (Sandbox Code Playgroud)

您必须确保等号两侧没有空格.

但我不能在Android Things驱动器上执行此操作,因为磁盘映像不可读

android-things

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

Android Things:截图

如何通过ADB为Android Things截取屏幕截图?我试过了:

adb shell screencap -p /sdcard/screen.png
adb pull /sdcard/screen.png
adb shell rm /sdcard/screen.png
Run Code Online (Sandbox Code Playgroud)

adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png
Run Code Online (Sandbox Code Playgroud)

screenshot adb android-things

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

Android Studio无法解析Espresso 3.0.0

根据迄今为止的Android Espresso文档:

添加Espresso依赖项

要将Espresso依赖项添加到项目中,请完成以下步骤:

  1. 打开应用程序的build.gradle文件.这通常不是顶级的build.gradle文件,而是app/build.gradle.
  2. 在依赖项中添加以下行:
androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.0'
androidTestCompile 'com.android.support.test:runner:1.0.0'
Run Code Online (Sandbox Code Playgroud)

我创建了一个新项目,生成的app/gradle文件是这样的:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.0"
    defaultConfig {
        applicationId "com.app.test"
        minSdkVersion 24
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:26.+'
    testCompile 'junit:junit:4.12'
}
Run Code Online (Sandbox Code Playgroud)

当我将其更改为以下内容时:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.0"
    defaultConfig …
Run Code Online (Sandbox Code Playgroud)

dependencies android android-espresso

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

GitHub Actions 运行 Espresso 测试

我目前正在尝试使用 GitHub Actions 运行我的Instrumentation 测试。我的单元测试运行良好,但我似乎无法运行 Espresso 测试。我目前正在尝试:

    - name: Run Instrumentation Tests (reactivecircus)
    uses: reactivecircus/android-emulator-runner@v2.6.1
    with:
      api-level: 23
      target: default
      arch: x86
      profile: Nexus 6
      script: ./gradlew connectedCheck --stacktrace
Run Code Online (Sandbox Code Playgroud)

我得到结果:

com.balsdon.ratesapp.behaviour.RateListActivityEntryBehaviourInstrumentedTest > recyclerViewClickOnItemChangesMain[test(AVD) - 6.0] FAILED 
    android.content.res.Resources$NotFoundException: Resource ID #0x7f0700d3
    at android.content.res.Resources.getValue(Resources.java:1351)
Tests on test(AVD) - 6.0 failed: Instrumentation run failed due to 'android.content.res.Resources$NotFoundException'

> Task :app:connectedOfflinemockDebugAndroidTest FAILED
> Task :app:processOnlineecbDebugAndroidTestResources
> Task :app:processProductionDebugAndroidTestResources

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task …
Run Code Online (Sandbox Code Playgroud)

continuous-integration android-espresso github-actions

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

亚行可访问性焦点变化

我想知道如何让 ADB 在 Talkback 开启时调整可访问性焦点。我试过了:

adb shell input trackball roll 0 1
adb shell input [stylusdpad|keyboard|mouse|touchpad|gamepad|touchnavigation|joystick|touchscreen|stylus|trackball] swipe 180 780 540 780
adb shell input keyboard keyevent KEYCODE_TAB
adb shell input keyevent KEYCODE_NAVIGATE_NEXT
adb shell "input keyevent KEYCODE_ALT_LEFT & input keyevent KEYCODE_DPAD_LEFT"
Run Code Online (Sandbox Code Playgroud)

我也尝试使用记录事件adb shell getevent并播放它们但没有成功。

但我总是必须物理滑动屏幕(即ADB 滑动不起作用)才能更改可访问性焦点。有没有办法通过可访问性来做到这一点,只是下一个和上一个动作?

我在谷歌找到了这篇文章

导航

  • 移至下一项:Alt + 向右箭头 注意:在连续阅读模式下,此快捷方式可在文本中快进。
  • 移至上一项:Alt + 向左箭头 注意:在连续阅读模式下,此快捷方式会倒回文本。

这意味着我只需要一次发送多个按键,对吗?我尝试了这个,基于另一个 SO 答案

device="/dev/input/event3"
ALT_KEY=57#18 #KEYCODE_ALT_LEFT
LEFT_KEY=21#37 #KEYCODE_DPAD_RIGHT
RIGHT_KEY=22#39 #KEYCODE_DPAD_RIGHT

device="/dev/input/event0"
adb shell "sendevent …
Run Code Online (Sandbox Code Playgroud)

android accessibility talkback

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

Azure + Swift推送通知

我试图从远程服务器到应用程序进行非常简单的推送.

我按照[1]在Azure上设置了一个通知中心,但我无法将调试消息发送到设备.我不想使用移动服务从数据库表读取/写入

我在Swift中这样做,我在互联网上一无所获,实际上从服务器接收推送是iOS swift作为一个完整的教程.

我不知道,例如,如何在swift中编写以下代码:

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
    // TODO: update @"MobileServiceUrl" and @"AppKey" placeholders
    MSClient *client = [MSClient clientWithApplicationURLString:@"MobileServiceUrl" applicationKey:@"AppKey"];

    [client.push registerNativeWithDeviceToken:deviceToken tags:@[@"uniqueTag"] completion:^(NSError *error) {
        if (error != nil) {
            NSLog(@"Error registering for notifications: %@", error);
        }
    }];
}
Run Code Online (Sandbox Code Playgroud)

到目前为止,这是我的AppDelegate中的代码(我从[2]得到的一些代码):

    var client: MSClient?

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    if(UIApplication.instancesRespondToSelector(Selector("registerUserNotificationSettings:")))
    {
        application.registerUserNotificationSettings(UIUserNotificationSettings(forTypes: UIUserNotificationType.Sound | UIUserNotificationType.Alert | UIUserNotificationType.Badge, categories: nil))
    }
    /*else
    {
    //do ios7 stuff here. If you …
Run Code Online (Sandbox Code Playgroud)

azure push-notification ios swift

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

三星Galaxy蓝牙驱动程序

我已经为Android编写了一个应用程序.主要部分是它通过蓝牙进行通信.我有四个设备:
1.三星Galaxy S2
2.三星Galaxy Gio
3. Netsurfer touch(A REALLY低端本地[南非]制作安卓平板电脑)
4.一个Motorolla ET1

现在我已经编写了我的应用程序 - 我需要测试完整的结构.

我首先写了蓝牙方面(因为那是我最不经验的) - 而我唯一可以上班的设备是Netsurfer触控.它使用标准的蓝牙驱动程序,它完美地工作 - 我可以在PC上接收信号并完美地处理它.

我的应用程序的OTHER部分无法在Netsurfer上完成,因为它的规格太低(它实际上没有所需的硬件).我尝试了Motorlla,整个应用程序按预期工作.

但现在Galaxy手机(Gio和S2)拒绝连接任何电脑.它们会很好,但是当我使用蓝牙代码连接时,我只是得到一个IOException:服务发现失败

由于它不是我的代码,我开始查看我的计算机上缺少驱动程序:"Bluetooth peripheral Device" - 错误代码未安装此设备的驱动程序.(守则28)

我尝试过使用Windows更新,但是失败了,我安装了三星Kies,并且我已经在两台独立的计算机上验证了这个问题 - 两者都运行Windows 7 x64

硬件ID为:
BTHENUM {00001132-0000-1000-8000-00805f9b34fb} _VID&0001000f_PID&0000
BTHENUM {00001132-0000-1000-8000-00805f9b34fb} _LOCALMFG&000f

我不相信代码存在问题,但使用设备的驱动程序.但是,如果您需要代码,我将使用此处的代码:http: //code.google.com/p/backport-android-bluetooth/source/browse/trunk/backport-android-bluetooth201/src/backport/android/蓝牙/聊天/ R = 49

android drivers bluetooth samsung-mobile

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