├── assets
├── 2048
│ ├── .gitignore
│ ├── favicon.ico
│ ├── style
│ │ ├── night.png
│ │ ├── fonts
│ │ │ ├── ClearSans-Bold-webfont.eot
│ │ │ ├── ClearSans-Bold-webfont.woff
│ │ │ ├── ClearSans-Light-webfont.eot
│ │ │ ├── ClearSans-Light-webfont.woff
│ │ │ ├── ClearSans-Regular-webfont.eot
│ │ │ ├── ClearSans-Regular-webfont.woff
│ │ │ └── clear-sans.css
│ │ ├── helpers.scss
│ │ ├── main.scss
│ │ └── main.css
│ ├── meta
│ │ ├── apple-touch-icon.png
│ │ ├── apple-touch-startup-image-640x1096.png
│ │ └── apple-touch-startup-image-640x920.png
│ ├── screenshots
│ │ └── screen01.png
│ ├── js
│ │ ├── application.js
│ │ ├── bind_polyfill.js
│ │ ├── nightmode.js
│ │ ├── tile.js
│ │ ├── animframe_polyfill.js
│ │ ├── classlist_polyfill.js
│ │ ├── grid.js
│ │ ├── local_storage_manager.js
│ │ ├── keyboard_input_manager.js
│ │ ├── html_actuator.js
│ │ └── game_manager.js
│ ├── Rakefile
│ ├── .jshintrc
│ ├── LICENSE.txt
│ ├── README.md
│ ├── CONTRIBUTING.md
│ └── index.html
└── ADBMobileConfig.json
├── metadata
├── ko
│ └── short_description.txt
├── ja
│ └── short_description.txt
├── am
│ └── short_description.txt
├── lt
│ └── short_description.txt
├── ar
│ └── short_description.txt
├── hi
│ └── short_description.txt
├── vi
│ └── short_description.txt
├── bg
│ └── short_description.txt
├── lv
│ └── short_description.txt
├── th
│ └── short_description.txt
├── tr
│ └── short_description.txt
├── af
│ └── short_description.txt
├── de
│ └── short_description.txt
├── en-US
│ ├── short_description.txt
│ ├── icon.png
│ ├── icon_original.png
│ ├── promoGraphic.png
│ ├── featureGraphic.png
│ ├── phoneScreenshots
│ │ └── screen1.png
│ ├── sevenInchScreenshots
│ │ └── screen_tablet.png
│ └── full_description.txt
├── et
│ └── short_description.txt
├── fr
│ └── short_description.txt
├── id
│ └── short_description.txt
├── ro
│ └── short_description.txt
├── sv
│ └── short_description.txt
├── sw
│ └── short_description.txt
├── el
│ └── short_description.txt
├── fi
│ └── short_description.txt
├── pt-BR
│ └── short_description.txt
├── pt-PT
│ └── short_description.txt
├── ru
│ └── short_description.txt
├── uk
│ └── short_description.txt
├── ca
│ └── short_description.txt
├── es
│ └── short_description.txt
└── it
│ └── short_description.txt
├── ic_launcher-web.png
├── .gitmodules
├── ic_launcher-web_promo.jpg
├── ic_launcher-web_feature.jpg
├── neolane_sdk-1.0.27-debug.aar
├── res
├── mipmap-hdpi
│ └── ic_launcher.png
├── mipmap-mdpi
│ └── ic_launcher.png
├── mipmap-xhdpi
│ └── ic_launcher.png
├── drawable-hdpi
│ ├── ic_launcher.png
│ └── ic_stat_name.png
├── drawable-mdpi
│ ├── ic_launcher.png
│ └── ic_stat_name.png
├── drawable-xhdpi
│ ├── ic_launcher.png
│ └── ic_stat_name.png
├── drawable-xxhdpi
│ ├── ic_launcher.png
│ └── ic_stat_name.png
├── mipmap-xxhdpi
│ └── ic_launcher.png
├── mipmap-xxxhdpi
│ └── ic_launcher.png
├── values
│ ├── dimens.xml
│ ├── styles.xml
│ └── strings.xml
├── xml
│ ├── network_security_config.xml
│ └── changelog_master.xml
├── menu
│ └── main.xml
├── values-da
│ └── strings.xml
├── values-sw720dp-land
│ └── dimens.xml
├── values-ko
│ └── strings.xml
├── values-eo
│ └── strings.xml
├── values-lt
│ └── strings.xml
├── values-pt
│ └── strings.xml
├── values-es
│ └── strings.xml
├── values-de
│ └── strings.xml
├── values-pl
│ └── strings.xml
├── values-nl
│ └── strings.xml
├── values-ru
│ └── strings.xml
├── values-fr
│ └── strings.xml
├── values-uk
│ └── strings.xml
├── values-el
│ └── strings.xml
├── values-sr
│ └── strings.xml
└── layout
│ ├── activity_debug_console.xml
│ ├── activity_main.xml
│ └── activity_collect_pii.xml
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── AdobeMobileLibrary
└── adobeMobileLibrary-4.16.1.jar
├── .travis.yml
├── proguard-project.txt
├── src
└── com
│ └── adobe
│ └── a2048
│ └── example
│ ├── AppConfig.java
│ ├── service
│ └── KeepAppAliveWorker.java
│ ├── MyApplication.java
│ ├── NotificationDismissedReceiver.java
│ ├── DebugConsole.java
│ ├── CollectPIIActivity.java
│ ├── MainActivity.java
│ └── MyFirebaseMessagingService.java
├── LICENSE
├── .gitignore
├── README.md
├── CONTRIBUTING.md
├── AndroidManifest.xml
├── gradlew.bat
├── CODE_OF_CONDUCT.md
└── gradlew
/assets/2048/.gitignore:
--------------------------------------------------------------------------------
1 | .sass-cache/
2 |
--------------------------------------------------------------------------------
/metadata/ko/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 퍼즐 게임. 이 안드로이드 오픈 소스 포트입니다.
--------------------------------------------------------------------------------
/metadata/ja/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048パズルゲーム。これはAndroidのオープンソースのポートです。
--------------------------------------------------------------------------------
/metadata/am/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 እንቆቅልሽ ጨዋታ. ይህ የ Android ክፍት ምንጭ ወደብ ነው.
--------------------------------------------------------------------------------
/metadata/lt/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 dėlionė. Tai Android atviro kodo uosto.
--------------------------------------------------------------------------------
/metadata/ar/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 لعبة اللغز. هذا هو الروبوت منفذ مفتوح المصدر.
--------------------------------------------------------------------------------
/metadata/hi/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 पहेली खेल. इस Android खुला स्रोत बंदरगाह है.
--------------------------------------------------------------------------------
/metadata/vi/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 Puzzle Game. Đây là cổng nguồn mở Android.
--------------------------------------------------------------------------------
/metadata/bg/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 Puzzle Game. Това е Android с отворен код порт.
--------------------------------------------------------------------------------
/metadata/lv/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 Puzzle spēle. Tas ir android open source portu.
--------------------------------------------------------------------------------
/metadata/th/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 เกมปริศนา นี้เป็นพอร์ตเปิดแหล่งที่มาของหุ่นยนต์
--------------------------------------------------------------------------------
/metadata/tr/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 Puzzle Oyunu. Bu android açık kaynak limanıdır.
--------------------------------------------------------------------------------
/metadata/af/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 legkaart spel. Dit is die Android open source hawe.
--------------------------------------------------------------------------------
/metadata/de/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 Puzzle-Spiel. Dies ist die Open-Source-Android-Port.
--------------------------------------------------------------------------------
/metadata/en-US/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 Puzzle Game. This is the android open source port.
--------------------------------------------------------------------------------
/metadata/et/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 puzzle mäng. See on Android avatud lähtekoodiga sadama.
--------------------------------------------------------------------------------
/metadata/fr/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 Puzzle Game. Il s'agit du port open source Android.
--------------------------------------------------------------------------------
/metadata/id/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 Puzzle Game. Ini adalah android pelabuhan open source.
--------------------------------------------------------------------------------
/metadata/ro/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 joc de puzzle. Acesta este portul open source Android.
--------------------------------------------------------------------------------
/metadata/sv/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 pusselspel. Detta är den Android öppen källkod port.
--------------------------------------------------------------------------------
/metadata/sw/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 Puzzle michezo. Hii ni android wazi chanzo bandari.
--------------------------------------------------------------------------------
/metadata/el/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 παιχνίδι παζλ. Αυτό είναι το Android λιμάνι open source.
--------------------------------------------------------------------------------
/metadata/fi/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 pulmapeli. Tämä on Android avoimen lähdekoodin satamaan.
--------------------------------------------------------------------------------
/metadata/pt-BR/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 Jogo Puzzle. Esta é a porta de código aberto Android.
--------------------------------------------------------------------------------
/metadata/pt-PT/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 Jogo Puzzle. Esta é a porta de código aberto Android.
--------------------------------------------------------------------------------
/metadata/ru/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 Puzzle Game. Это андроид порт с открытым исходным кодом.
--------------------------------------------------------------------------------
/metadata/uk/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 Puzzle Game. Це андроїд порт з відкритим вихідним кодом.
--------------------------------------------------------------------------------
/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/ic_launcher-web.png
--------------------------------------------------------------------------------
/metadata/ca/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 Joc de Trencaclosques. Aquest és el port de codi obert Android.
--------------------------------------------------------------------------------
/metadata/es/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 Juego de Puzzle. Este es el puerto de código abierto Android.
--------------------------------------------------------------------------------
/metadata/it/short_description.txt:
--------------------------------------------------------------------------------
1 | 2048 Puzzle Game. Questa è la versione open source per Android.
2 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "assets/2048"]
2 | path = assets/2048
3 | url = https://github.com/uberspot/2048.git
4 |
--------------------------------------------------------------------------------
/assets/2048/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/assets/2048/favicon.ico
--------------------------------------------------------------------------------
/ic_launcher-web_promo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/ic_launcher-web_promo.jpg
--------------------------------------------------------------------------------
/metadata/en-US/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/metadata/en-US/icon.png
--------------------------------------------------------------------------------
/assets/2048/style/night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/assets/2048/style/night.png
--------------------------------------------------------------------------------
/ic_launcher-web_feature.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/ic_launcher-web_feature.jpg
--------------------------------------------------------------------------------
/neolane_sdk-1.0.27-debug.aar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/neolane_sdk-1.0.27-debug.aar
--------------------------------------------------------------------------------
/metadata/en-US/icon_original.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/metadata/en-US/icon_original.png
--------------------------------------------------------------------------------
/metadata/en-US/promoGraphic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/metadata/en-US/promoGraphic.png
--------------------------------------------------------------------------------
/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/metadata/en-US/featureGraphic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/metadata/en-US/featureGraphic.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/res/drawable-hdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/res/drawable-mdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/drawable-xhdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/res/drawable-xhdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/assets/2048/meta/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/assets/2048/meta/apple-touch-icon.png
--------------------------------------------------------------------------------
/assets/2048/screenshots/screen01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/assets/2048/screenshots/screen01.png
--------------------------------------------------------------------------------
/res/drawable-xxhdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/res/drawable-xxhdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/metadata/en-US/phoneScreenshots/screen1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/metadata/en-US/phoneScreenshots/screen1.png
--------------------------------------------------------------------------------
/AdobeMobileLibrary/adobeMobileLibrary-4.16.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/AdobeMobileLibrary/adobeMobileLibrary-4.16.1.jar
--------------------------------------------------------------------------------
/assets/2048/style/fonts/ClearSans-Bold-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/assets/2048/style/fonts/ClearSans-Bold-webfont.eot
--------------------------------------------------------------------------------
/assets/2048/style/fonts/ClearSans-Bold-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/assets/2048/style/fonts/ClearSans-Bold-webfont.woff
--------------------------------------------------------------------------------
/assets/2048/style/fonts/ClearSans-Light-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/assets/2048/style/fonts/ClearSans-Light-webfont.eot
--------------------------------------------------------------------------------
/assets/2048/style/fonts/ClearSans-Light-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/assets/2048/style/fonts/ClearSans-Light-webfont.woff
--------------------------------------------------------------------------------
/assets/2048/meta/apple-touch-startup-image-640x1096.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/assets/2048/meta/apple-touch-startup-image-640x1096.png
--------------------------------------------------------------------------------
/assets/2048/meta/apple-touch-startup-image-640x920.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/assets/2048/meta/apple-touch-startup-image-640x920.png
--------------------------------------------------------------------------------
/assets/2048/style/fonts/ClearSans-Regular-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/assets/2048/style/fonts/ClearSans-Regular-webfont.eot
--------------------------------------------------------------------------------
/assets/2048/style/fonts/ClearSans-Regular-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/assets/2048/style/fonts/ClearSans-Regular-webfont.woff
--------------------------------------------------------------------------------
/metadata/en-US/sevenInchScreenshots/screen_tablet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/acs-android-example/master/metadata/en-US/sevenInchScreenshots/screen_tablet.png
--------------------------------------------------------------------------------
/assets/2048/js/application.js:
--------------------------------------------------------------------------------
1 | // Wait till the browser is ready to render the game (avoids glitches)
2 | window.requestAnimationFrame(function () {
3 | new GameManager(4, KeyboardInputManager, HTMLActuator, LocalStorageManager);
4 | });
5 |
--------------------------------------------------------------------------------
/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/assets/2048/js/bind_polyfill.js:
--------------------------------------------------------------------------------
1 | Function.prototype.bind = Function.prototype.bind || function (target) {
2 | var self = this;
3 | return function (args) {
4 | if (!(args instanceof Array)) {
5 | args = [args];
6 | }
7 | self.apply(target, args);
8 | };
9 | };
10 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Oct 14 19:55:48 PDT 2018
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-4.6-all.zip
7 |
--------------------------------------------------------------------------------
/res/xml/network_security_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: android
2 |
3 | android:
4 | components:
5 | - tools
6 | - build-tools-24.0.1
7 | - android-24
8 | - platform-tools
9 | - extra-android-support
10 | - extra-android-m2repository
11 |
12 | jdk:
13 | - oraclejdk8
14 | script:
15 | - ./gradlew build
16 |
--------------------------------------------------------------------------------
/res/values-da/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Indstillinger
3 | 2048
4 | Tryk tilbage igen for at slutte
5 | Hold knappen inde for at skifte til fuld skærm
6 |
7 |
--------------------------------------------------------------------------------
/res/values-sw720dp-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | 128dp
8 |
9 |
10 |
--------------------------------------------------------------------------------
/assets/2048/Rakefile:
--------------------------------------------------------------------------------
1 | require "date"
2 |
3 | namespace :appcache do
4 | desc "update the date in the appcache file (in the gh-pages branch)"
5 | task :update do
6 | appcache = File.read("cache.appcache")
7 | updated = "# Updated: #{DateTime.now}"
8 |
9 | File.write("cache.appcache", appcache.sub(/^# Updated:.*$/, updated))
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/res/values-ko/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2048
5 | 설정
6 | \'뒤로\' 버튼을 한번 더 누르시면 종료됩니다.
7 | 화면 모드 변경을 하려면 화면을 길게 누르세요.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/res/values-eo/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2048
5 | Agordoj
6 | Premu reen denove por eliri
7 | Premu longe por baskuligi tutekrane
8 |
9 |
10 |
--------------------------------------------------------------------------------
/res/values-lt/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 2048
4 | Nustatymai
5 | Paspauskite atgal norėdami išeiti
6 | Paspauskite ilgiau norėdami įjungti pilną ekraną
7 |
--------------------------------------------------------------------------------
/res/values-pt/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 2048
4 | Configurações
5 | Pressione voltar novamente para sair
6 | Pressione e segure para entrar no modo de tela cheia
7 |
--------------------------------------------------------------------------------
/res/values-es/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2048
5 | Ajustes
6 | Pulse "Atrás" de nuevo para salir
7 | Pulsación larga para alternar pantalla completa
8 |
9 |
10 |
--------------------------------------------------------------------------------
/res/values-de/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2048
5 | Einstellungen
6 | Drücke nochmal Zurück zum Beenden
7 | Lange drücken, um Vollbildschirm anzuzeigen
8 |
9 |
10 |
--------------------------------------------------------------------------------
/res/values-pl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2048
5 | Ustawienia
6 | Naciśnij ponownie, aby wyjść
7 | Trzymaj nacisk na pare sekund, aby zmienic na pełny ekran
8 |
9 |
10 |
--------------------------------------------------------------------------------
/res/values-nl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2048
5 | Instellingen
6 | Druk opnieuw op terug om af te sluiten
7 | Druk lang in om volledig scherm om te schakelen
8 |
9 |
10 |
--------------------------------------------------------------------------------
/res/values-ru/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2048
5 | Настройки
6 | Нажмите кнопку [Назад] ещё раз, чтобы выйти
7 | Долгое нажатие переключает полноэкранный режим
8 |
9 |
10 |
--------------------------------------------------------------------------------
/res/values-fr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2048
5 | Paramètres
6 | Appuyez encore sur retour pour quitter
7 | Appuyez longtemps pour passer en mode plein écran
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/res/values-uk/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2048
5 | Налаштування
6 | Натисніть назад ще раз, щоб вийти
7 | Довге натиснення для того, щоб перейти у повноекранний режим
8 |
9 |
10 |
--------------------------------------------------------------------------------
/res/values-el/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2048
5 | Ρυθμίσεις
6 | Πατήστε \'πίσω\' ξανά για έξοδο
7 | Πατήστε για ώρα την οθόνη για να μεγιστοποίηση/σμίκρυνση παραθύρου
8 |
9 |
10 |
--------------------------------------------------------------------------------
/assets/2048/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "esnext": true,
3 | "indent": 2,
4 | "maxlen": 80,
5 | "freeze": true,
6 | "camelcase": true,
7 | "unused": true,
8 | "eqnull": true,
9 | "proto": true,
10 | "supernew": true,
11 | "noyield": true,
12 | "evil": true,
13 | "node": true,
14 | "boss": true,
15 | "expr": true,
16 | "loopfunc": true,
17 | "white": true,
18 | "maxdepth": 4
19 | }
20 |
--------------------------------------------------------------------------------
/res/values-sr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2048
5 | Подешавања
6 | Притисните поново тастер за враћање ради изласка из апликације
7 | Додирните и задржите прст на екрану за пребацивање апликације у режим пуног екрана
8 |
9 |
10 |
--------------------------------------------------------------------------------
/assets/2048/js/nightmode.js:
--------------------------------------------------------------------------------
1 | window.onload = function() {
2 | var a = document.getElementById("night");
3 | a.onclick = function() {
4 | if (document.getElementsByTagName("html")[0].style.backgroundColor === "rgb(45, 48, 44)") {
5 | document.getElementsByTagName("html")[0].style.backgroundColor = "#faf8ef";
6 | document.getElementsByTagName("body")[0].style.backgroundColor = "#faf8ef";
7 | return false;
8 | } else {
9 | document.getElementsByTagName("html")[0].style.backgroundColor = "#2D302C";
10 | document.getElementsByTagName("body")[0].style.backgroundColor = "#2D302C";
11 | return false;
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/assets/2048/js/tile.js:
--------------------------------------------------------------------------------
1 | function Tile(position, value) {
2 | this.x = position.x;
3 | this.y = position.y;
4 | this.value = value || 2;
5 |
6 | this.previousPosition = null;
7 | this.mergedFrom = null; // Tracks tiles that merged together
8 | }
9 |
10 | Tile.prototype.savePosition = function () {
11 | this.previousPosition = { x: this.x, y: this.y };
12 | };
13 |
14 | Tile.prototype.updatePosition = function (position) {
15 | this.x = position.x;
16 | this.y = position.y;
17 | };
18 |
19 | Tile.prototype.serialize = function () {
20 | return {
21 | position: {
22 | x: this.x,
23 | y: this.y
24 | },
25 | value: this.value
26 | };
27 | };
28 |
--------------------------------------------------------------------------------
/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/metadata/en-US/full_description.txt:
--------------------------------------------------------------------------------
1 | 2048 Puzzle Game
2 |
3 | -------------------------------
4 |
5 | This is the android port of the 2048 game made by Gabriele Cirulli https://github.com/gabrielecirulli/2048
6 | It's just a webview that loads the locally stored HTML files of the original game.
7 | No ads, no permissions required. Just open source. :)
8 | I just wanted to make it instantly playable without Internet and with a quick access icon for my smartphone. It is a bit slower than native code since everything runs in an android webview. If you want you can contribute fixes/speedups here https://github.com/uberspot/2048
9 |
10 | Long touch for 3+ seconds anywhere on the game if you want to toggle the fullscreen mode.
11 |
12 | You can view the code here https://github.com/uberspot/2048-android
--------------------------------------------------------------------------------
/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/src/com/adobe/a2048/example/AppConfig.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2019 Adobe
3 | All Rights Reserved.
4 |
5 | NOTICE: Adobe permits you to use, modify, and distribute this file in
6 | accordance with the terms of the Adobe license agreement accompanying
7 | it. If you have received this file from a source other than Adobe,
8 | then your use, modification, or distribution of it requires the prior
9 | written permission of Adobe.
10 | */
11 |
12 | package com.adobe.a2048.example;
13 |
14 | public class AppConfig {
15 | public static final boolean CAMPAIGN_CLASSIC_ENABLED = false;
16 | public static final boolean CAMPAIGN_STANDARD_ENABLED = true;
17 | public static final boolean CAMPAIGN_STANDARD_DEBUG_LOGGING_ENABLED = true;
18 | public static final boolean KEEP_ALIVE_WORKER_ENABLED = true;
19 | public static final String EXAMPLE_CHANNEL_NAME = "EXAMPLE CHANNEL NAME";
20 | public static final String EXAMPLE_CHANNEL_ID = "EXAMPLE CHANNEL ID";
21 | }
22 |
--------------------------------------------------------------------------------
/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2048 Example
5 | Settings
6 | Press back again to exit
7 | Long click to toggle fullscreen
8 | Open PII View
9 | com.adobe.a2048.example.PUSH_TOKEN_KEY
10 | CollectPIIActivity
11 | Debug Console
12 | Button
13 | Copy to clipboard
14 | DebugConsole
15 |
16 |
17 |
--------------------------------------------------------------------------------
/res/layout/activity_debug_console.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
24 |
25 |
--------------------------------------------------------------------------------
/assets/2048/js/animframe_polyfill.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | var lastTime = 0;
3 | var vendors = ['webkit', 'moz'];
4 | for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
5 | window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
6 | window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] ||
7 | window[vendors[x] + 'CancelRequestAnimationFrame'];
8 | }
9 |
10 | if (!window.requestAnimationFrame) {
11 | window.requestAnimationFrame = function (callback) {
12 | var currTime = new Date().getTime();
13 | var timeToCall = Math.max(0, 16 - (currTime - lastTime));
14 | var id = window.setTimeout(function () {
15 | callback(currTime + timeToCall);
16 | },
17 | timeToCall);
18 | lastTime = currTime + timeToCall;
19 | return id;
20 | };
21 | }
22 |
23 | if (!window.cancelAnimationFrame) {
24 | window.cancelAnimationFrame = function (id) {
25 | clearTimeout(id);
26 | };
27 | }
28 | }());
29 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Paul Sarbinowski
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/assets/2048/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Gabriele Cirulli
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/assets/2048/style/fonts/clear-sans.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: "Clear Sans";
3 | src: url("ClearSans-Light-webfont.eot");
4 | src: url("ClearSans-Light-webfont.eot?#iefix") format("embedded-opentype"),
5 | url("ClearSans-Light-webfont.svg#clear_sans_lightregular") format("svg"),
6 | url("ClearSans-Light-webfont.woff") format("woff");
7 | font-weight: 200;
8 | font-style: normal;
9 | }
10 |
11 | @font-face {
12 | font-family: "Clear Sans";
13 | src: url("ClearSans-Regular-webfont.eot");
14 | src: url("ClearSans-Regular-webfont.eot?#iefix") format("embedded-opentype"),
15 | url("ClearSans-Regular-webfont.svg#clear_sansregular") format("svg"),
16 | url("ClearSans-Regular-webfont.woff") format("woff");
17 | font-weight: normal;
18 | font-style: normal;
19 | }
20 |
21 | @font-face {
22 | font-family: "Clear Sans";
23 | src: url("ClearSans-Bold-webfont.eot");
24 | src: url("ClearSans-Bold-webfont.eot?#iefix") format("embedded-opentype"),
25 | url("ClearSans-Bold-webfont.svg#clear_sansbold") format("svg"),
26 | url("ClearSans-Bold-webfont.woff") format("woff");
27 | font-weight: 700;
28 | font-style: normal;
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/src/com/adobe/a2048/example/service/KeepAppAliveWorker.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2019 Adobe
3 | All Rights Reserved.
4 |
5 | NOTICE: Adobe permits you to use, modify, and distribute this file in
6 | accordance with the terms of the Adobe license agreement accompanying
7 | it. If you have received this file from a source other than Adobe,
8 | then your use, modification, or distribution of it requires the prior
9 | written permission of Adobe.
10 | */
11 |
12 | package com.adobe.a2048.example.service;
13 |
14 | import android.support.annotation.NonNull;
15 | import android.util.Log;
16 |
17 | import com.adobe.a2048.example.BuildConfig;
18 |
19 | import androidx.work.Worker;
20 |
21 | /**
22 | * help from here:
23 | * https://developer.android.com/topic/libraries/architecture/adding-components#add_the_google_maven_repository
24 | * https://developer.android.com/topic/libraries/architecture/adding-components#workmanager
25 | * https://medium.com/mindorks/lets-work-manager-do-background-processing-58356e1ab844
26 | */
27 | public class KeepAppAliveWorker extends Worker {
28 | private final String TAG = KeepAppAliveWorker.class.getSimpleName();
29 |
30 | @NonNull
31 | @Override
32 | public Result doWork() {
33 | Log.d(TAG, "doWork(): " + BuildConfig.APPLICATION_ID);
34 | return Result.SUCCESS;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/res/xml/changelog_master.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Added Esperanto and Dutch (thx Robin van der Vliet).
5 | Fix bug with floating windows (thx diogopereira)
6 |
7 |
8 | Limit undo button to last 50 states to avoid using too much memory.
9 |
10 |
11 | Added changelog in app
12 |
13 |
14 | Added undo button (thx to fraggerfox on github)
15 |
16 |
17 | Rebuilt apk with new build tools.
18 |
19 |
20 | Added German, Spanish, Polish, Serbian translations thx to contributors in github
21 | Added experimental night mode button
22 | Minor optimizations to responsiveness
23 |
24 |
25 | Added greek and french app translation, minor build improvements.
26 |
27 |
--------------------------------------------------------------------------------
/src/com/adobe/a2048/example/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2019 Adobe
3 | All Rights Reserved.
4 |
5 | NOTICE: Adobe permits you to use, modify, and distribute this file in
6 | accordance with the terms of the Adobe license agreement accompanying
7 | it. If you have received this file from a source other than Adobe,
8 | then your use, modification, or distribution of it requires the prior
9 | written permission of Adobe.
10 | */
11 |
12 | package com.adobe.a2048.example;
13 |
14 | import android.app.Application;
15 |
16 | import com.adobe.mobile.Config;
17 |
18 | public class MyApplication extends Application {
19 | // Called when the application is starting, before any other application objects have been created.
20 | @Override
21 | public void onCreate() {
22 | super.onCreate();
23 |
24 | // allows Adobe Mobile SDK to
25 | if (AppConfig.CAMPAIGN_STANDARD_ENABLED) {
26 | /*
27 | Setting Adobe mobile v4 SDK context in Application class allows for entire app to
28 | allow the SDK access to the application context in all objects (currently provides
29 | context to MainActivity.java, MyFirebaseMessagingService.java, and CollectPIIActivity.java)
30 | */
31 | Config.setContext(this.getApplicationContext());
32 |
33 | //Turns on debug logging
34 | Config.setDebugLogging(AppConfig.CAMPAIGN_STANDARD_DEBUG_LOGGING_ENABLED);
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/com/adobe/a2048/example/NotificationDismissedReceiver.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2019 Adobe
3 | All Rights Reserved.
4 |
5 | NOTICE: Adobe permits you to use, modify, and distribute this file in
6 | accordance with the terms of the Adobe license agreement accompanying
7 | it. If you have received this file from a source other than Adobe,
8 | then your use, modification, or distribution of it requires the prior
9 | written permission of Adobe.
10 | */
11 |
12 | package com.adobe.a2048.example;
13 |
14 | import android.content.BroadcastReceiver;
15 | import android.content.Context;
16 | import android.content.Intent;
17 | import android.os.Bundle;
18 | import android.util.Log;
19 |
20 | import com.adobe.mobile.Analytics;
21 | import java.util.HashMap;
22 |
23 | public class NotificationDismissedReceiver extends BroadcastReceiver {
24 | private static final String TAG = NotificationDismissedReceiver.class.getSimpleName();
25 |
26 | @Override
27 | public void onReceive(Context context, Intent intent) {
28 | Log.d(TAG, "Dismissed Notification");
29 |
30 | Bundle data = intent.getExtras();
31 | String deliveryId = data.getString("_dId");
32 | String messageId = data.getString("_mId");
33 |
34 | if (AppConfig.CAMPAIGN_STANDARD_ENABLED) {
35 | HashMap contextData = new HashMap<>();
36 |
37 | if (deliveryId != null && messageId != null) {
38 | contextData.put("deliveryId", deliveryId);
39 | contextData.put("broadlogId", messageId);
40 | contextData.put("action", "2");
41 | Analytics.trackAction("tracking", contextData);
42 | }
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
13 |
14 |
15 |
16 |
23 |
24 |
34 |
35 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ===== START MacOS gitignore =====
2 | # General
3 | *.DS_Store
4 | .AppleDouble
5 | .LSOverride
6 |
7 | # Icon must end with two \r
8 | Icon
9 |
10 |
11 | # Thumbnails
12 | ._*
13 |
14 | # Files that might appear in the root of a volume
15 | .DocumentRevisions-V100
16 | .fseventsd
17 | .Spotlight-V100
18 | .TemporaryItems
19 | .Trashes
20 | .VolumeIcon.icns
21 | .com.apple.timemachine.donotpresent
22 |
23 | # Directories potentially created on remote AFP share
24 | .AppleDB
25 | .AppleDesktop
26 | Network Trash Folder
27 | Temporary Items
28 | .apdisk
29 | ===== END MacOS gitignore =====
30 | ===== START android gitignore =====
31 | # Built application files
32 | #*.apk
33 | *.ap_
34 |
35 | # Files for the ART/Dalvik VM
36 | *.dex
37 |
38 | # Java class files
39 | *.class
40 |
41 | # Generated files
42 | bin/
43 | gen/
44 | out/
45 |
46 | # Gradle files
47 | .gradle/
48 | build/
49 |
50 | # Local configuration file (sdk path, etc)
51 | local.properties
52 |
53 | # Proguard folder generated by Eclipse
54 | proguard/
55 |
56 | # Log Files
57 | *.log
58 |
59 | # Android Studio Navigation editor temp files
60 | .navigation/
61 |
62 | # Android Studio captures folder
63 | captures/
64 |
65 | # IntelliJ
66 | *.iml
67 | *.ipr
68 | *.iws
69 | .idea/
70 |
71 | # Keystore files
72 | # Uncomment the following line if you do not want to check your keystore files in.
73 | #*.jks
74 |
75 | # External native build folder generated in Android Studio 2.2 and later
76 | .externalNativeBuild
77 |
78 | # Google Services (e.g. APIs or Firebase)
79 | google-services.json
80 |
81 | # Freeline
82 | freeline.py
83 | freeline/
84 | freeline_project_description.json
85 |
86 | # fastlane
87 | fastlane/report.xml
88 | fastlane/Preview.html
89 | fastlane/screenshots
90 | fastlane/test_output
91 | fastlane/readme.md
92 | ===== END android gitignore =====
93 |
--------------------------------------------------------------------------------
/assets/2048/style/helpers.scss:
--------------------------------------------------------------------------------
1 | // Exponent
2 | // From: https://github.com/Team-Sass/Sassy-math/blob/master/sass/math.scss#L36
3 |
4 | @function exponent($base, $exponent) {
5 | // reset value
6 | $value: $base;
7 | // positive intergers get multiplied
8 | @if $exponent > 1 {
9 | @for $i from 2 through $exponent {
10 | $value: $value * $base; } }
11 | // negitive intergers get divided. A number divided by itself is 1
12 | @if $exponent < 1 {
13 | @for $i from 0 through -$exponent {
14 | $value: $value / $base; } }
15 | // return the last value written
16 | @return $value;
17 | }
18 |
19 | @function pow($base, $exponent) {
20 | @return exponent($base, $exponent);
21 | }
22 |
23 | // Transition mixins
24 | @mixin transition($args...) {
25 | -webkit-transition: $args;
26 | -moz-transition: $args;
27 | transition: $args;
28 | }
29 |
30 | @mixin transition-property($args...) {
31 | -webkit-transition-property: $args;
32 | -moz-transition-property: $args;
33 | transition-property: $args;
34 | }
35 |
36 | @mixin animation($args...) {
37 | -webkit-animation: $args;
38 | -moz-animation: $args;
39 | animation: $args;
40 | }
41 |
42 | @mixin animation-fill-mode($args...) {
43 | -webkit-animation-fill-mode: $args;
44 | -moz-animation-fill-mode: $args;
45 | animation-fill-mode: $args;
46 | }
47 |
48 | @mixin transform($args...) {
49 | -webkit-transform: $args;
50 | -moz-transform: $args;
51 | transform: $args;
52 | }
53 |
54 | // Keyframe animations
55 | @mixin keyframes($animation-name) {
56 | @-webkit-keyframes $animation-name {
57 | @content;
58 | }
59 | @-moz-keyframes $animation-name {
60 | @content;
61 | }
62 | @keyframes $animation-name {
63 | @content;
64 | }
65 | }
66 |
67 | // Media queries
68 | @mixin smaller($width) {
69 | @media screen and (max-width: $width) {
70 | @content;
71 | }
72 | }
73 |
74 | // Clearfix
75 | @mixin clearfix {
76 | &:after {
77 | content: "";
78 | display: block;
79 | clear: both;
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/assets/2048/README.md:
--------------------------------------------------------------------------------
1 | # 2048
2 | A small clone of [1024](https://play.google.com/store/apps/details?id=com.veewo.a1024), based on [Saming's 2048](http://saming.fr/p/2048/) (also a clone).
3 |
4 | Made just for fun. [Play it here!](http://gabrielecirulli.github.io/2048/)
5 |
6 | The official app can also be found on the [Play Store](https://play.google.com/store/apps/details?id=com.gabrielecirulli.app2048) and [App Store!](https://itunes.apple.com/us/app/2048-by-gabriele-cirulli/id868076805)
7 |
8 | ### Contributions
9 |
10 | - [TimPetricola](https://github.com/TimPetricola) added best score storage
11 | - [chrisprice](https://github.com/chrisprice) added custom code for swipe handling on mobile
12 | - [elektryk](https://github.com/elektryk) made swipes work on Windows Phone
13 | - [mgarciaisaia](https://github.com/mgarciaisaia) added support for Android 2.3
14 |
15 | Many thanks to [rayhaanj](https://github.com/rayhaanj), [Mechazawa](https://github.com/Mechazawa), [grant](https://github.com/grant), [remram44](https://github.com/remram44) and [ghoullier](https://github.com/ghoullier) for the many other good contributions.
16 |
17 | ### Screenshot
18 |
19 | 
20 |
21 | ## Contributing
22 | Changes and improvements are more than welcome! Feel free to fork and open a pull request. Please make your changes in a specific branch and request to pull into `master`! If you can, please make sure the game fully works before sending the PR, as that will help speed up the process.
23 |
24 | You can find the same information in the [contributing guide.](https://github.com/gabrielecirulli/2048/blob/master/CONTRIBUTING.md)
25 |
26 | ## License
27 | 2048 is licensed under the [MIT license.](https://github.com/gabrielecirulli/2048/blob/master/LICENSE.txt)
28 |
29 | ## Donations
30 | I made this in my spare time, and it's hosted on GitHub (which means I don't have any hosting costs), but if you enjoyed the game and feel like buying me coffee, you can donate at my BTC address: `1Ec6onfsQmoP9kkL3zkpB6c5sA4PVcXU2i`. Thank you very much!
31 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ACS Android Example with Adobe Mobile SDK v4
2 | ============
3 |
4 | Code based on https://github.com/uberspot/2048-android, which is the android port of the 2048 game made by Gabriele Cirulli https://github.com/gabrielecirulli/2048.
5 |
6 | ## :warning::warning: IMPORTANT :warning::warning:
7 | * App is missing google-services.json, so make sure to get it before using this project. https://firebase.google.com/docs/android/setup
8 |
9 | ## Building
10 |
11 | cd acs-android-example/
12 | git submodule update --init --recursive
13 | ./gradlew build
14 |
15 | ### Running app With Android Studio
16 |
17 | 1. Follow first three lines of Building directions.
18 | 2. In Android Studio 3.4.1 select File > Open... and select acs-android-example directory.
19 | 3. Run > Run 'acs-android-example'
20 |
21 | ## License
22 |
23 | acs-android-example is licensed under the [MIT license](https://github.com/adobe/acs-android-example/blob/master/LICENSE).
24 |
25 | ### How to add Adobe Mobile SDK v4 to app
26 | * https://marketing.adobe.com/resources/help/en_US/mobile/android/dev_qs.html
27 |
28 | ### Add push messaging with Adobe Mobile SDK v4
29 | * https://marketing.adobe.com/resources/help/en_US/mobile/android/push_messaging.html
30 | * NOTE: for firebase don't need permissions in AndroidManifest.xml (https://developers.google.com/cloud-messaging/android/android-migrate-fcm):
31 | * .permission.C2D_MESSAGE
32 | * android.permission.WAKE_LOCK
33 |
34 | ### How to Integrate the Adobe Mobile v4 SDK with a mobile app to receive Adobe Campaign Standard push notifications
35 | * https://helpx.adobe.com/campaign/kb/integrate-mobile-sdk.html
36 | * https://helpx.adobe.com/campaign/standard/administration/using/configuring-mobile-app-channel.html
37 |
38 | ### How to copy existing project with new name
39 | * https://stackoverflow.com/questions/18324555/android-copy-existing-project-with-new-name-in-android-studio/30377608#30377608
40 | * also need to get new google-services.json from https://console.firebase.google.com/ by adding an app to existing 2048 project
41 |
--------------------------------------------------------------------------------
/assets/2048/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 | Changes and improvements are more than welcome! Feel free to fork and open a pull request.
3 |
4 | Please follow the house rules to have a bigger chance of your contribution being merged.
5 |
6 | ## House rules
7 |
8 | ### How to make changes
9 | - To make changes, create a new branch based on `master` (do not create one from `gh-pages` unless strictly necessary) and make them there, then create a Pull Request to master.
10 | `gh-pages` is different from master in that it contains sharing features, analytics and other things that have no direct bearing with the game. `master` is the "pure" version of the game.
11 | - If you want to modify the CSS, please edit the SCSS files present in `style/`: `main.scss` and others. Don't edit the `main.css`, because it's supposed to be generated.
12 | In order to compile your SCSS modifications, you need to use the `sass` gem (install it by running `gem install sass` once Ruby is installed).
13 | To run SASS, simply use the following command:
14 | `sass --unix-newlines --watch style/main.scss`
15 | SASS will automatically recompile your css when changed.
16 | - `Rakefile` contains some tasks that help during development. Feel free to add useful tasks if needed.
17 | - Please use 2-space indentation when editing the JavaScript. A `.jshintrc` file is present, which will help your code to follow the guidelines if you install and run `jshint`.
18 | - Please test your modification thoroughly before submitting your Pull Request.
19 |
20 | ### Changes that might not be accepted
21 | We have to be conservative with the core game. This means that some modifications won't be merged, or will have to be evaluated carefully before being merged:
22 |
23 | - Undo/redo features
24 | - Save/reload features
25 | - Changes to how the tiles look or their contents
26 | - Changes to the layout
27 | - Changes to the grid size
28 |
29 | ### Changes that are welcome
30 | - Bug fixes
31 | - Compatibility improvements
32 | - "Under the hood" enhancements
33 | - Small changes that don't have an impact on the core gameplay
34 |
--------------------------------------------------------------------------------
/assets/2048/js/classlist_polyfill.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | if (typeof window.Element === "undefined" ||
3 | "classList" in document.documentElement) {
4 | return;
5 | }
6 |
7 | var prototype = Array.prototype,
8 | push = prototype.push,
9 | splice = prototype.splice,
10 | join = prototype.join;
11 |
12 | function DOMTokenList(el) {
13 | this.el = el;
14 | // The className needs to be trimmed and split on whitespace
15 | // to retrieve a list of classes.
16 | var classes = el.className.replace(/^\s+|\s+$/g, '').split(/\s+/);
17 | for (var i = 0; i < classes.length; i++) {
18 | push.call(this, classes[i]);
19 | }
20 | }
21 |
22 | DOMTokenList.prototype = {
23 | add: function (token) {
24 | if (this.contains(token)) return;
25 | push.call(this, token);
26 | this.el.className = this.toString();
27 | },
28 | contains: function (token) {
29 | return this.el.className.indexOf(token) != -1;
30 | },
31 | item: function (index) {
32 | return this[index] || null;
33 | },
34 | remove: function (token) {
35 | if (!this.contains(token)) return;
36 | for (var i = 0; i < this.length; i++) {
37 | if (this[i] == token) break;
38 | }
39 | splice.call(this, i, 1);
40 | this.el.className = this.toString();
41 | },
42 | toString: function () {
43 | return join.call(this, ' ');
44 | },
45 | toggle: function (token) {
46 | if (!this.contains(token)) {
47 | this.add(token);
48 | } else {
49 | this.remove(token);
50 | }
51 |
52 | return this.contains(token);
53 | }
54 | };
55 |
56 | window.DOMTokenList = DOMTokenList;
57 |
58 | function defineElementGetter(obj, prop, getter) {
59 | if (Object.defineProperty) {
60 | Object.defineProperty(obj, prop, {
61 | get: getter
62 | });
63 | } else {
64 | obj.__defineGetter__(prop, getter);
65 | }
66 | }
67 |
68 | defineElementGetter(HTMLElement.prototype, 'classList', function () {
69 | return new DOMTokenList(this);
70 | });
71 | })();
72 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | Thanks for choosing to contribute!
4 |
5 | The following are a set of guidelines to follow when contributing to this project.
6 |
7 | ## Code Of Conduct
8 |
9 | This project adheres to the Adobe [code of conduct](../CODE_OF_CONDUCT.md). By participating,
10 | you are expected to uphold this code. Please report unacceptable behavior to
11 | [Grp-opensourceoffice@adobe.com](mailto:Grp-opensourceoffice@adobe.com).
12 |
13 | ## Have A Question?
14 |
15 | Start by filing an issue. The existing committers on this project work to reach
16 | consensus around project direction and issue solutions within issue threads
17 | (when appropriate).
18 |
19 | ## Contributor License Agreement
20 |
21 | All third-party contributions to this project must be accompanied by a signed contributor
22 | license agreement. This gives Adobe permission to redistribute your contributions
23 | as part of the project. [Sign our CLA](http://opensource.adobe.com/cla.html). You
24 | only need to submit an Adobe CLA one time, so if you have submitted one previously,
25 | you are good to go!
26 |
27 | ## Code Reviews
28 |
29 | All submissions should come in the form of pull requests and need to be reviewed
30 | by project committers. Read [GitHub's pull request documentation](https://help.github.com/articles/about-pull-requests/)
31 | for more information on sending pull requests.
32 |
33 | Lastly, please follow the [pull request template](PULL_REQUEST_TEMPLATE.md) when
34 | submitting a pull request!
35 |
36 | ## From Contributor To Committer
37 |
38 | We love contributions from our community! If you'd like to go a step beyond contributor
39 | and become a committer with full write access and a say in the project, you must
40 | be invited to the project. The existing committers employ an internal nomination
41 | process that must reach lazy consensus (silence is approval) before invitations
42 | are issued. If you feel you are qualified and want to get more deeply involved,
43 | feel free to reach out to existing committers to have a conversation about that.
44 |
45 | ## Security Issues
46 |
47 | Security issues shouldn't be reported on this issue tracker. Instead, [file an issue to our security experts](https://helpx.adobe.com/security/alertus.html)
--------------------------------------------------------------------------------
/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
15 |
16 |
23 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
44 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/res/layout/activity_collect_pii.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
28 |
29 |
37 |
38 |
46 |
47 |
55 |
56 |
64 |
65 |
73 |
--------------------------------------------------------------------------------
/assets/2048/js/grid.js:
--------------------------------------------------------------------------------
1 | function Grid(size, previousState) {
2 | this.size = size;
3 | this.cells = previousState ? this.fromState(previousState) : this.empty();
4 | }
5 |
6 | // Build a grid of the specified size
7 | Grid.prototype.empty = function () {
8 | var cells = [];
9 |
10 | for (var x = 0; x < this.size; x++) {
11 | var row = cells[x] = [];
12 |
13 | for (var y = 0; y < this.size; y++) {
14 | row.push(null);
15 | }
16 | }
17 |
18 | return cells;
19 | };
20 |
21 | Grid.prototype.fromState = function (state) {
22 | var cells = [];
23 |
24 | for (var x = 0; x < this.size; x++) {
25 | var row = cells[x] = [];
26 |
27 | for (var y = 0; y < this.size; y++) {
28 | var tile = state[x][y];
29 | row.push(tile ? new Tile(tile.position, tile.value) : null);
30 | }
31 | }
32 |
33 | return cells;
34 | };
35 |
36 | // Find the first available random position
37 | Grid.prototype.randomAvailableCell = function () {
38 | var cells = this.availableCells();
39 |
40 | if (cells.length) {
41 | return cells[Math.floor(Math.random() * cells.length)];
42 | }
43 | };
44 |
45 | Grid.prototype.availableCells = function () {
46 | var cells = [];
47 |
48 | this.eachCell(function (x, y, tile) {
49 | if (!tile) {
50 | cells.push({ x: x, y: y });
51 | }
52 | });
53 |
54 | return cells;
55 | };
56 |
57 | // Call callback for every cell
58 | Grid.prototype.eachCell = function (callback) {
59 | for (var x = 0; x < this.size; x++) {
60 | for (var y = 0; y < this.size; y++) {
61 | callback(x, y, this.cells[x][y]);
62 | }
63 | }
64 | };
65 |
66 | // Check if there are any cells available
67 | Grid.prototype.cellsAvailable = function () {
68 | return !!this.availableCells().length;
69 | };
70 |
71 | // Check if the specified cell is taken
72 | Grid.prototype.cellAvailable = function (cell) {
73 | return !this.cellOccupied(cell);
74 | };
75 |
76 | Grid.prototype.cellOccupied = function (cell) {
77 | return !!this.cellContent(cell);
78 | };
79 |
80 | Grid.prototype.cellContent = function (cell) {
81 | if (this.withinBounds(cell)) {
82 | return this.cells[cell.x][cell.y];
83 | } else {
84 | return null;
85 | }
86 | };
87 |
88 | // Inserts a tile at its position
89 | Grid.prototype.insertTile = function (tile) {
90 | this.cells[tile.x][tile.y] = tile;
91 | };
92 |
93 | Grid.prototype.removeTile = function (tile) {
94 | this.cells[tile.x][tile.y] = null;
95 | };
96 |
97 | Grid.prototype.withinBounds = function (position) {
98 | return position.x >= 0 && position.x < this.size &&
99 | position.y >= 0 && position.y < this.size;
100 | };
101 |
102 | Grid.prototype.serialize = function () {
103 | var cellState = [];
104 |
105 | for (var x = 0; x < this.size; x++) {
106 | var row = cellState[x] = [];
107 |
108 | for (var y = 0; y < this.size; y++) {
109 | row.push(this.cells[x][y] ? this.cells[x][y].serialize() : null);
110 | }
111 | }
112 |
113 | return {
114 | size: this.size,
115 | cells: cellState
116 | };
117 | };
118 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Adobe Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as
6 | contributors and maintainers pledge to making participation in our project and
7 | our community a harassment-free experience for everyone, regardless of age, body
8 | size, disability, ethnicity, gender identity and expression, level of experience,
9 | nationality, personal appearance, race, religion, or sexual identity and
10 | orientation.
11 |
12 | ## Our Standards
13 |
14 | Examples of behavior that contributes to creating a positive environment
15 | include:
16 |
17 | * Using welcoming and inclusive language
18 | * Being respectful of differing viewpoints and experiences
19 | * Gracefully accepting constructive criticism
20 | * Focusing on what is best for the community
21 | * Showing empathy towards other community members
22 |
23 | Examples of unacceptable behavior by participants include:
24 |
25 | * The use of sexualized language or imagery and unwelcome sexual attention or
26 | advances
27 | * Trolling, insulting/derogatory comments, and personal or political attacks
28 | * Public or private harassment
29 | * Publishing others' private information, such as a physical or electronic
30 | address, without explicit permission
31 | * Other conduct which could reasonably be considered inappropriate in a
32 | professional setting
33 |
34 | ## Our Responsibilities
35 |
36 | Project maintainers are responsible for clarifying the standards of acceptable
37 | behavior and are expected to take appropriate and fair corrective action in
38 | response to any instances of unacceptable behavior.
39 |
40 | Project maintainers have the right and responsibility to remove, edit, or
41 | reject comments, commits, code, wiki edits, issues, and other contributions
42 | that are not aligned to this Code of Conduct, or to ban temporarily or
43 | permanently any contributor for other behaviors that they deem inappropriate,
44 | threatening, offensive, or harmful.
45 |
46 | ## Scope
47 |
48 | This Code of Conduct applies both within project spaces and in public spaces
49 | when an individual is representing the project or its community. Examples of
50 | representing a project or community include using an official project e-mail
51 | address, posting via an official social media account, or acting as an appointed
52 | representative at an online or offline event. Representation of a project may be
53 | further defined and clarified by project maintainers.
54 |
55 | ## Enforcement
56 |
57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
58 | reported by contacting the project team at Grp-opensourceoffice@adobe.com. All
59 | complaints will be reviewed and investigated and will result in a response that
60 | is deemed necessary and appropriate to the circumstances. The project team is
61 | obligated to maintain confidentiality with regard to the reporter of an incident.
62 | Further details of specific enforcement policies may be posted separately.
63 |
64 | Project maintainers who do not follow or enforce the Code of Conduct in good
65 | faith may face temporary or permanent repercussions as determined by other
66 | members of the project's leadership.
67 |
68 | ## Attribution
69 |
70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71 | available at [https://contributor-covenant.org/version/1/4][version]
72 |
73 | [homepage]: https://contributor-covenant.org
74 | [version]: https://contributor-covenant.org/version/1/4/
75 |
--------------------------------------------------------------------------------
/assets/2048/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 2048
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |