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

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. pandaboard ES学习之旅——4 Android源代码下载与编译
  2. 向模拟器发短信打电话的方法
  3. android百度地图标记点代码
  4. Android判断真机和模拟器
  5. Android使用代码模拟HOME键的功能
  6. 【Android】AndroidStudio无法创建原生模拟器
  7. Android代码速查,写给新手的朋友们

随机推荐

  1. Android(安卓)framework 编译常见错误
  2. Android的HTTP协议
  3. Android(安卓)对 SDCARD 卡 上的sqlite3
  4. android接入原生第三方登录(微信登录、QQ
  5. android应用程序---短信发送器
  6. android软键盘的消失事件处理方法
  7. Android采用pm命令静默卸载应用
  8. Android(安卓)ListView标题置顶效果实现
  9. Android(安卓)Service详解(四)---绑定服
  10. Android(安卓)LayoutInflater原理分析,深