Tag: android

AWS SNS – 推送GCM显示为从Cloudwatch发送但未在移动设备中收到

我正在从自定义推送通知迁移到AWS SNS。 我做了以下。 配置AWS SNS主题 创建平台应用程序 创建了端点 已终止平台应用程序的端点 我正在尝试使用Ruby的’publish’API推送通知的最后一步。 我收到message_id作为回复。 它还会在CloudWatch中记录成功/交付。 但是设备中没有收到Push。 设备有效设备具有设备已安装应用程序的有效推送令牌。 我试过的消息格式如下 {“GCM”=>{“data”=>”{\”message\”:\”message\”,\”url\”:\”url\”}”}, :default=>”default”} SNS发布API语法 client.publish({target_arn: endpoint_arn, message: message.to_json, subject: “SNS test”, message_structure: :json}) 仅供参考,在将此标记为任何其他问题的副本之前,请注意我已经提及了之前的所有答案,没有任何帮助。 因此,我正在筹集一个新的。

从ruby on rails网站/ webapp到Phonegap Android应用程序?

我想就这个问题提出一些建议。 我正在开发一个用ruby on rails(以及html.slim,css,angular.js)制作的网站。 我想创建一个Android(以及可能的iOS / Windows Phone)应用程序来访问该网站的一部分。 该网站只做一些api调用服务器,它真的很轻,所以我认为我不需要制作本机应用程序。 我想以最快和最简单的方式制作这个应用程序。 我以为我可以使用Phonegap转换网站,但如果只使用html,css和js,而不是使用ruby on rails,这将会有效。 我唯一需要的是在设备上存储一个小字符串(网站存储一个cookie),然后进行一些简单的API调用。 感谢您对此提出的任何建议 – 不是那么聪明 – 问题。 再见!

Appium:Ruby:在gem中加载错误

我在加载这个require-relative元素时遇到错误。 任何想法如何解决? 我已经尝试搜索android sdk,因为下面提到的require relative ,是否有任何文件我应该放置以使这项工作?> require ‘appium_lib’ require_relative ‘./libs/adbManager’ require_relative ‘./libs/error_handler’ require_relative ‘./libs/android_manifest_parser’ 错误: cannot load such file — /Users/jain/Documents/fslearning-android/Features/Support/libs/adbManager (LoadError) /Users/jain/Documents/fslearning-android/Features/Support/hooks.rb:2:in `require_relative’ /Users/jain/Documents/fslearning-android/Features/Support/hooks.rb:2:in `’ /usr/local/lib/ruby/gems/2.4.0/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in `load’ /usr/local/lib/ruby/gems/2.4.0/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in `load_code_file’ /usr/local/lib/ruby/gems/2.4.0/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:142:in `load_file’ /usr/local/lib/ruby/gems/2.4.0/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:84:in `block in load_files!’ /usr/local/lib/ruby/gems/2.4.0/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:83:in `each’ /usr/local/lib/ruby/gems/2.4.0/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:83:in `load_files!’ /usr/local/lib/ruby/gems/2.4.0/gems/cucumber-2.4.0/lib/cucumber/runtime.rb:253:in `load_step_definitions’ /usr/local/lib/ruby/gems/2.4.0/gems/cucumber-2.4.0/lib/cucumber/runtime.rb:61:in `run!’ /usr/local/lib/ruby/gems/2.4.0/gems/cucumber-2.4.0/lib/cucumber/cli/main.rb:32:in `execute!’ /usr/local/lib/ruby/gems/2.4.0/gems/cucumber-2.4.0/bin/cucumber:8:in `’ /usr/local/bin/cucumber:22:in `load’ /usr/local/bin/cucumber:22:in `’

无法运行示例rhodes应用程序

我安装了Android sdk版本和Andorid ndk。 使用Android SDK和AVD Manager,我安装了SDK Plaform Android 2.2,API8,rev3和1.6,API4,revsion3 当我尝试rake run:android我得到错误说 D:/Android_ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../lib/gcc/arm-linux-android eabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: crtbegin_so.o: No such file: No such file or directory collect2: ld returned 1 exit status 任何建议都会有所帮助

黄瓜高级步骤定义 – 语法错误,意外的tIDENTIFIER,期待keyword_end

我遵循了重复使用黄瓜的步骤 。 对于Ruby和Cucumber来说,我是个菜鸟。 我正在使用calabash-android 0.9.0和黄瓜2.4.0 我的calabash_steps.rb: require ‘calabash-android/calabash_steps’ Then /^I add the 1st bestsellers product to bag$/ do steps %Q { # App restarts and Onboarding screen shows again Given I see the text “next” Then I press the “next” button } end 完整堆栈跟踪: ❯ bundle exec calabash-android run app/build/outputs/apk/app-staging-debug.apk -t @bag /Users/eric/AndroidStudioProjects/xxx/features/step_definitions/calabash_steps.rb:7: syntax error, […]

Ruby Selenium无法从Android图库中选择图像

我试图从Android图像厨房网格视图中选择一个图像。 此网格视图具有每个图像的ImageView 。 每个ImageView都有id。 所以当我试图通过//ImageView[@id=”someId”][1]或//GridView[@id=”someId”]//ImageView[@id=”someId”][1] ,它找不到它。 如何Selenium webdriver in ruby使用Selenium webdriver in ruby从库中选择图像。 编辑: 编辑由于Uiautomator无法在图库中选择缩略图,我尝试使用相对坐标来选择图像,但这会产生错误。 有没有人这样做过? 我需要从android库中选择图像。

Calabash -Android:我们可以在Android设备上为Calabash-Android模拟主页按钮吗?

我们可以在Android设备上为Calabash-Android模拟Home按钮吗? 我需要点击脚本中的Home按钮,使用Calabash执行我的脚本。

使用calabash-android获取元素的颜色

我的Android应用程序中有一个文本字段(EditView),如果它的值无效或为空,它会更改颜色(边框)。 在这种情况下,标签(TextView)也会更改其颜色。 当我尝试使用query获取TextView时,我看到以下内容: [0] { “id” => “field_lable”, “enabled” => true, “contentDescription” => nil, “class” => “android.widget.TextView”, “text” => “Name”, “rect” => { “center_y” => 198.5, “center_x” => 51.0, “height” => 27, “y” => 185, “width” => 82, “x” => 10 }, “description” => “android.widget.TextView@a28btb00” } 如果我需要获取文本,我可以使用query(“TextView id:’field_label'”, :text) 在葫芦中有没有办法获得TextView的颜色?

任何类似教程的文章都解释了如何在Android上使用jRuby?

我打算购买一部Android手机,并希望能够在Ruby上编写一些简单的应用程序。 我在8月份发现了这篇文章,作者能够使脚本正常工作,但由于我不是Java主管,所以我很难理解所有步骤。 http://amazing-development.com/archives/2009/08/04/android-scripting-environment-supports-jruby/ 您是否知道其他任何教程或如何更详细地解释该过程? 你知道自8月以来表现是否有所改善?

Calabash处理“使用完成操作”对话框

我想测试应用程序的共享function,但我不知道如何处理Android对话框“使用完整操作”(Facebook,Gmail等) 当我使用query(“*”)它返回一组空字段。 有没有办法使用Calabash或任何其他方式来处理这样的系统对话框来测试共享等function? 我在物理设备上运行我的测试。 编辑:如果无法检查对话框是否已打开,那么也许可以使用adb shell或类似的东西?