Code Monkey home page Code Monkey logo

article-android's People

Contributors

klinker24 avatar klinker41 avatar sfilmak 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  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  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  avatar  avatar  avatar  avatar

article-android's Issues

UI improvements

  • parallax image views
  • diagonal separators between images and article
  • transparent toolbar and status bar with header behind it
  • hide toolbar when scrolling down
  • allow for changing color of primary and accent (remember overscroll on recyclerview)
  • dark/light theme
  • restrict width on tablets
  • tune parallax effect
  • add loading bar while contacting server

img_20161101_213206

Modify text selection colors

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.

Integrate into Pulse and Talon

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.

Open chrome custom tab when not an article

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.

  • accept all parameters that go into a custom tab
  • match apis to custom tabs so that migration is easy for existing users

Full screen image viewer

Clicking on an image should display it in a fullscreen activity that the user can zoom in on, like Talon and Pulse.

Fix Proguard configuration

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.

Add javadocs

Documentation is limited right now for the publicly facing endpoints, I should fix that when I get the chance.

Manifest merger failed

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

Add a save button to the viewer activity

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.

Apply to other things other than articles

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:

preview

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.

Deploy to Maven Central

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.

Add testing

Now that this is being used, there needs to be some simple Robolectric unit tests in place.

Suggestion : image loading background color

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.

some link formats don't work as expected

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?

[Request] Open in default browser instead of custom tab.

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!

Find a way to make money on the library

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.

Logo Proposal

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.

Glide issue

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?

Support ordered and unordered lists

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.

Proposition for a boolean method

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

Create a README

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).

Ability to change the font size

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 TextViews, 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.

Cache data locally on device so that we can preload data if desired

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.

  • set up database
  • store article in database after getting response from server
  • load article where available before making request to server
  • preload images after storing the article in the database
  • display preloaded images (I'm guessing we can do this automatically with glide, but I can use network monitor to confirm this)
  • add preloading apis to ArticleUtils (also update the readme on how to use this)
  • add way to set how often cache should be invalidated (or never if they want to handle it themselves)
  • invalidate old images and articles in the cache

Fetch article content when nonexistent

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.

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.