Skip to content

Commit

Permalink
1.6.3 updated
Browse files Browse the repository at this point in the history
  • Loading branch information
PranshulGG committed Sep 23, 2024
1 parent 47bd440 commit 711ca8f
Show file tree
Hide file tree
Showing 34 changed files with 4,712 additions and 1,098 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "com.example.weathermaster"
minSdk 22
targetSdk 33
versionCode 53
versionName "1.6.2 (W)"
versionCode 54
versionName "1.6.3 (W)"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Expand Down
38 changes: 37 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
android:name=".AboutPage"
android:screenOrientation="portrait"
android:exported="true"
android:theme="@style/ScreensAll"
android:theme="@style/aboutMainPage"
/>
<activity
android:name=".Terms_Conditions"
Expand Down Expand Up @@ -78,6 +78,42 @@
android:exported="true"
android:theme="@style/ScreensAll"
/>
<activity
android:name=".humidityCondition"
android:screenOrientation="portrait"
android:exported="true"
android:theme="@style/conditionMainPage"
/>
<activity
android:name=".pressureCondition"
android:screenOrientation="portrait"
android:exported="true"
android:theme="@style/conditionMainPage"
/>
<activity
android:name=".sunCondition"
android:screenOrientation="portrait"
android:exported="true"
android:theme="@style/conditionMainPage"
/>
<activity
android:name=".UVIndexCondition"
android:screenOrientation="portrait"
android:exported="true"
android:theme="@style/conditionMainPage"
/>
<activity
android:name=".visibilityCondition"
android:screenOrientation="portrait"
android:exported="true"
android:theme="@style/conditionMainPage"
/>
<activity
android:name=".WindCondition"
android:screenOrientation="portrait"
android:exported="true"
android:theme="@style/conditionMainPage"
/>
<activity
android:name=".MainActivity"
android:theme="@style/app_theme"
Expand Down
57 changes: 51 additions & 6 deletions app/src/main/assets/app/apiKeysRotation.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,72 @@
const apiKeysDaily = [
MAIN_KEYS
'd94bcd435b62a031771c35633f9f310a',
'3b833dcd6aac36124a8a30e182224427',
'dd1571a8ad3fd44555e8a5d66db01929',
'82005d27a116c2880c8f0fcb866998a0',
'279b4be6d54c8bf6ea9b12275a567156',
'7a02a834570055b013f9a14fd1b712ed',
'20f7632ffc2c022654e4093c6947b4f4',
'6557810176c36fac5f0db536711a6c52',
'b190a0605344cc4f3af08d0dd473dd25',
'b02af426a3fad0d92d3e0b32f9324cf0',
'392345e23d1613d56dad9cba63084b9c',
'6841e5450643e5d4ff59981dbf58944e'

];


const apiKeysAlerts = [
MAIN_KEYS
'd94bcd435b62a031771c35633f9f310a',
'3b833dcd6aac36124a8a30e182224427',
'dd1571a8ad3fd44555e8a5d66db01929',
'82005d27a116c2880c8f0fcb866998a0',
'279b4be6d54c8bf6ea9b12275a567156',
'7a02a834570055b013f9a14fd1b712ed',
'20f7632ffc2c022654e4093c6947b4f4',
'6557810176c36fac5f0db536711a6c52',
'b190a0605344cc4f3af08d0dd473dd25',
'b02af426a3fad0d92d3e0b32f9324cf0',
'392345e23d1613d56dad9cba63084b9c',
'6841e5450643e5d4ff59981dbf58944e'
];

const apiKeysCityName = [
MAIN_KEYS
'7147cfac7299479da122684c73d9b80a',
'09713ffe266c4dfa99b98157dfd148f9',
'66f9ad95f6704259a376949eaa659e62',
'0c2f2f52e0ac4212b663d878a673328f',
'd53acf46573c48e3be81683402f2be93'

];

const apiKeysGeo = [
MAIN_KEYS
'7147cfac7299479da122684c73d9b80a',
'09713ffe266c4dfa99b98157dfd148f9',
'66f9ad95f6704259a376949eaa659e62',
'0c2f2f52e0ac4212b663d878a673328f',
'd53acf46573c48e3be81683402f2be93'
];

const apiKeysVisual = [
MAIN_KEYS
'VGU8JQ9FQKP86FNHZRJEALTLH',
'XX6JNDK3D97HKE93N9J75BTXU',
'4KMES28T2K3PXBCXTNYZCZFW8',
'VLK2ZUD6XT4872PBVQT7FCJ92',
'CZ6BMMP5QEZQTLT45YVM9YJ5D',
'2U6VP2EF5WD6ZXEAA7V5G6H7R',
'7VXHK5K23FZAZEA8QGGPYM6NE',
'8DADTJ5YHGASWH7QFBNVXVUMD'
];


const astronomyApiKeys = [
MAIN_KEYS
'63a7210d2b104646a1099d5ba223d221',
'4c502232671d48699afaf3b2741db4a4',
'3dba64be2889483880c8534a81b5287e',
'a44390988cdb4d66a2e73d952cea14de',
'4545085e4d474639ab84961437736aef',
'45138b014170468889660331ec52f156',
'033158c54bf547a58ec44e6b7f5dc1f2',
'8e982325202c43ab8ff4e2434af4b2bc',
'5862f00bef2a49dbb8d96579e4d2bbee'
];
3 changes: 2 additions & 1 deletion app/src/main/assets/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function handleStorageChange(event) {
if (event.key === 'SelectedTempUnit' ||
event.key === 'SelectedWindUnit' ||
event.key === 'selectedVisibilityUnit' ||
event.key === 'selectedTimeMode'||
event.key === 'selectedPrecipitationUnit' ||
event.key === 'DefaultLocation'||
event.key === 'selectedPressureUnit') {
Expand Down Expand Up @@ -655,7 +656,7 @@ function checkNoInternet(){

document.addEventListener('DOMContentLoaded', async function() {

const currentVersion = 'v1.6.2';
const currentVersion = 'v1.6.3';
const githubRepo = 'PranshulGG/WeatherMaster';
const releasesUrl = `https://api.github.com/repos/${githubRepo}/releases/latest`;

Expand Down
7 changes: 5 additions & 2 deletions app/src/main/assets/app/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function getCountryName(code) {


async function DecodeWeather(lat, lon) {
const apiKey = 'MAIN_KEYS';
const apiKey = 'J8HTH6P4YTGO';
const url = `https://api.timezonedb.com/v2.1/get-time-zone?key=${apiKey}&format=json&by=position&lat=${lat}&lng=${lon}`;

try {
Expand All @@ -16,10 +16,12 @@ async function DecodeWeather(lat, lon) {
FetchWeather(lat, lon, data.zoneName)
} else {
console.error('Error fetching timezone:', data);
DecodeWeather(lat, lon)
return null;
}
} catch (error) {
console.error('Error:', error);
DecodeWeather(lat, lon)
return null;
}
}
Expand All @@ -32,7 +34,7 @@ showLoader();
localStorage.setItem('currentLong', lon)
localStorage.setItem('currentLat', lat)

fetch(`https://api.open-meteo.com/v1/forecast?latitude=${lat}&longitude=${lon}&current=temperature_2m,is_day,apparent_temperature,pressure_msl,relative_humidity_2m,precipitation,weather_code,cloud_cover,wind_speed_10m,wind_direction_10m,wind_gusts_10m&hourly=relative_humidity_2m,pressure_msl,cloud_cover,temperature_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,weather_code,visibility,uv_index&daily=weather_code,temperature_2m_max,temperature_2m_min,sunrise,sunset,daylight_duration,uv_index_max,precipitation_sum,daylight_duration,precipitation_probability_max,precipitation_hours,wind_speed_10m_max,wind_gusts_10m_max&timezone=${timezone}&forecast_days=14&forecast_hours=24`)
fetch(`https://api.open-meteo.com/v1/forecast?latitude=${lat}&longitude=${lon}&current=temperature_2m,is_day,apparent_temperature,pressure_msl,relative_humidity_2m,precipitation,weather_code,cloud_cover,wind_speed_10m,wind_direction_10m,wind_gusts_10m&hourly=wind_speed_10m,wind_direction_10m,relative_humidity_2m,pressure_msl,cloud_cover,temperature_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,weather_code,visibility,uv_index&daily=weather_code,temperature_2m_max,temperature_2m_min,sunrise,sunset,daylight_duration,uv_index_max,precipitation_sum,daylight_duration,precipitation_probability_max,precipitation_hours,wind_speed_10m_max,wind_gusts_10m_max&timezone=${timezone}&forecast_days=14&forecast_hours=24`)
.then(response => response.json())
.then(data => {

Expand All @@ -52,6 +54,7 @@ showLoader();
// Cache weather for different pages

localStorage.setItem('DailyWeatherCache', JSON.stringify(data.daily));
localStorage.setItem('CurrentHourlyCache', JSON.stringify(data.hourly))


// send current
Expand Down
Loading

0 comments on commit 711ca8f

Please sign in to comment.