How to display RSS feed in app? - android

I don't normally whine this much, but this problem is really painful.
I've been searching for an answer since 4 months and I still don't know how to do this. I taught myself Android from square 1, but this is 1 problem I just can't get around my head.
I've asked at least 20 questions on SO, half got down-rated, the other half got no answer.
I've checked at least half a dozen libraries, spent days to try and integrate it in my app, but nothing has ever worked.
These were the most promising ones:
https://github.com/matshofman/Androi...Reader-Library
https://github.com/ahorn/android-rss
Took hours to integrate and I never felt real sorrow until I was unable to get anything to work.
If you know how to integrate an RSS feed in an app, please help me out! It's the one thing that's stopping my app from becoming the best in it's field. I reckon I would retain twice as many users if I could just have this. A working example is all I need. I've never even seen ONE. I don't how the News apps do it, it's practically magic for me.
I just want a Listview that shows the title, on clicking and item the description opens up. The rest I can do myself. Any working example will do.
Please Help.

If you haven't figured it out by now, I have made a simple library for this exact reason. The current ones are outdated and hard to customize. Try this one and let me know if you need help. The readme should walk you through basic set up.
https://github.com/ShirwaM/Simplistic-RSS

You may want to check out this new powerful RSS library I wrote:
https://github.com/Pkmmte/PkRSS
It's very easy to use, extremely customizable, and supports most feeds. For example, the following code loads a specific url in the background:
PkRSS.with(this).load(url).async();
And then you can get the list of feeds loading in that url:
List<Article> articleList = PkRSS.with(this).get(url);
You can then use that ArrayList in your ListView to populate it. Easy, right? :D

Related

Recent API information on opening a camera in Android Studio (Kotlin)

This might come off as a weird post, because I don't directly want answers to how to fix this just yet. Over the past few weeks now I've been searching for good tutorials/information on opening the camera in Android Studio Kotlin with a button and having it ask for permission and all that jazz and allow you to take a picture and save it to the app, not the camera roll (I want to use the picture in several places of the app, and having it in the camera roll is not needed and also just takes up space). As of now I've tried several YouTube tutorials, and tried a few different ways that have been posted over the years but it seems most don't work and are severely outdated. I don't know if I'm implementing them wrong, which is very possible, I'm not well versed in Android Studio, and have been trying to learn. However most of the times the button just ends up not working, sometimes it doesn't do anything, sometimes it ends up crashing depending on which tutorial I use to help, or whatnot. I'm mainly here asking if anyone has any updated sources that I can look towards and at this point I will take anything, API Pages, YouTube, another Forum, anything that can point me in the right direction for this is insanely appreciated, the only thing I don't want is direct answers because I do want to be able to learn from this experience and hopefully be able to move forward with it without having to use a tutorial every time in the future, and direct answers aren't really going to help me achieve that.
I've tried to use several different ways to open the android camera, ask permission, and take a picture. So far the farthest I've gotten is it crashing, but most often it just doesn't do anything when said button is pushed. I even went for a more direct approach originally, eliminating the button as a whole and using just the navigation bar, but that went about as well as anything else did. Over this time I've tried maybe half a dozen or more tutorials and/or posts on another sites and stack overflow, and not only are each a different way, they're either many years old or using deprecated ways to complete the objective, and none seem to work. From this I would greatly appreciate just a link to a more up to date spot to learn how to use the camera.

Flutter / App development beginner seeking wisdom, general direction

I am a student working on a senior project. It will be a very simple android app to organize karaoke. We are using Flutter for the front-end work.
My education has been in Java, but this is my first time working with Dart/Flutter, let alone on a smartphone app. I have gone through Get Started (https://flutter.io/get-started/), as well as 2-3 step-by-step youtube tutorials that help you build very simple apps from scratch. These have been helpful, but I'm still having trouble wrapping my head around the organization of a Flutter app. All tutorials say "everything is a widget", as if that should make things simple. And maybe it does in the end. But I end up with so many widgets, and I am getting confused about what widget should be inside what other widget and why.
Take a look at this picture (in the middle of the picture I have the widget-tree on display). I have a stack, two columns, scaffold, container, etc. Do I really need all of those? Is this normal for a simple login page?
What helped you get a grip on Flutter? Or maybe it is app development, rather, that I am having trouble understanding. Regardless, I am getting a bit discouraged. Any advice? Maybe there is a particular tutorial that helped you a lot?
Thank you for any help.
I like to learn by downloading and running examples from the developers (like these ones in their GitHub repo).
One thing I struggled with at first too from the whole "everything is a widget" idea was figuring out how to handle state / data changes appropriately. If you're struggling with that, this Google I/O video does a great job showing how you can better architect an app in regard to handling state in a reactive way. A bit more advanced, but from beginning to end they go from their opinion on the worst way to handle state changes to their recommended way(s).

Just starting Android Studio, I need guidance

I just decided today that I wanted to make a gallery app for my phone, pretty much just combine several features I like from different apps I've tried into one, perfect app, for me. The problem however is that although I know some java, took Programming 1 & 2 and currently taking AP Computer Science in high school, I have no idea where to begin. I roughly know and even less so understand the layout of Android Studio, but I can get by. I need help finding useful resources online to help me learn or even someone who is able to answer the probably many questions I have. I've watched some youtube videos and tried reading some tutorials but I haven't found anything that clears things up for me. I will ask a few questions now:
1.) I have no idea where to start or what to use to get the app to show images from device storage and micro sd card in a grid view. I have read things about using the RecyclerView to not use as much resources, and also something about Glide for better performance(I think thats what both those do, if I understand correctly) but I have no idea what to do with either or even how to use either.
2.) In the xml design portion I'm not good at navigating everything and understanding what I should use for what. I can make a good design in photoshop or other programs but I'm not sure how to actually take that vision and translate it into working pieces.
3.) Pretty much I just need help and will probably think of more questions as someone tries to answer those.
Thanks!
There are lots of good, free tutorials on the net. For example on the official Android Developer site: https://developer.android.com/training/index.html
- where you can find a lot of useful example code snippets, but there are other sites also - https://www.tutorialspoint.com/android/index.htm . It starts with the very basics and has lots of examples too.
Other non-free tutorials can be found at
udacity.com - Android Developer Nanodegree by Google
udemy.com
To reach data from your device storage or from your micro SD card you have to understand the principle working of content providers.
I do not recommend Recycle View, when you are a beginner, because it is a more complex thing than a List View (or Grid View). Start with these and then upgrade.
Glide is cool thing, because it saves you from a lot of useless coding and easy to use. On their GitHub page you find detailed instructions how to import it to your project - I recommend Gradle - and how to use it.
In my point of view, start reading one of the free sites patiently and than you are going to get answer for your questions, but it is very important to understand the basics.
I hope I helped! Sorry for my bad English, I used it a long time ago.

Always connect to Webservice or local storage Android?

I'm developing a personal project with Android and struggling here with some doubts about the better way to develop it.
Well, my project consists of my app consuming a Rest Webservice (which I already developed with Java and Spring) and showing up a list of places on it. The thing is: This list could be huge, something like 2000- 3000 records with description and picture of each place.
I'm using volley and OKHttp to take care of my networking stuff, so far my list of places isn't that long, so everything is alright, but I'm afraid when the list starting to get big, I don't know how my app will handle this.
My questions would be:
1- Should I store the that list on my device and update the list every time I connect to the webservice?
2 - Am I doing correct, retrieving the entire list with just one request? If not, how's the best way to do it?
Thank you guys, I'm new to android stuff, and I'm developing everything by myself, don't have anyone experience around to ask that.
Cheers!
As mentioned in comments You need your app to do "paging" and to load some of the content every time you scroll down.
For example if you will open Facebook app and go over photos you will notice that the first ones always loading the fastest and as you keep scrolling some will be left blank for few moments, thats what paging is all about.
Make sure though not to overload the app with info, specially if you use bitmaps
You can read some good tutorials here

Parsing plain text from webpage

It's the very first time for me asking question on this forum, so hope that everyone won't be too strict.
This semester I've been doing Project and I decided to make android application that will be able to parse articles from websites(not one, but many) and save it in text file or SQLite Database. I've been doing this for already 5 months and I really don't know how can I get particular plain text from webpage without getting unrelated to particular article stuff, such as adds etc.
Through this forum I found out how I can parse data from one website using Jsoup(I'm using one in my Project). And I thought it might work with multiple websites as well, but since many websites using different html tags to represent content of certain article, I couldn't find any common parameters that can be used.
I'm not sure, but I think I saw somebody on this forum said this kind of thing is impossible, but then how we can explain existence of such kind of apps like Pocket(Former Read it Later), Instapaper etc. These apps are doing what ultimately I want my app to do.
So can anybody give any suggestions about what can I do about it? Thanks.
I'm not sure whether it's going to show whole story, but here is the code:
doc = Jsoup.connect("http://"+URLField.getText().toString()+"").get();
// get page title
title = doc.title();
doc = new Cleaner(Whitelist.none()).clean(doc);
Here I'm simply using Jsoup library and its Cleaner class, but I get a lot of text that I don't want to appear. I wanted to post image to make it clear(what I want), but this forum doesn't let me do that.

Categories

Resources