├── app
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── drawable-hdpi
│ │ │ │ ├── add.png
│ │ │ │ ├── here.png
│ │ │ │ ├── amiibo.png
│ │ │ │ ├── website.png
│ │ │ │ ├── amiibo_icon.png
│ │ │ │ ├── github_mark.png
│ │ │ │ ├── google_drive_icon.png
│ │ │ │ ├── icon_0000000000000002.png
│ │ │ │ ├── icon_0000000000340102.png
│ │ │ │ ├── icon_00000000003c0102.png
│ │ │ │ ├── icon_00000000003d0102.png
│ │ │ │ ├── icon_0000010000190002.png
│ │ │ │ ├── icon_00010000000c0002.png
│ │ │ │ ├── icon_0001000000350102.png
│ │ │ │ ├── icon_0002000000010002.png
│ │ │ │ ├── icon_0002000000360102.png
│ │ │ │ ├── icon_0003000000020002.png
│ │ │ │ ├── icon_0003000000370102.png
│ │ │ │ ├── icon_0003010200410302.png
│ │ │ │ ├── icon_0003010200420302.png
│ │ │ │ ├── icon_0003010200430302.png
│ │ │ │ ├── icon_0004010000130002.png
│ │ │ │ ├── icon_0005000000140002.png
│ │ │ │ ├── icon_0005000000390102.png
│ │ │ │ ├── icon_0006000000150002.png
│ │ │ │ ├── icon_00070000001a0002.png
│ │ │ │ ├── icon_0008000000030002.png
│ │ │ │ ├── icon_00090000000d0002.png
│ │ │ │ ├── icon_000a000000380102.png
│ │ │ │ ├── icon_0100000000040002.png
│ │ │ │ ├── icon_0100010000160002.png
│ │ │ │ ├── icon_01010000000e0002.png
│ │ │ │ ├── icon_0101010000170002.png
│ │ │ │ ├── icon_01020100001b0002.png
│ │ │ │ ├── icon_0180000000080002.png
│ │ │ │ ├── icon_0181000100440502.png
│ │ │ │ ├── icon_0182010100460502.png
│ │ │ │ ├── icon_0183000100450502.png
│ │ │ │ ├── icon_01850001004b0502.png
│ │ │ │ ├── icon_0187000100470502.png
│ │ │ │ ├── icon_018c0001004c0502.png
│ │ │ │ ├── icon_018e000100490502.png
│ │ │ │ ├── icon_01910001004e0502.png
│ │ │ │ ├── icon_0196000100480502.png
│ │ │ │ ├── icon_01a30001004a0502.png
│ │ │ │ ├── icon_01a40001004d0502.png
│ │ │ │ ├── icon_01a6000100500502.png
│ │ │ │ ├── icon_01a80001004f0502.png
│ │ │ │ ├── icon_01aa000100530502.png
│ │ │ │ ├── icon_01b0000100520502.png
│ │ │ │ ├── icon_01b5000100510502.png
│ │ │ │ ├── icon_01c1000100540502.png
│ │ │ │ ├── icon_0200000100a10502.png
│ │ │ │ ├── icon_0208000100960502.png
│ │ │ │ ├── icon_0216000100570502.png
│ │ │ │ ├── icon_02190001007e0502.png
│ │ │ │ ├── icon_021b000100800502.png
│ │ │ │ ├── icon_02310001006a0502.png
│ │ │ │ ├── icon_0235000100840502.png
│ │ │ │ ├── icon_024f000100810502.png
│ │ │ │ ├── icon_025d000100550502.png
│ │ │ │ ├── icon_0261000100650502.png
│ │ │ │ ├── icon_0263000100750502.png
│ │ │ │ ├── icon_0266000100680502.png
│ │ │ │ ├── icon_02680001007d0502.png
│ │ │ │ ├── icon_027d000100630502.png
│ │ │ │ ├── icon_0280000100830502.png
│ │ │ │ ├── icon_02870001005a0502.png
│ │ │ │ ├── icon_0299000100950502.png
│ │ │ │ ├── icon_02a4000100720502.png
│ │ │ │ ├── icon_02b1000100690502.png
│ │ │ │ ├── icon_02c4000100670502.png
│ │ │ │ ├── icon_02d6000100560502.png
│ │ │ │ ├── icon_02db0001005e0502.png
│ │ │ │ ├── icon_02de0001009c0502.png
│ │ │ │ ├── icon_02ef000100580502.png
│ │ │ │ ├── icon_02f0000100a70502.png
│ │ │ │ ├── icon_02fa000100970502.png
│ │ │ │ ├── icon_02fb000100900502.png
│ │ │ │ ├── icon_0307000100640502.png
│ │ │ │ ├── icon_030b000100790502.png
│ │ │ │ ├── icon_0317000100a60502.png
│ │ │ │ ├── icon_03180001006c0502.png
│ │ │ │ ├── icon_0323000100760502.png
│ │ │ │ ├── icon_03290001009d0502.png
│ │ │ │ ├── icon_033f0001008f0502.png
│ │ │ │ ├── icon_03450001005f0502.png
│ │ │ │ ├── icon_03480001006b0502.png
│ │ │ │ ├── icon_034b0001009f0502.png
│ │ │ │ ├── icon_035a000100850502.png
│ │ │ │ ├── icon_03710001005c0502.png
│ │ │ │ ├── icon_03830001009b0502.png
│ │ │ │ ├── icon_0384000100860502.png
│ │ │ │ ├── icon_0393000100a00502.png
│ │ │ │ ├── icon_0394000100890502.png
│ │ │ │ ├── icon_03a8000100910502.png
│ │ │ │ ├── icon_03a9000100710502.png
│ │ │ │ ├── icon_03ae000100870502.png
│ │ │ │ ├── icon_03bc0001008a0502.png
│ │ │ │ ├── icon_03c6000100930502.png
│ │ │ │ ├── icon_03db0001006d0502.png
│ │ │ │ ├── icon_03ee0001008b0502.png
│ │ │ │ ├── icon_04000001006f0502.png
│ │ │ │ ├── icon_0401000100660502.png
│ │ │ │ ├── icon_040d000100780502.png
│ │ │ │ ├── icon_040e000100880502.png
│ │ │ │ ├── icon_04100001007f0502.png
│ │ │ │ ├── icon_0429000100700502.png
│ │ │ │ ├── icon_043d0001007c0502.png
│ │ │ │ ├── icon_044c0001008e0502.png
│ │ │ │ ├── icon_0452000100730502.png
│ │ │ │ ├── icon_0460000100a50502.png
│ │ │ │ ├── icon_04650001006e0502.png
│ │ │ │ ├── icon_046c0001008c0502.png
│ │ │ │ ├── icon_0479000100920502.png
│ │ │ │ ├── icon_047a000100600502.png
│ │ │ │ ├── icon_04800001008d0502.png
│ │ │ │ ├── icon_0488000100980502.png
│ │ │ │ ├── icon_04940001009a0502.png
│ │ │ │ ├── icon_04970001007a0502.png
│ │ │ │ ├── icon_049b000100610502.png
│ │ │ │ ├── icon_04a5000100740502.png
│ │ │ │ ├── icon_04a6000100a30502.png
│ │ │ │ ├── icon_04ba0001005d0502.png
│ │ │ │ ├── icon_04c7000100940502.png
│ │ │ │ ├── icon_04cc000100a40502.png
│ │ │ │ ├── icon_04d10001009e0502.png
│ │ │ │ ├── icon_04dd000100a20502.png
│ │ │ │ ├── icon_04e6000100820502.png
│ │ │ │ ├── icon_04ec000100770502.png
│ │ │ │ ├── icon_04ed000100620502.png
│ │ │ │ ├── icon_04fd0001007b0502.png
│ │ │ │ ├── icon_04fe000100590502.png
│ │ │ │ ├── icon_050b000100990502.png
│ │ │ │ ├── icon_05150001005b0502.png
│ │ │ │ ├── icon_0580000000050002.png
│ │ │ │ ├── icon_0581000000000002.png
│ │ │ │ ├── icon_05c0000000060002.png
│ │ │ │ ├── icon_05c00100001d0002.png
│ │ │ │ ├── icon_0600000000120002.png
│ │ │ │ ├── icon_06400100001e0002.png
│ │ │ │ ├── icon_06c00000000f0002.png
│ │ │ │ ├── icon_0700000000070002.png
│ │ │ │ ├── icon_0740000000100002.png
│ │ │ │ ├── icon_0741000000000002.png
│ │ │ │ ├── icon_07420000001f0002.png
│ │ │ │ ├── icon_0780000000000002.png
│ │ │ │ ├── icon_0781000000000002.png
│ │ │ │ ├── icon_0782000000000002.png
│ │ │ │ ├── icon_08000100003e0402.png
│ │ │ │ ├── icon_08000200003f0402.png
│ │ │ │ ├── icon_0800030000400402.png
│ │ │ │ ├── icon_1906000000240002.png
│ │ │ │ ├── icon_1919000000090002.png
│ │ │ │ ├── icon_1927000000260002.png
│ │ │ │ ├── icon_1b92000000250002.png
│ │ │ │ ├── icon_1f000000000a0002.png
│ │ │ │ ├── icon_1f01000000270002.png
│ │ │ │ ├── icon_1f02000000280002.png
│ │ │ │ ├── icon_21000000000b0002.png
│ │ │ │ ├── icon_2101000000180002.png
│ │ │ │ ├── icon_2102000000290002.png
│ │ │ │ ├── icon_21030000002a0002.png
│ │ │ │ ├── icon_22400000002b0002.png
│ │ │ │ ├── icon_22800000002c0002.png
│ │ │ │ ├── icon_3200000000300002.png
│ │ │ │ ├── icon_3340000000320002.png
│ │ │ │ ├── icon_3480000000310002.png
│ │ │ │ ├── ic_navigation_menu_dark.png
│ │ │ │ ├── ic_navigation_menu_light.png
│ │ │ │ └── twitter_circle_black_512.png
│ │ │ ├── drawable-ldpi
│ │ │ │ ├── here.png
│ │ │ │ ├── amiibo.png
│ │ │ │ ├── amiibo_icon.png
│ │ │ │ ├── github_mark.png
│ │ │ │ └── google_drive_icon.png
│ │ │ ├── drawable-mdpi
│ │ │ │ ├── add.png
│ │ │ │ ├── here.png
│ │ │ │ ├── amiibo.png
│ │ │ │ ├── website.png
│ │ │ │ ├── amiibo_icon.png
│ │ │ │ ├── github_mark.png
│ │ │ │ ├── google_drive_icon.png
│ │ │ │ ├── ic_navigation_menu_dark.png
│ │ │ │ ├── ic_navigation_menu_light.png
│ │ │ │ └── twitter_circle_black_512.png
│ │ │ ├── drawable-xhdpi
│ │ │ │ ├── add.png
│ │ │ │ ├── amiibo.png
│ │ │ │ ├── here.png
│ │ │ │ ├── website.png
│ │ │ │ ├── amiibo_icon.png
│ │ │ │ ├── github_mark.png
│ │ │ │ ├── google_drive_icon.png
│ │ │ │ ├── ic_navigation_menu_dark.png
│ │ │ │ ├── ic_navigation_menu_light.png
│ │ │ │ └── twitter_circle_black_512.png
│ │ │ ├── drawable-xxhdpi
│ │ │ │ ├── add.png
│ │ │ │ ├── website.png
│ │ │ │ ├── github_mark.png
│ │ │ │ ├── google_drive_icon.png
│ │ │ │ ├── ic_navigation_menu_dark.png
│ │ │ │ └── ic_navigation_menu_light.png
│ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── drawable-tvdpi
│ │ │ │ ├── github_mark.png
│ │ │ │ └── google_drive_icon.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ │ ├── github_mark.png
│ │ │ │ └── google_drive_icon.png
│ │ │ ├── drawable
│ │ │ │ ├── drawer_text.xml
│ │ │ │ └── gradient_black_transparent_from_left.xml
│ │ │ ├── values-land
│ │ │ │ └── dimens.xml
│ │ │ ├── values-sw520dp-land
│ │ │ │ └── dimens.xml
│ │ │ ├── values-sw520dp-port
│ │ │ │ └── dimens.xml
│ │ │ ├── xml
│ │ │ │ └── nfc.xml
│ │ │ ├── layout
│ │ │ │ ├── empty.xml
│ │ │ │ ├── empty_content.xml
│ │ │ │ ├── toolbar.xml
│ │ │ │ ├── fab_add.xml
│ │ │ │ ├── fragment_scanned_amiibo.xml
│ │ │ │ ├── fab_write.xml
│ │ │ │ ├── fragment_amiibo_information.xml
│ │ │ │ ├── fragment_my_amibo_loading.xml
│ │ │ │ ├── fragment_drive_sync.xml
│ │ │ │ ├── fragment_my_amiibo_by_category.xml
│ │ │ │ ├── fragment_amiibo_information_page.xml
│ │ │ │ ├── fragment_my_amiibo_from_category.xml
│ │ │ │ ├── activity_main.xml
│ │ │ │ ├── fragment_dashboard.xml
│ │ │ │ ├── fragment_amiibo_information_pages_header_encrypted.xml
│ │ │ │ ├── fragment_amiibo_information_pages_header_decrypted.xml
│ │ │ │ ├── fragment_scan.xml
│ │ │ │ ├── fragment_amiibo_information_header.xml
│ │ │ │ ├── fragment_my_amibo_item.xml
│ │ │ │ ├── fragment_my_amibo_item_vertical.xml
│ │ │ │ ├── fragment_my_amibo_item_with_count.xml
│ │ │ │ └── fragment_menu_drawer.xml
│ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ ├── anim
│ │ │ │ └── slide_in_from_right.xml
│ │ │ ├── values
│ │ │ │ ├── styles.xml
│ │ │ │ ├── colors_deep_orange_indigo.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── colors.xml
│ │ │ │ └── strings.xml
│ │ │ └── values-fr
│ │ │ │ └── strings.xml
│ │ ├── java
│ │ │ └── eu
│ │ │ │ └── codlab
│ │ │ │ └── amiiwrite
│ │ │ │ ├── ui
│ │ │ │ ├── drive
│ │ │ │ │ └── DriveEvent.java
│ │ │ │ ├── my_list
│ │ │ │ │ ├── adapters
│ │ │ │ │ │ ├── IAmiiboListListener.java
│ │ │ │ │ │ ├── internal
│ │ │ │ │ │ │ ├── AmiiboContainer.java
│ │ │ │ │ │ │ ├── Container.java
│ │ │ │ │ │ │ ├── LoadableHolder.java
│ │ │ │ │ │ │ ├── AmiiboItem.java
│ │ │ │ │ │ │ └── AmiiboCategory.java
│ │ │ │ │ │ └── AmiiboListAdapter.java
│ │ │ │ │ ├── EventMyList.java
│ │ │ │ │ └── fragments
│ │ │ │ │ │ ├── AbstractMyAmiiboFragment.java
│ │ │ │ │ │ ├── MyAmiiboFromCategory.java
│ │ │ │ │ │ └── AbstractLoadableFragment.java
│ │ │ │ ├── _stack
│ │ │ │ │ ├── PopableFragment.java
│ │ │ │ │ └── StackController.java
│ │ │ │ ├── information
│ │ │ │ │ ├── adapters
│ │ │ │ │ │ └── internal
│ │ │ │ │ │ │ ├── BindableViewHolder.java
│ │ │ │ │ │ │ ├── PagerHeaderViewHolder.java
│ │ │ │ │ │ │ ├── PageViewHolder.java
│ │ │ │ │ │ │ └── HeaderViewHolder.java
│ │ │ │ │ └── fragments
│ │ │ │ │ │ ├── AmiiboInformationFragment.java
│ │ │ │ │ │ └── AbstractAmiiboInformationFragment.java
│ │ │ │ ├── scan
│ │ │ │ │ ├── ScanEvent.java
│ │ │ │ │ └── fragments
│ │ │ │ │ │ ├── ScanFragment.java
│ │ │ │ │ │ ├── ScanToWriteFragment.java
│ │ │ │ │ │ └── ScannedAmiiboFragment.java
│ │ │ │ ├── dashboard
│ │ │ │ │ └── DashboardFragment.java
│ │ │ │ └── drawer
│ │ │ │ │ └── MenuDrawer.java
│ │ │ │ ├── webservice
│ │ │ │ ├── models
│ │ │ │ │ ├── Apk.java
│ │ │ │ │ ├── WebsiteInformation.java
│ │ │ │ │ └── AmiiboDescriptorInformation.java
│ │ │ │ ├── IAmiiboWebsite.java
│ │ │ │ └── AmiiboWebsiteController.java
│ │ │ │ ├── events
│ │ │ │ ├── SyncResult.java
│ │ │ │ ├── AmiiboFileRead.java
│ │ │ │ └── PostRefreshAmiibos.java
│ │ │ │ ├── database
│ │ │ │ ├── models
│ │ │ │ │ ├── Database.java
│ │ │ │ │ ├── AmiiboDescriptor.java
│ │ │ │ │ └── Amiibo.java
│ │ │ │ ├── holders
│ │ │ │ │ └── AmiiboIdentifiersHolder.java
│ │ │ │ ├── migrations
│ │ │ │ │ └── Migration1.java
│ │ │ │ └── controllers
│ │ │ │ │ ├── AmiiboFactory.java
│ │ │ │ │ ├── AbstractCacheable.java
│ │ │ │ │ ├── AmiiboDescriptorCache.java
│ │ │ │ │ └── AmiiboCache.java
│ │ │ │ ├── amiibo
│ │ │ │ ├── Constants.java
│ │ │ │ ├── AmiiboMethods.java
│ │ │ │ ├── AmiiboHelper.java
│ │ │ │ ├── AmiiboCommands.java
│ │ │ │ └── AmiiboIO.java
│ │ │ │ ├── amiitool
│ │ │ │ └── AmiitoolFactory.java
│ │ │ │ ├── utils
│ │ │ │ ├── IO.java
│ │ │ │ └── RecyclerViewWithEmpty.java
│ │ │ │ └── sync
│ │ │ │ ├── AmiiboFile.java
│ │ │ │ └── SyncService.java
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── eu
│ │ │ └── codlab
│ │ │ └── amiiwrite
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── eu
│ │ └── codlab
│ │ └── amiiwrite
│ │ └── ApplicationTest.java
├── fabric.properties
├── proguard-rules.pro
└── build.gradle
├── settings.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitignore
├── gradle.properties
├── README.md
├── gradlew.bat
└── gradlew
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/add.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/here.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/here.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi/here.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-ldpi/here.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-mdpi/add.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/here.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-mdpi/here.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-xhdpi/add.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/amiibo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/amiibo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/website.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/website.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi/amiibo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-ldpi/amiibo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/amiibo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-mdpi/amiibo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/website.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-mdpi/website.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/amiibo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-xhdpi/amiibo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/here.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-xhdpi/here.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-xxhdpi/add.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/website.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-xhdpi/website.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/website.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-xxhdpi/website.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/amiibo_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/amiibo_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/github_mark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/github_mark.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi/amiibo_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-ldpi/amiibo_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi/github_mark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-ldpi/github_mark.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/amiibo_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-mdpi/amiibo_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/github_mark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-mdpi/github_mark.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-tvdpi/github_mark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-tvdpi/github_mark.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/amiibo_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-xhdpi/amiibo_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/github_mark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-xhdpi/github_mark.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/github_mark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-xxhdpi/github_mark.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/github_mark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-xxxhdpi/github_mark.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/google_drive_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/google_drive_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi/google_drive_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-ldpi/google_drive_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/google_drive_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-mdpi/google_drive_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-tvdpi/google_drive_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-tvdpi/google_drive_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/google_drive_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-xhdpi/google_drive_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/google_drive_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-xxhdpi/google_drive_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0000000000000002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0000000000000002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0000000000340102.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0000000000340102.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_00000000003c0102.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_00000000003c0102.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_00000000003d0102.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_00000000003d0102.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0000010000190002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0000010000190002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_00010000000c0002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_00010000000c0002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0001000000350102.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0001000000350102.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0002000000010002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0002000000010002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0002000000360102.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0002000000360102.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0003000000020002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0003000000020002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0003000000370102.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0003000000370102.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0003010200410302.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0003010200410302.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0003010200420302.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0003010200420302.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0003010200430302.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0003010200430302.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0004010000130002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0004010000130002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0005000000140002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0005000000140002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0005000000390102.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0005000000390102.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0006000000150002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0006000000150002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_00070000001a0002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_00070000001a0002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0008000000030002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0008000000030002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_00090000000d0002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_00090000000d0002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_000a000000380102.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_000a000000380102.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0100000000040002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0100000000040002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0100010000160002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0100010000160002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_01010000000e0002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_01010000000e0002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0101010000170002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0101010000170002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_01020100001b0002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_01020100001b0002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0180000000080002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0180000000080002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0181000100440502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0181000100440502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0182010100460502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0182010100460502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0183000100450502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0183000100450502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_01850001004b0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_01850001004b0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0187000100470502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0187000100470502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_018c0001004c0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_018c0001004c0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_018e000100490502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_018e000100490502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_01910001004e0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_01910001004e0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0196000100480502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0196000100480502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_01a30001004a0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_01a30001004a0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_01a40001004d0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_01a40001004d0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_01a6000100500502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_01a6000100500502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_01a80001004f0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_01a80001004f0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_01aa000100530502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_01aa000100530502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_01b0000100520502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_01b0000100520502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_01b5000100510502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_01b5000100510502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_01c1000100540502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_01c1000100540502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0200000100a10502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0200000100a10502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0208000100960502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0208000100960502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0216000100570502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0216000100570502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_02190001007e0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_02190001007e0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_021b000100800502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_021b000100800502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_02310001006a0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_02310001006a0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0235000100840502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0235000100840502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_024f000100810502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_024f000100810502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_025d000100550502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_025d000100550502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0261000100650502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0261000100650502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0263000100750502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0263000100750502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0266000100680502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0266000100680502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_02680001007d0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_02680001007d0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_027d000100630502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_027d000100630502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0280000100830502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0280000100830502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_02870001005a0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_02870001005a0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0299000100950502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0299000100950502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_02a4000100720502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_02a4000100720502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_02b1000100690502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_02b1000100690502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_02c4000100670502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_02c4000100670502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_02d6000100560502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_02d6000100560502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_02db0001005e0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_02db0001005e0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_02de0001009c0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_02de0001009c0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_02ef000100580502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_02ef000100580502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_02f0000100a70502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_02f0000100a70502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_02fa000100970502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_02fa000100970502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_02fb000100900502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_02fb000100900502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0307000100640502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0307000100640502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_030b000100790502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_030b000100790502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0317000100a60502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0317000100a60502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_03180001006c0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_03180001006c0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0323000100760502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0323000100760502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_03290001009d0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_03290001009d0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_033f0001008f0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_033f0001008f0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_03450001005f0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_03450001005f0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_03480001006b0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_03480001006b0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_034b0001009f0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_034b0001009f0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_035a000100850502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_035a000100850502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_03710001005c0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_03710001005c0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_03830001009b0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_03830001009b0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0384000100860502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0384000100860502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0393000100a00502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0393000100a00502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0394000100890502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0394000100890502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_03a8000100910502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_03a8000100910502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_03a9000100710502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_03a9000100710502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_03ae000100870502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_03ae000100870502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_03bc0001008a0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_03bc0001008a0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_03c6000100930502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_03c6000100930502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_03db0001006d0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_03db0001006d0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_03ee0001008b0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_03ee0001008b0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_04000001006f0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_04000001006f0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0401000100660502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0401000100660502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_040d000100780502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_040d000100780502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_040e000100880502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_040e000100880502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_04100001007f0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_04100001007f0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0429000100700502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0429000100700502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_043d0001007c0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_043d0001007c0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_044c0001008e0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_044c0001008e0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0452000100730502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0452000100730502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0460000100a50502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0460000100a50502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_04650001006e0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_04650001006e0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_046c0001008c0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_046c0001008c0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0479000100920502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0479000100920502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_047a000100600502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_047a000100600502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_04800001008d0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_04800001008d0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0488000100980502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0488000100980502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_04940001009a0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_04940001009a0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_04970001007a0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_04970001007a0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_049b000100610502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_049b000100610502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_04a5000100740502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_04a5000100740502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_04a6000100a30502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_04a6000100a30502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_04ba0001005d0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_04ba0001005d0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_04c7000100940502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_04c7000100940502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_04cc000100a40502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_04cc000100a40502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_04d10001009e0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_04d10001009e0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_04dd000100a20502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_04dd000100a20502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_04e6000100820502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_04e6000100820502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_04ec000100770502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_04ec000100770502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_04ed000100620502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_04ed000100620502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_04fd0001007b0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_04fd0001007b0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_04fe000100590502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_04fe000100590502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_050b000100990502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_050b000100990502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_05150001005b0502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_05150001005b0502.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0580000000050002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0580000000050002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0581000000000002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0581000000000002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_05c0000000060002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_05c0000000060002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_05c00100001d0002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_05c00100001d0002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0600000000120002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0600000000120002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_06400100001e0002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_06400100001e0002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_06c00000000f0002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_06c00000000f0002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0700000000070002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0700000000070002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0740000000100002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0740000000100002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0741000000000002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0741000000000002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_07420000001f0002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_07420000001f0002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0780000000000002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0780000000000002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0781000000000002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0781000000000002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0782000000000002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0782000000000002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_08000100003e0402.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_08000100003e0402.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_08000200003f0402.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_08000200003f0402.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_0800030000400402.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_0800030000400402.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_1906000000240002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_1906000000240002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_1919000000090002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_1919000000090002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_1927000000260002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_1927000000260002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_1b92000000250002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_1b92000000250002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_1f000000000a0002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_1f000000000a0002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_1f01000000270002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_1f01000000270002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_1f02000000280002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_1f02000000280002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_21000000000b0002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_21000000000b0002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_2101000000180002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_2101000000180002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_2102000000290002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_2102000000290002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_21030000002a0002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_21030000002a0002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_22400000002b0002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_22400000002b0002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_22800000002c0002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_22800000002c0002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_3200000000300002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_3200000000300002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_3340000000320002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_3340000000320002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/icon_3480000000310002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/icon_3480000000310002.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/google_drive_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-xxxhdpi/google_drive_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_navigation_menu_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/ic_navigation_menu_dark.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_navigation_menu_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/ic_navigation_menu_light.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/twitter_circle_black_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-hdpi/twitter_circle_black_512.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_navigation_menu_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-mdpi/ic_navigation_menu_dark.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_navigation_menu_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-mdpi/ic_navigation_menu_light.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/twitter_circle_black_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-mdpi/twitter_circle_black_512.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_navigation_menu_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-xhdpi/ic_navigation_menu_dark.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_navigation_menu_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-xhdpi/ic_navigation_menu_light.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/twitter_circle_black_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-xhdpi/twitter_circle_black_512.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_navigation_menu_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-xxhdpi/ic_navigation_menu_dark.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_navigation_menu_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codlab/amiibo/HEAD/app/src/main/res/drawable-xxhdpi/ic_navigation_menu_light.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/drawer_text.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | 6
3 | 2
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-sw520dp-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | 12
3 | 4
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-sw520dp-port/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | 6
3 | 2
4 |
5 |
--------------------------------------------------------------------------------
/app/fabric.properties:
--------------------------------------------------------------------------------
1 | #Contains API Secret used to validate your application. Commit to internal source control; avoid making secret public.
2 | #Sat Nov 07 11:22:02 CET 2015
3 | apiSecret=d072664380370d35a6597413803b321346b1248a5883257d7fe5f67dbf04d0ba
4 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/nfc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | android.nfc.tech.NfcA
4 | android.nfc.tech.MifareClassic
5 | android.nfc.tech.Ultralight
6 | android.nfc.tech.NdefFormatable
7 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Apr 20 21:47:58 CEST 2016
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
7 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/drive/DriveEvent.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.drive;
2 |
3 | /**
4 | * Created by kevinleperf on 31/10/2015.
5 | */
6 | public class DriveEvent {
7 | private DriveEvent() {
8 |
9 | }
10 |
11 | public static class StartFragment {
12 |
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/webservice/models/Apk.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.webservice.models;
2 |
3 | /**
4 | * Describe the available apk from the website
5 | *
6 | * Created by kevinleperf on 01/11/2015.
7 | */
8 | public class Apk {
9 | public long version;
10 |
11 | public String url;
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/events/SyncResult.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.events;
2 |
3 | /**
4 | * Created by kevinleperf on 03/11/2015.
5 | */
6 | public class SyncResult {
7 | public boolean finished;
8 |
9 | public SyncResult(boolean finished) {
10 | this.finished = finished;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/my_list/adapters/IAmiiboListListener.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.my_list.adapters;
2 |
3 | import eu.codlab.amiiwrite.ui.my_list.adapters.internal.Container;
4 |
5 | /**
6 | * Created by kevinleperf on 01/11/2015.
7 | */
8 | public interface IAmiiboListListener {
9 | void onClick(Container item);
10 | }
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/gradient_black_transparent_from_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/empty.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/my_list/adapters/internal/AmiiboContainer.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.my_list.adapters.internal;
2 |
3 | /**
4 | * Created by kevinleperf on 01/11/2015.
5 | */
6 | public class AmiiboContainer extends Container {
7 | public AmiiboContainer(String identifier, String name, long id) {
8 | super(identifier, name, id);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/_stack/PopableFragment.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui._stack;
2 |
3 | import android.support.v4.app.Fragment;
4 |
5 | /**
6 | * Created by kevinleperf on 01/01/16.
7 | */
8 | public abstract class PopableFragment extends Fragment {
9 |
10 | public abstract boolean hasParent();
11 |
12 | public abstract boolean managedOnBackPressed();
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/database/models/Database.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.database.models;
2 |
3 | /**
4 | * Created by kevinleperf on 31/10/2015.
5 | */
6 | @com.raizlabs.android.dbflow.annotation.Database(version = Database.VERSION, name = Database.NAME)
7 | public class Database {
8 | public final static int VERSION = 4;
9 | public final static String NAME = "amiibos";
10 | }
11 |
--------------------------------------------------------------------------------
/app/src/test/java/eu/codlab/amiiwrite/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_in_from_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 |
15 | # Gradle files
16 | .gradle/
17 | build/
18 | /*/build/
19 |
20 | # Local configuration file (sdk path, etc)
21 | local.properties
22 |
23 | # Proguard folder generated by Eclipse
24 | proguard/
25 |
26 | # Log Files
27 | *.log
28 |
29 | gradle.properties
30 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/eu/codlab/amiiwrite/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/webservice/models/WebsiteInformation.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.webservice.models;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * Describe all the relevant information from the server
7 | *
8 | * Created by kevinleperf on 01/11/2015.
9 | */
10 | public class WebsiteInformation {
11 | public long revision;
12 |
13 | public List amiibos;
14 |
15 | public Apk apk;
16 | }
17 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/events/AmiiboFileRead.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.events;
2 |
3 | import eu.codlab.amiiwrite.sync.AmiiboFile;
4 |
5 | /**
6 | * Created by kevinleperf on 07/11/2015.
7 | */
8 | public class AmiiboFileRead {
9 | public AmiiboFile amiibos_file;
10 | public long last_file;
11 |
12 | public AmiiboFileRead(AmiiboFile amiibos_file, long last_file) {
13 | this.amiibos_file = amiibos_file;
14 | this.last_file = last_file;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors_deep_orange_indigo.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FF5722
4 | #E64A19
5 | #FFCCBC
6 | #536DFE
7 | #212121
8 | #727272
9 | #FFFFFF
10 | #B6B6B6
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/webservice/IAmiiboWebsite.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.webservice;
2 |
3 | import eu.codlab.amiiwrite.webservice.models.WebsiteInformation;
4 | import retrofit.Call;
5 | import retrofit.http.GET;
6 |
7 | /**
8 | * Describe where are the relevant information for the webservice
9 | *
10 | * Created by kevinleperf on 01/11/2015.
11 | */
12 | public interface IAmiiboWebsite {
13 |
14 | @GET("/amiibos")
15 | Call retrieveInformations();
16 | }
17 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/amiibo/Constants.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.amiibo;
2 |
3 | /**
4 | * Created by kevinleperf on 30/10/2015.
5 | */
6 | public class Constants {
7 | public static final int LAST_READABLE_PAGE = 129;
8 | public static final int MAX_READABLE_PAGES = 130;
9 | public static final byte COMMAND_READ = 0x30;
10 | public static final byte COMMAND_WRITE = (byte) 0xA2;
11 | public static final int AMIIBO_IDENTIFIER_PAGE_1 = 21;
12 | public static final int AMIIBO_IDENTIFIER_PAGE_2 = 21;
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/my_list/adapters/internal/Container.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.my_list.adapters.internal;
2 |
3 | import android.util.Log;
4 |
5 | /**
6 | * Created by kevinleperf on 01/11/2015.
7 | */
8 | public class Container {
9 | public String name;
10 | public String identifier;
11 | public long data;
12 |
13 | public Container(String identifier, String name, long data) {
14 | this.name = name;
15 | this.identifier = identifier;
16 | this.data = data;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/empty_content.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/toolbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fab_add.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 8dp
6 | 36sp
7 | 64dp
8 | 70dp
9 | 16dp
10 |
11 | 3
12 | 1
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/events/PostRefreshAmiibos.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.events;
2 |
3 | import android.support.annotation.NonNull;
4 | import android.support.annotation.Nullable;
5 |
6 | import java.util.List;
7 |
8 | import eu.codlab.amiiwrite.webservice.models.AmiiboDescriptorInformation;
9 |
10 | /**
11 | * Created by kevinleperf on 03/11/2015.
12 | */
13 | public class PostRefreshAmiibos {
14 | @Nullable
15 | public List amiibos;
16 |
17 | public PostRefreshAmiibos(@Nullable List amiibos) {
18 | this.amiibos = amiibos;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_scanned_amiibo.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fab_write.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_amiibo_information.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_my_amibo_loading.xml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
15 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/database/holders/AmiiboIdentifiersHolder.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.database.holders;
2 |
3 | import android.support.annotation.NonNull;
4 |
5 | /**
6 | * Created by kevinleperf on 31/12/15.
7 | */
8 | public class AmiiboIdentifiersHolder {
9 | public String identifier;
10 | public String name;
11 | public long count;
12 |
13 | public AmiiboIdentifiersHolder(@NonNull String identifier,
14 | @NonNull String name,
15 | long count) {
16 | this.identifier = identifier;
17 | this.count = count;
18 | this.name = name;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/my_list/adapters/internal/LoadableHolder.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.my_list.adapters.internal;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 | import android.view.View;
5 |
6 | import eu.codlab.amiiwrite.ui.my_list.adapters.AmiiboListAdapter;
7 | import eu.codlab.recyclercolumnadaptable.adapter.ColumnItemHolder;
8 |
9 | /**
10 | * Created by kevinleperf on 01/11/2015.
11 | */
12 | public class LoadableHolder extends ColumnItemHolder {
13 | public LoadableHolder(View itemView) {
14 | super(itemView);
15 | }
16 |
17 | public void onBindViewHolder(AmiiboListAdapter parent, int position) {
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/information/adapters/internal/BindableViewHolder.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.information.adapters.internal;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 | import android.view.View;
5 |
6 | import eu.codlab.amiiwrite.ui.information.adapters.AmiiboAdapter;
7 |
8 | /**
9 | * Created by kevinleperf on 01/11/2015.
10 | */
11 | public abstract class BindableViewHolder extends RecyclerView.ViewHolder {
12 |
13 | public abstract void onBindViewHolder(AmiiboAdapter amiiboAdapter, int position);
14 |
15 | public abstract int getDelta();
16 |
17 | public BindableViewHolder(View itemView) {
18 | super(itemView);
19 | }
20 | }
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/scan/ScanEvent.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.scan;
2 |
3 | /**
4 | * Created by kevinleperf on 31/10/2015.
5 | */
6 | public class ScanEvent {
7 | private ScanEvent() {
8 |
9 | }
10 |
11 | public static class StartFragment {
12 |
13 | }
14 |
15 | public static class AmiiboToSave {
16 | public byte[] data;
17 |
18 | public AmiiboToSave(byte[] data) {
19 | this.data = data;
20 | }
21 | }
22 |
23 | public static class StartWriteFragment {
24 | public long id;
25 |
26 | public StartWriteFragment(long id) {
27 | this.id = id;
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/information/adapters/internal/PagerHeaderViewHolder.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.information.adapters.internal;
2 |
3 | import android.view.View;
4 |
5 | import eu.codlab.amiiwrite.ui.information.adapters.AmiiboAdapter;
6 |
7 | /**
8 | * Created by kevinleperf on 01/11/2015.
9 | */
10 | public class PagerHeaderViewHolder extends BindableViewHolder {
11 |
12 | @Override
13 | public void onBindViewHolder(AmiiboAdapter amiiboAdapter, int position) {
14 |
15 | }
16 |
17 | @Override
18 | public int getDelta() {
19 | return 0;
20 | }
21 |
22 | public PagerHeaderViewHolder(View itemView) {
23 | super(itemView);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | @color/primary
4 | @color/primary_dark
5 | @color/primary_light
6 | @color/primary_text
7 | @color/accent
8 | @android:color/black
9 | #66000000
10 | @android:color/white
11 | #e7e7e7
12 | #ff2e2e
13 | #00000000
14 |
15 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/kevinleperf/android_sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/database/models/AmiiboDescriptor.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.database.models;
2 |
3 | import com.raizlabs.android.dbflow.annotation.Column;
4 | import com.raizlabs.android.dbflow.annotation.PrimaryKey;
5 | import com.raizlabs.android.dbflow.annotation.Table;
6 | import com.raizlabs.android.dbflow.data.Blob;
7 | import com.raizlabs.android.dbflow.structure.BaseModel;
8 |
9 | /**
10 | * Created by kevinleperf on 01/11/2015.
11 | */
12 | @Table(databaseName = Database.NAME)
13 | public class AmiiboDescriptor extends BaseModel {
14 | @Column
15 | @PrimaryKey(autoincrement = true)
16 | public long id;
17 |
18 | @Column
19 | public String name;
20 |
21 | @Column
22 | public String amiibo_identifier;
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/my_list/adapters/internal/AmiiboItem.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.my_list.adapters.internal;
2 |
3 | import android.view.View;
4 |
5 | import eu.codlab.amiiwrite.ui.my_list.adapters.AmiiboListAdapter;
6 |
7 | /**
8 | * Created by kevinleperf on 01/11/2015.
9 | */
10 | public class AmiiboItem extends AmiiboCategory {
11 | public AmiiboItem(View itemView) {
12 | super(itemView);
13 | }
14 |
15 | @Override
16 | protected void updateHeaderFooter(AmiiboListAdapter parent, int position) {
17 | boolean is_last = position + 1 >= parent.getItemCount();
18 |
19 | header.setVisibility(position == 0 ? View.VISIBLE : View.GONE);
20 | footer.setVisibility(is_last ? View.VISIBLE : View.GONE);
21 |
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_drive_sync.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
14 |
15 |
22 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/webservice/models/AmiiboDescriptorInformation.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.webservice.models;
2 |
3 | import eu.codlab.amiiwrite.database.models.AmiiboDescriptor;
4 |
5 | /**
6 | * Describe a simple amiibo information obtained from the server
7 | *
8 | * Created by kevinleperf on 01/11/2015.
9 | */
10 | public class AmiiboDescriptorInformation {
11 | /**
12 | * The human-readable name of the amiibo
13 | */
14 | public String name;
15 |
16 | /**
17 | * The unique amiibo identifier obtained from there page 22/23
18 | */
19 | public String identifier;
20 |
21 | public AmiiboDescriptor asAmiiboDescriptor() {
22 | AmiiboDescriptor descriptor = new AmiiboDescriptor();
23 | descriptor.name = name;
24 | descriptor.amiibo_identifier = identifier;
25 | return descriptor;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/database/migrations/Migration1.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.database.migrations;
2 |
3 | import com.raizlabs.android.dbflow.annotation.Migration;
4 | import com.raizlabs.android.dbflow.sql.migration.AlterTableMigration;
5 |
6 | import eu.codlab.amiiwrite.database.models.Amiibo;
7 | import eu.codlab.amiiwrite.database.models.Database;
8 | import hugo.weaving.DebugLog;
9 |
10 | /**
11 | * Created by kevinleperf on 07/11/2015.
12 | */
13 | @Migration(version = 4, databaseName = Database.NAME)
14 | public class Migration1 extends AlterTableMigration {
15 |
16 | public Migration1() {
17 | super(Amiibo.class);
18 | }
19 |
20 | @DebugLog
21 | @Override
22 | public void onPreMigrate() {
23 | // Simple ALTER TABLE migration wraps the statements into a nice builder notation
24 | addColumn(boolean.class, "synced");
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_my_amiibo_by_category.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
16 |
17 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/my_list/EventMyList.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.my_list;
2 |
3 | /**
4 | * Created by kevinleperf on 01/11/2015.
5 | */
6 | public class EventMyList {
7 |
8 | private EventMyList() {
9 |
10 | }
11 |
12 | public static class EventLoadCategories {
13 |
14 | }
15 |
16 | public static class EventLoadAmiibos {
17 | public String identifier;
18 |
19 | public EventLoadAmiibos(String identifier) {
20 | this.identifier = identifier;
21 | }
22 | }
23 |
24 | public static class EventLoadAmiibo {
25 | public long id;
26 |
27 | public EventLoadAmiibo(long id) {
28 | this.id = id;
29 | }
30 | }
31 |
32 | public static class EventFetch {
33 | public String class_name;
34 |
35 | private EventFetch() {
36 |
37 | }
38 |
39 | public EventFetch(String class_name) {
40 | this.class_name = class_name;
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_amiibo_information_page.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
16 |
17 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_my_amiibo_from_category.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
12 |
13 |
14 |
15 |
19 |
20 |
21 |
22 |
26 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 | org.gradle.parallel=true
20 | org.gradle.daemon=true
21 |
22 | KEYSTORE=
23 | STORE_PASSWORD=
24 | STORE_KEY_ALIAS=
25 | STORE_KEY_ALIAS_PASSWORD=
26 |
27 | VERSION_CODE=1
28 | VERSION_NAME=1.0
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
17 |
18 |
22 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_dashboard.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
11 |
12 |
16 |
17 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/information/adapters/internal/PageViewHolder.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.information.adapters.internal;
2 |
3 | import android.view.View;
4 | import android.widget.TextView;
5 |
6 | import butterknife.Bind;
7 | import butterknife.ButterKnife;
8 | import eu.codlab.amiiwrite.R;
9 | import eu.codlab.amiiwrite.ui.information.adapters.AmiiboAdapter;
10 | import eu.codlab.amiiwrite.utils.IO;
11 |
12 | /**
13 | * Created by kevinleperf on 01/11/2015.
14 | */
15 | public class PageViewHolder extends BindableViewHolder {
16 | @Bind(R.id.header)
17 | public View header;
18 |
19 | @Bind(R.id.data)
20 | public TextView data;
21 |
22 | @Override
23 | public void onBindViewHolder(AmiiboAdapter amiiboAdapter, int position) {
24 | if (position == 0) header.setVisibility(View.VISIBLE);
25 | else header.setVisibility(View.GONE);
26 |
27 | byte[] bytes = amiiboAdapter.getObject(getItemViewType(), position);
28 | data.setText(IO.byteArrayToLoggableHexString(bytes));
29 | }
30 |
31 | @Override
32 | public int getDelta() {
33 | return 0;
34 | }
35 |
36 | public PageViewHolder(View itemView) {
37 | super(itemView);
38 |
39 | ButterKnife.bind(this, itemView);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_amiibo_information_pages_header_encrypted.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
14 |
15 |
19 |
20 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_amiibo_information_pages_header_decrypted.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
14 |
15 |
19 |
20 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/database/controllers/AmiiboFactory.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.database.controllers;
2 |
3 | import android.database.Cursor;
4 | import android.support.annotation.NonNull;
5 | import android.support.v4.util.LruCache;
6 | import android.util.Log;
7 |
8 | import com.raizlabs.android.dbflow.sql.builder.Condition;
9 | import com.raizlabs.android.dbflow.sql.language.ColumnAlias;
10 | import com.raizlabs.android.dbflow.sql.language.Select;
11 |
12 | import java.util.ArrayList;
13 | import java.util.List;
14 | import java.util.UUID;
15 |
16 | import eu.codlab.amiiwrite.amiibo.AmiiboMethods;
17 | import eu.codlab.amiiwrite.database.holders.AmiiboIdentifiersHolder;
18 | import eu.codlab.amiiwrite.database.models.Amiibo;
19 | import eu.codlab.amiiwrite.database.models.Amiibo$Table;
20 | import eu.codlab.amiiwrite.database.models.AmiiboDescriptor;
21 | import eu.codlab.amiiwrite.database.models.AmiiboDescriptor$Table;
22 | import eu.codlab.amiiwrite.utils.IO;
23 |
24 | /**
25 | * Created by kevinleperf on 31/10/2015.
26 | */
27 | public class AmiiboFactory {
28 | private static AmiiboCache _amiibo_cache = new AmiiboCache();
29 | private static AmiiboDescriptorCache _amiibo_descriptor_cache = new AmiiboDescriptorCache();
30 |
31 | @NonNull
32 | public static AmiiboCache getAmiiboCache() {
33 | return _amiibo_cache;
34 | }
35 |
36 | @NonNull
37 | public static AmiiboDescriptorCache getAmiiboDescriptorCache() {
38 | return _amiibo_descriptor_cache;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/information/adapters/internal/HeaderViewHolder.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.information.adapters.internal;
2 |
3 | import android.content.Context;
4 | import android.view.View;
5 | import android.widget.ImageView;
6 | import android.widget.TextView;
7 |
8 | import butterknife.Bind;
9 | import butterknife.ButterKnife;
10 | import eu.codlab.amiiwrite.R;
11 | import eu.codlab.amiiwrite.amiibo.AmiiboMethods;
12 | import eu.codlab.amiiwrite.ui.information.adapters.AmiiboAdapter;
13 |
14 | /**
15 | * Created by kevinleperf on 01/11/2015.
16 | */
17 | public class HeaderViewHolder extends BindableViewHolder {
18 | @Bind(R.id.icon)
19 | public ImageView icon;
20 |
21 | @Bind(R.id.name)
22 | public TextView name;
23 |
24 | @Override
25 | public void onBindViewHolder(AmiiboAdapter amiiboAdapter, int position) {
26 | if (amiiboAdapter.getAmiibo() != null)
27 | name.setText(amiiboAdapter.getAmiibo().name);
28 | else
29 | name.setText(R.string.amiibo_void_name);
30 |
31 | Context context = name.getContext();
32 | int drawable = AmiiboMethods.getAmiiboDrawable(context, amiiboAdapter.getIdentifier());
33 |
34 | if (drawable != 0) {
35 | icon.setImageResource(drawable);
36 | }
37 | }
38 |
39 | @Override
40 | public int getDelta() {
41 | return 0;
42 | }
43 |
44 | public HeaderViewHolder(View itemView) {
45 | super(itemView);
46 |
47 | ButterKnife.bind(this, itemView);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_scan.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
12 |
13 |
20 |
21 |
26 |
27 |
28 |
29 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/amiitool/AmiitoolFactory.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.amiitool;
2 |
3 | import android.content.Context;
4 | import android.util.Log;
5 |
6 | import eu.codlab.amiitool.AmiiTool;
7 | import eu.codlab.amiiwrite.database.models.Amiibo;
8 |
9 | /**
10 | * Created by kevinleperf on 22/04/16.
11 | */
12 | public class AmiitoolFactory {
13 | private static AmiitoolFactory _sInstance = new AmiitoolFactory();
14 |
15 | private AmiitoolFactory() {
16 |
17 | }
18 |
19 | public static AmiitoolFactory getInstance() {
20 | return _sInstance;
21 | }
22 |
23 | private AmiiTool mAmiitool;
24 |
25 | public void init(Context context) {
26 | mAmiitool = new AmiiTool(context);
27 | }
28 |
29 | public byte[] unpack(Amiibo amiibo) {
30 | byte[] encrypted = amiibo.data.getBlob();
31 | return unpack(encrypted);
32 | }
33 |
34 | public byte[] unpack(byte[] encrypted) {
35 | byte[] decrypted = new byte[encrypted.length];
36 | mAmiitool.unpack(encrypted, encrypted.length, decrypted, decrypted.length);
37 |
38 | Log.d("AmiitoolFactory", "encrypted := " + byteArrayToHex(encrypted));
39 | Log.d("AmiitoolFactory", "decrypted := " + byteArrayToHex(decrypted));
40 | return decrypted;
41 | }
42 |
43 | public static String byteArrayToHex(byte[] a) {
44 | StringBuilder sb = new StringBuilder(a.length * 2);
45 | for (byte b : a)
46 | sb.append(String.format("\\x%02x", b & 0xff));
47 | return sb.toString();
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/database/controllers/AbstractCacheable.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.database.controllers;
2 |
3 | import android.support.annotation.NonNull;
4 | import android.support.annotation.Nullable;
5 | import android.util.LruCache;
6 |
7 | import com.raizlabs.android.dbflow.sql.builder.Condition;
8 | import com.raizlabs.android.dbflow.sql.language.Select;
9 |
10 | import eu.codlab.amiiwrite.database.models.AmiiboDescriptor;
11 | import eu.codlab.amiiwrite.database.models.AmiiboDescriptor$Table;
12 |
13 | /**
14 | * Created by kevinleperf on 31/12/15.
15 | */
16 | public abstract class AbstractCacheable {
17 | private LruCache cache = new LruCache<>(100);
18 |
19 | @Nullable
20 | protected abstract T getFromKeyInternal(@NonNull KEY key);
21 |
22 | protected abstract void updateCache(@NonNull T object, boolean force);
23 |
24 | @Nullable
25 | public T getFromKey(@NonNull KEY key) {
26 | T obtained = getCache().get(key);
27 | if (obtained == null) {
28 | obtained = getFromKeyInternal(key);
29 | if (obtained != null) updateCache(obtained, true);
30 | }
31 | return obtained;
32 | }
33 |
34 | public void updateInDatabase(@NonNull T object) {
35 | T modified = updateInDatabaseInternal(object);
36 |
37 | updateCache(modified, true);
38 | }
39 |
40 | @NonNull
41 | protected abstract T updateInDatabaseInternal(@NonNull T object);
42 |
43 | @NonNull
44 | protected LruCache getCache() {
45 | return cache;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/webservice/AmiiboWebsiteController.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.webservice;
2 |
3 | import eu.codlab.amiiwrite.webservice.models.WebsiteInformation;
4 | import retrofit.Call;
5 | import retrofit.GsonConverterFactory;
6 | import retrofit.Retrofit;
7 |
8 | /**
9 | * This class performs the webservice instantiations
10 | *
11 | * Created by kevinleperf on 01/11/2015.
12 | */
13 | public class AmiiboWebsiteController {
14 | private static final String AMIIBO_WEBSITE = "http://amiibo.codlab.eu";
15 | private Retrofit _adapter;
16 | private IAmiiboWebsite _webservice;
17 |
18 | public AmiiboWebsiteController() {
19 | init();
20 | }
21 |
22 | /**
23 | * Init the proxy webservice controller
24 | *
25 | * Keep instance of the retrofit instantiation and the webservice caller
26 | */
27 | public void init() {
28 | _adapter = new Retrofit.Builder()
29 | .baseUrl(AMIIBO_WEBSITE)
30 | .addConverterFactory(GsonConverterFactory.create())
31 | .build();
32 | _webservice = _adapter.create(IAmiiboWebsite.class);
33 | }
34 |
35 | /**
36 | * Retrieve every important information
37 | *
38 | * - the current Amiibo revision
39 | * - the current list of amiibos
40 | * - the online apk version and url, to manage new version
41 | *
42 | * @return a callable object to be used as callback
43 | */
44 | public Call retrieveInformation() {
45 | return _webservice.retrieveInformations();
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
15 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
34 |
35 |
36 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/utils/IO.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.utils;
2 |
3 | import android.text.TextUtils;
4 |
5 | /**
6 | * Created by kevinleperf on 30/10/2015.
7 | */
8 | public class IO {
9 | private static String[] HEX = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"};
10 |
11 | /**
12 | * @param bytes the bytes to make human-readable
13 | * @return the simple hexadecimal string representation from the given value
14 | */
15 | public static String byteArrayToHexString(byte[] bytes) {
16 | if (bytes == null) return "null";
17 |
18 | String[] res = new String[bytes.length];
19 | for (int i = 0; i < bytes.length; i++) {
20 | int val = 0xFF & bytes[i];
21 | int k = 0xF & val >> 4;
22 | int m = val & 0xF;
23 | res[i] = HEX[k] + HEX[m];
24 | }
25 | return TextUtils.join("", res);
26 | }
27 |
28 | /**
29 | * @param bytes the bytes to make human-readable
30 | * @return the 0x-byte prefixed hexadecimal string representation from the given value enclosed by [ ]
31 | */
32 | public static String byteArrayToLoggableHexString(byte[] bytes) {
33 | if (bytes == null) return "null";
34 |
35 | String[] res = new String[bytes.length];
36 | for (int i = 0; i < bytes.length; i++) {
37 | int val = 0xFF & bytes[i];
38 | int k = 0xF & val >> 4;
39 | int m = val & 0xF;
40 | res[i] = "0x" + HEX[k] + HEX[m];
41 | }
42 | return "[" + TextUtils.join(",", res) + "]";
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # AmiiManage
2 |
3 | Manage your amiibo on Android. Enhance your experience ! Take what Nintendo said Amiibo would be : a complete experience on ALL your compatible games
4 |
5 | ## Installation
6 |
7 | The entire repo is here, simply clone this repo to have the complete source code
8 |
9 | Requirements :
10 | + Android Studio (using the 1.5)
11 | + The Android SDK Installed
12 |
13 | ```
14 | compileSdkVersion 23
15 | buildToolsVersion "23.0.1"
16 | ```
17 |
18 | ```
19 | minSdkVersion 14
20 | targetSdkVersion 23
21 | ```
22 |
23 | ## Usage
24 |
25 | No apk are currently are available. The current app state does not permit this. But it is already possible to give a glance into the logic in our beloved amiibos
26 |
27 | ## Useful classes
28 |
29 | ### AmiiboHelper
30 |
31 | Provides some method useful to populate the IO operations from simple dump to pages
32 |
33 | ### AmiiboIO
34 |
35 | This class helps performing
36 | + the authentication
37 | + read
38 | + write operations
39 |
40 | ### AmiiboMethods
41 |
42 | + gets the authentication key from its NFC UUID
43 | + gets the Amiibo identifier (what distincts a bowser from a samus ;) )
44 |
45 | ## Tests
46 |
47 | It currently lacks of tests. The internal structure of the code will be soon updated to let test implementation easier to make
48 |
49 | ## License
50 |
51 | Released under the GNU General Public License v2.0 License. See the [LICENSE](http://www.gnu.org/licenses/gpl-2.0.txt) file for further details.
52 |
53 | ## Contributing
54 |
55 | 1. Fork this repo ! Yeah, No kidding... DO IT
56 | 2. Create a branch for your feature
57 | 3. Send a Pull Request
58 | 4. Share your ideas
59 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_amiibo_information_header.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
14 |
15 |
19 |
20 |
26 |
27 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/database/models/Amiibo.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.database.models;
2 |
3 | import android.support.annotation.Nullable;
4 |
5 | import com.raizlabs.android.dbflow.annotation.Column;
6 | import com.raizlabs.android.dbflow.annotation.PrimaryKey;
7 | import com.raizlabs.android.dbflow.annotation.Table;
8 | import com.raizlabs.android.dbflow.data.Blob;
9 | import com.raizlabs.android.dbflow.structure.BaseModel;
10 |
11 | import eu.codlab.amiiwrite.amiitool.AmiitoolFactory;
12 | import eu.codlab.amiiwrite.database.controllers.AmiiboFactory;
13 |
14 | /**
15 | * Created by kevinleperf on 31/10/2015.
16 | */
17 | @Table(databaseName = Database.NAME)
18 | public class Amiibo extends BaseModel {
19 | @Column
20 | @PrimaryKey(autoincrement = true)
21 | public long id;
22 |
23 | @Column
24 | public String name;
25 |
26 | @Column
27 | public String uuid;
28 |
29 | @Column
30 | public String game_name;
31 |
32 | @Column
33 | public long created_at;
34 |
35 | /**
36 | * Identifier, it is extracted from the blob but here for clarity issue
37 | */
38 | @Column
39 | public String amiibo_identifier;
40 |
41 | @Column(defaultValue = "false")
42 | public boolean synced;
43 |
44 | @Column
45 | public Blob data;
46 |
47 | private AmiiboDescriptor descriptor;
48 |
49 |
50 | @Nullable
51 | public AmiiboDescriptor getDescriptor() {
52 | if (descriptor == null) {
53 | descriptor = AmiiboFactory.getAmiiboDescriptorCache()
54 | .getFromKey(amiibo_identifier);
55 | }
56 | return descriptor;
57 | }
58 |
59 | public byte[] decrypt() {
60 | return AmiitoolFactory.getInstance()
61 | .unpack(this);
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_my_amibo_item.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
12 |
13 |
24 |
25 |
31 |
32 |
38 |
39 |
40 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | AmiiWrite
3 |
4 | My amiibos
5 | NFC chip content :
6 | NFC chip content : (decyphered)
7 | Waiting for any amiibo to scan...
8 | Woops! Please retry
9 | Scanned information
10 | Name this amiibo
11 | Scan an amiibo
12 | It will help you differentiate this data set from other saved data
13 | What is its game save ?
14 | It will help you differentiate this data set from other saved data
15 | Canceled
16 | The amiibo has been successfully written
17 | Source code
18 | App by codlab. The amiibo belongs to Nintendo, etc... (for more legal, please go to the official amiibo website, they have what you need)
19 | \@codlab
20 | Website
21 | A new version is available
22 | Do you want to download it from the web ?
23 | Uploading...
24 | Sync Google Drive
25 | Sync with your Google Drive account
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/values-fr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | AmiiWrite
3 |
4 | Mes Amiibos
5 | Contenu de la puce NFC :
6 | Contenu de la puce NFC : (déchiffré)
7 | En attente d\'un Amiibo à lire...
8 | Oops! Veuillez réessayer
9 | Informations
10 | Nom du amiibo
11 | Scanner un amiibo
12 | Cela servira à différencier ses données d\'un autre
13 | Quel est son jeu ?
14 | It will help you differentiate this data set from other saved data
15 | Annulé
16 | L\'amiibo a bien été sauvegardé
17 | Code Source
18 | App by codlab. The amiibo belongs to Nintendo, etc... (for more legal, please go to the official amiibo website, they have what you need)
19 | \@codlab
20 | Site web
21 | Une nouvelle version est disponible
22 | Voulez-vous télécharger la version depuis le web ?
23 |
24 | Upload en cours...
25 | Synchro Google Drive
26 | Synchronisez avec votre compte Google Drive
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/my_list/fragments/AbstractMyAmiiboFragment.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.my_list.fragments;
2 |
3 | import android.support.v7.widget.LinearLayoutManager;
4 | import android.view.View;
5 |
6 | import java.util.List;
7 |
8 | import butterknife.Bind;
9 | import eu.codlab.amiiwrite.R;
10 | import eu.codlab.amiiwrite.ui.my_list.adapters.AmiiboListAdapter;
11 | import eu.codlab.amiiwrite.ui.my_list.adapters.IAmiiboListListener;
12 | import eu.codlab.amiiwrite.ui.my_list.adapters.internal.Container;
13 | import eu.codlab.amiiwrite.utils.RecyclerViewWithEmpty;
14 |
15 | /**
16 | * Created by kevinleperf on 01/11/2015.
17 | */
18 | public abstract class AbstractMyAmiiboFragment extends AbstractLoadableFragment
19 | implements IAmiiboListListener {
20 |
21 | @Bind(R.id.empty)
22 | View _empty;
23 |
24 | @Bind(R.id.recycler)
25 | RecyclerViewWithEmpty _recycler;
26 |
27 | public AbstractMyAmiiboFragment() {
28 |
29 | }
30 |
31 |
32 | @Override
33 | public boolean hasParent() {
34 | return true;
35 | }
36 |
37 | @Override
38 | protected int getLayoutToInflate() {
39 | return R.layout.fragment_my_amiibo_from_category;
40 | }
41 |
42 | @Override
43 | protected void init(View view) {
44 | _recycler.setLayoutManager(new LinearLayoutManager(view.getContext()));
45 | _recycler.setEmptyView(_empty);
46 | }
47 |
48 | @Override
49 | protected void requestRefreshList() {
50 | _recycler.setAdapter(new AmiiboListAdapter(this));
51 | }
52 |
53 | protected void setAdapter(AmiiboListAdapter adapter) {
54 | _recycler.setAdapter(adapter);
55 | }
56 |
57 | @Override
58 | protected void updateUpdate(EventFetched event) {
59 | List containers = itemsToContainers(event.result);
60 |
61 | setAdapter(new AmiiboListAdapter(this, containers));
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/amiibo/AmiiboMethods.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.amiibo;
2 |
3 | import android.content.Context;
4 | import android.support.annotation.NonNull;
5 | import android.support.annotation.Nullable;
6 | import android.util.Log;
7 |
8 | import java.util.Arrays;
9 |
10 | /**
11 | * Created by kevinleperf on 30/10/2015.
12 | */
13 | public class AmiiboMethods {
14 | private static byte[] ERROR = new byte[]{0};
15 |
16 | public static boolean isError(@Nullable byte[] check) {
17 | return check == null || Arrays.equals(check, ERROR);
18 | }
19 |
20 | @NonNull
21 | public static byte[] keygen(@NonNull byte[] uuid) {
22 | byte[] key = new byte[4];
23 | int[] uuid_to_ints = new int[uuid.length];
24 |
25 | for (int i = 0; i < uuid.length; i++)
26 | uuid_to_ints[i] = (0xFF & uuid[i]);
27 |
28 | if (uuid.length == 7) {
29 | key[0] = ((byte) (0xFF & (0xAA ^ (uuid_to_ints[1] ^ uuid_to_ints[3]))));
30 | key[1] = ((byte) (0xFF & (0x55 ^ (uuid_to_ints[2] ^ uuid_to_ints[4]))));
31 | key[2] = ((byte) (0xFF & (0xAA ^ (uuid_to_ints[3] ^ uuid_to_ints[5]))));
32 | key[3] = ((byte) (0xFF & (0x55 ^ (uuid_to_ints[4] ^ uuid_to_ints[6]))));
33 | return key;
34 | }
35 |
36 | return ERROR;
37 | }
38 |
39 | @NonNull
40 | public static byte[] amiiboIdentifier(@Nullable byte[] read_data) {
41 | if (read_data == null) return ERROR;
42 | return AmiiboHelper.getPage(read_data, Constants.AMIIBO_IDENTIFIER_PAGE_1, 2);
43 | }
44 |
45 | public static int getAmiiboDrawable(@NonNull Context context,
46 | @NonNull String amiibo_identifier) {
47 | String output = String.format("icon_%s", amiibo_identifier.toLowerCase());
48 | return context.getResources().getIdentifier(output, "drawable", context.getPackageName());
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/information/fragments/AmiiboInformationFragment.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.information.fragments;
2 |
3 |
4 | import android.os.Bundle;
5 |
6 | import de.greenrobot.event.EventBus;
7 | import eu.codlab.amiiwrite.R;
8 | import eu.codlab.amiiwrite.amiitool.AmiitoolFactory;
9 | import eu.codlab.amiiwrite.database.controllers.AmiiboFactory;
10 | import eu.codlab.amiiwrite.database.models.Amiibo;
11 | import eu.codlab.amiiwrite.ui.information.adapters.AmiiboAdapter;
12 | import eu.codlab.amiiwrite.ui.scan.ScanEvent;
13 |
14 | public class AmiiboInformationFragment extends AbstractAmiiboInformationFragment {
15 | private final static String AMIIBO_ID = "AMIIBO_ID";
16 |
17 | public static AmiiboInformationFragment newInstance(Amiibo amiibo, boolean add_fab) {
18 | AmiitoolFactory.getInstance().unpack(amiibo);
19 | AmiiboInformationFragment fragment = new AmiiboInformationFragment();
20 | Bundle args = new Bundle();
21 | args.putLong(AMIIBO_ID, amiibo.id);
22 | fragment.setArguments(args);
23 | return fragment;
24 | }
25 |
26 | @Override
27 | protected void onFabClicked() {
28 | EventBus.getDefault().post(new ScanEvent.StartWriteFragment(getAmiiboId()));
29 | }
30 |
31 | public AmiiboInformationFragment() {
32 | }
33 |
34 | @Override
35 | public int getResourceLayout() {
36 | return R.layout.fragment_amiibo_information;
37 | }
38 |
39 | @Override
40 | public AmiiboAdapter getAdapter() {
41 | return new AmiiboAdapter(getAmiibo());
42 | }
43 |
44 |
45 | private Amiibo getAmiibo() {
46 | return AmiiboFactory.getAmiiboCache().getFromKey(getAmiiboId());
47 | }
48 |
49 | private long getAmiiboId() {
50 | return getArguments().getLong(AMIIBO_ID, 0);
51 | }
52 |
53 | @Override
54 | public boolean managedOnBackPressed() {
55 | return false;
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_my_amibo_item_vertical.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
12 |
13 |
26 |
27 |
33 |
34 |
40 |
41 |
42 |
46 |
47 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/sync/AmiiboFile.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.sync;
2 |
3 | import android.util.Base64;
4 |
5 | import com.google.gson.Gson;
6 | import com.raizlabs.android.dbflow.data.Blob;
7 |
8 | import java.util.UUID;
9 |
10 | import eu.codlab.amiiwrite.database.models.Amiibo;
11 |
12 | /**
13 | * Created by kevinleperf on 07/11/2015.
14 | */
15 | public class AmiiboFile {
16 | public String name;
17 |
18 | public String uuid;
19 |
20 | public String game_name;
21 |
22 | public long created_at;
23 |
24 | public String amiibo_identifier;
25 |
26 | public String data;
27 |
28 | public boolean synced;
29 |
30 | public Amiibo toAmiibo() {
31 | try {
32 | Amiibo amiibo = new Amiibo();
33 | amiibo.name = name;
34 | amiibo.uuid = uuid;
35 | if (amiibo.uuid == null) amiibo.uuid = UUID.randomUUID().toString();
36 | amiibo.game_name = game_name;
37 | amiibo.created_at = created_at;
38 | amiibo.data = new Blob(Base64.decode(data, Base64.URL_SAFE | Base64.NO_WRAP));
39 | amiibo.amiibo_identifier = amiibo_identifier;
40 |
41 | return amiibo;
42 | } catch (Exception exception_while_parsing) {
43 | exception_while_parsing.printStackTrace();
44 | return null;
45 | }
46 | }
47 |
48 | public String toString() {
49 | return new Gson().toJson(this);
50 | }
51 |
52 | public static AmiiboFile fromString(String jsonobject) {
53 | return new Gson().fromJson(jsonobject, AmiiboFile.class);
54 | }
55 |
56 | public static AmiiboFile fromAmiibo(Amiibo amiibo) {
57 | AmiiboFile file = new AmiiboFile();
58 | file.name = amiibo.name;
59 | file.uuid = amiibo.uuid;
60 | file.game_name = amiibo.game_name;
61 | file.created_at = amiibo.created_at;
62 | file.data = Base64.encodeToString(amiibo.data.getBlob(), Base64.URL_SAFE | Base64.NO_WRAP);
63 | return file;
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/dashboard/DashboardFragment.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.dashboard;
2 |
3 | import android.os.Bundle;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 |
8 | import butterknife.ButterKnife;
9 | import butterknife.OnClick;
10 | import de.greenrobot.event.EventBus;
11 | import eu.codlab.amiiwrite.R;
12 | import eu.codlab.amiiwrite.ui._stack.PopableFragment;
13 | import eu.codlab.amiiwrite.ui._stack.StackController;
14 | import eu.codlab.amiiwrite.ui.scan.ScanEvent;
15 |
16 | public class DashboardFragment extends PopableFragment {
17 | public DashboardFragment() {
18 | // Required empty public constructor
19 | }
20 |
21 | public static DashboardFragment newInstance() {
22 | DashboardFragment fragment = new DashboardFragment();
23 | Bundle args = new Bundle();
24 | fragment.setArguments(args);
25 | return fragment;
26 | }
27 |
28 | @OnClick(R.id.fab)
29 | public void onScanRequested() {
30 | EventBus.getDefault().post(new ScanEvent.StartFragment());
31 | }
32 |
33 | @Override
34 | public void onCreate(Bundle savedInstanceState) {
35 | super.onCreate(savedInstanceState);
36 | }
37 |
38 | @Override
39 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
40 | Bundle savedInstanceState) {
41 | return inflater.inflate(R.layout.fragment_dashboard, container, false);
42 | }
43 |
44 | @Override
45 | public void onViewCreated(View view, Bundle savedInstanceState) {
46 | ButterKnife.bind(this, view);
47 | }
48 |
49 | @Override
50 | public void onResume() {
51 | super.onResume();
52 | }
53 |
54 | @Override
55 | public void onPause() {
56 | super.onPause();
57 | }
58 |
59 | @Override
60 | public boolean hasParent() {
61 | return false;
62 | }
63 |
64 | @Override
65 | public boolean managedOnBackPressed() {
66 | return false;
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/utils/RecyclerViewWithEmpty.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.utils;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.util.AttributeSet;
6 | import android.view.View;
7 |
8 | /**
9 | * Make a given view visible when no items are available into the recyclerview
10 | *
11 | * The given view must be outside of the recyclerview
12 | *
13 | * for instance, in a framelayout -> (recyclerview, the view)
14 | * Created by kevinleperf on 01/11/2015.
15 | */
16 | public class RecyclerViewWithEmpty extends RecyclerView {
17 | private View emptyView;
18 |
19 | private AdapterDataObserver emptyObserver = new AdapterDataObserver() {
20 |
21 |
22 | @Override
23 | public void onChanged() {
24 | Adapter> adapter = getAdapter();
25 | if (adapter != null && emptyView != null) {
26 | if (adapter.getItemCount() == 0) {
27 | emptyView.setVisibility(View.VISIBLE);
28 | RecyclerViewWithEmpty.this.setVisibility(View.GONE);
29 | } else {
30 | emptyView.setVisibility(View.GONE);
31 | RecyclerViewWithEmpty.this.setVisibility(View.VISIBLE);
32 | }
33 | }
34 |
35 | }
36 | };
37 |
38 | public RecyclerViewWithEmpty(Context context) {
39 | super(context);
40 | }
41 |
42 | public RecyclerViewWithEmpty(Context context, AttributeSet attrs) {
43 | super(context, attrs);
44 | }
45 |
46 | public RecyclerViewWithEmpty(Context context, AttributeSet attrs, int defStyle) {
47 | super(context, attrs, defStyle);
48 | }
49 |
50 |
51 | @Override
52 | public void setAdapter(Adapter adapter) {
53 | super.setAdapter(adapter);
54 |
55 | if (adapter != null) {
56 | adapter.registerAdapterDataObserver(emptyObserver);
57 | }
58 |
59 | emptyObserver.onChanged();
60 | }
61 |
62 | public void setEmptyView(View emptyView) {
63 | this.emptyView = emptyView;
64 | }
65 |
66 | }
67 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_my_amibo_item_with_count.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
12 |
13 |
24 |
25 |
31 |
32 |
39 |
40 |
46 |
47 |
48 |
52 |
53 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/information/fragments/AbstractAmiiboInformationFragment.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.information.fragments;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.Nullable;
5 | import android.support.v7.widget.LinearLayoutManager;
6 | import android.support.v7.widget.RecyclerView;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 |
11 | import butterknife.Bind;
12 | import butterknife.ButterKnife;
13 | import butterknife.OnClick;
14 | import eu.codlab.amiiwrite.R;
15 | import eu.codlab.amiiwrite.ui._stack.PopableFragment;
16 | import eu.codlab.amiiwrite.ui._stack.StackController;
17 | import eu.codlab.amiiwrite.ui.information.adapters.AmiiboAdapter;
18 |
19 | /**
20 | * Created by kevinleperf on 01/11/2015.
21 | */
22 | public abstract class AbstractAmiiboInformationFragment extends PopableFragment {
23 | protected abstract int getResourceLayout();
24 |
25 | protected abstract void onFabClicked();
26 |
27 | protected abstract AmiiboAdapter getAdapter();
28 |
29 |
30 | @Bind(R.id.recycler)
31 | public RecyclerView _recycler;
32 |
33 | @Nullable
34 | @OnClick(R.id.fab)
35 | public void onClickWriteAmiibo() {
36 | onFabClicked();
37 | }
38 |
39 |
40 | @Override
41 | public void onCreate(Bundle savedInstanceState) {
42 | super.onCreate(savedInstanceState);
43 | }
44 |
45 | @Override
46 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
47 | Bundle savedInstanceState) {
48 | return inflater.inflate(getResourceLayout(), container, false);
49 | }
50 |
51 | @Override
52 | public void onViewCreated(View view, Bundle savedInstanceState) {
53 | ButterKnife.bind(this, view);
54 |
55 | RecyclerView.LayoutManager manager = new LinearLayoutManager(getActivity());
56 | _recycler.setLayoutManager(manager);
57 |
58 | _recycler.setAdapter(getAdapter());
59 | }
60 |
61 | @Override
62 | public void onResume() {
63 | super.onResume();
64 | getActivity().setTitle("");
65 | }
66 |
67 | @Override
68 | public boolean hasParent() {
69 | return true;
70 | }
71 |
72 | }
73 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/_stack/StackController.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui._stack;
2 |
3 | import android.support.annotation.NonNull;
4 | import android.support.annotation.Nullable;
5 | import android.support.v4.app.Fragment;
6 | import android.util.Log;
7 | import android.view.View;
8 |
9 | import java.util.ArrayList;
10 | import java.util.List;
11 |
12 | import eu.codlab.amiiwrite.BuildConfig;
13 | import eu.codlab.amiiwrite.MainActivity;
14 |
15 | /**
16 | * Created by kevinleperf on 31/10/2015.
17 | */
18 | public class StackController {
19 |
20 | private MainActivity _parent;
21 | private View _container;
22 | private List _fragments;
23 |
24 | private StackController() {
25 |
26 | }
27 |
28 | public StackController(@NonNull MainActivity parent, @NonNull View received) {
29 | this();
30 | _fragments = new ArrayList<>();
31 | _container = received;
32 | _parent = parent;
33 | }
34 |
35 | public void remove(int count) {
36 | for (int i = 0; i < count; i++)
37 | if (_fragments.size() > 0)
38 | _fragments.remove(_fragments.size() - 1);
39 | }
40 |
41 | public boolean pop() {
42 | if (_fragments.size() > 1) {
43 | remove(1);
44 | setFragment();
45 |
46 | return true;
47 | }
48 | return false;
49 | }
50 |
51 | public void flush() {
52 | while (pop()) {
53 | if (BuildConfig.DEBUG) Log.d("StackController", "popping");
54 | }
55 | }
56 |
57 | public void push(@NonNull PopableFragment new_fragment) {
58 | _fragments.add(new_fragment);
59 | setFragment();
60 | }
61 |
62 | private void setFragment() {
63 | _parent.getSupportFragmentManager()
64 | .beginTransaction()
65 | .replace(_container.getId(), head())
66 | .commit();
67 |
68 | _parent.invalidateToolbar();
69 | }
70 |
71 | @Nullable
72 | public PopableFragment head() {
73 | if (_fragments.size() > 0)
74 | return _fragments.get(_fragments.size() - 1);
75 | return null;
76 | }
77 |
78 | public boolean hasParent() {
79 | PopableFragment fragment = head();
80 | return fragment != null && fragment.hasParent();
81 | }
82 |
83 | public boolean managedOnBackPressed(){
84 | if(head() != null)
85 | return head().managedOnBackPressed();
86 | return false;
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/my_list/fragments/MyAmiiboFromCategory.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.my_list.fragments;
2 |
3 |
4 | import android.os.Bundle;
5 |
6 | import java.util.ArrayList;
7 | import java.util.List;
8 |
9 | import de.greenrobot.event.EventBus;
10 | import eu.codlab.amiiwrite.database.controllers.AmiiboFactory;
11 | import eu.codlab.amiiwrite.database.models.Amiibo;
12 | import eu.codlab.amiiwrite.ui.my_list.EventMyList;
13 | import eu.codlab.amiiwrite.ui.my_list.adapters.internal.AmiiboContainer;
14 | import eu.codlab.amiiwrite.ui.my_list.adapters.internal.Container;
15 |
16 | /**
17 | * Show all amiibo in a specific category
18 | *
19 | * For instance, shows all your Classic Mario dumps
20 | */
21 | public class MyAmiiboFromCategory extends AbstractMyAmiiboFragment {
22 | private final static String AMIIBO_IDENTIFIER = "AMIIBO_IDENTIFIER";
23 |
24 | public MyAmiiboFromCategory() {
25 | }
26 |
27 | public static MyAmiiboFromCategory newInstance(String amiibo_id) {
28 | MyAmiiboFromCategory fragment = new MyAmiiboFromCategory();
29 | Bundle args = new Bundle();
30 | args.putString(AMIIBO_IDENTIFIER, amiibo_id);
31 | fragment.setArguments(args);
32 | return fragment;
33 | }
34 |
35 |
36 | @Override
37 | protected List getListOfItem() {
38 | List results = AmiiboFactory.getAmiiboCache()
39 | .getAmiibos(getAmiiboIdentifier());
40 |
41 | return results;
42 | }
43 |
44 | @Override
45 | protected List itemsToContainers(List items) {
46 | List containers = new ArrayList<>();
47 |
48 | for (Amiibo amiibo : items) {
49 | containers.add(new AmiiboContainer(amiibo.amiibo_identifier,
50 | amiibo.name, amiibo.id));
51 | }
52 | return containers;
53 | }
54 |
55 | @Override
56 | protected boolean isCorrectInstance(Object object) {
57 | return object != null && object instanceof Amiibo;
58 | }
59 |
60 | @Override
61 | protected Class extends Amiibo> getImplementationClass() {
62 | return Amiibo.class;
63 | }
64 |
65 | @Override
66 | public void onClick(Container item) {
67 | //it is from an amiibo category, so the relevant information is from the data
68 | EventBus.getDefault().post(new EventMyList.EventLoadAmiibo(item.data));
69 | }
70 |
71 | public boolean isFromIdentifier(String identifier) {
72 | if (identifier != null)
73 | return identifier.equalsIgnoreCase(getAmiiboIdentifier());
74 | return false;
75 | }
76 |
77 | private String getAmiiboIdentifier() {
78 | return getArguments().getString(AMIIBO_IDENTIFIER, "");
79 | }
80 |
81 | @Override
82 | public boolean managedOnBackPressed() {
83 | return false;
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/my_list/adapters/AmiiboListAdapter.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.my_list.adapters;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 | import android.view.LayoutInflater;
5 | import android.view.ViewGroup;
6 |
7 | import java.util.List;
8 |
9 | import eu.codlab.amiiwrite.R;
10 | import eu.codlab.amiiwrite.ui.my_list.adapters.internal.AmiiboCategory;
11 | import eu.codlab.amiiwrite.ui.my_list.adapters.internal.AmiiboContainer;
12 | import eu.codlab.amiiwrite.ui.my_list.adapters.internal.AmiiboItem;
13 | import eu.codlab.amiiwrite.ui.my_list.adapters.internal.Container;
14 | import eu.codlab.amiiwrite.ui.my_list.adapters.internal.LoadableHolder;
15 |
16 | /**
17 | * Created by kevinleperf on 01/11/2015.
18 | */
19 | public class AmiiboListAdapter extends RecyclerView.Adapter {
20 | private final static int AMIIBO_CATEGORY = 0;
21 | private final static int AMIIBO = 1;
22 | private final static int AMIIBO_LOADER = 2;
23 |
24 | private List _containers;
25 | private IAmiiboListListener _listener;
26 |
27 |
28 | public AmiiboListAdapter(IAmiiboListListener listener) {
29 | _listener = listener;
30 | _containers = null;
31 | }
32 |
33 | public AmiiboListAdapter(IAmiiboListListener listener, List container) {
34 | this(listener);
35 | _containers = container;
36 | }
37 |
38 | public Container getObject(int position) {
39 | return _containers.get(position);
40 | }
41 |
42 | public IAmiiboListListener getListener() {
43 | return _listener;
44 | }
45 |
46 | @Override
47 | public LoadableHolder onCreateViewHolder(ViewGroup parent, int viewType) {
48 | LayoutInflater inflater = LayoutInflater.from(parent.getContext());
49 |
50 | switch (viewType) {
51 | case AMIIBO_CATEGORY:
52 | return new AmiiboCategory(inflater.inflate(R.layout.fragment_my_amibo_item_with_count, parent, false));
53 | case AMIIBO:
54 | return new AmiiboItem(inflater.inflate(R.layout.fragment_my_amibo_item, parent, false));
55 | case AMIIBO_LOADER:
56 | return new LoadableHolder(inflater.inflate(R.layout.fragment_my_amibo_loading, parent, false));
57 | default:
58 | }
59 | return null;
60 | }
61 |
62 | @Override
63 | public void onBindViewHolder(LoadableHolder holder, int position) {
64 | holder.onBindViewHolder(this, position);
65 | }
66 |
67 | @Override
68 | public int getItemViewType(int position) {
69 | if (_containers == null) return AMIIBO_LOADER;
70 | if (_containers.get(position) instanceof AmiiboContainer) return AMIIBO;
71 | return AMIIBO_CATEGORY;
72 | }
73 |
74 | @Override
75 | public int getItemCount() {
76 | if (_containers == null) return 1;
77 | return _containers.size();
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/drawer/MenuDrawer.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.drawer;
2 |
3 |
4 | import android.app.Fragment;
5 | import android.content.Intent;
6 | import android.net.Uri;
7 | import android.os.Bundle;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.view.ViewGroup;
11 |
12 | import butterknife.ButterKnife;
13 | import butterknife.OnClick;
14 | import de.greenrobot.event.EventBus;
15 | import eu.codlab.amiiwrite.R;
16 | import eu.codlab.amiiwrite.ui.drive.DriveEvent;
17 | import eu.codlab.amiiwrite.ui.my_list.EventMyList;
18 |
19 | public class MenuDrawer extends Fragment {
20 | private static final String URL_TWITTER = "http://twitter.com/codlab";
21 | private static final String URL_WEBSITE = "http://amiibo.codlab.eu/";
22 | private static final String URL_GITHUB = "http://github.com/codlab/amiibo";
23 |
24 | public MenuDrawer() {
25 | // Required empty public constructor
26 | }
27 |
28 | @OnClick(R.id.my_amiibos)
29 | public void onClickOnMyAmiibo() {
30 | EventBus.getDefault().post(new EventMyList.EventLoadCategories());
31 | }
32 |
33 | @OnClick(R.id.sync_drive)
34 | public void onClickOnSyncDrive() {
35 | EventBus.getDefault().post(new DriveEvent.StartFragment());
36 | }
37 |
38 | @OnClick(R.id.twitter)
39 | public void onClickTwitter() {
40 | showUrl(URL_TWITTER);
41 | }
42 |
43 | @OnClick(R.id.website)
44 | public void onClickWebsite() {
45 | showUrl(URL_WEBSITE);
46 | }
47 |
48 | @OnClick(R.id.github)
49 | public void onClickGithub() {
50 | showUrl(URL_GITHUB);
51 | }
52 |
53 | /**
54 | * Use this factory method to create a new instance of
55 | * this fragment using the provided parameters.
56 | *
57 | * @param param1 Parameter 1.
58 | * @param param2 Parameter 2.
59 | * @return A new instance of fragment MenuDrawer.
60 | */
61 | // TODO: Rename and change types and number of parameters
62 | public static MenuDrawer newInstance(String param1, String param2) {
63 | MenuDrawer fragment = new MenuDrawer();
64 | Bundle args = new Bundle();
65 | fragment.setArguments(args);
66 | return fragment;
67 | }
68 |
69 | @Override
70 | public void onCreate(Bundle savedInstanceState) {
71 | super.onCreate(savedInstanceState);
72 | }
73 |
74 | @Override
75 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
76 | Bundle savedInstanceState) {
77 | return inflater.inflate(R.layout.fragment_menu_drawer, container, false);
78 | }
79 |
80 | @Override
81 | public void onViewCreated(View view, Bundle savedInstanceState) {
82 | ButterKnife.bind(this, view);
83 | }
84 |
85 |
86 | private void showUrl(String url) {
87 | Intent i = new Intent(Intent.ACTION_VIEW);
88 | i.setData(Uri.parse(url));
89 | startActivity(i);
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/my_list/adapters/internal/AmiiboCategory.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.my_list.adapters.internal;
2 |
3 | import android.support.annotation.Nullable;
4 | import android.util.Log;
5 | import android.view.View;
6 | import android.widget.ImageView;
7 | import android.widget.TextView;
8 |
9 | import butterknife.Bind;
10 | import butterknife.ButterKnife;
11 | import eu.codlab.amiiwrite.R;
12 | import eu.codlab.amiiwrite.amiibo.AmiiboMethods;
13 | import eu.codlab.amiiwrite.database.holders.AmiiboIdentifiersHolder;
14 | import eu.codlab.amiiwrite.ui.my_list.adapters.AmiiboListAdapter;
15 |
16 | /**
17 | * Created by kevinleperf on 01/11/2015.
18 | */
19 | public class AmiiboCategory extends LoadableHolder {
20 |
21 | @Bind(R.id.header)
22 | public View header;
23 |
24 | @Bind(R.id.footer)
25 | public View footer;
26 |
27 | @Bind(R.id.name)
28 | public TextView name;
29 |
30 | @Bind(R.id.icon)
31 | public ImageView icon;
32 |
33 | @Nullable
34 | @Bind(R.id.count)
35 | public TextView count;
36 |
37 | @Bind(R.id.clickable)
38 | public View _clickable;
39 |
40 | @Nullable
41 | private Container _container;
42 | private String TAG = AmiiboCategory.class.getSimpleName();
43 |
44 | @Override
45 | public void onBindViewHolder(final AmiiboListAdapter parent, int position) {
46 | _container = parent.getObject(position);
47 |
48 | updateHeaderFooter(parent, position);
49 |
50 | name.setText(_container.name);
51 | if (count != null) count.setText(Long.toString(_container.data));
52 |
53 | int drawable = AmiiboMethods.getAmiiboDrawable(itemView.getContext(), _container.identifier);
54 | if (drawable != 0) {
55 | icon.setImageResource(drawable);
56 | }
57 |
58 | _clickable.setOnClickListener(new View.OnClickListener() {
59 | @Override
60 | public void onClick(View v) {
61 | if (parent.getListener() != null)
62 | parent.getListener().onClick(_container);
63 | }
64 | });
65 | }
66 |
67 | public void onBindViewHolder(AmiiboIdentifiersHolder parent,
68 | View.OnClickListener listener) {
69 | name.setText(parent.name);
70 | if (count != null) count.setText(Long.toString(parent.count));
71 |
72 | int drawable = AmiiboMethods.getAmiiboDrawable(itemView.getContext(), parent.identifier);
73 | Log.d(TAG, "onBindViewHolder: " + parent.identifier + " " + parent.name + " " + drawable);
74 | if (drawable != 0) {
75 | icon.setImageResource(drawable);
76 | }
77 |
78 | _clickable.setOnClickListener(listener);
79 |
80 | updateHeaderFooter(null, -1);
81 | }
82 |
83 |
84 | protected void updateHeaderFooter(final AmiiboListAdapter parent, int position) {
85 | header.setVisibility(View.GONE);
86 | footer.setVisibility(View.GONE);
87 | }
88 |
89 | public AmiiboCategory(View itemView) {
90 | super(itemView);
91 | ButterKnife.bind(this, itemView);
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | jcenter()
4 | maven { url 'https://maven.fabric.io/public' }
5 | maven { url "https://jitpack.io" }
6 | }
7 | dependencies {
8 | classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
9 | classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
10 | classpath 'io.fabric.tools:gradle:1.+'
11 | }
12 | }
13 |
14 | repositories {
15 | maven { url "https://jitpack.io" }
16 | maven { url 'https://maven.fabric.io/public' }
17 | }
18 |
19 | apply plugin: 'com.android.application'
20 | apply plugin: 'com.jakewharton.hugo'
21 | apply plugin: 'io.fabric'
22 | apply plugin: 'com.neenbedankt.android-apt'
23 |
24 |
25 | android {
26 | compileSdkVersion 23
27 | buildToolsVersion "23.0.1"
28 |
29 | defaultConfig {
30 | applicationId "eu.codlab.amiiwrite"
31 | minSdkVersion 14
32 | targetSdkVersion 23
33 | versionCode Integer.parseInt(VERSION_CODE)
34 | versionName VERSION_NAME
35 | }
36 |
37 | signingConfigs {
38 | release {
39 | storeFile file(KEYSTORE)
40 | storePassword STORE_PASSWORD
41 | keyAlias STORE_KEY_ALIAS
42 | keyPassword STORE_KEY_ALIAS_PASSWORD
43 | }
44 | }
45 |
46 | buildTypes {
47 | debug {
48 | minifyEnabled false
49 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
50 | signingConfig signingConfigs.release
51 | }
52 | release {
53 | minifyEnabled false
54 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
55 | signingConfig signingConfigs.release
56 | }
57 | }
58 | }
59 |
60 | dependencies {
61 | compile fileTree(dir: 'libs', include: ['*.jar'])
62 | compile 'com.android.support:appcompat-v7:23.2.0'
63 | compile 'com.android.support:design:23.2.0'
64 | compile 'com.android.support:cardview-v7:23.2.0'
65 | compile 'com.android.support:recyclerview-v7:23.2.0'
66 | compile 'de.greenrobot:eventbus:3.0.0-beta1'
67 |
68 | apt 'com.raizlabs.android:DBFlow-Compiler:2.2.1'
69 | compile "com.raizlabs.android:DBFlow-Core:2.2.1"
70 | compile "com.raizlabs.android:DBFlow:2.2.1"
71 |
72 | compile 'com.jakewharton:butterknife:7.0.1'
73 |
74 | compile('com.github.afollestad.material-dialogs:core:0.8.5.6@aar') {
75 | transitive = true
76 | }
77 |
78 | compile 'eu.codlab:android_multicolumn_adaptable:1.8'
79 | compile 'eu.codlab:amiitool_android:0.2.2'
80 |
81 | compile 'com.squareup.retrofit:retrofit:2.0.0-beta2'
82 | compile 'com.squareup.retrofit:converter-gson:2.0.0-beta2'
83 |
84 | compile 'com.google.android.gms:play-services-drive:7.8.0'
85 | compile('com.crashlytics.sdk.android:crashlytics:2.5.2@aar') {
86 | transitive = true;
87 | }
88 | compile('com.crashlytics.sdk.android:answers:1.3.3@aar') {
89 | transitive = true;
90 | }
91 |
92 | testCompile 'junit:junit:4.12'
93 | testCompile 'org.mockito:mockito-core:1.10.19'
94 | testCompile 'org.hamcrest:hamcrest-library:1.1'
95 | }
96 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/scan/fragments/ScanFragment.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.scan.fragments;
2 |
3 | import android.content.Context;
4 | import android.nfc.tech.NfcA;
5 | import android.os.Bundle;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 |
10 | import java.io.IOException;
11 |
12 | import butterknife.Bind;
13 | import butterknife.ButterKnife;
14 | import eu.codlab.amiiwrite.MainActivity;
15 | import eu.codlab.amiiwrite.R;
16 | import eu.codlab.amiiwrite.amiibo.AmiiboIO;
17 | import eu.codlab.amiiwrite.ui._stack.PopableFragment;
18 | import eu.codlab.amiiwrite.ui._stack.StackController;
19 |
20 | public class ScanFragment extends PopableFragment {
21 |
22 | private ScanFragment.IScanListener _scan_listener;
23 |
24 | public ScanFragment() {
25 | // Required empty public constructor
26 | }
27 |
28 | @Bind(R.id.please_retry)
29 | View _please_retry;
30 |
31 | @Override
32 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
33 | Bundle savedInstanceState) {
34 | return inflater.inflate(R.layout.fragment_scan, container, false);
35 | }
36 |
37 | @Override
38 | public void onViewCreated(View view, Bundle savedInstanceState) {
39 | ButterKnife.bind(this, view);
40 | }
41 |
42 | @Override
43 | public boolean hasParent() {
44 | return true;
45 | }
46 |
47 | @Override
48 | public boolean managedOnBackPressed() {
49 | return false;
50 | }
51 |
52 | @Override
53 | public void onResume() {
54 | super.onResume();
55 | ((MainActivity) getActivity()).startScanning();
56 | }
57 |
58 | @Override
59 | public void onPause() {
60 | ((MainActivity) getActivity()).stopScanning();
61 | super.onPause();
62 | }
63 |
64 | @Override
65 | public void onDetach() {
66 | _scan_listener = null;
67 | super.onDetach();
68 | }
69 |
70 | @Override
71 | public void onAttach(Context context) {
72 | super.onAttach(context);
73 |
74 | if (context instanceof ScanFragment.IScanListener) {
75 | _scan_listener = (ScanFragment.IScanListener) context;
76 | } else {
77 | throw new IllegalStateException("The parent activity does not implements "
78 | + IScanListener.class.getName());
79 | }
80 | }
81 |
82 | public void tryReadingAmiibo(NfcA ntag215, byte[] uid) {
83 | boolean read_successfully = false;
84 | try {
85 | ntag215.connect();
86 |
87 | boolean authenticated = AmiiboIO.authenticateAmiibo(ntag215, uid);
88 |
89 | if (authenticated) {
90 | byte[] read = AmiiboIO.readAmiibo(ntag215);
91 | if (read != null) {
92 | _scan_listener.onScanResult(read);
93 | }
94 | }
95 | } catch (IOException e) {
96 | e.printStackTrace();
97 | }
98 | try {
99 | ntag215.close();
100 | } catch (Exception e) {
101 | e.printStackTrace();
102 | }
103 |
104 | if (!read_successfully) {
105 | _please_retry.setVisibility(View.VISIBLE);
106 | }
107 | }
108 |
109 | public interface IScanListener {
110 | public void onScanResult(byte[] bytes);
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/my_list/fragments/AbstractLoadableFragment.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.my_list.fragments;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.LayoutRes;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 |
9 | import java.util.List;
10 |
11 | import butterknife.ButterKnife;
12 | import de.greenrobot.event.EventBus;
13 | import de.greenrobot.event.Subscribe;
14 | import de.greenrobot.event.ThreadMode;
15 | import eu.codlab.amiiwrite.ui._stack.PopableFragment;
16 | import eu.codlab.amiiwrite.ui.my_list.EventMyList;
17 | import eu.codlab.amiiwrite.ui.my_list.adapters.internal.Container;
18 |
19 | /**
20 | * Created by kevinleperf on 01/11/2015.
21 | */
22 | public abstract class AbstractLoadableFragment extends PopableFragment {
23 |
24 | public AbstractLoadableFragment() {
25 |
26 | }
27 |
28 | @Override
29 | public void onCreate(Bundle savedInstanceState) {
30 | super.onCreate(savedInstanceState);
31 | }
32 |
33 | @Override
34 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
35 | Bundle savedInstanceState) {
36 | return inflater.inflate(getLayoutToInflate(), container, false);
37 | }
38 |
39 | @Override
40 | public void onViewCreated(View view, Bundle savedInstanceState) {
41 | ButterKnife.bind(this, view);
42 |
43 | init(view);
44 | }
45 |
46 |
47 | @Override
48 | public void onResume() {
49 | super.onResume();
50 | EventBus.getDefault().register(this);
51 | internalRequestRefreshList();
52 | }
53 |
54 | @Override
55 | public void onPause() {
56 | EventBus.getDefault().unregister(this);
57 | super.onPause();
58 | }
59 |
60 | protected abstract void requestRefreshList();
61 |
62 | private void internalRequestRefreshList() {
63 | requestRefreshList();
64 | EventBus.getDefault().post(new EventMyList.EventFetch(getImplementationClass().getName()));
65 | }
66 |
67 | @Subscribe(threadMode = ThreadMode.Async)
68 | public void onAskedToSearchCategories(EventMyList.EventFetch event) {
69 | if (isCorrectEventFetch(event)) {
70 | EventFetched result = new EventFetched<>(getListOfItem());
71 | EventBus.getDefault().post(result);
72 | }
73 | }
74 |
75 | @Subscribe(threadMode = ThreadMode.MainThread)
76 | public void onFetchedCategories(EventFetched event) {
77 | List list = event.result;
78 | if (list != null && list.size() > 0 && isCorrectInstance(list.get(0))) {
79 | updateUpdate(event);
80 | }
81 | }
82 |
83 |
84 | @LayoutRes
85 | protected abstract int getLayoutToInflate();
86 |
87 | protected abstract void init(View view);
88 |
89 | protected abstract void updateUpdate(EventFetched event);
90 |
91 | protected abstract List getListOfItem();
92 |
93 | protected abstract List itemsToContainers(List items);
94 |
95 | protected abstract boolean isCorrectInstance(Object object);
96 |
97 | protected abstract Class extends T> getImplementationClass();
98 |
99 | private boolean isCorrectEventFetch(EventMyList.EventFetch event) {
100 | return event != null && event.class_name != null
101 | && event.class_name.equalsIgnoreCase(getImplementationClass().getName());
102 | }
103 |
104 |
105 | protected class EventFetched {
106 | List result;
107 |
108 | public EventFetched(List result) {
109 | this.result = result;
110 | }
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/database/controllers/AmiiboDescriptorCache.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.database.controllers;
2 |
3 | import android.database.Cursor;
4 | import android.support.annotation.NonNull;
5 | import android.support.annotation.Nullable;
6 |
7 | import com.raizlabs.android.dbflow.sql.builder.Condition;
8 | import com.raizlabs.android.dbflow.sql.language.ColumnAlias;
9 | import com.raizlabs.android.dbflow.sql.language.Select;
10 |
11 | import java.util.ArrayList;
12 | import java.util.List;
13 |
14 | import eu.codlab.amiiwrite.database.holders.AmiiboIdentifiersHolder;
15 | import eu.codlab.amiiwrite.database.models.Amiibo;
16 | import eu.codlab.amiiwrite.database.models.Amiibo$Table;
17 | import eu.codlab.amiiwrite.database.models.AmiiboDescriptor;
18 | import eu.codlab.amiiwrite.database.models.AmiiboDescriptor$Table;
19 |
20 | /**
21 | * Created by kevinleperf on 31/12/15.
22 | */
23 | public class AmiiboDescriptorCache extends AbstractCacheable {
24 |
25 | @NonNull
26 | public List getListOfIdentifiers() {
27 | List list = new ArrayList<>();
28 |
29 | Cursor cursor = new Select(ColumnAlias.column(Amiibo$Table.AMIIBO_IDENTIFIER),
30 | ColumnAlias.columnsWithFunction("count", Amiibo$Table.AMIIBO_IDENTIFIER).as("c"))
31 | .from(Amiibo.class)
32 | .where().groupBy(Amiibo$Table.AMIIBO_IDENTIFIER)
33 | .query();
34 | cursor.moveToFirst();
35 | int idx_count = cursor.getColumnIndex("c");
36 | int idx_id = cursor.getColumnIndex(Amiibo$Table.AMIIBO_IDENTIFIER);
37 |
38 | while (!cursor.isAfterLast()) {
39 | //change the identifier 00000000000 into the "human readable name"
40 | //not done into the sql query since the controller will cache the descriptor for later use
41 | String identifier = cursor.getString(idx_id);
42 | String amiibo_name = identifier;
43 | AmiiboDescriptor descriptor = getFromKey(identifier);
44 | if (descriptor != null) amiibo_name = descriptor.name;
45 |
46 | AmiiboIdentifiersHolder tuple = new AmiiboIdentifiersHolder(identifier, amiibo_name,
47 | cursor.getLong(idx_count));
48 |
49 | list.add(tuple);
50 | cursor.moveToNext();
51 | }
52 |
53 |
54 | return list;
55 | }
56 |
57 | @Override
58 | @Nullable
59 | protected AmiiboDescriptor getFromKeyInternal(@NonNull String identifier) {
60 | AmiiboDescriptor descriptor = null;
61 | identifier = identifier.toLowerCase();
62 | descriptor = new Select()
63 | .from(AmiiboDescriptor.class)
64 | .where(Condition.column(AmiiboDescriptor$Table.AMIIBO_IDENTIFIER).eq(identifier))
65 | .querySingle();
66 | return descriptor;
67 | }
68 |
69 | @Override
70 | protected void updateCache(@NonNull AmiiboDescriptor amiibo_descriptor,
71 | boolean force) {
72 | String amiibo_identifier = amiibo_descriptor.amiibo_identifier;
73 | if (force || null == getCache().get(amiibo_identifier))
74 | getCache().put(amiibo_identifier, amiibo_descriptor);
75 | }
76 |
77 | @NonNull
78 | @Override
79 | protected AmiiboDescriptor updateInDatabaseInternal(@NonNull AmiiboDescriptor object) {
80 | AmiiboDescriptor previous = new Select()
81 | .from(AmiiboDescriptor.class)
82 | .where(Condition.column(AmiiboDescriptor$Table.AMIIBO_IDENTIFIER)
83 | .eq(object.amiibo_identifier.toLowerCase()))
84 | .querySingle();
85 | if (previous == null) {
86 | previous = object;
87 | object.insert();
88 | } else {
89 | previous.amiibo_identifier = object.amiibo_identifier.toLowerCase();
90 | previous.name = object.name;
91 | previous.update();
92 | }
93 | return previous;
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/amiibo/AmiiboHelper.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.amiibo;
2 |
3 | import android.support.annotation.NonNull;
4 | import android.util.SparseArray;
5 |
6 | import java.util.Arrays;
7 |
8 | /**
9 | * Created by kevinleperf on 29/10/2015.
10 | */
11 | public class AmiiboHelper {
12 |
13 | /**
14 | * Store every REJECTED_PAGES_TO_WRITE
15 | * > unwritable pages and factory locked
16 | */
17 | private static final SparseArray REJECTED_PAGES_TO_WRITE = new SparseArray<>();
18 |
19 | public static void init() {
20 | REJECTED_PAGES_TO_WRITE.put(0, true); //UID
21 | REJECTED_PAGES_TO_WRITE.put(1, true);
22 | REJECTED_PAGES_TO_WRITE.put(2, true);
23 | REJECTED_PAGES_TO_WRITE.put(3, true);
24 | for (int i = 0; i < 8; i++)
25 | REJECTED_PAGES_TO_WRITE.put(i + 0x0D, true); //13th page to the 31th include
26 | for (int i = 0; i < 0x0B; i++) REJECTED_PAGES_TO_WRITE.put(i + 0x15, true);
27 | REJECTED_PAGES_TO_WRITE.put(0x82, true);//dynamic lock bytes
28 | REJECTED_PAGES_TO_WRITE.put(0x83, true);//configuration
29 | REJECTED_PAGES_TO_WRITE.put(0x84, true);//configuration
30 | REJECTED_PAGES_TO_WRITE.put(0x85, true);//PWD
31 | REJECTED_PAGES_TO_WRITE.put(0x86, true);//PACK
32 | }
33 |
34 |
35 | /**
36 | * From a given data in intput, return the sub-byte array where the first returned
37 | * octet is the first octet of the given page with all the subsequents pages (limited to number)
38 | *
39 | * @param data
40 | * @param page
41 | * @param number_pages
42 | * @return
43 | */
44 | @NonNull
45 | static byte[] getPage(@NonNull byte[] data, int page, int number_pages) {
46 | int byte_read = 4 * number_pages;
47 | int start = page * 4;
48 | return Arrays.copyOfRange(data, start, start + byte_read);
49 | }
50 |
51 | /**
52 | * Appends a given page to the list of pages to write, also check for rejected pages
53 | *
54 | * @param pages_output
55 | * @param array_intput
56 | * @param page_number
57 | * @return
58 | */
59 | private static boolean appendPage(SparseArray pages_output,
60 | byte[] array_intput, int page_number) {
61 | return appendPage(pages_output, array_intput, page_number, false);
62 | }
63 |
64 | private static boolean appendPage(SparseArray pages_output,
65 | byte[] array_intput, int page_number,
66 | boolean include_rejected) {
67 | if (!include_rejected && REJECTED_PAGES_TO_WRITE.get(page_number) != null) return false;
68 |
69 | int i0 = page_number * 4;
70 | int i1 = i0 + 1;
71 | int i2 = i0 + 2;
72 | int i3 = i0 + 3;
73 |
74 | byte[] page = new byte[]{
75 | array_intput.length > i0 ? array_intput[i0] : 0,
76 | array_intput.length > i1 ? array_intput[i1] : 0,
77 | array_intput.length > i2 ? array_intput[i2] : 0,
78 | array_intput.length > i3 ? array_intput[i3] : 0,
79 | };
80 |
81 | pages_output.put(page_number, page);
82 | return true;
83 | }
84 |
85 | /**
86 | * From all the input data, return a complete list of pages to write
87 | *
88 | * @param pages_output
89 | * @param bytes_input
90 | * @return
91 | */
92 | public static boolean appendPagesFromBytes(SparseArray pages_output, byte[] bytes_input) {
93 | int block = 0;
94 | for (int i = 0; i < bytes_input.length; i += 4, block++) {
95 | appendPage(pages_output, bytes_input, block);
96 | }
97 | return true;
98 | }
99 |
100 | public static SparseArray pagesIntoList(byte[] bytes_input) {
101 | SparseArray pages_output = new SparseArray<>();
102 | for (int i = 0, block = 0; i < bytes_input.length; i += 4, block++) {
103 | appendPage(pages_output, bytes_input, block, true);
104 | }
105 | return pages_output;
106 | }
107 |
108 |
109 | }
110 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/scan/fragments/ScanToWriteFragment.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.scan.fragments;
2 |
3 | import android.content.Context;
4 | import android.nfc.tech.NfcA;
5 | import android.os.Bundle;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 |
10 | import java.io.IOException;
11 |
12 | import butterknife.Bind;
13 | import butterknife.ButterKnife;
14 | import eu.codlab.amiiwrite.MainActivity;
15 | import eu.codlab.amiiwrite.R;
16 | import eu.codlab.amiiwrite.amiibo.AmiiboIO;
17 | import eu.codlab.amiiwrite.database.controllers.AmiiboFactory;
18 | import eu.codlab.amiiwrite.database.models.Amiibo;
19 | import eu.codlab.amiiwrite.ui._stack.PopableFragment;
20 | import eu.codlab.amiiwrite.ui._stack.StackController;
21 |
22 | public class ScanToWriteFragment extends PopableFragment {
23 | private final static String AMIIBO_ID = "AMIIBO_ID";
24 |
25 | private IScanToWriteListener _scan_listener;
26 |
27 | public ScanToWriteFragment() {
28 | // Required empty public constructor
29 | }
30 |
31 | public static ScanToWriteFragment newInstance(Amiibo amiibo) {
32 | return newInstance(amiibo.id);
33 | }
34 |
35 | public static ScanToWriteFragment newInstance(long id) {
36 | ScanToWriteFragment fragment = new ScanToWriteFragment();
37 | Bundle arguments = new Bundle();
38 | arguments.putLong(AMIIBO_ID, id);
39 | fragment.setArguments(arguments);
40 | return fragment;
41 | }
42 |
43 | @Bind(R.id.please_retry)
44 | View _please_retry;
45 |
46 | @Override
47 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
48 | Bundle savedInstanceState) {
49 | return inflater.inflate(R.layout.fragment_scan, container, false);
50 | }
51 |
52 | @Override
53 | public void onViewCreated(View view, Bundle savedInstanceState) {
54 | ButterKnife.bind(this, view);
55 | }
56 |
57 | @Override
58 | public boolean hasParent() {
59 | return true;
60 | }
61 |
62 | @Override
63 | public boolean managedOnBackPressed() {
64 | return false;
65 | }
66 |
67 | @Override
68 | public void onResume() {
69 | super.onResume();
70 | ((MainActivity) getActivity()).startScanning();
71 | }
72 |
73 | @Override
74 | public void onPause() {
75 | ((MainActivity) getActivity()).stopScanning();
76 | super.onPause();
77 | }
78 |
79 | @Override
80 | public void onDetach() {
81 | _scan_listener = null;
82 | super.onDetach();
83 | }
84 |
85 | @Override
86 | public void onAttach(Context context) {
87 | super.onAttach(context);
88 |
89 | if (context instanceof IScanToWriteListener) {
90 | _scan_listener = (IScanToWriteListener) context;
91 | } else {
92 | throw new IllegalStateException("The parent activity does not implements "
93 | + IScanToWriteListener.class.getName());
94 | }
95 | }
96 |
97 | public void tryWriteAmiibo(NfcA ntag215, byte[] uid) {
98 | boolean read_successfully = false;
99 | try {
100 | ntag215.connect();
101 |
102 | boolean authenticated = AmiiboIO.authenticateAmiibo(ntag215, uid);
103 |
104 | if (authenticated) {
105 | boolean result = AmiiboIO.writeAmiibo(ntag215, getAmiibo().data.getBlob());
106 |
107 | _scan_listener.onWriteResult(result);
108 | read_successfully = result;
109 | }
110 | } catch (IOException e) {
111 | e.printStackTrace();
112 | }
113 | try {
114 | ntag215.close();
115 | } catch (Exception e) {
116 | e.printStackTrace();
117 | }
118 |
119 | if (!read_successfully) {
120 | _please_retry.setVisibility(View.VISIBLE);
121 | }
122 | }
123 |
124 | private Amiibo getAmiibo() {
125 | return AmiiboFactory.getAmiiboCache()
126 | .getFromKey(getArguments().getLong(AMIIBO_ID, 0));
127 | }
128 |
129 | public interface IScanToWriteListener {
130 | void onWriteResult(boolean written);
131 | }
132 | }
133 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/amiibo/AmiiboCommands.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.amiibo;
2 |
3 | import android.nfc.tech.NfcA;
4 |
5 | import java.io.IOException;
6 |
7 | /**
8 | * Those methods were here to try editing the specific ntag215 blocks
9 | *
10 | * unfortunately, impossible but still here for knowledge purpose
11 | *
12 | *
13 | * Created by kevinleperf on 30/10/2015.
14 | */
15 | public class AmiiboCommands {
16 |
17 | private void setLock(NfcA tag, boolean lock_128_129,
18 | boolean lock_112_127,
19 | boolean lock_96_111,
20 | boolean lock_80_95,
21 | boolean lock_64_79,
22 | boolean lock_48_63,
23 | boolean lock_32_47,
24 | boolean lock_16_31) {
25 | byte[] response = new byte[0];
26 | try {
27 | response = tag.transceive(new byte[]{
28 | (byte) Constants.COMMAND_READ, // COMMAND_READ
29 | (byte) 0x82 // page address
30 | });
31 | byte lock = (byte) ((lock_128_129 ? 1 << 7 : 0)
32 | + (lock_112_127 ? 1 << 6 : 0)
33 | + (lock_96_111 ? 1 << 5 : 0)
34 | + (lock_80_95 ? 1 << 4 : 0)
35 | + (lock_64_79 ? 1 << 3 : 0)
36 | + (lock_48_63 ? 1 << 2 : 0)
37 | + (lock_32_47 ? 1 << 1 : 0)
38 | + (lock_16_31 ? 1 : 0));
39 | if ((response != null)) { // read always returns 4 pages
40 | byte[] write = new byte[]{
41 | (byte) 0xA2, // COMMAND_WRITE
42 | (byte) 38, // page address
43 | lock,
44 | response[1], response[2], response[3] // keep old value for bytes 1-3, you could also simply set them to 0 as they are currently RFU and must always be written as 0 (response[1], response[2], response[3] will contain 0 too as they contain the read RFU value)
45 | };
46 | response = tag.transceive(write);
47 | }
48 | } catch (IOException e) {
49 | e.printStackTrace();
50 | }
51 | }
52 |
53 | private void setProt(NfcA tag, boolean prot, int authlim) {
54 | byte[] response = new byte[0];
55 | try {
56 | response = tag.transceive(new byte[]{
57 | (byte) Constants.COMMAND_READ, // COMMAND_READ
58 | (byte) 0x84 // page address
59 | });
60 | if ((response != null)) { // read always returns 4 pages
61 | byte[] write = new byte[]{
62 | (byte) 0xA2, // COMMAND_WRITE
63 | (byte) 38, // page address
64 | (byte) ((response[0] & 0x078) | (prot ? 0x080 : 0x000) | (authlim & 0x007)),
65 | response[1], response[2], response[3] // keep old value for bytes 1-3, you could also simply set them to 0 as they are currently RFU and must always be written as 0 (response[1], response[2], response[3] will contain 0 too as they contain the read RFU value)
66 | };
67 | response = tag.transceive(write);
68 | }
69 | } catch (IOException e) {
70 | e.printStackTrace();
71 | }
72 | }
73 |
74 | // first page to be protected, set to a value between 0 and 37 for NTAG212
75 | private void setAuth0(NfcA tag, int auth0) {
76 | byte[] response = new byte[0];
77 | try {
78 | response = tag.transceive(new byte[]{
79 | (byte) Constants.COMMAND_READ, // COMMAND_READ
80 | (byte) 0x83 // page address
81 | });
82 | if ((response != null) && (response.length >= 16)) { // read always returns 4 pages
83 | byte[] write = new byte[]{
84 | (byte) 0xA2, // COMMAND_WRITE
85 | (byte) 37, // page address
86 | response[0], // keep old value for byte 0
87 | response[1], // keep old value for byte 1
88 | response[2], // keep old value for byte 2
89 | (byte) (auth0 & 0x0ff)
90 | };
91 | response = tag.transceive(write);
92 | }
93 | } catch (IOException e) {
94 | e.printStackTrace();
95 | }
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/database/controllers/AmiiboCache.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.database.controllers;
2 |
3 | import android.support.annotation.NonNull;
4 | import android.support.annotation.Nullable;
5 |
6 | import com.raizlabs.android.dbflow.sql.builder.Condition;
7 | import com.raizlabs.android.dbflow.sql.language.Select;
8 |
9 | import java.util.List;
10 | import java.util.UUID;
11 |
12 | import eu.codlab.amiiwrite.amiibo.AmiiboMethods;
13 | import eu.codlab.amiiwrite.database.models.Amiibo;
14 | import eu.codlab.amiiwrite.database.models.Amiibo$Table;
15 | import eu.codlab.amiiwrite.utils.IO;
16 |
17 | /**
18 | * Created by kevinleperf on 31/12/15.
19 | */
20 | public class AmiiboCache extends AbstractCacheable {
21 |
22 |
23 | public List getAmiibosUnsynced() {
24 | List amiibos = new Select()
25 | .from(Amiibo.class)
26 | .where(Condition.CombinedCondition
27 | .begin(Condition.column(Amiibo$Table.SYNCED).eq(false))
28 | .or(Condition.column(Amiibo$Table.SYNCED).isNull()))
29 | .queryList();
30 |
31 | for (Amiibo amiibo : amiibos) updateCache(amiibo, true);
32 |
33 | return amiibos;
34 | }
35 |
36 | @NonNull
37 | public List getAmiibos(String amiibo_identifier) {
38 | amiibo_identifier = amiibo_identifier.toLowerCase();
39 | List amiibos = new Select()
40 | .from(Amiibo.class)
41 | .where(Condition.column(Amiibo$Table.AMIIBO_IDENTIFIER).eq(amiibo_identifier))
42 | .orderBy(false, Amiibo$Table.CREATED_AT)
43 | .queryList();
44 |
45 | for (Amiibo amiibo : amiibos) updateCache(amiibo, true);
46 |
47 | return amiibos;
48 | }
49 |
50 | @NonNull
51 | public Amiibo getAmiibo(String amiibo_uuid) {
52 | amiibo_uuid = amiibo_uuid.toLowerCase();
53 | Amiibo amiibo = new Select()
54 | .from(Amiibo.class)
55 | .where(Condition.column(Amiibo$Table.UUID).eq(amiibo_uuid))
56 | .querySingle();
57 |
58 | if (amiibo != null)
59 | updateCache(amiibo, true);
60 |
61 | return amiibo;
62 | }
63 |
64 | @Nullable
65 | @Override
66 | protected Amiibo getFromKeyInternal(@NonNull Long id) {
67 | return new Select()
68 | .from(Amiibo.class)
69 | .where(Condition.column(Amiibo$Table.ID).eq(id))
70 | .querySingle();
71 | }
72 |
73 | @Override
74 | protected void updateCache(@NonNull Amiibo object, boolean force) {
75 | if (null == getCache().get(object.id) || force)
76 | getCache().put(object.id, object);
77 | }
78 |
79 | @Override
80 | @NonNull
81 | protected Amiibo updateInDatabaseInternal(@NonNull Amiibo object) {
82 | byte[] identifiers = AmiiboMethods.amiiboIdentifier(object.data.getBlob());
83 |
84 | //set the identifier as the readable representation from the available pages
85 | object.amiibo_identifier = IO.byteArrayToHexString(identifiers);
86 | //lower case the amiibo identifier to make research for more efficient
87 | object.amiibo_identifier = object.amiibo_identifier.toLowerCase();
88 |
89 | //create and uuid from the amiibo, to make easier share/cloud storage
90 | if (object.uuid == null) object.uuid = UUID.randomUUID().toString();
91 |
92 | object.update();
93 |
94 | return object;
95 | }
96 |
97 | public void setUploaded(String uuid, boolean b) {
98 | Amiibo amiibo = getAmiibo(uuid);
99 | amiibo.synced = b;
100 | updateAmiibo(amiibo);
101 | }
102 |
103 |
104 | public void updateAmiibo(Amiibo amiibo) {
105 | byte[] identifiers = AmiiboMethods.amiiboIdentifier(amiibo.data.getBlob());
106 |
107 | //set the identifier as the readable representation from the available pages
108 | amiibo.amiibo_identifier = IO.byteArrayToHexString(identifiers);
109 | //lower case the amiibo identifier to make research for more efficient
110 | amiibo.amiibo_identifier = amiibo.amiibo_identifier.toLowerCase();
111 |
112 | //create and uuid from the amiibo, to make easier share/cloud storage
113 | if (amiibo.uuid == null) amiibo.uuid = UUID.randomUUID().toString();
114 |
115 | amiibo.update();
116 | updateCache(amiibo, true);
117 | }
118 |
119 |
120 | }
121 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/ui/scan/fragments/ScannedAmiiboFragment.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.ui.scan.fragments;
2 |
3 |
4 | import android.os.Bundle;
5 | import android.text.InputType;
6 | import android.widget.Toast;
7 |
8 | import com.afollestad.materialdialogs.DialogAction;
9 | import com.afollestad.materialdialogs.MaterialDialog;
10 | import com.raizlabs.android.dbflow.data.Blob;
11 |
12 | import eu.codlab.amiiwrite.R;
13 | import eu.codlab.amiiwrite.database.controllers.AmiiboFactory;
14 | import eu.codlab.amiiwrite.database.models.Amiibo;
15 | import eu.codlab.amiiwrite.ui.information.adapters.AmiiboAdapter;
16 | import eu.codlab.amiiwrite.ui.information.fragments.AbstractAmiiboInformationFragment;
17 |
18 | public class ScannedAmiiboFragment extends AbstractAmiiboInformationFragment {
19 | private static final String DATA_SCANNED = "DATA_SCANNED";
20 |
21 | public static ScannedAmiiboFragment newInstance(byte[] data) {
22 | ScannedAmiiboFragment fragment = new ScannedAmiiboFragment();
23 | Bundle args = new Bundle();
24 | args.putByteArray(DATA_SCANNED, data);
25 | fragment.setArguments(args);
26 | return fragment;
27 | }
28 |
29 | private Amiibo _tmp_amiibo;
30 | private byte[] _data;
31 |
32 | public ScannedAmiiboFragment() {
33 | }
34 |
35 | @Override
36 | protected void onFabClicked() {
37 | _tmp_amiibo = new Amiibo();
38 | _tmp_amiibo.data = new Blob(_data);
39 |
40 | requestAmiiboInformation();
41 | }
42 |
43 | @Override
44 | public int getResourceLayout() {
45 | return R.layout.fragment_scanned_amiibo;
46 | }
47 |
48 | @Override
49 | public AmiiboAdapter getAdapter() {
50 | return new AmiiboAdapter(_data);
51 | }
52 |
53 | @Override
54 | public void onCreate(Bundle savedInstanceState) {
55 | super.onCreate(savedInstanceState);
56 | if (getArguments() != null) {
57 | _data = getArguments().getByteArray(DATA_SCANNED);
58 | }
59 | }
60 |
61 | private void requestAmiiboInformation() {
62 | if (_tmp_amiibo == null) _tmp_amiibo = new Amiibo();
63 |
64 | int title = _tmp_amiibo.name == null ? R.string.add_amiibo_name_title
65 | : R.string.add_amiibo_game_name_title;
66 | int text = _tmp_amiibo.name == null ? R.string.add_amiibo_name_text
67 | : R.string.add_amiibo_game_name_text;
68 |
69 | new MaterialDialog.Builder(getActivity())
70 | .title(title)
71 | .content(text)
72 | .inputType(InputType.TYPE_CLASS_TEXT)
73 | .input("", "", new MaterialDialog.InputCallback() {
74 | @Override
75 | public void onInput(MaterialDialog dialog, CharSequence input) {
76 | }
77 | })
78 | .onPositive(new MaterialDialog.SingleButtonCallback() {
79 | @Override
80 | public void onClick(MaterialDialog materialDialog, DialogAction dialogAction) {
81 | String name = materialDialog.getInputEditText().getText().toString();
82 | if (_tmp_amiibo != null) {
83 | if (_tmp_amiibo.name == null) _tmp_amiibo.name = name;
84 | else _tmp_amiibo.game_name = name;
85 | }
86 | materialDialog.dismiss();
87 |
88 | //if we still have to request for game information
89 | if (_tmp_amiibo != null) {
90 | if (_tmp_amiibo.game_name == null) {
91 | requestAmiiboInformation();
92 | } else {
93 | AmiiboFactory.getAmiiboCache().updateInDatabase(_tmp_amiibo);
94 | _tmp_amiibo = null;
95 | }
96 | }
97 | }
98 | })
99 | .onNegative(new MaterialDialog.SingleButtonCallback() {
100 | @Override
101 | public void onClick(MaterialDialog materialDialog, DialogAction dialogAction) {
102 | Toast.makeText(materialDialog.getContext(), R.string.canceled,
103 | Toast.LENGTH_SHORT).show();
104 | materialDialog.dismiss();
105 | _tmp_amiibo = null;
106 | }
107 | }).show();
108 | }
109 |
110 | @Override
111 | public boolean managedOnBackPressed() {
112 | return false;
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_menu_drawer.xml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
16 |
17 |
22 |
23 |
32 |
33 |
44 |
45 |
56 |
57 |
58 |
69 |
70 |
81 |
82 |
93 |
94 |
102 |
103 |
104 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/amiibo/AmiiboIO.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.amiibo;
2 |
3 | import android.nfc.TagLostException;
4 | import android.nfc.tech.NfcA;
5 | import android.util.Log;
6 | import android.util.SparseArray;
7 |
8 | import java.io.IOException;
9 | import java.util.Arrays;
10 |
11 | import eu.codlab.amiiwrite.utils.IO;
12 |
13 | /**
14 | * Created by kevinleperf on 29/10/2015.
15 | */
16 | public class AmiiboIO {
17 | public static boolean authenticateAmiibo(NfcA tag, byte[] uid) {
18 | byte[] password = AmiiboMethods.keygen(uid);
19 |
20 | byte[] auth = new byte[]{
21 | (byte) 0x1B,
22 | password[0],
23 | password[1],
24 | password[2],
25 | password[3]
26 | };
27 | byte[] response = new byte[0];
28 | try {
29 | response = tag.transceive(auth);
30 | return true;
31 | } catch (IOException e) {
32 | e.printStackTrace();
33 | }
34 | return false;
35 | }
36 |
37 | public static byte[] readAmiibo(NfcA tag) {
38 | byte[] obtained = null;
39 |
40 | SparseArray read_blocks = new SparseArray<>();
41 |
42 |
43 | try {
44 | for (int i = 0; i < Constants.MAX_READABLE_PAGES; i += 4) {
45 | byte[] write = new byte[]{Constants.COMMAND_READ, (byte) i};
46 | byte[] response = null;
47 | Log.d("MainActivity", "read I :: " + IO.byteArrayToLoggableHexString(write));
48 | boolean continue_with_except = true;
49 | try {
50 | response = tag.transceive(write);
51 | } catch (TagLostException e) {
52 | response = null;
53 | continue_with_except = false;
54 | } catch (IOException e) {
55 | e.printStackTrace();
56 | response = null;
57 | }
58 |
59 | if (response != null && response.length >= 16) {
60 | //we always retrieve 4pages
61 | byte[] first = Arrays.copyOfRange(response, 0, 4);
62 | byte[] second = Arrays.copyOfRange(response, 4, 8);
63 | byte[] third = Arrays.copyOfRange(response, 8, 12);
64 | byte[] fourth = Arrays.copyOfRange(response, 12, 16);
65 | read_blocks.put(i, first);
66 | read_blocks.put(i + 1, second);
67 | read_blocks.put(i + 2, third);
68 | read_blocks.put(i + 3, fourth);
69 | } else if (!continue_with_except) {
70 | throw new TagLostException("having lost completely the tag");
71 | }
72 | }
73 | } catch (TagLostException e) {
74 | e.printStackTrace();
75 | read_blocks.clear();
76 | return null;
77 | }
78 |
79 |
80 | //construct the final array
81 | if (read_blocks.size() > 0) {
82 | obtained = new byte[4 * Constants.MAX_READABLE_PAGES];
83 |
84 | for (int i = 0; i <= Constants.LAST_READABLE_PAGE; i++) {
85 | int delta = i * 4;
86 | byte[] page = read_blocks.get(i);
87 | for (int j = 0; j < 4; j++) obtained[delta + j] = page[j];
88 | }
89 | }
90 |
91 | return obtained;
92 | }
93 |
94 | public static boolean writeAmiibo(NfcA tag, byte[] bytes) {
95 | for (String string : tag.getTag().getTechList())
96 | Log.d("MainActivity", "technos " + string);
97 |
98 | SparseArray pages = new SparseArray<>();
99 | AmiiboHelper.appendPagesFromBytes(pages, bytes);
100 |
101 |
102 | try {
103 | int error = 0;
104 |
105 | for (int key_index = 0; key_index < pages.size(); key_index++) {
106 | boolean continue_with_except = true;
107 |
108 | int page_index = pages.keyAt(key_index);
109 | byte[] page = pages.get(page_index);
110 | byte[] response = null;
111 |
112 | byte[] write = new byte[]{
113 | Constants.COMMAND_WRITE, // COMMAND_WRITE
114 | (byte) (page_index & 0xff),
115 | page[0],
116 | page[1],
117 | page[2],
118 | page[3],
119 | };
120 | try {
121 | response = tag.transceive(write);
122 | Log.d("MainActivity", "write O :: " + IO.byteArrayToLoggableHexString(write) + " OK");
123 | } catch (TagLostException e) {
124 | response = null;
125 | continue_with_except = false;
126 | } catch (IOException e) {
127 | Log.d("MainActivity", "write O :: " + IO.byteArrayToLoggableHexString(write) + " KO");
128 | response = null;
129 | }
130 |
131 | if (response != null) {
132 |
133 | } else if (!continue_with_except) {
134 | return false;
135 | //throw new TagLostException("having lost completely the tag");
136 | }
137 | }
138 | } catch (Exception e) {
139 | e.printStackTrace();
140 | }
141 | return true;
142 | }
143 | }
144 |
--------------------------------------------------------------------------------
/app/src/main/java/eu/codlab/amiiwrite/sync/SyncService.java:
--------------------------------------------------------------------------------
1 | package eu.codlab.amiiwrite.sync;
2 |
3 | import android.app.Activity;
4 | import android.app.Service;
5 | import android.content.Intent;
6 | import android.os.Binder;
7 | import android.os.IBinder;
8 |
9 | import com.crashlytics.android.answers.Answers;
10 | import com.crashlytics.android.answers.CustomEvent;
11 | import com.google.android.gms.common.api.GoogleApiClient;
12 | import com.google.android.gms.drive.Metadata;
13 |
14 | import java.util.List;
15 |
16 | import de.greenrobot.event.EventBus;
17 | import eu.codlab.amiiwrite.database.controllers.AmiiboFactory;
18 | import eu.codlab.amiiwrite.database.models.Amiibo;
19 | import eu.codlab.amiiwrite.events.SyncResult;
20 | import hugo.weaving.DebugLog;
21 |
22 | /**
23 | * Created by kevinleperf on 24/08/15.
24 | */
25 | public class SyncService extends Service {
26 | private State _state = State.FINISHED;
27 |
28 | private enum State {
29 | STARTED,
30 | FINISHED
31 | }
32 |
33 | private static SyncService _instance;
34 |
35 | public static void start(Activity parent) {
36 | Intent service = new Intent(parent, SyncService.class);
37 | parent.startService(service);
38 | }
39 |
40 | public static SyncService getInstance() {
41 | return _instance;
42 | }
43 |
44 | private GoogleApiClient _google_api_client;
45 | private FileManager _file_manager;
46 |
47 | private boolean checkState() {
48 | return _google_api_client != null && _google_api_client.isConnected();
49 | }
50 |
51 | @Override
52 | public void onCreate() {
53 | super.onCreate();
54 |
55 | _instance = this;
56 | _file_manager = new FileManager(this);
57 | onPushFinished();
58 |
59 | checkState();
60 | }
61 |
62 | @Override
63 | public int onStartCommand(Intent intent, int flag, int startId) {
64 | return super.onStartCommand(intent, flag, startId);
65 | }
66 |
67 | @Override
68 | public void onDestroy() {
69 | _instance = null;
70 | _file_manager.onDestroy();
71 | }
72 |
73 | @Override
74 | public IBinder onBind(Intent intent) {
75 | return mBinder;
76 | }
77 |
78 | private final IBinder mBinder = new myBinder();
79 |
80 | @DebugLog
81 | public void setGoogleApiClient(GoogleApiClient google_api_client) {
82 | _google_api_client = google_api_client;
83 |
84 | checkState();
85 | }
86 |
87 | @DebugLog
88 | public void init() {
89 | _state = State.STARTED;
90 | _file_manager.init(this);
91 | _file_manager.listFiles();
92 | checkState();
93 | }
94 |
95 | @DebugLog
96 | public GoogleApiClient getClient() {
97 | return _google_api_client;
98 | }
99 |
100 | @DebugLog
101 | public boolean exists(final String uuid) {
102 | Amiibo amiibo = AmiiboFactory.getAmiiboCache().getAmiibo(uuid);
103 | return amiibo != null;
104 | }
105 |
106 | /**
107 | * Call the retrieval of files from google drive
108 | */
109 | @DebugLog
110 | public void listFiles() {
111 | _file_manager.listFiles();
112 | }
113 |
114 | /**
115 | * The list of files retrieved
116 | *
117 | * @param files the list of files metadata, not null
118 | */
119 | @DebugLog
120 | public void onListFilesResult(List files) {
121 | _file_manager.readFileContent(files);
122 | }
123 |
124 | /**
125 | * Called when the lists of files are fully retrieved
126 | */
127 | @DebugLog
128 | public void onReadFinished() {
129 | upload();
130 | }
131 |
132 | /**
133 | * Upload the locally unsynced files
134 | */
135 | @DebugLog
136 | public void upload() {
137 | List amiibos = AmiiboFactory.getAmiiboCache()
138 | .getAmiibosUnsynced();
139 |
140 | _file_manager.pushToDrive(amiibos);
141 | }
142 |
143 | /**
144 | * When the files are all synced upward
145 | */
146 | @DebugLog
147 | public void onPushFinished() {
148 | _state = State.FINISHED;
149 | EventBus.getDefault().postSticky(new SyncResult(true));
150 | }
151 |
152 | @DebugLog
153 | public void onFileRead(AmiiboFile result) {
154 | CustomEvent event = new CustomEvent("Download");
155 | event.putCustomAttribute("success", result != null ? "true" : "false");
156 | Answers.getInstance().logCustom(event);
157 |
158 | if (result != null) {
159 | Amiibo amiibo = AmiiboFactory.getAmiiboCache().getAmiibo(result.uuid);
160 | Amiibo to_write = result.toAmiibo();
161 | if (amiibo != null) {
162 | to_write.id = amiibo.id;
163 | }
164 | to_write.synced = true;
165 | AmiiboFactory.getAmiiboCache()
166 | .updateInDatabase(to_write);
167 | }
168 | }
169 |
170 | @DebugLog
171 | public void onPushResult(Amiibo amiibo, boolean success) {
172 | CustomEvent event = new CustomEvent("Upload");
173 | event.putCustomAttribute("success", success ? "true" : "false");
174 | Answers.getInstance().logCustom(event);
175 | }
176 |
177 | public void setUploaded(String uuid, boolean success) {
178 | AmiiboFactory.getAmiiboCache().setUploaded(uuid, success);
179 | }
180 |
181 | public class myBinder extends Binder {
182 | public SyncService getService() {
183 | return SyncService.this;
184 | }
185 | }
186 |
187 | public boolean isFinished() {
188 | return _state.ordinal() == State.FINISHED.ordinal();
189 | }
190 | }
191 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------