好不容易在模拟器上把程序调试通了,安装真机上,居然分辨率不正确,在模拟器上时正确的,获取分辨率的代码如下

android::DisplayInfo info;
android::SurfaceComposerClient::getDisplayInfo(android::DisplayID(0), &info);

使用c++实现的,

用java获取分辨率代码如下:

Display display = getWindowManager().getDefaultDisplay();
int screenWidth = display.getWidth();
int screenHeight = display.getHeight();

居然两种方法获取的分辨率不一样,导致真机上出现不正确的显示,

最后只好用java获取分辨率,传给c++层调用。


Kindle fire 配置使用

On the Kindle Fire Settings screen, go to "Device" and turn On "Allow Installation of Application From Unknown Sources"
Plug your Kindle Fire into your Mac.
Open ~/.android/adb_usb.ini with your favorite text editor
Add the value "0x1949" to the end of the file and save it.
You'll need to restart the adb server process to get it to re-read that file. Do that with "adb kill-server".
Run "adb devices" and you should see the attached device.

更多相关文章

  1. Android教程之Android(安卓)SDK1.5模拟器使用命令
  2. Android(安卓)Step by Step (1)——第一个Android程序"Helllo An
  3. Android(安卓)的独特shell命令
  4. android 的各种manager
  5. android google地图定位开发,且可以自由移动位置重新获取定位,地址
  6. android 开发 解码gif图片,获取每帧bitmap
  7. 向模拟器发短信打电话的方法
  8. Android教程之Android(安卓)SDK1.5模拟器使用命令
  9. android IP

随机推荐

  1. Django-bootstrap3|在Django中快速使用Boo
  2. 高中学历的前端又如何?照样可以年薪30万!
  3. 【工具】历史文章分类汇总-V6 | Python数
  4. 爬虫进阶:反反爬虫技巧
  5. 官方示例(十三):3步70行代码开发GIS点坐标技
  6. 5分钟了解Python语言的简单介绍
  7. 内卷?猝死?企业如何利用数据分析提升人效比
  8. 推荐一种Python安装的方法
  9. 运行你的第一个Python程序
  10. Python数据类型-List介绍(上)