Aggregated Blog Park News, Infoq News, 36KR News, Oschina News, 51cto News, CSDN News;
Strive to be ready to brush at any time with the developer's news!
Only Android apps are currently supported
But with a lot of people, I will publish the Apple version of the app
Latest version of: http://shumanu.com/DeveloperNews.apk
The address of the open source code (including the capture program, daemon, app client, and Web server side): Https://github.com/xland/DeveloperNews
Scan code Download:
To see the system:
The main contents of this update are:
A screen only displays one news, and the font is enlarged, so that users can refresh the smell on the bus. Pro-Test! )
Swipe up home in more news, swipe down to refresh the news!
Only provides the ability to open the news body with the system browser!
Remove the permissions that are not available!
Modified the upgrade logic
Key code for the upgrade section:
(as you can see, the client is JS write, all the code to go to GitHub to see it)
Function updateandroid (Fpath) { var date = new date (). GetTime (); var filen = ""; filen = "_ Doc/dn_ " + date + " apk "; var options = { method: "GET", filename: filen }; var watiting = Plus.nativeUI.showWaiting ("Start download: 0%"); var dtask = Plus.downloader.createDownload (fpath, options); dtask.addeventlistener (" StateChanged ", function (task, status) { if (!dtask) { return; } switch (task.state) { case 1: // Start break; case 2: // is connected to the server break; case 3: // has received data var nowdata = math.floor (task.downloadedsize * 100 / Task.totalsize); if (nowdata % 10 == 0) { &nbsP; watiting.settitle ("Downloaded:" + nowData + "%"); if (nowdata == 100) { plus.nativeui.toast ("Preparing for the environment, please later!") "); plus.runtime.openfile (Dtask.filename); plus.runtime.quit (); } } break; case 4: // Download Complete break; } }); dtask.start ();} Function checkversion () { mui.get (baseurl + '/Default.aspx? Action=checkversion ', {}, function (data) { if (data != plus.runtime.version) { plus.nativeui.confirm ("There is a new version, is it updated?") ", function (msg) { if (msg.index == 1) { if (' IOS ' == Plus.os.name) { plus.runtime.openurl (baseurl + "/update/ Ios.aspx "); } else { updateandroid (baseUrl+ "/ developernews.apk "); } } }, "Friendly reminder:", ["Cancel", "OK"]); } });}
The code page for WebService is updated as follows:
var pagesize = 8;var index = request["Index"];if (string. Isnullorwhitespace (Index)) { index = "0";} Var start = convert.toint32 (Index);var dbfactory = new Ormliteconnectionfactory (configurationmanager.appsettings["Dbconnstr"], mysqldialect.provider);var Db = dbfactory.open (); List<allen_news> obj;if (start == 0) { obj = db. Select<allen_news> ("Select * from allen_news order by news_id desc limit 0, "+ (pagesize*2). ToString ());} Else{ obj = db. Select<allen_news> ("select * from allen_news where news_id < " + Start. ToString () + " order by news_id desc limit 0," + pagesize.tostring ()); Db. Close ();d B. Dispose ();if (obj. COUNT&NBSP;<&NBSP;1) { response.write ("Sorry ... We are not going to provide you with content that does not count as "new" and your favorite content can be found in my favorites. "); response.end (); return;} Response.Write (Jsonconvert.serializeobject (obj)); Response.End ();
Like a friend please help point a recommendation, or on GitHub to give me a star, thank you!
"Open source" developer News aggregator App 2.0.3 released (second stable version)