Sunday, February 12, 2017

We've Got Images!

Hello everyone! We have finally made the big jump over our last hurdle, which is was obtaining images from the Observer's RSS feed and using them in our app! 

Our app design/layout is very dependent on visualizations and the use of the images that corresponded to the published articles. However, we realized after we completely designed and coded out the layout that the images for the news articles were not actually included in the RSS feed for the website. When we met with the ITS department to talk about push notifications we also mentioned our image crisis. They suggested also writing a script to retrieve the images from the Word Press database. However, we again decided against this and found a plug-in that would place the image URL for each article into the RSS feed. And it worked!


Once we had access to the images, Riley, was able to retrieve the URL by searching in the RSS feed for the image tag, which contains the URL, and parsing the text to obtain the String of the URL under the source attribute of the image tag. Once we had the String of the URL, Lauren, was able to successfully obtain the image from the URL and store it as a Drawable in Android Studio. Once we had a Drawable of the image we could easily place it in the layout as desired! However, there are some stories that do not have an image that corresponds with them. Thus, we have an image of the Observer "O" as a default place holder. 


What's next?!

Now we have all the basic functionality we need for our app to work. Our next steps are cleaning up the app. This includes smoother transitions between activities, refactoring our code, replace place holder images for the categories selector layout, and more.

We will be presenting the beta version of our app on Tuesday 3-5pm in Olin 202! Everyone is welcome! 

Sunday, February 5, 2017

The Final Stretch


Hello! We apologize it has been a littler longer since our last post. Team Newspaper hit a standstill in progress due to our individual application projects due week 8 and also waiting to hear back form Augustana's ITS department. 

We finally were able to talk to the Observers web developer in the ITS department on Wednesday about implementing the push notification plug-in. However, it turns out the plug-in we found requires a newer version of PHP than what the server the website is on has. Hitting another wall we had to go back and research other ways to implement the push notifications. The reason we feel push notifications is so important is because it is really the true distinction between our app versus the website. 



We had the opportunity on Friday to sit down with the ITS web developer and discuss other options and how he can help. He was able to give us access to the database that stores all the website information and suggested us writing a script to find when a new story was published to send out a notification. While this seemed like our best/only option we didn't feel it would be feasible since it would require constantly or semi-constantly running the script to see if a new story was published. It wasn't the most elegant approach. 

We decided to do a little more digging and were able to find another plug-in that works on older version of PHP, but without administrative access to the website and the limited communication with the ITS department we couldn't test if this new plug-in would work. Therefore, Dr. Stonedahl decided to create our own dummy WordPress website. Having the dummy site allows us to test the plug-in and PHP code as often as we would like without worrying about breaking the site. 

Team Newspaper member, Andrew, was able to successfully get push notifications working using the dummy site! The way this works is our app will send it's individual device registration token to the WordPress website. We are currently using SharedPreferences to keep track of whether or not the app has already been registered. Whenever a post is made, there's some PHP code that will be called and uses GCM to send a notification to every app. 

Now since we know the plug-in words we are hoping to get it installed into the Observer's WordPress site! Only one week left!