klinker41 / article-android Goto Github PK
View Code? Open in Web Editor NEWAndroid library for displaying web articles in a readable format
License: Other
Android library for displaying web articles in a readable format
License: Other
This should be part of the sample app, it should receive a text/plain string, parse the URL from it, and open that URL in the article viewer.
Since we can now select blocks of text with a long click, we need to change the color of the handles and the highlight to whatever the user sets as the accent color.
This should be an easy process since both already implement chrome custom tabs. For Pulse, we would probably want to preload the articles that you receive when the SMS comes in with a link.
I like to share articles, we should make this as easy as possible.
We should fall back to a chrome custom tab when we can't display the content correctly. We can also preload the custom tab so that loading is instant if the user doesn't want to look at it in the article view.
Clicking on an image should display it in a fullscreen activity that the user can zoom in on, like Talon and Pulse.
I have not been able to get the library to work with Proguard yet. Even ignoring it seems to cause issues.
I don't know a whole lot about how proguard works, to be honest, but could it have something to do with that libraries dependencies not being excluded correctly? I think it is very telling that requests aren't going through at all. Perhaps something with Retrofit
? I don't think that the issue is with the actual API uri getting lost or anything, but like I said, I don't think I know enough about how it works!
This was originally tracked here, but I wanted to move it here, so that anyone looking to use this library will know of the issue.
Documentation is limited right now for the publicly facing endpoints, I should fix that when I get the chance.
Hello, @klinker41
I would like to use your library. Currently using api 28 but I am having the following error when sync gradle.
Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:8:5-37:19 to override.
I followed the suggestion but same result. Any advice?
Regards
We should provide a user with the option to save an article for later, if they fulfill a few requirements.
This would go nicely with #5 when I get around to doing that.
The main requirement would be that they have an app on their phone that can properly handle the save request. I think the best way to do this would be to create my own permission and then check if apps on the device request that permission. If they do, then it can be safely assumed that they can handle the save request, so we'll send a broadcast for them to pick up which includes the article information. They can then handle saving that information however they'd like to.
On the article viewer activity, this can just be represented by a star icon in the toolbar that hides itself if we don't have a way to save it.
@klinker24 this would also be useful for Source, we could then add an article as saved when using the article viewer activity instead of the inline viewing.
I think it would be cool to have this be a library that displays various types of content other than articles as well. For example, I saw a cool concept for a movie preview that looks very similar to what is currently implemented for articles:
It would be very cool if we were to supply a tmdb link to it, then it would pull up the movie or tv info instead of an article. The TMDb work is something I've already done with https://github.com/klinker24/series-track-android, so it would be quite easy to bring the library over and display the information here.
Just something for future consideration, not something that I want to do now.
Should use the gradle push templates that we have set up in other libraries. There is already a Jenkins job to deploy this, just have to set it up.
Now that this is being used, there needs to be some simple Robolectric unit tests in place.
Just a suggestion, for people using the news reader in the THEME_BLACK mode at night, the white background for the top ImageView before loading is a bit jarring. It would be nicer if the ImageView background was black before loading an image, for THEME_BLACK, grey for THEME_DARK, etc.
I have posted this in the Talon Google+ Community, but maybe this is a better place.
I have 2 issues with the otherwise great article browser (using it in Talon)
Some links open the same article, where chrome does not. Example: http://speld.nl/?p=68521 and http://speld.nl/?p=68495 open both the article I first opened with the new article browser. So none of the above links are correctly opened.
second is, some cookiewalls can't be "taken". example link: s.ad.nl/4471885 is there a solution for this?
Maybe direct these links to internal browser?
Hi,
I'm currently using the library on my app, and I have one question and one request.
Is it normal that the "Open in chrome" inside the article viewer opens links in a Chrome custom tab ? If it's the intended behavior, I think that the button isn't named well.
Would it be possible to customize the "Open ..." action, so we could use our own Chrome custom tab, or open links in the default user browser?
Thanks!
This will work best if there are a lot of apps using it, because then our server can index more articles. When the article is indexed, we can respond way faster than any normal web site would be able to since the responses are small and we don't have to load images, ads, etc right off the bat, just text.
So, to get the highest number of developers using it, it has to work well and it has to be free for them to use, even if the server is costing us money each month.
My idea is to build a pocket-like app for reading articles later. Sharing the URL to the app would kick off the preloading and caching process so that we could display it offline later. The app itself would be extremely simple since the majority of the logic would be coming from the library. All the app would need to do is accept links from sharing and create a list view to manage all of the links that you currently have (deleting an item from that list should delete it from the cache).
To build onto this later, we could add a scoring system to the backend based on the number of hits that each article gets and a simple regression over time. We could then grab the trending articles for that day and display them in a discovery section. Again, this would work best with the most number of apps using the library.
Hello, @klinker41 i am a graphics designer. I will like to know if you want me to create a new logo for your project. I will be creating the logo for free.
I am getting this issue while import your lib
Error:Module 'com.github.bumptech.glide:glide:4.4.0' depends on one or more Android Libraries but is a jar
Do i need to change anything?
Right now I believe we are grabbing the ul
and ol
tags in an article but then we're stripping them out on the client because we don't support them there (need to confirm this). If we are grabbing them, then we should display them appropriately as another item in the adapter. If we aren't, then we should modify the server so that we do get them and then support them properly.
Lists add a bit of info to articles and shouldn't be too difficult to implement.
hi, I want a method which permit to know if the website is an article or no because if it'snt I will start a Webview to display I website.
Thks
This is mainly used for codeblock sections, it would be something that does not wrap words, uses monospaced font and has a slightly different colored background, such as a codeblock. For testing, see: http://martinfowler.com/articles/web-security-basics.html
I am just moving this issue from the Pulse repo. Details can be found at
Should contain information about including the library in your own project, migrating from chrome custom tabs, how it works, and links to apps that are currently using it (and anything else in other libraries that I've made that I'm forgetting).
Many apps already have font size settings built in, we should give developers the opportunity to follow those preferences.
This will just require a new extra on the ArticleIntent
for font size in sp
. That size should be set for the content of the TextView
s, with slight deviations for the domain name and the article title
@klinker41 should be very straightforward, do you foresee any issues? I was going to add this this weekend.
We should allow the user to invoke the APIs directly if they wish instead of starting it via the activity. This will allow them to preload the article in the background so that it is available immediately to the user.
Use case for this would be an offline reader app, downloading an article instantly when an SMS is received with a link so that there is no load time later, etc.
This would also help to give the perception of a speedy app. If we need to go to a chrome custom tab instead of our own article, then that could be done instantly instead of waiting for the result from our server.
Implementation wise, a simple SQLite database should work fine to store the article information and HTML, very similar to what Source currently has. Then we would just need to query that database before making a request to the server for the data.
We would also have to preload the images so that they are available when offline and viewing an article. I believe that talon does this already, so we could borrow that implementation.
ArticleUtils
(also update the readme on how to use this)For my new project, there could be instances where an article has information such as title and image stored in the database, but no content. If that is the case, we should send a request to the server to grab the content for us and then update the item in the local database accordingly.
Hi there,
I would like to use article-android in my current Android project. https://article.klinkerapps.com/developer appears to be dead where it's mentioned we could request an API key.
Thank you!
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.