Skip to content

Yes, Another NewsAPP Product Powered By NewsAPI And Azure SQL Server

License

Notifications You must be signed in to change notification settings

2dgirlismywaifu/NewsApp-Spring-Api

Repository files navigation


Logo

NewsApp Reader

Powered by NewsAPI and Spring Services
A News Reader App from multiple sources

Contributors Forks Stargazers Reposize Lastcommit Issues Linecount APACHE License

Table of Contents
  1. About The Project
  2. Getting Started
  3. Demo
  4. Known Issues
  5. Contributing
  6. License
  7. Contact

About The Project

News application or newspaper reading application is a popular application with the role of providing quick news to users. In this project, the application uses: NewsAPI with 53 countries supported, RSS2JSON converts RSS to JSON and Microsoft Azure services: SQL Server, App Services and Blob Storages.

Product Name Screen Shot

(back to top)

Include with project

  • SQL file without user information
  • Figma design file
  • Image use in Azure Blob Storage

(back to top)

Getting Started

  • This project only use for research and purpose. It is NOT available for retail.
  • Follow all instruction to run project in your local devices.
  • At this time, the application is only developed on the Android platform. Once I have a Mac device, I will develop this project run on Apple mobile device

Prerequisites

Before use this project, you need have:

  • Android Studio
  • Android Native Development Kit (version in build.gradle)
  • Sign up Free Account Microsoft Azure Portal if you do not have any account
  • Create free Azure SQL Database S0: Free Azure SQL Database
  • Create App Services B1 Plan (Recomended: 13$/month): NewsApp Android RESTServices
  • Java Development Kit 17
    Notes: You can use Azure App Services with F1 Plan (Free Forever), but performance is very slow.

Installation

  1. Clone the repo
    git clone https://github.com/2dgirlismywaifu/NewsAPP_RSS_NewsAPI_Azure.git
  2. Follow instruction from my App Services: NewsApp Android RESTServices
  3. Get a free NewsAPI Key at https://newsapi.org/
  4. Get a free RSS2JSON API Key at https://rss2json.com/
  5. Get a secret access token to Azure Blob Storage follow this link Create SAS Token Azure Blob Containers
  6. Open this project in Android Studio
  7. Now connect this project to Firebase Authentication
    The easy way: In Menu at top your screen, choose Tools -> Firebase -> Authentication. Follow this video bellow to see details
    System Demo Information:
    • 💻 Device: MSI GF63 Thin10SC
    • 🐧 Operating System: Archcraft (Based on Arch Linux)
    • 💪 CPU: Intel Core i5-10500H
    • 🖼️ GPU: Intel UHD Graphics / NVIDIA GTX 1650 With Max-Q Design
    • 🗃️ RAM: 16GB
DEMO_Firebase_connect.mp4

\

  1. Add SHA-1 and SHA-256 in Firebase Project
  • In root project folder, open Terminal and run this command

    ./gradlew signingReport
  • Wait for this command run and you will get SHA-1 and SHA-256 code return like bellow

    Variant: debug
    Config: debug
    Store: C:\Users\pc\.android\debug.keystore
    Alias: AndroidDebugKey
    MD5: <code return>
    SHA1: <code return>
    SHA-256: <code return>
    Valid until: Sunday, December 1, 2052
    ----------
    Variant: release
    Config: release
    Store: D:\GitHub\newsapp_AzureDatbase\app\src\main\keyStore\signedKey.jks
    Alias: NewsAppReader-2dgirlismywaifu
    MD5: <code return>
    SHA1: <code return>
    SHA-256: <code return>
    Valid until: Wednesday, February 16, 2033
    
  • Open your project firebase connect with this project, scroll down to your app part. In SHA certificate fingerprints, add SHA-1 and SHA-256 code project have taken above.

  1. Now open Firebase Authentication in your Firebase Project

    • In Sign-in method part, add two providers: Email/Password and Google
    • In Settings part, choose User account linking , select Create multiple accounts for each identity provider. Then select Save to complete configuration Firebase Authentication
  2. Encode all your API key to Base64 (Azure Blob SAS need encode 2 times)

  3. Create keys.c file in this path bellow

    app\src\main\jni\keys.c
    
  • Page this content to 'keys.c' like bellow

    #include <jni.h>
    
    JNIEXPORT jstring JNICALL
    Java_com_notmiyouji_newsapp_java_Retrofit_NewsAPIKey_getNewsAPIKey(JNIEnv *env, jobject thiz) {
        // TODO: implement getNewsAPIKey()
        //your NewsAPI key
        return (*env)->NewStringUTF(env, "<input your encode key here>");
    }
    
    JNIEXPORT jstring JNICALL
    Java_com_notmiyouji_newsapp_java_Retrofit_NewsAPPAPI_getNewsAPPKey(JNIEnv *env, jobject thiz) {
        // TODO: implement geNewsAPPHeader()
        //your API key Spring Boot Services
        return (*env)->NewStringUTF(env, "<input your encode key here>");
    }
    
    JNIEXPORT jstring JNICALL
    Java_com_notmiyouji_newsapp_java_Retrofit_NewsAPPAPI_geNewsAPPHeader(JNIEnv *env, jclass clazz) {
        // TODO: implement geNewsAPPHeader()
        //your API Header Spring Boot Services
        return (*env)->NewStringUTF(env, "<input your encode key here>");
    }
    
    JNIEXPORT jstring JNICALL
    Java_com_notmiyouji_newsapp_java_RSS2JSON_FeedMultiRSS_getRSS2JSONAPIKey(JNIEnv *env, jobject thiz) {
        //Your RSS2JSON Key
        return (*env)->NewStringUTF(env, "<input your encode key here>");
    }
    
    JNIEXPORT jstring JNICALL
    Java_com_notmiyouji_newsapp_java_RecycleViewAdapter_ListRSSAdapter_getSecretKey(JNIEnv *env,jobject thiz) {
        //Your secret key to access image save from Azure Blob Storage
        //You need encode this key two times
        return (*env)->NewStringUTF(env, "<input your encode key here>");
    }
  1. Now project is ready to build and install in your physical device and Google Android emulator 💕💕💕💕💕💕💕 .

(back to top)

Demo

This is a video demo project
System Demo Information:

  • 📱 Device: Xiaomi Redmi Note 7 Global
  • 🐧 Operating System: Android 13 Tiramisu (Project Elixir)
  • 💪 CPU: Qualcomm Snapdragon 660
  • 🖼️ GPU: Adreno 512
  • 🗃️ RAM: 4GB
NewsApp_Android_DEMO_part1.mp4

NewsApp_Android_DEMO_part2.mp4

(back to top)

Known Issues

  1. RecycleView Search only work with RecycleView Horizontal (expect: NewsSourceList, Favourite News).
  2. Set favourite an un favourite in recycleview adapter not update view. Need Swipe To Refresh action from user to update view.
  3. Duplicate result login
  4. Tell me 💕
    See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork this Project
  2. Create your Feature Branch
    git checkout -b feature/AmazingFeature
  3. Commit your Changes
    git commit -m 'Add some AmazingFeature'
  4. Push to the Branch
    git push origin feature/AmazingFeature
  5. Open a Pull Request

(back to top)

License

  • Do NOT delete my header copyright if you fork or clone this project for personal use
            Copyright By @2dgirlismywaifu (2023)

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

(back to top)

Contact

twitter-shield
My Gmail Workspace: longntworkspace2911@gmail.com
Project Link: https://github.com/2dgirlismywaifu/NewsAPP_RSS_NewsAPI_Azure
Scan QR code bellow to follow my Github account 💕💕💕

(back to top)

=======


Logo

NewsApp Reader (Curently working update API URI)

Powered by NewsAPI and Microsft Azure Services
A News Reader App from multiple sources

Contributors Forks Stargazers Reposize Lastcommit Issues Linecount APACHE License

Table of Contents
  1. About The Project
  2. Getting Started
  3. Demo
  4. Known Issues
  5. Contributing
  6. License
  7. Contact

About The Project

News application or newspaper reading application is a popular application with the role of providing quick news to users. In this project, the application uses: NewsAPI with 53 countries supported, RSS2JSON converts RSS to JSON and Microsoft Azure services: SQL Server, App Services and Blob Storages.

Product Name Screen Shot

(back to top)

Include with project

  • SQL file without user information
  • Figma design file
  • Image use in Azure Blob Storage

(back to top)

Getting Started

  • This project only use for research and purpose. It is NOT available for retail.
  • Follow all instruction to run project in your local devices.
  • At this time, the application is only developed on the Android platform.

Prerequisites

Before use this project, you need have:

  • Android Studio
  • Android Native Development Kit (version in build.gradle)
  • Sign up Free Account Microsoft Azure Portal if you do not have any account
  • Create free Azure SQL Database S0: Free Azure SQL Database
  • Create App Services B1 Plan (13$/month): NewsApp-RESTServices
  • Java Development Kit 17
    Note: You can use Azure App Services with F1 Plan (Free Forever), but performance is very slow.

Installation

  1. Clone the repo
    git clone https://github.com/2dgirlismywaifu/NewsAPP_RSS_NewsAPI_Azure.git
  2. Follow instruction from my App Services: NewsApp Android RESTServices
  3. Get a free NewsAPI Key at https://newsapi.org/
  4. Get a free RSS2JSON API Key at https://rss2json.com/
  5. Get a secret access token to Azure Blob Storage follow this link Create SAS Token Azure Blob Containers
  6. Open this project in Android Studio
  7. Now connect this project to Firebase Authentication
    The easy way: In Menu at top your screen, choose Tools -> Firebase -> Authentication. Follow this video bellow to see details
DEMO_Firebase_connect.mp4


8. Add SHA-1 and SHA-256 in Firebase Project

  • In root project folder, open Terminal and run this command

    ./gradlew signingReport
  • Wait for this command run and you will get SHA-1 and SHA-256 code return like bellow

    Variant: debug
    Config: debug
    Store: C:\Users\pc\.android\debug.keystore
    Alias: AndroidDebugKey
    MD5: <code return>
    SHA1: <code return>
    SHA-256: <code return>
    Valid until: Sunday, December 1, 2052
    ----------
    Variant: release
    Config: release
    Store: D:\GitHub\newsapp_AzureDatbase\app\src\main\keyStore\signedKey.jks
    Alias: NewsAppReader-2dgirlismywaifu
    MD5: <code return>
    SHA1: <code return>
    SHA-256: <code return>
    Valid until: Wednesday, February 16, 2033
    
  • Open your project firebase connect with this project, scroll down to your app part. In SHA certificate fingerprints, add SHA-1 and SHA-256 code project have taken above.

  1. Now open Firebase Authentication in your Firebase Project

    • In Sign-in method part, add two providers: Email/Password and Google
    • In Settings part, choose User account linking , select Create multiple accounts for each identity provider. Then select Save to complete configuration Firebase Authentication
  2. Encode all your API key to Base64 (Azure Blob SAS need encode 2 times)

  3. Create keys.c file in this path bellow

    app\src\main\jni\keys.c
    
  • Page this content to 'keys.c' like bellow

    #include <jni.h>
    
    //use base64 to encode
    
    JNIEXPORT jstring JNICALL
    Java_com_notmiyouji_newsapp_java_Retrofit_NewsAPIKey_getNewsAPIKey(JNIEnv *env, jobject thiz) {
        // TODO: implement getNewsAPIKey()
        //your NewsAPI key
        return (*env)->NewStringUTF(env, "<input your encode key here>");
    }
    
    JNIEXPORT jstring JNICALL
    Java_com_notmiyouji_newsapp_java_Retrofit_NewsAPPAPI_getNewsAPPKey(JNIEnv *env, jobject thiz) {
        // TODO: implement geNewsAPPHeader()
        //your API key Spring Boot Services
        return (*env)->NewStringUTF(env, "<input your encode key here>");
    }
    
    JNIEXPORT jstring JNICALL
    Java_com_notmiyouji_newsapp_java_Retrofit_NewsAPPAPI_geNewsAPPHeader(JNIEnv *env, jclass clazz) {
        // TODO: implement geNewsAPPHeader()
        //your API Header Spring Boot Services
        return (*env)->NewStringUTF(env, "<input your encode key here>");
    }
    
    JNIEXPORT jstring JNICALL
    Java_com_notmiyouji_newsapp_java_RSS2JSON_FeedMultiRSS_getRSS2JSONAPIKey(JNIEnv *env, jobject thiz) {
        //Your RSS2JSON Key
        return (*env)->NewStringUTF(env, "<input your encode key here>");
    }
    
    JNIEXPORT jstring JNICALL
    Java_com_notmiyouji_newsapp_java_RecycleViewAdapter_ListRSSAdapter_getSecretKey(JNIEnv *env,jobject thiz) {
        //Your secret key to access image save from Azure Blob Storage
        //You need encode this key two times
        return (*env)->NewStringUTF(env, "<input your encode key here>");
    }
  1. Now project is ready to build and install in your physical device and Google Android emulator.

(back to top)

Demo

This is a video demo project
System Demo Information:

  • 📱 Device: Xiaomi Redmi Note 7 Global
  • 🐧 Operating System: Android 13 Tiramisu
NewsApp_Android_DEMO_part1.mp4

NewsApp_Android_DEMO_part2.mp4

(back to top)

Known Issues

  1. RecycleView Search only work with RecycleView Horizontal (expect: NewsSourceList, Favourite News).
  2. Set favourite an un favourite in recycleview adapter not update view. Need Swipe To Refresh action from user to update view.
  3. Duplicate result login
  4. News personalization has not been developed.
  5. Tell me.
    See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork this Project
  2. Create your Feature Branch
    git checkout -b feature/AmazingFeature
  3. Commit your Changes
    git commit -m 'Add some AmazingFeature'
  4. Push to the Branch
    git push origin feature/AmazingFeature
  5. Open a Pull Request

(back to top)

License

  • Do NOT delete my header copyright if you fork or clone this project for personal use
            Copyright By @2dgirlismywaifu (2023)

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

(back to top)

Contact

twitter-shield
My Gmail Workspace: longntworkspace2911@gmail.com
Project Link: https://github.com/2dgirlismywaifu/NewsAPP-RSS-NewsAPI

(back to top)