changed api and package name
This commit is contained in:
parent
1231683dae
commit
fc908199f1
23 changed files with 69 additions and 104 deletions
15
README.md
15
README.md
|
@ -1,15 +0,0 @@
|
|||
## This is the `dev` branch!!
|
||||
**You are on the `dev` branch for Wiimmfi Watcher.** This is seperate from the `master` branch, which contains the currently most stable version, while this branch is made for me to work on the app without changing currently stable code. If you are looking for the `master` branch, [click here.](https://github.com/brysonsteck/wiimmfi-watcher/tree/master)
|
||||
|
||||
# Wiimmfi Watcher
|
||||
|
||||
Wiimmfi Watcher is an Android application that allows you to watch Mario Kart Wii gameplay by simply entering your friend code.
|
||||
|
||||
## TODO
|
||||
|
||||
* Add an indentifiable user agent for Jsoup
|
||||
* Add a new fragment for the "info" button on the main screen
|
||||
* Fix the repeating recent friend codes
|
||||
* Figure out if a license is appropriate
|
||||
* Create the app on the Play Store
|
||||
* Create a meaningful README
|
|
@ -7,8 +7,8 @@ android {
|
|||
buildToolsVersion "30.0.3"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.example.wiimmterfaceandroid"
|
||||
minSdkVersion 29
|
||||
applicationId "me.brysonsteck.wiimmfiwatcher"
|
||||
minSdkVersion 22
|
||||
targetSdkVersion 30
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
@ -31,7 +31,6 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
dependencies {
|
||||
dependencies {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.wiimmterfaceandroid;
|
||||
package me.brysonsteck.wiimmfiwatcher;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
|
@ -21,6 +21,6 @@ public class ExampleInstrumentedTest {
|
|||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
assertEquals("com.example.wiimmterfaceandroid", appContext.getPackageName());
|
||||
assertEquals("me.brysonsteck.wiimmfiwatcher", appContext.getPackageName());
|
||||
}
|
||||
}
|
|
@ -1,16 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.wiimmterfaceandroid">
|
||||
package="me.brysonsteck.wiimmfiwatcher">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/wiimmterface_launcher"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/wiimmterface_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.WiimmterfaceAndroid">
|
||||
android:theme="@style/Theme.WiimmfiWatcher">
|
||||
<activity android:name=".MainActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
@ -19,6 +19,6 @@
|
|||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".wiimmfi.WiimmfiActivity"/>
|
||||
</application>
|
||||
</application>
|
||||
|
||||
</manifest>
|
|
@ -1,18 +1,12 @@
|
|||
package com.example.wiimmterfaceandroid;
|
||||
package me.brysonsteck.wiimmfiwatcher;
|
||||
|
||||
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.fragment.app.FragmentContainerView;
|
||||
import androidx.room.Room;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.example.wiimmterfaceandroid.database.AppDatabase;
|
||||
import com.example.wiimmterfaceandroid.model.FriendCode;
|
||||
|
||||
import java.util.List;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import me.brysonsteck.wiimmfiwatcher.database.AppDatabase;
|
||||
import me.brysonsteck.wiimmfiwatcher.model.FriendCode;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
ObservableArrayList<FriendCode> recentFCList = new ObservableArrayList<>();
|
|
@ -1,20 +1,20 @@
|
|||
package com.example.wiimmterfaceandroid;
|
||||
package me.brysonsteck.wiimmfiwatcher;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.wiimmterfaceandroid.model.FriendCode;
|
||||
import com.example.wiimmterfaceandroid.wiimmfi.WiimmfiActivity;
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
|
||||
import me.brysonsteck.wiimmfiwatcher.model.FriendCode;
|
||||
import me.brysonsteck.wiimmfiwatcher.wiimmfi.WiimmfiActivity;
|
||||
|
||||
public class WatchCodeAdapter extends RecyclerView.Adapter<WatchCodeAdapter.ViewHolder>{
|
||||
ObservableArrayList<FriendCode> entries;
|
||||
OnFriendCodeClicked listener;
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.wiimmterfaceandroid;
|
||||
package me.brysonsteck.wiimmfiwatcher;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
@ -14,11 +14,12 @@ import androidx.lifecycle.ViewModelProvider;
|
|||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.wiimmterfaceandroid.model.FriendCode;
|
||||
import com.example.wiimmterfaceandroid.viewmodel.FriendCodeViewModel;
|
||||
import com.example.wiimmterfaceandroid.wiimmfi.WiimmfiActivity;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
import me.brysonsteck.wiimmfiwatcher.model.FriendCode;
|
||||
import me.brysonsteck.wiimmfiwatcher.viewmodel.FriendCodeViewModel;
|
||||
import me.brysonsteck.wiimmfiwatcher.wiimmfi.WiimmfiActivity;
|
||||
|
||||
public class WatchCodeFragment extends Fragment {
|
||||
|
||||
public WatchCodeFragment() {
|
|
@ -1,9 +1,9 @@
|
|||
package com.example.wiimmterfaceandroid.database;
|
||||
package me.brysonsteck.wiimmfiwatcher.database;
|
||||
|
||||
import androidx.room.Database;
|
||||
import androidx.room.RoomDatabase;
|
||||
|
||||
import com.example.wiimmterfaceandroid.model.FriendCode;
|
||||
import me.brysonsteck.wiimmfiwatcher.model.FriendCode;
|
||||
|
||||
@Database(entities = {FriendCode.class}, version=1)
|
||||
public abstract class AppDatabase extends RoomDatabase {
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.wiimmterfaceandroid.database;
|
||||
package me.brysonsteck.wiimmfiwatcher.database;
|
||||
|
||||
import androidx.room.Dao;
|
||||
import androidx.room.Delete;
|
||||
|
@ -6,10 +6,10 @@ import androidx.room.Insert;
|
|||
import androidx.room.Query;
|
||||
import androidx.room.Update;
|
||||
|
||||
import com.example.wiimmterfaceandroid.model.FriendCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import me.brysonsteck.wiimmfiwatcher.model.FriendCode;
|
||||
|
||||
@Dao
|
||||
public interface FriendCodeDao {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.wiimmterfaceandroid.model;
|
||||
package me.brysonsteck.wiimmfiwatcher.model;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.room.ColumnInfo;
|
|
@ -1,23 +1,14 @@
|
|||
package com.example.wiimmterfaceandroid.viewmodel;
|
||||
package me.brysonsteck.wiimmfiwatcher.viewmodel;
|
||||
|
||||
import android.app.Application;
|
||||
|
||||
import androidx.lifecycle.AndroidViewModel;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import com.example.wiimmterfaceandroid.database.AppDatabase;
|
||||
import com.example.wiimmterfaceandroid.model.FriendCode;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.lifecycle.AndroidViewModel;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
import androidx.room.Room;
|
||||
import androidx.room.RoomDatabase;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
|
||||
import java.util.LinkedHashSet;
|
||||
import me.brysonsteck.wiimmfiwatcher.database.AppDatabase;
|
||||
import me.brysonsteck.wiimmfiwatcher.model.FriendCode;
|
||||
|
||||
public class FriendCodeViewModel extends AndroidViewModel {
|
||||
ObservableArrayList<FriendCode> entries = new ObservableArrayList<>();
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.wiimmterfaceandroid.wiimmfi;
|
||||
package me.brysonsteck.wiimmfiwatcher.wiimmfi;
|
||||
|
||||
public class Player {
|
||||
String rosterNumber;
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.wiimmterfaceandroid.wiimmfi;
|
||||
package me.brysonsteck.wiimmfiwatcher.wiimmfi;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.graphics.Color;
|
||||
|
@ -6,21 +6,18 @@ import android.view.LayoutInflater;
|
|||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
import org.jsoup.*;
|
||||
import org.jsoup.nodes.Document;
|
||||
import org.jsoup.nodes.Element;
|
||||
import org.jsoup.select.Elements;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.wiimmterfaceandroid.R;
|
||||
import com.google.android.material.card.MaterialCardView;
|
||||
import com.google.android.material.color.MaterialColors;
|
||||
|
||||
import java.io.IOException;
|
||||
import org.jsoup.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import me.brysonsteck.wiimmfiwatcher.R;
|
||||
|
||||
public class RoomAdapter extends RecyclerView.Adapter<RoomAdapter.ViewHolder>{
|
||||
|
||||
String display;
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.wiimmterfaceandroid.wiimmfi;
|
||||
package me.brysonsteck.wiimmfiwatcher.wiimmfi;
|
||||
|
||||
import org.jsoup.Jsoup;
|
||||
import org.jsoup.nodes.Document;
|
||||
|
@ -24,7 +24,9 @@ public class RoomData {
|
|||
} else {
|
||||
|
||||
try {
|
||||
doc = Jsoup.connect("https://wiimmfi.de/" + this.playerLink).get();
|
||||
doc = Jsoup.connect("https://wiimmfi.de/" + this.playerLink)
|
||||
.userAgent("Wiimmfi Watcher for Android (https://github.com/brysonsteck/wiimmfi-watcher) (UNDER DEVELOPMENT)")
|
||||
.get();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -91,7 +93,9 @@ public class RoomData {
|
|||
try {
|
||||
Document doc = null;
|
||||
|
||||
doc = Jsoup.connect("https://wiimmfi.de/stats/mkw").get();
|
||||
doc = Jsoup.connect("https://wiimmfi.de/stats/mkw")
|
||||
.userAgent("Wiimmfi Watcher for Android (https://github.com/brysonsteck/wiimmfi-watcher) (UNDER DEVELOPMENT)")
|
||||
.get();
|
||||
Element table = doc.select("table").get(0);
|
||||
Elements rows = table.select("tr");
|
||||
|
||||
|
@ -126,8 +130,7 @@ public class RoomData {
|
|||
public RoomData refresh() {
|
||||
players.clear();
|
||||
roomHeader = "";
|
||||
RoomData returningData = new RoomData(players, playerLink, friendCode);
|
||||
return returningData;
|
||||
return new RoomData(players, playerLink, friendCode);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.wiimmterfaceandroid.wiimmfi;
|
||||
package me.brysonsteck.wiimmfiwatcher.wiimmfi;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
@ -10,11 +10,12 @@ import androidx.fragment.app.Fragment;
|
|||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.wiimmterfaceandroid.R;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import me.brysonsteck.wiimmfiwatcher.R;
|
||||
|
||||
public class RoomFragment extends Fragment {
|
||||
String display;
|
||||
String header;
|
|
@ -1,27 +1,21 @@
|
|||
package com.example.wiimmterfaceandroid.wiimmfi;
|
||||
package me.brysonsteck.wiimmfiwatcher.wiimmfi;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.os.StrictMode;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.jsoup.*;
|
||||
import org.jsoup.nodes.Document;
|
||||
import org.jsoup.nodes.Element;
|
||||
import org.jsoup.select.Elements;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import androidx.room.Room;
|
||||
|
||||
import com.example.wiimmterfaceandroid.R;
|
||||
import com.google.android.material.appbar.MaterialToolbar;
|
||||
import com.google.android.material.navigation.NavigationView;
|
||||
|
||||
import java.io.IOException;
|
||||
import org.jsoup.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import me.brysonsteck.wiimmfiwatcher.R;
|
||||
|
||||
public class WiimmfiActivity extends AppCompatActivity {
|
||||
ArrayList<Player> players = new ArrayList<>();
|
||||
final String[] playerLink = new String[1];
|
|
@ -1,6 +1,6 @@
|
|||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.WiimmterfaceAndroid" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<style name="Theme.WiimmfiWatcher" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_200</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.WiimmterfaceAndroid" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<style name="Theme.WiimmfiWatcher" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">#1E88E5</item>
|
||||
<item name="colorPrimaryVariant">#0D47A1</item>
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 324 KiB |
|
@ -1,4 +1,4 @@
|
|||
package com.example.wiimmterfaceandroid;
|
||||
package me.brysonsteck.wiimmfiwatcher;
|
||||
|
||||
import org.junit.Test;
|
||||
|
|
@ -5,7 +5,7 @@ buildscript {
|
|||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath "com.android.tools.build:gradle:4.1.2"
|
||||
classpath "com.android.tools.build:gradle:4.1.3"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,4 +1,4 @@
|
|||
#Wed Apr 14 23:20:43 MDT 2021
|
||||
#Sat May 08 14:23:18 MDT 2021
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
include ':app'
|
||||
rootProject.name = "Wiimmterface Android"
|
||||
rootProject.name = "Wiimmfi Watcher"
|
Reference in a new issue