miao1007 / animewallpaper Goto Github PK
View Code? Open in Web Editor NEW[Android] Konachan wallpaper downloader
Home Page: http://www.jianshu.com/p/93475df308b8
[Android] Konachan wallpaper downloader
Home Page: http://www.jianshu.com/p/93475df308b8
为何要这样做?不应该始终为true么, 用它开启动画效果
I think we should use some other name as the example mentioned in README, currently (yosuga_no_sora) 🤣 which is a HAREM anime and is inappropriate to use as an example 😆
I'll create a PR to fix that, i hope u appreciate my suggestion @miao1007 😸
new OkHttpClient.Builder()
.dns(new HttpDns())
.addInterceptor(new HeadInterceptor())
.addInterceptor(new TokenInterceptor())
.readTimeout(TIME_OUT, TimeUnit.MILLISECONDS)
.cache(cache)
.build();
new HttpDns() lookup 正常返回List,但是最终发出去的请求并没有被替换host,这是为什么
I just saw the github_best_ios.MD file where you listed the iOS based android snippet links which you have incorporated in the project. However, the markdown is not proper at all so I'll turn it all into proper github markdown.
I hope this will work.
Awesome app @miao1007 , open for contributions ?
用android studio 克隆下来还是运行不了
下载完壁纸之后发送广播手动刷新图库:
`/**
* 刷新图库
*
* @param context
* @param file
* @param fileName
*/
public static void refreshAlbum(Context context, File file, String fileName) {
// 其次把文件插入到系统图库
try {
MediaStore.Images.Media.insertImage(context.getContentResolver(),
file.getPath(), fileName, null);
// 最后通知图库更新
// context.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.parse("file://" + path)));
context.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(file)));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}`
设置壁纸的代码会崩溃,我改成这样子了:
@TargetApi(Build.VERSION_CODES.KITKAT)
private static void setWallpaperKitkat(Context context, File file) {
Intent intent = new Intent(Intent.ACTION_ATTACH_DATA);
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
intent.putExtra("mimeType", "image/jpg");
Uri uri = Uri.parse(MediaStore.Images.Media
.insertImage(context.getContentResolver(),
BitmapFactory.decodeFile(file.getAbsolutePath()), null, null));
intent.setData(uri);
try {
if (Build.VERSION.SDK_INT >= 24) {
try {
Method m = StrictMode.class.getMethod("disableDeathOnFileUriExposure");
m.invoke(null);
} catch (Exception e) {
e.printStackTrace();
}
}
context.startActivity(intent);
} catch (ActivityNotFoundException e) {
e.printStackTrace();
}
}
另外BaseUrl后缀改成.com结尾可以获取18X的图片,但是要翻墙。
不能在5.0以下的使用吗
not working any more
如题
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.