Table of Contents
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.
- SQL file without user information
- Figma design file
- Image use in Azure Blob Storage
- 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
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.
- Clone the repo
git clone https://github.com/2dgirlismywaifu/NewsAPP_RSS_NewsAPI_Azure.git
- Follow instruction from my App Services: NewsApp Android RESTServices
- Get a free NewsAPI Key at https://newsapi.org/
- Get a free RSS2JSON API Key at https://rss2json.com/
- Get a secret access token to Azure Blob Storage follow this link Create SAS Token Azure Blob Containers
- Open this project in Android Studio
- 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
\
- 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.
-
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
, selectCreate multiple accounts for each identity provider
. Then selectSave
to complete configuration Firebase Authentication
-
Encode all your API key to Base64 (Azure Blob SAS need encode 2 times)
-
Create
keys.c
file in this path bellowapp\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>"); }
- Now project is ready to build and install in your physical device and Google Android emulator 💕💕💕💕💕💕💕 .
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
- RecycleView Search only work with RecycleView Horizontal (expect: NewsSourceList, Favourite News).
- Set favourite an un favourite in recycleview adapter not update view. Need Swipe To Refresh action from user to update view.
Duplicate result login- Tell me 💕
See the open issues for a full list of proposed features (and known issues).
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!
- Fork this Project
- Create your Feature Branch
git checkout -b feature/AmazingFeature
- Commit your Changes
git commit -m 'Add some AmazingFeature'
- Push to the Branch
git push origin feature/AmazingFeature
- Open a Pull Request
- 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.
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 💕💕💕
Table of Contents
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.
- SQL file without user information
- Figma design file
- Image use in Azure Blob Storage
- 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.
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.
- Clone the repo
git clone https://github.com/2dgirlismywaifu/NewsAPP_RSS_NewsAPI_Azure.git
- Follow instruction from my App Services: NewsApp Android RESTServices
- Get a free NewsAPI Key at https://newsapi.org/
- Get a free RSS2JSON API Key at https://rss2json.com/
- Get a secret access token to Azure Blob Storage follow this link Create SAS Token Azure Blob Containers
- Open this project in Android Studio
- 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.
-
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
, selectCreate multiple accounts for each identity provider
. Then selectSave
to complete configuration Firebase Authentication
-
Encode all your API key to Base64 (Azure Blob SAS need encode 2 times)
-
Create
keys.c
file in this path bellowapp\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>"); }
- Now project is ready to build and install in your physical device and Google Android emulator.
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
- RecycleView Search only work with RecycleView Horizontal (expect: NewsSourceList, Favourite News).
- Set favourite an un favourite in recycleview adapter not update view. Need Swipe To Refresh action from user to update view.
Duplicate result login- News personalization has not been developed.
- Tell me.
See the open issues for a full list of proposed features (and known issues).
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!
- Fork this Project
- Create your Feature Branch
git checkout -b feature/AmazingFeature
- Commit your Changes
git commit -m 'Add some AmazingFeature'
- Push to the Branch
git push origin feature/AmazingFeature
- Open a Pull Request
- 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.
My Gmail Workspace: longntworkspace2911@gmail.com
Project Link: https://github.com/2dgirlismywaifu/NewsAPP-RSS-NewsAPI