Giter VIP home page Giter VIP logo

feeder's People

Contributors

zhangsr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

feeder's Issues

Android中如何方便直观地查看数据库

本文旨在抛出如题问题,并提供Feeder项目中的解决方案,希望大家一起讨论一起提升。

效果

在终端输入命令
image

弹出数据库浏览的可视化界面:
image

原理

通过adb将app对应的数据库文件拷贝到pc目录,然后调用pc上的数据库浏览软件打开。

实现

1 定义变量

PKG=me.zsr.feeder
DB=feed_db

2 权限更改,拷贝文件到外部方便读取的目录,如/sdcard/

adb shell "run-as $PKG chmod 755 /data/data/$PKG/databases"
adb shell "run-as $PKG chmod 666 /data/data/$PKG/databases/$DB"
adb shell "rm /sdcard/$DB"
adb shell "cp /data/data/$PKG/databases/$DB /sdcard/$DB"

3 清除旧数据库文件,将当前新的数据库文件从Android设备拉取到pc目录,这里放在~/Temp/下

rm -f ~/Temp/${DB}
adb pull /sdcard/${DB} ~/Temp/${DB}l

4 根据不同的操作系统,选择不同的数据库浏览软件打开

if [[ "$OSTYPE" == "linux-gnu" ]]; then
    slitebrowser ~/Temp/${DB}
elif [[ "$OSTYPE" == "darwin"* ]]; then
    open -a sqlitebrowser ~/Temp/${DB}
else
    printf "Unknown os type : $OSTYPE"
fi

源码

完整脚本源码:inspect_db.sh
如果拉取了Feeder项目,也可以编译运行 Feeder app 到 Android 设备中,像效果图那样执行脚本,数据库界面就出来了。

大神!我Download你的工程了,但是打不开,报错如下。

Error:(14, 0) Could not find property 'AVOS_APP_ID' on ProductFlavor_Decorated{name=main, dimension=null, minSdkVersion=DefaultApiVersion{mApiLevel=16, mCodename='null'}, targetSdkVersion=DefaultApiVersion{mApiLevel=21, mCodename='null'}, renderscriptTargetApi=null, renderscriptSupportModeEnabled=null, renderscriptNdkModeEnabled=null, versionCode=6, versionName=1.5, applicationId=me.zsr.feeder, testApplicationId=null, testInstrumentationRunner=null, testInstrumentationRunnerArguments={}, testHandleProfiling=null, testFunctionalTest=null, signingConfig=null, resConfig=null, mBuildConfigFields={}, mResValues={}, mProguardFiles=[], mConsumerProguardFiles=[], mManifestPlaceholders={}}.

HTML文本展示控件选型

首先谈输入,在Rss规范中,获取到得文章是HTML格式的,这么无法改变,那么问题来了,要用什么View来输出展示HTML文本?

WebView or TextView ?

优势 劣势
WebView 图片点击事件需要 JavaScrip 代码支持
TextView 轻量级? 支持的Html标签少
Other

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.