├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values-pt-rBR │ │ │ │ └── strings.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── bottom_shadow.9.png │ │ │ │ ├── ic_search_white_24dp.png │ │ │ │ ├── ic_send_white_24dp.png │ │ │ │ ├── ic_favorite_solid_24dp.png │ │ │ │ ├── ic_favorite_white_24dp.png │ │ │ │ ├── ic_account_circle_grey600.png │ │ │ │ └── ic_favorite_outline_24dp.png │ │ │ ├── drawable-hdpi │ │ │ │ ├── ic_send_white_24dp.png │ │ │ │ ├── ic_favorite_solid_24dp.png │ │ │ │ ├── ic_favorite_white_24dp.png │ │ │ │ ├── ic_search_white_24dp.png │ │ │ │ ├── ic_favorite_outline_24dp.png │ │ │ │ └── ic_account_circle_grey600.png │ │ │ ├── drawable-mdpi │ │ │ │ ├── ic_send_white_24dp.png │ │ │ │ ├── ic_favorite_solid_24dp.png │ │ │ │ ├── ic_favorite_white_24dp.png │ │ │ │ ├── ic_search_white_24dp.png │ │ │ │ ├── ic_favorite_outline_24dp.png │ │ │ │ └── ic_account_circle_grey600.png │ │ │ ├── drawable-xhdpi │ │ │ │ ├── ic_send_white_24dp.png │ │ │ │ ├── ic_search_white_24dp.png │ │ │ │ ├── ic_favorite_solid_24dp.png │ │ │ │ ├── ic_favorite_white_24dp.png │ │ │ │ ├── ic_account_circle_grey600.png │ │ │ │ └── ic_favorite_outline_24dp.png │ │ │ ├── drawable │ │ │ │ ├── highlight.xml │ │ │ │ ├── line.xml │ │ │ │ └── divider.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ ├── menu │ │ │ │ ├── menu_wc_speaker.xml │ │ │ │ ├── menu_session_detail.xml │ │ │ │ ├── menu_feedback.xml │ │ │ │ ├── menu_wc_detail.xml │ │ │ │ └── menu_base_act.xml │ │ │ ├── values │ │ │ │ ├── attribs.xml │ │ │ │ ├── styles.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ └── strings.xml │ │ │ ├── layout │ │ │ │ ├── toolbar.xml │ │ │ │ ├── item_session_by_speaker.xml │ │ │ │ ├── activity_wordcamp_detail.xml │ │ │ │ ├── fragment_wc.xml │ │ │ │ ├── header_time_session.xml │ │ │ │ ├── item_header_session.xml │ │ │ │ ├── fragment_sessions_list.xml │ │ │ │ ├── activity_my_sessions_list.xml │ │ │ │ ├── item_speaker.xml │ │ │ │ ├── fragment_wcdetails_speaker.xml │ │ │ │ ├── activity_base.xml │ │ │ │ ├── activity_speaker_detail.xml │ │ │ │ ├── item_wordcamp.xml │ │ │ │ ├── item_session.xml │ │ │ │ ├── item_header_speaker.xml │ │ │ │ ├── activity_session_detail.xml │ │ │ │ └── activity_feedback.xml │ │ │ ├── values-is │ │ │ │ └── strings.xml │ │ │ ├── values-ko │ │ │ │ └── strings.xml │ │ │ ├── values-ja │ │ │ │ └── strings.xml │ │ │ ├── values-he │ │ │ │ └── strings.xml │ │ │ ├── values-sv │ │ │ │ └── strings.xml │ │ │ ├── values-es │ │ │ │ └── strings.xml │ │ │ ├── values-id │ │ │ │ └── strings.xml │ │ │ ├── values-sr │ │ │ │ └── strings.xml │ │ │ ├── values-th │ │ │ │ └── strings.xml │ │ │ ├── values-cs │ │ │ │ └── strings.xml │ │ │ ├── values-hi │ │ │ │ └── strings.xml │ │ │ ├── values-en-rAU │ │ │ │ └── strings.xml │ │ │ ├── values-el │ │ │ │ └── strings.xml │ │ │ ├── values-pl │ │ │ │ └── strings.xml │ │ │ ├── values-sk │ │ │ │ └── strings.xml │ │ │ ├── values-nl │ │ │ │ └── strings.xml │ │ │ ├── values-ro │ │ │ │ └── strings.xml │ │ │ ├── values-tr │ │ │ │ └── strings.xml │ │ │ ├── values-fr │ │ │ │ └── strings.xml │ │ │ ├── values-nb │ │ │ │ └── strings.xml │ │ │ ├── values-ru │ │ │ │ └── strings.xml │ │ │ ├── values-sq │ │ │ │ └── strings.xml │ │ │ ├── values-it │ │ │ │ └── strings.xml │ │ │ └── values-de │ │ │ │ └── strings.xml │ │ ├── java │ │ │ └── org │ │ │ │ └── wordcamp │ │ │ │ └── android │ │ │ │ ├── networking │ │ │ │ ├── ResponseListener.java │ │ │ │ ├── WCRequest.java │ │ │ │ ├── WCHurlStack.java │ │ │ │ └── WPAPIClient.java │ │ │ │ ├── objects │ │ │ │ ├── MiniSpeaker.java │ │ │ │ ├── speaker │ │ │ │ │ ├── Meta.java │ │ │ │ │ ├── Meta_.java │ │ │ │ │ ├── Meta__.java │ │ │ │ │ ├── Meta___.java │ │ │ │ │ ├── Meta____.java │ │ │ │ │ ├── Terms.java │ │ │ │ │ ├── Links.java │ │ │ │ │ ├── Links__.java │ │ │ │ │ ├── Links____.java │ │ │ │ │ ├── PostMetum.java │ │ │ │ │ ├── Links_.java │ │ │ │ │ ├── Links___.java │ │ │ │ │ └── WcbTrack.java │ │ │ │ ├── wordcamp │ │ │ │ │ ├── Meta.java │ │ │ │ │ ├── Meta_.java │ │ │ │ │ ├── Links.java │ │ │ │ │ ├── PostMetum.java │ │ │ │ │ └── Links_.java │ │ │ │ ├── session │ │ │ │ │ ├── Meta.java │ │ │ │ │ ├── Meta_.java │ │ │ │ │ ├── Meta__.java │ │ │ │ │ ├── Terms.java │ │ │ │ │ ├── Links.java │ │ │ │ │ ├── Links__.java │ │ │ │ │ ├── Links_.java │ │ │ │ │ ├── WcbTrack.java │ │ │ │ │ └── Foo.java │ │ │ │ ├── SessionDB.java │ │ │ │ └── SpeakerDB.java │ │ │ │ ├── WordCampApplication.java │ │ │ │ ├── utils │ │ │ │ ├── Utils.java │ │ │ │ ├── CustomGsonDeSerializer.java │ │ │ │ ├── ImageUtils.java │ │ │ │ └── WordCampUtils.java │ │ │ │ ├── adapters │ │ │ │ ├── SpeakerDetailAdapter.java │ │ │ │ ├── WCDetailAdapter.java │ │ │ │ ├── SessionDetailAdapter.java │ │ │ │ ├── SpeakersListAdapter.java │ │ │ │ └── SessionsListAdapter.java │ │ │ │ ├── db │ │ │ │ └── WCSQLiteHelper.java │ │ │ │ ├── notifs │ │ │ │ ├── FavoriteSession.java │ │ │ │ └── SessionNotifierReceiver.java │ │ │ │ ├── wcdetails │ │ │ │ ├── MySessionsActivity.java │ │ │ │ └── SpeakerFragment.java │ │ │ │ └── FeedbackActivity.java │ │ └── AndroidManifest.xml │ └── androidTest │ │ └── java │ │ └── org │ │ └── wordcamp │ │ └── android │ │ └── ApplicationTest.java ├── gradle.properties-example ├── lint.xml ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .travis.yml ├── tools ├── exported-language-codes.csv └── update-translations.sh ├── .gitignore ├── README.md └── gradlew.bat /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /app/src/main/res/values-pt-rBR/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bottom_shadow.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-xxhdpi/bottom_shadow.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_send_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-hdpi/ic_send_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_send_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-mdpi/ic_send_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_send_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-xhdpi/ic_send_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_favorite_solid_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-hdpi/ic_favorite_solid_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_favorite_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-hdpi/ic_favorite_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_search_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-hdpi/ic_search_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_favorite_solid_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-mdpi/ic_favorite_solid_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_favorite_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-mdpi/ic_favorite_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_search_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-mdpi/ic_search_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_search_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-xhdpi/ic_search_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_search_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-xxhdpi/ic_search_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_send_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-xxhdpi/ic_send_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_favorite_outline_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-hdpi/ic_favorite_outline_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_favorite_outline_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-mdpi/ic_favorite_outline_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_favorite_solid_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-xhdpi/ic_favorite_solid_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_favorite_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-xhdpi/ic_favorite_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_favorite_solid_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-xxhdpi/ic_favorite_solid_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_favorite_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-xxhdpi/ic_favorite_white_24dp.png -------------------------------------------------------------------------------- /app/gradle.properties-example: -------------------------------------------------------------------------------- 1 | default.central_wordcamp_url = https://central.wordcamp.org/ 2 | local.central_wordcamp_url = http://localhost:8000/ 3 | wc.feedback_mail = example@example.com 4 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_account_circle_grey600.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-hdpi/ic_account_circle_grey600.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_account_circle_grey600.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-mdpi/ic_account_circle_grey600.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_account_circle_grey600.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-xhdpi/ic_account_circle_grey600.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_favorite_outline_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-xhdpi/ic_favorite_outline_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_account_circle_grey600.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-xxhdpi/ic_account_circle_grey600.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_favorite_outline_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordCamp-Android/HEAD/app/src/main/res/drawable-xxhdpi/ic_favorite_outline_24dp.png -------------------------------------------------------------------------------- /app/lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/highlight.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Jun 28 09:37:12 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.14-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/networking/ResponseListener.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.networking; 2 | 3 | 4 | 5 | /** 6 | * Created by shah.aagam on 30/07/15. 7 | */ 8 | public interface ResponseListener { 9 | 10 | public void onResponseReceived(T t); 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/line.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_wc_speaker.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_session_detail.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_feedback.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/MiniSpeaker.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.objects; 2 | 3 | /** 4 | * Created by aagam on 28/2/15. 5 | */ 6 | public class MiniSpeaker { 7 | public String name; 8 | public String dp; 9 | public int id; 10 | 11 | public MiniSpeaker(String name, String dp, int id) { 12 | this.name = name; 13 | this.dp = dp; 14 | this.id = id; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/res/values/attribs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_wc_detail.xml: -------------------------------------------------------------------------------- 1 | 3 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/androidTest/java/org/wordcamp/android/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android; 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 | } 14 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: android 2 | jdk: oraclejdk7 3 | sudo: false 4 | 5 | android: 6 | components: 7 | - extra-android-m2repository 8 | - extra-android-support 9 | - build-tools-23.0.1 10 | - android-23 11 | 12 | env: 13 | global: 14 | - GRADLE_OPTS="-XX:MaxPermSize=4g -Xmx4g" 15 | - ANDROID_SDKS=android-14 16 | - ANDROID_TARGET=android-14 17 | 18 | install: 19 | # Setup gradle.properties 20 | - cp app/gradle.properties-example app/gradle.properties 21 | 22 | script: 23 | - ./gradlew -PdisablePreDex build 24 | -------------------------------------------------------------------------------- /tools/exported-language-codes.csv: -------------------------------------------------------------------------------- 1 | cs,cs,Czech 2 | en-au,en-rAU,English(Australian) 3 | en-us,en-rUS,English(US) 4 | fr,fr,French 5 | de,de,German 6 | el,el,Greek 7 | it,it,Italian 8 | ja,ja,Japanese 9 | ko,ko,Korean 10 | nb,nb,Norwegian 11 | pl,pl,Polish 12 | pt-br,pt-rBR,Portuguese(Brazil) 13 | nl,nl,Dutch 14 | ro,ro,Romanian 15 | ru,ru,Russian 16 | sr,sr,Serbian 17 | es,es,Spanish(Spain) 18 | sv,sv,Swedish 19 | th,th,Thai 20 | tr,tr,Turkish 21 | is,is,Icelandic 22 | id,id,Indonesian 23 | sk,sk,Slovak 24 | sq,sq,Albanian 25 | he,he,Hebrew 26 | hi,hi,Hindi 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X generated file 2 | .DS_Store 3 | 4 | # built application files 5 | *.apk 6 | *.ap_ 7 | 8 | # files for the dex VM 9 | *.dex 10 | 11 | # Java class files 12 | *.class 13 | 14 | # generated files 15 | bin/ 16 | gen/ 17 | build/ 18 | 19 | # Local configuration file (sdk path, etc) 20 | local.properties 21 | 22 | # Eclipse project files 23 | .settings/ 24 | .classpath 25 | .project 26 | 27 | # Intellij project files 28 | *.iml 29 | *.ipr 30 | *.iws 31 | .idea/ 32 | 33 | # Gradle 34 | .gradle/ 35 | gradle.properties 36 | 37 | # Generated by gradle 38 | crashlytics.properties 39 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/WordCampApplication.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android; 2 | 3 | 4 | import android.app.Application; 5 | 6 | import com.android.volley.RequestQueue; 7 | import com.android.volley.toolbox.Volley; 8 | 9 | import org.wordcamp.android.networking.WCHurlStack; 10 | 11 | public class WordCampApplication extends Application { 12 | 13 | public static RequestQueue requestQueue; 14 | 15 | @Override 16 | public void onCreate() { 17 | super.onCreate(); 18 | requestQueue = Volley.newRequestQueue(this,new WCHurlStack()); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/speaker/Meta.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.speaker; 3 | 4 | import com.google.gson.annotations.Expose; 5 | 6 | public class Meta { 7 | 8 | @Expose 9 | private Links links; 10 | 11 | /** 12 | * 13 | * @return 14 | * The links 15 | */ 16 | public Links getLinks() { 17 | return links; 18 | } 19 | 20 | /** 21 | * 22 | * @param links 23 | * The links 24 | */ 25 | public void setLinks(Links links) { 26 | this.links = links; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/speaker/Meta_.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.speaker; 3 | 4 | import com.google.gson.annotations.Expose; 5 | 6 | public class Meta_ { 7 | 8 | @Expose 9 | private Links_ links; 10 | 11 | /** 12 | * 13 | * @return 14 | * The links 15 | */ 16 | public Links_ getLinks() { 17 | return links; 18 | } 19 | 20 | /** 21 | * 22 | * @param links 23 | * The links 24 | */ 25 | public void setLinks(Links_ links) { 26 | this.links = links; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/wordcamp/Meta.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.wordcamp; 3 | 4 | import com.google.gson.annotations.Expose; 5 | 6 | 7 | public class Meta { 8 | 9 | @Expose 10 | private Links links; 11 | 12 | /** 13 | * 14 | * @return 15 | * The links 16 | */ 17 | public Links getLinks() { 18 | return links; 19 | } 20 | 21 | /** 22 | * 23 | * @param links 24 | * The links 25 | */ 26 | public void setLinks(Links links) { 27 | this.links = links; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/session/Meta.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.session; 3 | 4 | 5 | import com.google.gson.annotations.Expose; 6 | 7 | 8 | public class Meta { 9 | 10 | @Expose 11 | private Links links; 12 | 13 | /** 14 | * 15 | * @return 16 | * The links 17 | */ 18 | public Links getLinks() { 19 | return links; 20 | } 21 | 22 | /** 23 | * 24 | * @param links 25 | * The links 26 | */ 27 | public void setLinks(Links links) { 28 | this.links = links; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/speaker/Meta__.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.speaker; 3 | 4 | import com.google.gson.annotations.Expose; 5 | 6 | public class Meta__ { 7 | 8 | @Expose 9 | private Links__ links; 10 | 11 | /** 12 | * 13 | * @return 14 | * The links 15 | */ 16 | public Links__ getLinks() { 17 | return links; 18 | } 19 | 20 | /** 21 | * 22 | * @param links 23 | * The links 24 | */ 25 | public void setLinks(Links__ links) { 26 | this.links = links; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/wordcamp/Meta_.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.wordcamp; 3 | 4 | import com.google.gson.annotations.Expose; 5 | 6 | 7 | public class Meta_ { 8 | 9 | @Expose 10 | private Links_ links; 11 | 12 | /** 13 | * 14 | * @return 15 | * The links 16 | */ 17 | public Links_ getLinks() { 18 | return links; 19 | } 20 | 21 | /** 22 | * 23 | * @param links 24 | * The links 25 | */ 26 | public void setLinks(Links_ links) { 27 | this.links = links; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/session/Meta_.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.session; 3 | 4 | 5 | import com.google.gson.annotations.Expose; 6 | 7 | 8 | public class Meta_ { 9 | 10 | @Expose 11 | private Links_ links; 12 | 13 | /** 14 | * 15 | * @return 16 | * The links 17 | */ 18 | public Links_ getLinks() { 19 | return links; 20 | } 21 | 22 | /** 23 | * 24 | * @param links 25 | * The links 26 | */ 27 | public void setLinks(Links_ links) { 28 | this.links = links; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/speaker/Meta___.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.speaker; 3 | 4 | import com.google.gson.annotations.Expose; 5 | 6 | public class Meta___ { 7 | 8 | @Expose 9 | private Links___ links; 10 | 11 | /** 12 | * 13 | * @return 14 | * The links 15 | */ 16 | public Links___ getLinks() { 17 | return links; 18 | } 19 | 20 | /** 21 | * 22 | * @param links 23 | * The links 24 | */ 25 | public void setLinks(Links___ links) { 26 | this.links = links; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/session/Meta__.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.session; 3 | 4 | 5 | import com.google.gson.annotations.Expose; 6 | 7 | 8 | public class Meta__ { 9 | 10 | @Expose 11 | private Links__ links; 12 | 13 | /** 14 | * 15 | * @return 16 | * The links 17 | */ 18 | public Links__ getLinks() { 19 | return links; 20 | } 21 | 22 | /** 23 | * 24 | * @param links 25 | * The links 26 | */ 27 | public void setLinks(Links__ links) { 28 | this.links = links; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/speaker/Meta____.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.speaker; 3 | 4 | import com.google.gson.annotations.Expose; 5 | 6 | public class Meta____ { 7 | 8 | @Expose 9 | private Links____ links; 10 | 11 | /** 12 | * 13 | * @return 14 | * The links 15 | */ 16 | public Links____ getLinks() { 17 | return links; 18 | } 19 | 20 | /** 21 | * 22 | * @param links 23 | * The links 24 | */ 25 | public void setLinks(Links____ links) { 26 | this.links = links; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/utils/Utils.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.utils; 2 | 3 | import android.os.Build; 4 | 5 | /** 6 | * Created by aagam on 3/3/15. 7 | */ 8 | public class Utils { 9 | 10 | public static boolean isLollipopOrAbove() { 11 | return Build.VERSION.SDK_INT >= 21; 12 | } 13 | 14 | public static String getDeviceInfo() { 15 | return "\n\n Device info :- \n" 16 | + "API : " + Build.VERSION.SDK_INT + "\n " // API Level 17 | + "Device : " + Build.DEVICE + "\n" // Device 18 | + "Manufacturer : " + Build.MANUFACTURER + "\n" // Manufacturer 19 | + "Model : " + Build.MODEL + "\n" // Model 20 | + "Product : " + Build.PRODUCT; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/speaker/Terms.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.speaker; 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | 10 | public class Terms { 11 | 12 | @SerializedName("wcb_track") 13 | @Expose 14 | private List wcbTrack = new ArrayList(); 15 | 16 | /** 17 | * 18 | * @return 19 | * The wcbTrack 20 | */ 21 | public List getWcbTrack() { 22 | return wcbTrack; 23 | } 24 | 25 | /** 26 | * 27 | * @param wcbTrack 28 | * The wcb_track 29 | */ 30 | public void setWcbTrack(List wcbTrack) { 31 | this.wcbTrack = wcbTrack; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/session/Terms.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.session; 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | 10 | 11 | public class Terms { 12 | 13 | @SerializedName("wcb_track") 14 | @Expose 15 | private List wcbTrack = new ArrayList(); 16 | 17 | /** 18 | * 19 | * @return 20 | * The wcbTrack 21 | */ 22 | public List getWcbTrack() { 23 | return wcbTrack; 24 | } 25 | 26 | /** 27 | * 28 | * @param wcbTrack 29 | * The wcb_track 30 | */ 31 | public void setWcbTrack(List wcbTrack) { 32 | this.wcbTrack = wcbTrack; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /tools/update-translations.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | LANG_FILE=tools/exported-language-codes.csv 4 | RESDIR=app/src/main/res/ 5 | URL=https://translate.wordpress.org/projects/apps/wordcamp-android/dev 6 | 7 | for line in $(grep -v en-rUS $LANG_FILE) ; do 8 | code=$(echo $line|cut -d "," -f1|tr -d " ") 9 | local=$(echo $line|cut -d "," -f2|tr -d " ") 10 | echo updating $local - $code 11 | test -d $RESDIR/values-$local/ || mkdir $RESDIR/values-$local/ 12 | test -f $RESDIR/values-$local/strings.xml && cp $RESDIR/values-$local/strings.xml $RESDIR/values-$local/strings.xml.bak 13 | curl -sSfL --globoff -o $RESDIR/values-$local/strings.xml "$URL/$code/default/export-translations?filters[status]=current&format=android" || (echo Error downloading $code && rm -rf $RESDIR/values-$local/) 14 | test -f $RESDIR/values-$local/strings.xml.bak && rm $RESDIR/values-$local/strings.xml.bak 15 | done 16 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_base_act.xml: -------------------------------------------------------------------------------- 1 | 5 | 11 | 12 | 17 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/speaker/Links.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.speaker; 3 | 4 | import com.google.gson.annotations.Expose; 5 | 6 | public class Links { 7 | 8 | @Expose 9 | private String self; 10 | @Expose 11 | private String archives; 12 | 13 | /** 14 | * 15 | * @return 16 | * The self 17 | */ 18 | public String getSelf() { 19 | return self; 20 | } 21 | 22 | /** 23 | * 24 | * @param self 25 | * The self 26 | */ 27 | public void setSelf(String self) { 28 | this.self = self; 29 | } 30 | 31 | /** 32 | * 33 | * @return 34 | * The archives 35 | */ 36 | public String getArchives() { 37 | return archives; 38 | } 39 | 40 | /** 41 | * 42 | * @param archives 43 | * The archives 44 | */ 45 | public void setArchives(String archives) { 46 | this.archives = archives; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/speaker/Links__.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.speaker; 3 | 4 | import com.google.gson.annotations.Expose; 5 | 6 | public class Links__ { 7 | 8 | @Expose 9 | private String self; 10 | @Expose 11 | private String archives; 12 | 13 | /** 14 | * 15 | * @return 16 | * The self 17 | */ 18 | public String getSelf() { 19 | return self; 20 | } 21 | 22 | /** 23 | * 24 | * @param self 25 | * The self 26 | */ 27 | public void setSelf(String self) { 28 | this.self = self; 29 | } 30 | 31 | /** 32 | * 33 | * @return 34 | * The archives 35 | */ 36 | public String getArchives() { 37 | return archives; 38 | } 39 | 40 | /** 41 | * 42 | * @param archives 43 | * The archives 44 | */ 45 | public void setArchives(String archives) { 46 | this.archives = archives; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/wordcamp/Links.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.wordcamp; 3 | 4 | import com.google.gson.annotations.Expose; 5 | 6 | public class Links { 7 | 8 | @Expose 9 | private String self; 10 | @Expose 11 | private String archives; 12 | 13 | /** 14 | * 15 | * @return 16 | * The self 17 | */ 18 | public String getSelf() { 19 | return self; 20 | } 21 | 22 | /** 23 | * 24 | * @param self 25 | * The self 26 | */ 27 | public void setSelf(String self) { 28 | this.self = self; 29 | } 30 | 31 | /** 32 | * 33 | * @return 34 | * The archives 35 | */ 36 | public String getArchives() { 37 | return archives; 38 | } 39 | 40 | /** 41 | * 42 | * @param archives 43 | * The archives 44 | */ 45 | public void setArchives(String archives) { 46 | this.archives = archives; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_session_by_speaker.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/session/Links.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.session; 3 | 4 | 5 | import com.google.gson.annotations.Expose; 6 | 7 | 8 | public class Links { 9 | 10 | @Expose 11 | private String self; 12 | @Expose 13 | private String archives; 14 | 15 | /** 16 | * 17 | * @return 18 | * The self 19 | */ 20 | public String getSelf() { 21 | return self; 22 | } 23 | 24 | /** 25 | * 26 | * @param self 27 | * The self 28 | */ 29 | public void setSelf(String self) { 30 | this.self = self; 31 | } 32 | 33 | /** 34 | * 35 | * @return 36 | * The archives 37 | */ 38 | public String getArchives() { 39 | return archives; 40 | } 41 | 42 | /** 43 | * 44 | * @param archives 45 | * The archives 46 | */ 47 | public void setArchives(String archives) { 48 | this.archives = archives; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/speaker/Links____.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.speaker; 3 | 4 | import com.google.gson.annotations.Expose; 5 | 6 | public class Links____ { 7 | 8 | @Expose 9 | private String collection; 10 | @Expose 11 | private String self; 12 | 13 | /** 14 | * 15 | * @return 16 | * The collection 17 | */ 18 | public String getCollection() { 19 | return collection; 20 | } 21 | 22 | /** 23 | * 24 | * @param collection 25 | * The collection 26 | */ 27 | public void setCollection(String collection) { 28 | this.collection = collection; 29 | } 30 | 31 | /** 32 | * 33 | * @return 34 | * The self 35 | */ 36 | public String getSelf() { 37 | return self; 38 | } 39 | 40 | /** 41 | * 42 | * @param self 43 | * The self 44 | */ 45 | public void setSelf(String self) { 46 | this.self = self; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/session/Links__.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.session; 3 | 4 | 5 | import com.google.gson.annotations.Expose; 6 | 7 | 8 | public class Links__ { 9 | 10 | @Expose 11 | private String collection; 12 | @Expose 13 | private String self; 14 | 15 | /** 16 | * 17 | * @return 18 | * The collection 19 | */ 20 | public String getCollection() { 21 | return collection; 22 | } 23 | 24 | /** 25 | * 26 | * @param collection 27 | * The collection 28 | */ 29 | public void setCollection(String collection) { 30 | this.collection = collection; 31 | } 32 | 33 | /** 34 | * 35 | * @return 36 | * The self 37 | */ 38 | public String getSelf() { 39 | return self; 40 | } 41 | 42 | /** 43 | * 44 | * @param self 45 | * The self 46 | */ 47 | public void setSelf(String self) { 48 | this.self = self; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/utils/CustomGsonDeSerializer.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.utils; 2 | 3 | import com.google.gson.Gson; 4 | import com.google.gson.JsonArray; 5 | import com.google.gson.JsonDeserializationContext; 6 | import com.google.gson.JsonDeserializer; 7 | import com.google.gson.JsonElement; 8 | import com.google.gson.JsonParseException; 9 | 10 | import org.wordcamp.android.objects.speaker.Terms; 11 | 12 | import java.lang.reflect.Type; 13 | 14 | 15 | /** 16 | * Created by aagam on 15/5/15. 17 | */ 18 | public class CustomGsonDeSerializer implements JsonDeserializer { 19 | 20 | @Override 21 | public Terms deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { 22 | //Terms object when null returns an empty array rather then empty list 23 | if (json instanceof JsonArray) { 24 | return null; 25 | } else { 26 | Gson gson = new Gson(); 27 | return gson.fromJson(json,Terms.class); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_wordcamp_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 19 | 20 | 24 | 25 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /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 /home/aagam/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 | 19 | -keep class com.parse.*{ *; } 20 | -dontwarn com.parse.** 21 | -dontwarn com.squareup.picasso.** 22 | -keepclasseswithmembernames class * { 23 | native ; 24 | } 25 | 26 | -keepattributes ** 27 | # Used as a workaround for some Samsung devices on 4.2.2 - https://github.com/wordpress-mobile/WordPress-Android/issues/2151 28 | -keep class !android.support.v7.internal.view.menu.**,** {*;} 29 | -dontpreverify 30 | -dontoptimize 31 | -dontshrink 32 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 48dp 4 | 4dp 5 | 72dp 6 | 7 | 24dp 8 | 72dp 9 | 2dp 10 | 16dp 11 | 8dp 12 | 10dp 13 | 40dp 14 | 15 | 16 | 16dp 17 | 48dp 18 | 56dp 19 | 20 | 21 | 5dp 22 | 23 | 24 | 12sp 25 | 14sp 26 | 16sp 27 | 18sp 28 | 20sp 29 | 25sp 30 | 31 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/speaker/PostMetum.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.speaker; 3 | 4 | import com.google.gson.annotations.Expose; 5 | 6 | public class PostMetum { 7 | 8 | @Expose 9 | private int ID; 10 | @Expose 11 | private String key; 12 | @Expose 13 | private String value; 14 | 15 | /** 16 | * 17 | * @return 18 | * The ID 19 | */ 20 | public int getID() { 21 | return ID; 22 | } 23 | 24 | /** 25 | * 26 | * @param ID 27 | * The ID 28 | */ 29 | public void setID(int ID) { 30 | this.ID = ID; 31 | } 32 | 33 | /** 34 | * 35 | * @return 36 | * The key 37 | */ 38 | public String getKey() { 39 | return key; 40 | } 41 | 42 | /** 43 | * 44 | * @param key 45 | * The key 46 | */ 47 | public void setKey(String key) { 48 | this.key = key; 49 | } 50 | 51 | /** 52 | * 53 | * @return 54 | * The value 55 | */ 56 | public String getValue() { 57 | return value; 58 | } 59 | 60 | /** 61 | * 62 | * @param value 63 | * The value 64 | */ 65 | public void setValue(String value) { 66 | this.value = value; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_wc.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 16 | 17 | 21 | 22 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/wordcamp/PostMetum.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.wordcamp; 3 | 4 | import com.google.gson.annotations.Expose; 5 | 6 | 7 | public class PostMetum { 8 | 9 | @Expose 10 | private Integer ID; 11 | @Expose 12 | private String key; 13 | @Expose 14 | private String value; 15 | 16 | /** 17 | * 18 | * @return 19 | * The ID 20 | */ 21 | public Integer getID() { 22 | return ID; 23 | } 24 | 25 | /** 26 | * 27 | * @param ID 28 | * The ID 29 | */ 30 | public void setID(Integer ID) { 31 | this.ID = ID; 32 | } 33 | 34 | /** 35 | * 36 | * @return 37 | * The key 38 | */ 39 | public String getKey() { 40 | return key; 41 | } 42 | 43 | /** 44 | * 45 | * @param key 46 | * The key 47 | */ 48 | public void setKey(String key) { 49 | this.key = key; 50 | } 51 | 52 | /** 53 | * 54 | * @return 55 | * The value 56 | */ 57 | public String getValue() { 58 | return value; 59 | } 60 | 61 | /** 62 | * 63 | * @param value 64 | * The value 65 | */ 66 | public void setValue(String value) { 67 | this.value = value; 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /app/src/main/res/layout/header_time_session.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 18 | 19 | 25 | 26 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WordCamp-Android 2 | 3 | [![Build Status](https://travis-ci.org/wordpress-mobile/WordCamp-Android.svg?branch=develop)](https://travis-ci.org/wordpress-mobile/WordCamp-Android) 4 | 5 | WordCamp-Android helps you to organize your WordCamp visit, consult venue 6 | address, schedule and speakers list. 7 | 8 | ## Build Instructions ## 9 | 10 | The [gradle build system][1] will fetch all dependencies and generate 11 | files you need to build the project. 12 | 13 | In order to compile the project you need to add `app/gradle.properties` file 14 | for which you can take reference from `app/gradle.properties-example`. 15 | 16 | ## Help us translate the app in your language ## 17 | 18 | You can suggest new translations on our translation 19 | tool: [WordCamp GlotPress project][3]. 20 | 21 | ## Need help to build or hack? ## 22 | 23 | Say hello on [Slack][2] channel: `#mobile`. 24 | 25 | ## License ## 26 | 27 | WordCamp for Android is an Open Source project covered by the 28 | [GNU General Public License version 2](LICENSE.md). Note: some source 29 | files come from external libraries, and might be covered by a different 30 | license compatible with the GPLv2. License information for these files 31 | are included as a comment header. 32 | 33 | [1]: http://tools.android.com/tech-docs/new-build-system/user-guide 34 | [2]: https://make.wordpress.org/chat/ 35 | [3]: https://translate.wordpress.org/projects/apps/wordcamp-android/dev 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_header_session.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | 23 | 24 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_sessions_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | 18 | 19 | 20 | 21 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_my_sessions_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 12 | 13 | 22 | 23 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_speaker.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 17 | 18 | 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_wcdetails_speaker.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 19 | 20 | 24 | 25 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_base.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 19 | 20 | 27 | 28 | 32 | 33 | 37 | 38 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_speaker_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 15 | 16 | 23 | 24 | 25 | 30 | 31 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_wordcamp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 16 | 17 | 24 | 25 | 31 | 32 | 33 | 41 | 42 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/adapters/SpeakerDetailAdapter.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.adapters; 2 | 3 | import android.content.Context; 4 | import android.text.Html; 5 | import android.view.LayoutInflater; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | import android.widget.BaseAdapter; 9 | import android.widget.TextView; 10 | 11 | import org.wordcamp.android.R; 12 | 13 | import java.util.List; 14 | 15 | /** 16 | * Created by aagam on 12/2/15. 17 | */ 18 | public class SpeakerDetailAdapter extends BaseAdapter { 19 | 20 | private Context mContext; 21 | private List session; 22 | private LayoutInflater inflater; 23 | 24 | public SpeakerDetailAdapter(Context ctx, List names){ 25 | mContext = ctx; 26 | session = names; 27 | inflater = LayoutInflater.from(ctx); 28 | } 29 | 30 | @Override 31 | public int getCount() { 32 | return session.size(); 33 | } 34 | 35 | @Override 36 | public Object getItem(int position) { 37 | return session.get(position); 38 | } 39 | 40 | @Override 41 | public long getItemId(int position) { 42 | return position; 43 | } 44 | 45 | @Override 46 | public View getView(int position, View convertView, ViewGroup parent) { 47 | 48 | TextView title; 49 | if(convertView==null){ 50 | convertView = inflater.inflate(R.layout.item_session_by_speaker,parent,false); 51 | } 52 | 53 | title = (TextView)convertView.findViewById(R.id.item_session); 54 | title.setText(Html.fromHtml(session.get(position))); 55 | 56 | return convertView; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/adapters/WCDetailAdapter.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.adapters; 2 | 3 | import android.content.Context; 4 | import android.support.v4.app.Fragment; 5 | import android.support.v4.app.FragmentManager; 6 | 7 | import org.wordcamp.android.R; 8 | import org.wordcamp.android.wcdetails.SessionsFragment; 9 | import org.wordcamp.android.wcdetails.SpeakerFragment; 10 | import org.wordcamp.android.wcdetails.WordCampOverview; 11 | 12 | /** 13 | * Created by aagam on 26/1/15. 14 | */ 15 | public class WCDetailAdapter extends CacheFragmentStatePagerAdapter { 16 | 17 | private Context mContext; 18 | 19 | public WCDetailAdapter(FragmentManager fm,Context ctx) { 20 | super(fm); 21 | mContext = ctx; 22 | } 23 | 24 | @Override 25 | protected Fragment createItem(int position) { 26 | switch (position){ 27 | case 0: 28 | return new WordCampOverview(); 29 | case 1: 30 | return new SessionsFragment(); 31 | case 2: 32 | return new SpeakerFragment(); 33 | default: 34 | return new WordCampOverview(); 35 | } 36 | } 37 | 38 | @Override 39 | public int getCount() { 40 | return 3; 41 | } 42 | 43 | @Override 44 | public CharSequence getPageTitle(int position) { 45 | switch (position){ 46 | case 0: 47 | return mContext.getString(R.string.title_overview); 48 | case 1: 49 | return mContext.getString(R.string.title_schedule); 50 | default: 51 | return mContext.getString(R.string.title_speakers); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/utils/ImageUtils.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.utils; 2 | 3 | import android.content.Context; 4 | import android.content.res.Resources; 5 | import android.content.res.TypedArray; 6 | import android.graphics.Point; 7 | import android.util.TypedValue; 8 | import android.view.Display; 9 | import android.view.WindowManager; 10 | 11 | import org.wordcamp.android.R; 12 | 13 | /** 14 | * Created by aagam on 23/1/15. 15 | */ 16 | public class ImageUtils { 17 | 18 | public static int getAspectRatio(Context ctx){ 19 | WindowManager wm = (WindowManager) ctx.getSystemService(Context.WINDOW_SERVICE); 20 | Display display = wm.getDefaultDisplay(); 21 | int width; 22 | 23 | if (android.os.Build.VERSION.SDK_INT >= 13){ 24 | Point size = new Point(); 25 | display.getSize(size); 26 | width = size.x; 27 | } 28 | else{ 29 | width = display.getWidth(); 30 | } 31 | 32 | return (9*width)/16; 33 | } 34 | 35 | public static int dpToPx(Context ctx, int dp){ 36 | Resources r = ctx.getResources(); 37 | return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, r.getDisplayMetrics()); 38 | } 39 | 40 | public static int getActionBarSize(Context ctx) { 41 | TypedValue typedValue = new TypedValue(); 42 | int[] textSizeAttr = new int[]{R.attr.actionBarSize}; 43 | int indexOfAttrTextSize = 0; 44 | TypedArray a = ctx.obtainStyledAttributes(typedValue.data, textSizeAttr); 45 | int actionBarSize = a.getDimensionPixelSize(indexOfAttrTextSize, -1); 46 | a.recycle(); 47 | return actionBarSize; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/res/values-is/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Engin nettenging 4 | WordCamp hafa ekki verið samkeyrð 5 | Væntanlegt 6 | Vefútgáfa 7 | Yfirlit 8 | Setja í áætlun 9 | Senda 10 | Mínir fyrirlestrar 11 | Fyrirlesarar 12 | Fyrirlestrar 13 | Tilkynna villu? 14 | Lýsing 15 | Fyrirsögn 16 | Endurgjöf 17 | Leita í WordCamps 18 | Uppfæra fyrirlesara 19 | Engir eftirlætis fyrirlestrar enn 20 | Um 21 | Staðsetning 22 | Uppfæra yfirlit 23 | Leita í WordCamps 24 | Engu WordCamp bætt við enn 25 | Fyrirlesarar verða kynntir síðar 26 | Dagskrá verður kynnt síðar 27 | Endurgjöf 28 | Uppfæra fyrirlestra 29 | Endurhlaða 30 | 31 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_session.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 19 | 20 | 25 | 26 | 33 | 34 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | #00A0D2 11 | #0085BA 12 | #32373C 13 | #A0A5AA 14 | #F7F8F8 15 | #F78B53 16 | #F9A87E 17 | #FFE399 18 | #B3FFFFFF 19 | #1F32373C 20 | 21 | 22 | @color/almost_white 23 | @color/blue_light 24 | @color/blue_dark 25 | @color/yellow 26 | @color/grey_dark 27 | @color/grey_light 28 | @color/grey_dark 29 | @color/grey_light 30 | @color/grey_light 31 | @android:color/white 32 | @color/transparent70_white 33 | @color/grey_dark 34 | @color/transparent12_grey_dark 35 | 36 | @color/primary 37 | @color/primary 38 | @color/primary 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/adapters/SessionDetailAdapter.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.adapters; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import android.widget.BaseAdapter; 8 | import android.widget.ImageView; 9 | import android.widget.TextView; 10 | 11 | import com.squareup.picasso.Picasso; 12 | 13 | import org.wordcamp.android.R; 14 | import org.wordcamp.android.objects.MiniSpeaker; 15 | 16 | import java.util.List; 17 | 18 | /** 19 | * Created by aagam on 12/2/15. 20 | */ 21 | public class SessionDetailAdapter extends BaseAdapter { 22 | 23 | private Context mContext; 24 | private List speakers; 25 | private LayoutInflater inflater; 26 | 27 | public SessionDetailAdapter(Context ctx, List speakerList){ 28 | mContext = ctx; 29 | speakers = speakerList; 30 | inflater = LayoutInflater.from(ctx); 31 | } 32 | 33 | @Override 34 | public int getCount() { 35 | return speakers.size(); 36 | } 37 | 38 | @Override 39 | public Object getItem(int position) { 40 | return speakers.get(position); 41 | } 42 | 43 | @Override 44 | public long getItemId(int position) { 45 | return position; 46 | } 47 | 48 | @Override 49 | public View getView(int position, View convertView, ViewGroup parent) { 50 | 51 | TextView title; 52 | ImageView dp; 53 | if(convertView==null){ 54 | convertView = inflater.inflate(R.layout.item_speaker,parent,false); 55 | } 56 | 57 | title = (TextView)convertView.findViewById(R.id.speaker_name); 58 | dp = (ImageView)convertView.findViewById(R.id.speaker_avatar); 59 | title.setText(speakers.get(position).name); 60 | Picasso.with(mContext).load(speakers.get(position).dp). 61 | placeholder(R.drawable.ic_account_circle_grey600).into(dp); 62 | 63 | return convertView; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /app/src/main/res/values-ko/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 이 WordCamp는 피드백 주소를 공개하지 않았습니다. 4 | WordCamp 피드백 5 | 달력에 추가하기 6 | 더 많은 정보를 보려면 웹사이트를 참고해주세요. 7 | 날짜 8 | 찾아보기 9 | 웹사이트 방문 10 | 즐겨찾기 11 | 네트워크 사용 불가 12 | WordCamp 목록이 동기화되지 않았습니다. 13 | 다가오는 WordCamp 14 | 웹버전 15 | 내 세션 16 | 보내기 17 | 일정 18 | 개요 19 | 세션 20 | 발표자 21 | 제목 22 | 피드백 23 | 설명 24 | 버그를 알리시겠습니까? 25 | 세션이 업데이트 되었습니다. 26 | 피드백 27 | 일정이 안내되었습니다. 28 | 발표자가 알려져있지 않습니다. 29 | 추가한 WordCamp가 없습니다. 30 | WordCamp 검색 31 | 개요가 업데이트 됨 32 | 소개 33 | 위치 34 | 즐겨찾기에 등록한 세션이 없습니다. 35 | 발표자 업데이트 36 | WordCamp 검색 37 | 새로고침 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/values-ja/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | WordCamp のフィードバック 4 | この WordCamp はまだフィードバック URL を公開していません 5 | カレンダーに追加 6 | サイトで詳細をチェック 7 | 日付 8 | ウェブサイトを見る 9 | ナビゲート 10 | お気に入り 11 | ネットワークが利用できません 12 | WordCamp はまだ同期されていません 13 | 今後 14 | ウェブ版 15 | 概要 16 | スケジュール 17 | 送信 18 | スピーカー 19 | 自分のセッション 20 | セッション 21 | フィードバック 22 | タイトル 23 | 説明 24 | バグを報告しますか? 25 | About 26 | スピーカーを更新しました 27 | 告知するスケジュール 28 | セッションを更新しました 29 | 概要を更新しました 30 | フィードバック 31 | スピーカーはこれから告知されます 32 | お気に入りのセッションがありません 33 | まだ WordCamp が追加されていません 34 | WordCamp を検索 35 | 場所 36 | WordCamp を検索 37 | 更新 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_header_speaker.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 20 | 21 | 30 | 31 | 32 | 39 | 40 | 48 | 49 | -------------------------------------------------------------------------------- /app/src/main/res/values-he/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ו-%d אחרים 4 | וכן 5 | משוב לוורדקאמפ 6 | וורדקאמפ זה טרם פרסם קישור למתן משובים 7 | למידע נוסף בקרו באתר 8 | הוספת תזכורת ללוח שנה 9 | ניווט 10 | תאריך 11 | בקר באתר 12 | מועדפים 13 | אין גישת לרשת 14 | וורדקאמפ עדיין לא סונכרן 15 | שלח 16 | לוח זמנים 17 | סקירה 18 | גרסה 19 | דוברים 20 | הרצאות 21 | ההרצאות שלי 22 | בקרוב 23 | תאור 24 | כותרת 25 | משוב 26 | דיווח על תקלות 27 | אודות 28 | מיקום 29 | משוב 30 | חיפוש וורדקאמפ 31 | דוברים מעודכנים 32 | סקירה מעודכנת 33 | חיפוש וורדקאמפ 34 | טרם התווספו וורדקאמפים 35 | טרם הוכרזו דוברים 36 | טרם נקבע לוח זמנים 37 | הרצאות מעודכנות 38 | אין הרצאות מועדפות 39 | רענון 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/values-sv/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | WordCamp-feedback 4 | Denna WordCamp har inte publicerat en feedback-URL än 5 | Lägg till i kalender 6 | Besök webbplatsen för mer information 7 | Besök webbplats 8 | Navigation 9 | Datum 10 | Favoriter 11 | Ingen nätverksanslutning 12 | WordCamps har inte hämtats än 13 | Schema 14 | Överblick 15 | Webbversion 16 | Kommande 17 | Mina tal 18 | Skicka 19 | Talare 20 | Tal 21 | Titel 22 | Feedback 23 | Rapportera en bugg? 24 | Beskrivning 25 | Feedback 26 | Tal uppdaterade 27 | Talare har ännu inte tillkännagivits 28 | Schema inte klart än 29 | Sök WordCamp 30 | Inga WordCamps tillagda än 31 | Plats 32 | Överblick uppdaterad 33 | Talare uppdaterade 34 | Inga tal markerade som favoriter 35 | Om 36 | Sök WordCamp 37 | Uppdatera 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/values-es/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Respuesta a la WordCamp 4 | Esta WordCamp aún no ha publicado una URL de respuesta 5 | Visita la web para informarte 6 | Añadir al calendario 7 | Visitar Web 8 | Navegar 9 | Fecha 10 | Favoritos 11 | Ninguna red disponible 12 | WordCamps aún sin sincronizar 13 | Versión Web 14 | Próximos 15 | Horario 16 | Resumen 17 | Enviar 18 | Mis Ponencias 19 | Ponentes 20 | Sesiones 21 | Respuesta 22 | ¿Reportar un error? 23 | Título 24 | Descripción 25 | No hay sesiones favoritas 26 | Vista actualizada 27 | Respuesta 28 | Ponentes sin publicar 29 | Ponencias actualizadas 30 | Lugar 31 | Ponentes actualizados 32 | Programa sin publicar 33 | Sin WordCamps añadidas 34 | Buscar WordCamps 35 | Acerca de 36 | Buscar WordCamps 37 | Actualizar 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 14 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 28 | 29 | 30 | 31 | 35 | 39 | 40 | 44 | 45 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /app/src/main/res/values-id/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | WordCamp ini belum menerbitkan URL umpan balik 4 | Umpan balik WordCamp 5 | Tambahkan ke kalender 6 | Kunjungi situs untuk informasi lebih lanjut 7 | Kunjungi Website 8 | Navigasi 9 | Tanggal 10 | Favorit 11 | Tidak ada jaringan tersedia 12 | WordCamps belum disinkronkan 13 | Kirim 14 | Jadwal 15 | Ikhtisar 16 | Versi web 17 | Akan datang 18 | Sesi-sesi 19 | Pembicara 20 | Sesi-sesi saya 21 | Judul 22 | Umpan balik 23 | Deskripsi 24 | Laporkan bug? 25 | Umpan balik 26 | Jadwal akan diumumkan 27 | Cari WordCamps 28 | Tentang 29 | Lokasi 30 | Tidak ada sesi yang difavoritkan 31 | Cari WordCamps 32 | Perbarui sesi-sesi 33 | Belum ada WordCamps yang ditambahkan 34 | Ikhtisar terbaru 35 | Pembicara diperbarui 36 | Pembicara belum diumumkan 37 | Segarkan 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/values-sr/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Вордкамп још увек није објавио URL за повратне информације 4 | Повратна информација Вордкампа 5 | Проверите веб место за још информација 6 | Додај у календар 7 | Посети веб место 8 | Датум 9 | Крећи се 10 | Омиљени 11 | Нема доступне мреже 12 | Вордкампови још увек нису усклађени 13 | Распоред 14 | Предстојећи 15 | Сесије 16 | Моје сесије 17 | Преглед 18 | Пошаљи 19 | Предавачи 20 | Веб издање 21 | Повратна информација 22 | Наслов 23 | Опис 24 | Пријављујете грешку? 25 | Повратна информација 26 | Распоред предавања ће бити објављен 27 | Предавачи ће бити објављени 28 | Нисте додали ниједан Вордкамп 29 | Претражи Вордкампове 30 | Ажурирани преглед 31 | О 32 | Немате омиљених предавања 33 | Ажурирани предавачи 34 | Претражи Вордкампове 35 | Локација 36 | Ажуриране сесије 37 | Освежи 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/values-th/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | และ %d อื่น ๆ 4 | และ 5 | WordCamp นี้ยังไม่สามารถเผยแพร่ URL ผลตอบรับได้ 6 | ผลตอบรับ WordCamp 7 | ดูเว็บไซต์สำหรับข้อมูลเพิ่มเติม 8 | เพิ่มไปยังปฎิทิน 9 | วันที่ 10 | เยี่ยมชมเว็บไซต์ 11 | ค้นหา 12 | ชื่นชอบ 13 | ไม่มีเครือข่ายที่ใช้งานได้ 14 | ยังไม่เชื่อมต่อ WordCamps 15 | ตารางเวลา 16 | ช่วงเวลาของฉัน 17 | ส่ง 18 | ช่วงเวลา 19 | ผู้พูด 20 | ภาพรวม 21 | เว็บรุ่น 22 | กำลังมา 23 | หัวข้อ 24 | ผลตอบรับ 25 | คำอธิบาย 26 | ต้องการรายงานบั๊ก? 27 | ค้นหา WordCamps 28 | ยังไม่มีการเพิ่ม WordCamps 29 | ค้นหา WordCamps 30 | รายชื่อผู้พูดที่อัปเดต 31 | ไม่มีช่วงเวลาที่ชื่นชอบ 32 | เกี่ยวกับ 33 | สถานที่ 34 | ภาพรวมที่อัปเดต 35 | ยังไม่ประกาศชื่อผู้พูดในงาน 36 | ตารางเวลาที่จะประกาศ 37 | ผลตอบรับ 38 | อัปเดตแต่ละช่วงเวลา 39 | รีเฟรช 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/values-cs/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Zpětná vazba k WordCampu 4 | Tento WordCamp ještě nezveřejnil žádnou zpětnou vazbu 5 | Přidat do kalendáře 6 | Podívejte se na webové stránky pro více informací 7 | Zobrazit stránku 8 | Navigace 9 | Datum 10 | Oblíbené 11 | Žádná síť není k dispozici 12 | WordCampy nejsou doteď synchronizovány 13 | Budoucí 14 | Webová verze 15 | Přehled 16 | Přednášející 17 | Přednášky 18 | Moje přednášky 19 | Poslat 20 | Plán 21 | Zpětná vazba 22 | Nadpis 23 | Popis 24 | Hlášení chyb? 25 | Žádné přednášky mezi oblíbenými 26 | Aktualizovat přednášející 27 | Lokalizace 28 | Info 29 | Aktualizovat přednášky 30 | Program bude oznámen 31 | Zpětná vazba 32 | Přednášející zatím nebyl oznámen 33 | Zatím žádné WordCampy nejsou přidané 34 | Hledat WordCampy 35 | Aktualizovat informace 36 | Prohledat WordCampy 37 | Aktualizace 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/values-hi/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | और 4 | और %d अन्य 5 | इस वर्डकॅंप ने अभी तक सुझाव यूआरएल प्रकाशित नहीं किया है 6 | वर्डकॅंप का सुझाव 7 | कैलेंडर में जोड़ें 8 | अधिक जानकारी के लिए वेबसाइट की जाँच करें 9 | वेबसाइट पर जाएँ 10 | नेविगेट 11 | तिथि 12 | पसंदीदा 13 | नेटवर्क उपलब्ध नहीं 14 | वर्डकॅंप अभी तक समन्वयित नहीं हुए 15 | भेजें 16 | विहंगावलोकन 17 | वेब संस्करण 18 | आगामी 19 | मेरे सत्र 20 | सत्र 21 | वक्ताओं 22 | अनुसूची 23 | सुझाव 24 | वर्णन 25 | शीर्षक 26 | बग रिपोर्ट कर रहे हो 27 | वक्ताओं की घोषणा अभी तक नहीं हुआ 28 | सुझाव 29 | स्थान 30 | अपडेट किया अवलोकन 31 | वर्डकॅंप खोजे 32 | के बारे में 33 | अपडेटेड वक्ता 34 | वर्डकेम्प खोजे 35 | कोई सत्र पसंदीदा नहीं बनाया 36 | अपडेटेड सत्र 37 | कोई वर्डकेम्प अभी तक जोड़ा नहीं गया 38 | समय की घोषणा 39 | ताज़ा करें 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/values-en-rAU/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | and %d others 4 | and 5 | This WordCamp hasn\'t published a feedback URL yet 6 | WordCamp Feedback 7 | Add to calendar 8 | Check out the website for more information 9 | Date 10 | Navigate 11 | Visit Website 12 | Favourites 13 | No network available 14 | WordCamps not yet synced 15 | Sessions 16 | Speakers 17 | My Sessions 18 | Send 19 | Schedule 20 | Overview 21 | Web version 22 | Upcoming 23 | Title 24 | Feedback 25 | Reporting a Bug? 26 | Description 27 | Updated sessions 28 | Feedback 29 | Schedule to be announced 30 | Speakers yet to be announced 31 | No WordCamps added yet 32 | Search WordCamps 33 | Updated overview 34 | Location 35 | About 36 | No Sessions favourited 37 | Updated speakers 38 | Search WordCamps 39 | Refresh 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/networking/WCRequest.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.networking; 2 | 3 | import com.android.volley.NetworkResponse; 4 | import com.android.volley.Request; 5 | import com.android.volley.Response; 6 | import com.android.volley.VolleyError; 7 | import com.android.volley.toolbox.HttpHeaderParser; 8 | import com.google.gson.Gson; 9 | import com.google.gson.GsonBuilder; 10 | 11 | import org.apache.http.HttpStatus; 12 | 13 | import org.wordcamp.android.objects.speaker.Terms; 14 | import org.wordcamp.android.utils.CustomGsonDeSerializer; 15 | 16 | import java.io.UnsupportedEncodingException; 17 | 18 | /** 19 | * Created by shah.aagam on 30/07/15. 20 | */ 21 | public class WCRequest extends Request { 22 | 23 | private final Gson gson; 24 | private ResponseListener responseListener; 25 | private Class requestType; 26 | 27 | public WCRequest(String url, Class typeResponse, Response.ErrorListener listener, ResponseListener responseListener) { 28 | super(Method.GET, url, listener); 29 | this.responseListener = responseListener; 30 | 31 | gson = new GsonBuilder().registerTypeHierarchyAdapter(Terms.class, 32 | new CustomGsonDeSerializer()).create(); 33 | 34 | requestType = typeResponse; 35 | } 36 | 37 | @Override 38 | protected Response parseNetworkResponse(NetworkResponse response) { 39 | if (response.statusCode == HttpStatus.SC_OK) { 40 | try { 41 | String json = new String( 42 | response.data, HttpHeaderParser.parseCharset(response.headers)); 43 | return Response.success( 44 | gson.fromJson(json, requestType), HttpHeaderParser.parseCacheHeaders(response)); 45 | } catch (UnsupportedEncodingException e) { 46 | e.printStackTrace(); 47 | return Response.error(new VolleyError(response)); 48 | } 49 | } else { 50 | return Response.error(new VolleyError(response)); 51 | } 52 | 53 | } 54 | 55 | 56 | 57 | @Override 58 | public Priority getPriority() { 59 | return Priority.IMMEDIATE; 60 | } 61 | 62 | @Override 63 | protected void deliverResponse(T response) { 64 | responseListener.onResponseReceived(response); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /app/src/main/res/values-el/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Αυτό το WordCamp δεν έχει δημοσιεύσει διεύθυνση URL για σχόλια ακόμη 4 | Σχόλια WordCamp 5 | Προσθήκη στο ημερολόγιο 6 | Ελέγξτε την ιστοσελίδα για περισσότερες πληροφορίες 7 | Ημερομηνία 8 | Πλοηγηθείτε 9 | Επισκεφθείτε την ιστοσελίδα 10 | Αγαπημένα 11 | Δεν υπάρχει διαθέσιμο δίκτυο 12 | Τα WordCamps δεν έχουν συγχρονιστεί ακόμη 13 | επερχόμενο 14 | Web έκδοση 15 | Επισκόπηση 16 | Αποστολή 17 | Πρόγραμμα 18 | Οι συνεδρίες μου 19 | Ομιλητές 20 | Συνεδρίες 21 | Σχόλια 22 | Τίτλος 23 | Περιγραφή 24 | Αναφορά Σφάλματος; 25 | Ενημερώθηκαν οι συνεδρίες 26 | Οι ομιλιτές θα ανακοινωθούν 27 | Το πρόγραμμα θα ανακοινωθεί 28 | Σχόλια 29 | Δεν προστέθηκαν WordCamps ακόμα 30 | Αναζήτηση WordCamps 31 | Σχετικά 32 | Τοποθεσία 33 | Ενημερώθηκε η επισκόπηση 34 | Καμία Συνεδρία ως αγαπημένο 35 | Ανανεώθηκαν οι Ομιλιτές 36 | Αναζήτηση WordCamps 37 | Ανανέωση 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/values-pl/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Ten WordCamp nie opublikował jeszcze adresu URL do nadsyłania opinii 4 | Opinia o WordCampie 5 | Przejdź na witrynę, aby uzyskać więcej informacji 6 | Dodaj do kalendarza 7 | Przejdź 8 | Data 9 | Odwiedź witrynę 10 | Ulubione 11 | Brak połączenia z siecią 12 | Informacje o WordCampach nie zostały jeszcze zsynchronizowane 13 | Sesje 14 | Moje sesje 15 | Prelegenci 16 | Nadchodzące 17 | Wersja WWW 18 | Opis 19 | Agenda 20 | Wyślij 21 | Zgłaszasz błąd? 22 | Opinia 23 | Tytuł 24 | Opis 25 | Zaktualizowany opis 26 | Zaktualizowane informacje o prelegentach 27 | Zaktualizowane sesje 28 | Nie dodano żadnych sesji do ulubionych 29 | Agenda zostanie dopiero opublikowana 30 | Lista prelegentów zostanie dopiero opublikowana 31 | Opinia 32 | Szukaj WordCampów 33 | Nie dodano jeszcze żadnych WordCampów 34 | Lokalizacja 35 | O WordCampie 36 | Szukaj WordCampów 37 | Odśwież 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/values-sk/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | a 4 | a %d ďalších 5 | WordCamp Feedback 6 | Tento WordCamp ešte nezverejnil URL pre spätnú väzbu 7 | Pridajte do kalendára 8 | Pozrite si webovú stránku pre viac informácií 9 | Navigovať 10 | Dátum 11 | Navštívte webovú stránku 12 | Obľúbené 13 | Žiadne dostupné siete 14 | WordCampy ešte nie sú synchronizované 15 | Odoslať 16 | Naplánovať 17 | Prehľad 18 | Webová verzia 19 | Nadchádzajúce 20 | Rečníci 21 | Prednášky 22 | Moje prednášky 23 | Nahlásiť chybu? 24 | Popis 25 | Nadpis 26 | Feedback 27 | Hľadajte WordCampy 28 | Feedback 29 | Hľadaj WordCampy 30 | Rečníci zatiaľ neboli oznámení 31 | Aktualizovaný prehľad 32 | Žiadne pridané WordCampy 33 | Program bude oznámený 34 | Miesto 35 | Aktualizovaní rečníci 36 | O WordCamp 37 | Žiadne obľúbené prednášky 38 | Aktualizované prednášky 39 | Obnoviť 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/values-nl/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | en %d anderen 4 | en 5 | WordCamp Feedback 6 | Deze WordCamp heeft nog geen feedback URL gepubliceerd 7 | Bekijk de website voor meer informatie 8 | Toevoegen aan kalender 9 | Bezoek website 10 | Navigatie 11 | Datum 12 | Favorieten 13 | Geen netwerk beschikbaar 14 | WordCamps nog niet gesynchroniseerd 15 | Sessies 16 | Sprekers 17 | Mijn Sessies 18 | Verstuur 19 | Overzicht 20 | Web versie 21 | In de toekomst 22 | Tijdschema 23 | Rapporteer een bug 24 | Titel 25 | Feedback 26 | Beschrijving 27 | Geen favoriete sessies 28 | Over 29 | Vernieuwde sprekers 30 | Feedback 31 | Vernieuwde sessies 32 | Tijdschema is nog niet aangekondigd 33 | Sprekers zijn nog niet aangekondigd 34 | Nog geen WordCamps toegevoegd 35 | Zoek WordCamps 36 | Vernieuwd overzicht 37 | Locatie 38 | Zoek WordCamps 39 | Verversen 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/values-ro/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | și alți %d 4 | și 5 | Acest WordCamp încă n-a publicat un URL pentru impresii 6 | Impresii despre WordCamp 7 | Verifică situl web pentru mai multe informații 8 | Adaugă la calendar 9 | Data 10 | Vizitează situl 11 | Navighează 12 | Favorite 13 | Nicio rețea disponibilă 14 | WordCamp-urile încă nesincronizate 15 | Următoare 16 | Vorbitori 17 | Sesiunile mele 18 | Trimite 19 | Planificare 20 | Prezentare generală 21 | Versiune web 22 | Sesiuni 23 | Titlu 24 | Raportezi un defect? 25 | Impresii 26 | Descriere 27 | Sesiuni actualizate 28 | Actualizare oratori 29 | Actualizare prezentare generală 30 | Oratori de anunțat 31 | Caută WordCamp-uri 32 | Program de anunțat 33 | Niciun WordCamp adăugat 34 | Nicio sesiune favorită 35 | Locație 36 | Căutare WordCamp-uri 37 | Impresii 38 | Despre 39 | Actualizare 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/values-tr/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ve 4 | ve %d diğer kişi 5 | Bu WordCamp henüz bir geri besleme adresi yayınlamadı 6 | WordCamp geri beslemesi 7 | Daha fazla bilgi için web sitesine göz atın 8 | Takvime ekle 9 | Tarih 10 | Websiteyi ziyaret et 11 | Gezinti 12 | Favoriler 13 | Bağlantı yok 14 | WordCamplar henüz senkronize edilmedi 15 | Oturumlarım 16 | Oturumlar 17 | Konuşmacılar 18 | Gönder 19 | Program 20 | Yaklaşan 21 | Web sürümü 22 | Genel bakış 23 | Açıklama 24 | Başlık 25 | Geri besleme 26 | Bir hata mı bildiriyorsunuz? 27 | Konuşmacılar henüz ilan edilmedi 28 | Program açıklanacak 29 | Güncel oturumlar 30 | Güncel genel bakış 31 | Henüz WordCamp eklenmedi 32 | Favori oturum yok 33 | Hakkında 34 | Konum 35 | Güncel konuşmacılar 36 | Geri besleme 37 | WordCamp&#8217;ler arasında ara 38 | WordCamp&#8217;ler arasında ara 39 | Yenile 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/values-fr/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | et %d autres 4 | et 5 | Feedback sur WordCamp 6 | Ce WordCamp n\'a pas encore publié d\'URL de feedback 7 | Ajouter au calendrier 8 | Visiter le site web pour plus d\'informations 9 | Date 10 | Visit Website 11 | Naviguer 12 | Favoris 13 | Réseau indisponible 14 | WordCamps non synchronisés 15 | Sessions 16 | Mes Sessions 17 | Intervenants 18 | Envoyer 19 | Programme 20 | Présentation 21 | Version Web 22 | Prochains 23 | Rapporter un Bug? 24 | Description 25 | Titre 26 | Feedback 27 | Chercher un WordCamp 28 | Intervenants mis à jour 29 | Aucune Session Favorite 30 | À Propos 31 | Localisation 32 | Présentation mise à jour 33 | Chercher un WordCamp 34 | Aucun WordCamp pour le moment 35 | Intervenants non annoncés pour le moment 36 | Programme non annoncé pour le moment 37 | Feedback 38 | Sessions mis à jour 39 | Rafraichir 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/values-nb/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | og %d andre 4 | og 5 | Denne WordCampen har ikke publisert tilbakemeldingslenke enda. 6 | Tilbakemelding til WordCamp 7 | Legg til i kalender 8 | Besøk nettsiden for mer informasjon 9 | Naviger 10 | Dato 11 | Besøk nettside 12 | Favoritter 13 | Ingen nettverk tilgjengelig 14 | WordCamper er ennå ikke synkronisert 15 | Oversikt 16 | Økter 17 | Mine økter 18 | Send 19 | Foredragsholdere 20 | Timeplan 21 | Webversjon 22 | Kommende 23 | Rapportere en feil? 24 | Tilbakemelding 25 | Beskrivelse 26 | Tittel 27 | Oppdatert økter 28 | Tilbakemelding 29 | Tidsplanen er ikke publisert enda 30 | Foredragsholdere er ikke publisert enda 31 | Søk i WordCamper 32 | Ingen WordCamper lagt til enda 33 | Søk i WordCamper 34 | Oppdatert oversikt 35 | Beliggenhet 36 | Om 37 | Ingen økter er favorittmerket 38 | Oppdatert foredragsholdere 39 | Oppdater 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/values-ru/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | и 4 | и %d других 5 | Обратная связь о конференции 6 | Для этой конференции ещё не указан URL обратной связи 7 | Посетите сайт, чтобы получить больше информации 8 | Добавить в календарь 9 | Перейти 10 | Дата 11 | Перейти на сайт 12 | Избранное 13 | Сеть недоступна 14 | Конференции WordCamp ещё не синхронизированы 15 | Веб-версия 16 | Докладчики 17 | Скоро 18 | Обзор 19 | Расписание 20 | Мои сессии 21 | Отправить 22 | Сессии 23 | Обратная связь 24 | Описание 25 | Заголовок 26 | Сообщить об ошибке? 27 | Расписание ещё не объявлено 28 | Докладчики ещё не объявлены 29 | Конференции WordCamp ещё не добавлены 30 | Поиск конференций WordCamp 31 | Поиск конференций WordCamp 32 | Докладчики обновлены 33 | Место 34 | Сессии обновлены 35 | Обратная связь 36 | Страница обзора обновлена 37 | О программе 38 | Нет избранных сессий 39 | Обновить 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/values-sq/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | dhe %d të tjerë 4 | dhe 5 | Përhtypje Mbi WordCamp-in 6 | Ky WordCamp s&#8217;ka botuar ende URL përshtypjesh 7 | Për më tepër të dhëna shihni sajtin 8 | Shtoje në kalendar 9 | Vizitoni Sajtin 10 | Lëvizje 11 | Datë 12 | Të parapëlqyer 13 | Pa rrjet gati 14 | WordCamp-et s&#8217;janë njëkohësuar ende 15 | Sesione 16 | Folës 17 | Sesionet e Mia 18 | Dërgoje 19 | Plani 20 | Përmbledhje 21 | Version Web 22 | Së Afërmi 23 | Njoftim të Metash? 24 | Përshkrim 25 | Titull 26 | Përshtypje 27 | Kërkoni në WordCamp-e 28 | Folësit u përditësuan 29 | Pa Sesione të Parapëlqyer 30 | Rreth 31 | Vendndodhje 32 | Përmbledhja u përditësua 33 | Kërkoni në WordCamp-e 34 | S&#8217;janë shtuar ende WordCamp-e 35 | Folësit do të shpallen së afërmi 36 | Plani do të shpallet së afërmi 37 | Përshtypje 38 | Sesionet u përditësuan 39 | Rifreskoje 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/values-it/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | e %d altri 4 | e 5 | WordCamp Feedback 6 | Questo WordCamp non ha ancora pubblicato un URL di feedback 7 | Controlla il sito per ulteriori informazioni 8 | Aggiungi al calendario 9 | Data 10 | Naviga 11 | Visita il sito web 12 | Preferiti 13 | Nessun network disponibile 14 | WordCamp non è ancora sincronizzato 15 | Relatori 16 | Prossimo 17 | Versione per il web 18 | Panoramica 19 | Programma 20 | Le mie sessioni 21 | Invia 22 | Sessioni 23 | Riscontro 24 | Titolo 25 | Segnalazione di un bug? 26 | Descrizione 27 | Programmato per essere annunciato 28 | Relatori aggiornati 29 | Realatori non ancora annunciati 30 | Cerca WordCamp 31 | Cerca WordCamp 32 | Riscontro 33 | Nessun WordCamp aggiunto 34 | Sessioni aggiornate 35 | Luogo 36 | Panoramica aggiornata 37 | A proposito 38 | Nessuna sessione aggiunta ai preferiti 39 | Sessioni aggiornate 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/db/WCSQLiteHelper.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.db; 2 | 3 | import android.content.Context; 4 | import android.database.sqlite.SQLiteDatabase; 5 | import android.database.sqlite.SQLiteOpenHelper; 6 | 7 | /** 8 | * Created by aagam on 27/1/15. 9 | */ 10 | class WCSQLiteHelper extends SQLiteOpenHelper { 11 | 12 | private static final String DB_NAME = "wordcamp.central"; 13 | private static final int DB_VERSION = 1; 14 | public static final String TABLE_WC = "wordcamp"; 15 | private static final String DB_CREATE_WORDCAMP = "create table wordcamp ( wcid integer primary key," + 16 | " title text, fromdate text, todate text, lastscannedgmt text, gsonobject text, url text," + 17 | " featuredImageUrl text, mywc INTEGER DEFAULT 0, twitter text, address text, venue text, " + 18 | "location text, about text); "; 19 | 20 | private static final String DB_CREATE_SPEAKER = "create table speaker ( wcid integer, name text, " + 21 | "speaker_id int, speaker_bio text, postid int, featuredimage text, lastscannedgmt text," + 22 | " gsonobject text, gravatar text, PRIMARY KEY ( wcid, postid) ); "; 23 | 24 | private static final String DB_CREATE_SESSION = "create table session ( wcid integer, title text, " + 25 | "time int, postid int, location text, category text, " + 26 | "lastscannedgmt text, gsonobject text, mysession INTEGER DEFAULT 0, PRIMARY KEY ( wcid, postid) ); "; 27 | 28 | private static final String DB_CREATE_SPEAKER_SESSION = "create table speakersessions ( wcid integer," + 29 | "speakerid integer, sessionid integer, PRIMARY KEY (wcid, speakerid, sessionid) ); "; 30 | 31 | private static final String DB_CREATE_FEEDBACK_URLS = "create table feedback ( wcid integer primary key," + 32 | " url text); "; 33 | 34 | 35 | 36 | public WCSQLiteHelper(Context context) { 37 | super(context, DB_NAME, null, DB_VERSION); 38 | } 39 | 40 | @Override 41 | public void onCreate(SQLiteDatabase db) { 42 | db.execSQL(DB_CREATE_WORDCAMP); 43 | db.execSQL(DB_CREATE_SPEAKER); 44 | db.execSQL(DB_CREATE_SESSION); 45 | db.execSQL(DB_CREATE_SPEAKER_SESSION); 46 | db.execSQL(DB_CREATE_FEEDBACK_URLS); 47 | } 48 | 49 | @Override 50 | public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { 51 | 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_session_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 15 | 16 | 17 | 18 | 31 | 32 | 45 | 46 | 47 | 55 | 56 | -------------------------------------------------------------------------------- /app/src/main/res/values-de/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | und 4 | und %d andere 5 | Dieses WordCamp hat bisher keine Feedback-URL veröffentlicht 6 | WordCamp-Feedback 7 | Besuche die Website für weitere Informationen 8 | Zum Kalender hinzufügen 9 | Datum 10 | Navigieren 11 | Website besuchen 12 | Favoriten 13 | Kein Netzwerk verfügbar 14 | WordCamps wurden noch nicht synchronisiert 15 | Programm 16 | Demnächst 17 | Sessions 18 | Speaker 19 | Übersicht 20 | Abschicken 21 | Webversion 22 | Meine Sessions 23 | Fehler melden? 24 | Beschreibung 25 | Titel 26 | Feedback 27 | Keine Sessions favorisiert 28 | Über 29 | Speaker wurden aktualisiert 30 | Veranstaltungsort 31 | Übersicht wurde aktualisiert 32 | Suchen 33 | WordCamps suchen 34 | Noch keine WordCamps hinzugefügt 35 | Speaker sind noch nicht bekanntgegeben worden 36 | Der Ablauf wurde noch nicht bekanntgegeben 37 | Feedback 38 | Sessions wurden aktualisiert 39 | Aktualisieren 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/speaker/Links_.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.speaker; 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | public class Links_ { 8 | 9 | @Expose 10 | private String self; 11 | @Expose 12 | private String author; 13 | @Expose 14 | private String collection; 15 | @Expose 16 | private String replies; 17 | @SerializedName("version-history") 18 | @Expose 19 | private String versionHistory; 20 | 21 | /** 22 | * 23 | * @return 24 | * The self 25 | */ 26 | public String getSelf() { 27 | return self; 28 | } 29 | 30 | /** 31 | * 32 | * @param self 33 | * The self 34 | */ 35 | public void setSelf(String self) { 36 | this.self = self; 37 | } 38 | 39 | /** 40 | * 41 | * @return 42 | * The author 43 | */ 44 | public String getAuthor() { 45 | return author; 46 | } 47 | 48 | /** 49 | * 50 | * @param author 51 | * The author 52 | */ 53 | public void setAuthor(String author) { 54 | this.author = author; 55 | } 56 | 57 | /** 58 | * 59 | * @return 60 | * The collection 61 | */ 62 | public String getCollection() { 63 | return collection; 64 | } 65 | 66 | /** 67 | * 68 | * @param collection 69 | * The collection 70 | */ 71 | public void setCollection(String collection) { 72 | this.collection = collection; 73 | } 74 | 75 | /** 76 | * 77 | * @return 78 | * The replies 79 | */ 80 | public String getReplies() { 81 | return replies; 82 | } 83 | 84 | /** 85 | * 86 | * @param replies 87 | * The replies 88 | */ 89 | public void setReplies(String replies) { 90 | this.replies = replies; 91 | } 92 | 93 | /** 94 | * 95 | * @return 96 | * The versionHistory 97 | */ 98 | public String getVersionHistory() { 99 | return versionHistory; 100 | } 101 | 102 | /** 103 | * 104 | * @param versionHistory 105 | * The version-history 106 | */ 107 | public void setVersionHistory(String versionHistory) { 108 | this.versionHistory = versionHistory; 109 | } 110 | 111 | } 112 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/speaker/Links___.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.speaker; 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | public class Links___ { 8 | 9 | @Expose 10 | private String self; 11 | @Expose 12 | private String author; 13 | @Expose 14 | private String collection; 15 | @Expose 16 | private String replies; 17 | @SerializedName("version-history") 18 | @Expose 19 | private String versionHistory; 20 | 21 | /** 22 | * 23 | * @return 24 | * The self 25 | */ 26 | public String getSelf() { 27 | return self; 28 | } 29 | 30 | /** 31 | * 32 | * @param self 33 | * The self 34 | */ 35 | public void setSelf(String self) { 36 | this.self = self; 37 | } 38 | 39 | /** 40 | * 41 | * @return 42 | * The author 43 | */ 44 | public String getAuthor() { 45 | return author; 46 | } 47 | 48 | /** 49 | * 50 | * @param author 51 | * The author 52 | */ 53 | public void setAuthor(String author) { 54 | this.author = author; 55 | } 56 | 57 | /** 58 | * 59 | * @return 60 | * The collection 61 | */ 62 | public String getCollection() { 63 | return collection; 64 | } 65 | 66 | /** 67 | * 68 | * @param collection 69 | * The collection 70 | */ 71 | public void setCollection(String collection) { 72 | this.collection = collection; 73 | } 74 | 75 | /** 76 | * 77 | * @return 78 | * The replies 79 | */ 80 | public String getReplies() { 81 | return replies; 82 | } 83 | 84 | /** 85 | * 86 | * @param replies 87 | * The replies 88 | */ 89 | public void setReplies(String replies) { 90 | this.replies = replies; 91 | } 92 | 93 | /** 94 | * 95 | * @return 96 | * The versionHistory 97 | */ 98 | public String getVersionHistory() { 99 | return versionHistory; 100 | } 101 | 102 | /** 103 | * 104 | * @param versionHistory 105 | * The version-history 106 | */ 107 | public void setVersionHistory(String versionHistory) { 108 | this.versionHistory = versionHistory; 109 | } 110 | 111 | } 112 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/wordcamp/Links_.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.wordcamp; 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | public class Links_ { 8 | 9 | @Expose 10 | private String self; 11 | @Expose 12 | private String author; 13 | @Expose 14 | private String collection; 15 | @Expose 16 | private String replies; 17 | @SerializedName("version-history") 18 | @Expose 19 | private String versionHistory; 20 | 21 | /** 22 | * 23 | * @return 24 | * The self 25 | */ 26 | public String getSelf() { 27 | return self; 28 | } 29 | 30 | /** 31 | * 32 | * @param self 33 | * The self 34 | */ 35 | public void setSelf(String self) { 36 | this.self = self; 37 | } 38 | 39 | /** 40 | * 41 | * @return 42 | * The author 43 | */ 44 | public String getAuthor() { 45 | return author; 46 | } 47 | 48 | /** 49 | * 50 | * @param author 51 | * The author 52 | */ 53 | public void setAuthor(String author) { 54 | this.author = author; 55 | } 56 | 57 | /** 58 | * 59 | * @return 60 | * The collection 61 | */ 62 | public String getCollection() { 63 | return collection; 64 | } 65 | 66 | /** 67 | * 68 | * @param collection 69 | * The collection 70 | */ 71 | public void setCollection(String collection) { 72 | this.collection = collection; 73 | } 74 | 75 | /** 76 | * 77 | * @return 78 | * The replies 79 | */ 80 | public String getReplies() { 81 | return replies; 82 | } 83 | 84 | /** 85 | * 86 | * @param replies 87 | * The replies 88 | */ 89 | public void setReplies(String replies) { 90 | this.replies = replies; 91 | } 92 | 93 | /** 94 | * 95 | * @return 96 | * The versionHistory 97 | */ 98 | public String getVersionHistory() { 99 | return versionHistory; 100 | } 101 | 102 | /** 103 | * 104 | * @param versionHistory 105 | * The version-history 106 | */ 107 | public void setVersionHistory(String versionHistory) { 108 | this.versionHistory = versionHistory; 109 | } 110 | 111 | } 112 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/session/Links_.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.session; 3 | 4 | 5 | import com.google.gson.annotations.Expose; 6 | import com.google.gson.annotations.SerializedName; 7 | 8 | 9 | public class Links_ { 10 | 11 | @Expose 12 | private String self; 13 | @Expose 14 | private String author; 15 | @Expose 16 | private String collection; 17 | @Expose 18 | private String replies; 19 | @SerializedName("version-history") 20 | @Expose 21 | private String versionHistory; 22 | 23 | /** 24 | * 25 | * @return 26 | * The self 27 | */ 28 | public String getSelf() { 29 | return self; 30 | } 31 | 32 | /** 33 | * 34 | * @param self 35 | * The self 36 | */ 37 | public void setSelf(String self) { 38 | this.self = self; 39 | } 40 | 41 | /** 42 | * 43 | * @return 44 | * The author 45 | */ 46 | public String getAuthor() { 47 | return author; 48 | } 49 | 50 | /** 51 | * 52 | * @param author 53 | * The author 54 | */ 55 | public void setAuthor(String author) { 56 | this.author = author; 57 | } 58 | 59 | /** 60 | * 61 | * @return 62 | * The collection 63 | */ 64 | public String getCollection() { 65 | return collection; 66 | } 67 | 68 | /** 69 | * 70 | * @param collection 71 | * The collection 72 | */ 73 | public void setCollection(String collection) { 74 | this.collection = collection; 75 | } 76 | 77 | /** 78 | * 79 | * @return 80 | * The replies 81 | */ 82 | public String getReplies() { 83 | return replies; 84 | } 85 | 86 | /** 87 | * 88 | * @param replies 89 | * The replies 90 | */ 91 | public void setReplies(String replies) { 92 | this.replies = replies; 93 | } 94 | 95 | /** 96 | * 97 | * @return 98 | * The versionHistory 99 | */ 100 | public String getVersionHistory() { 101 | return versionHistory; 102 | } 103 | 104 | /** 105 | * 106 | * @param versionHistory 107 | * The version-history 108 | */ 109 | public void setVersionHistory(String versionHistory) { 110 | this.versionHistory = versionHistory; 111 | } 112 | 113 | } 114 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/SessionDB.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.objects; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * Created by aagam on 28/1/15. 7 | */ 8 | public class SessionDB implements Serializable { 9 | 10 | private int wc_id; 11 | private int post_id; 12 | private String title; 13 | private int time; 14 | private String last_scanned_gmt; 15 | private String location; 16 | public String category; 17 | private String gson_object; 18 | public boolean isMySession; 19 | 20 | public SessionDB(int wc_id, int post_id, String title, int time, String last_scanned_gmt, 21 | String location, String category, String gson_object, boolean isMySession) { 22 | this.wc_id = wc_id; 23 | this.post_id = post_id; 24 | this.title = title; 25 | this.time = time; 26 | this.last_scanned_gmt = last_scanned_gmt; 27 | this.location = location; 28 | this.category = category; 29 | this.gson_object = gson_object; 30 | this.isMySession = isMySession; 31 | } 32 | 33 | public int getWc_id() { 34 | return wc_id; 35 | } 36 | 37 | public void setWc_id(int wc_id) { 38 | this.wc_id = wc_id; 39 | } 40 | 41 | public int getPost_id() { 42 | return post_id; 43 | } 44 | 45 | public void setPost_id(int post_id) { 46 | this.post_id = post_id; 47 | } 48 | 49 | public String getTitle() { 50 | return title; 51 | } 52 | 53 | public void setTitle(String title) { 54 | this.title = title; 55 | } 56 | 57 | public int getTime() { 58 | return time; 59 | } 60 | 61 | public void setTime(int time) { 62 | this.time = time; 63 | } 64 | 65 | public String getLast_scanned_gmt() { 66 | return last_scanned_gmt; 67 | } 68 | 69 | public void setLast_scanned_gmt(String last_scanned_gmt) { 70 | this.last_scanned_gmt = last_scanned_gmt; 71 | } 72 | 73 | public String getLocation() { 74 | return location; 75 | } 76 | 77 | public void setLocation(String location) { 78 | this.location = location; 79 | } 80 | 81 | public String getCategory() { 82 | return category; 83 | } 84 | 85 | public void setCategory(String category) { 86 | this.category = category; 87 | } 88 | 89 | public String getGson_object() { 90 | return gson_object; 91 | } 92 | 93 | public void setGson_object(String gson_object) { 94 | this.gson_object = gson_object; 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/SpeakerDB.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.objects; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * Created by aagam on 28/1/15. 7 | */ 8 | public class SpeakerDB implements Serializable { 9 | 10 | private int wc_id; 11 | private String name; 12 | private int speaker_id; 13 | private String info; 14 | private String featured_image; 15 | private String last_scanned_gmt; 16 | private String gson_object; 17 | private String gravatar; 18 | 19 | public SpeakerDB(int wc_id, String name, int speaker_id, 20 | String info, String featured_image, 21 | String last_scanned_gmt, String gson_object, String gravatar) { 22 | this.wc_id = wc_id; 23 | this.name = name; 24 | this.speaker_id = speaker_id; 25 | this.info = info; 26 | this.featured_image = featured_image; 27 | this.last_scanned_gmt = last_scanned_gmt; 28 | this.gson_object = gson_object; 29 | this.gravatar = gravatar; 30 | } 31 | 32 | public String getGravatar() { 33 | return gravatar; 34 | } 35 | 36 | public void setGravatar(String gravatar) { 37 | this.gravatar = gravatar; 38 | } 39 | 40 | public int getWc_id() { 41 | return wc_id; 42 | } 43 | 44 | public void setWc_id(int wc_id) { 45 | this.wc_id = wc_id; 46 | } 47 | 48 | public String getName() { 49 | return name; 50 | } 51 | 52 | public void setName(String name) { 53 | this.name = name; 54 | } 55 | 56 | public int getSpeaker_id() { 57 | return speaker_id; 58 | } 59 | 60 | public void setSpeaker_id(int speaker_id) { 61 | this.speaker_id = speaker_id; 62 | } 63 | 64 | public String getInfo() { 65 | return info; 66 | } 67 | 68 | public void setInfo(String info) { 69 | this.info = info; 70 | } 71 | 72 | public String getFeatured_image() { 73 | return featured_image; 74 | } 75 | 76 | public void setFeatured_image(String featured_image) { 77 | this.featured_image = featured_image; 78 | } 79 | 80 | public String getLast_scanned_gmt() { 81 | return last_scanned_gmt; 82 | } 83 | 84 | public void setLast_scanned_gmt(String last_scanned_gmt) { 85 | this.last_scanned_gmt = last_scanned_gmt; 86 | } 87 | 88 | public String getGson_object() { 89 | return gson_object; 90 | } 91 | 92 | public void setGson_object(String gson_object) { 93 | this.gson_object = gson_object; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_feedback.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 12 | 13 | 18 | 19 | 22 | 23 | 31 | 32 | 33 | 34 | 38 | 39 | 47 | 48 | 49 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | WordCamp 4 | WordCamp Central 5 | " – " 6 | 7 | Refresh 8 | Web version 9 | Search WordCamps 10 | Search WordCamps 11 | Feedback 12 | WordCamp Feedback 13 | Send 14 | Navigate 15 | Speakers yet to be announced 16 | Schedule to be announced 17 | About 18 | Location 19 | No WordCamps added yet 20 | WordCamps not yet synced 21 | No Sessions favorited 22 | Updated overview 23 | Updated sessions 24 | Updated speakers 25 | This WordCamp hasn\'t published a feedback URL yet 26 | Feedback 27 | Reporting a Bug? 28 | Description 29 | Title 30 | My Sessions 31 | Upcoming 32 | Favorites 33 | Date 34 | Overview 35 | Schedule 36 | Speakers 37 | Sessions 38 | No network available 39 | Visit Website 40 | Add to calendar 41 | Check out the website for more information 42 | and %d others 43 | and 44 | 45 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/notifs/FavoriteSession.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.notifs; 2 | 3 | import android.app.AlarmManager; 4 | import android.app.PendingIntent; 5 | import android.content.Context; 6 | import android.content.Intent; 7 | 8 | import org.wordcamp.android.objects.SessionDB; 9 | 10 | import java.util.Calendar; 11 | import java.util.Date; 12 | import java.util.TimeZone; 13 | 14 | /** 15 | * Created by aagam on 10/3/15. 16 | */ 17 | public class FavoriteSession { 18 | 19 | private Context context; 20 | 21 | public FavoriteSession(Context context) { 22 | this.context = context; 23 | } 24 | 25 | public void favoriteSession(SessionDB session) { 26 | Calendar calendar = Calendar.getInstance(); 27 | long s = ((long) session.getTime()) * 1000; 28 | Date d = new Date(s); 29 | calendar.setTime(d); 30 | calendar.setTimeZone(TimeZone.getTimeZone("GMT")); 31 | calendar.add(Calendar.MINUTE, -30); 32 | 33 | //Converting the time to Local TimeZone 34 | Calendar newCalendar = Calendar.getInstance(); 35 | newCalendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), 36 | calendar.get(Calendar.DAY_OF_MONTH), calendar.get(Calendar.HOUR_OF_DAY) 37 | , calendar.get(Calendar.MINUTE)); 38 | 39 | d = newCalendar.getTime(); 40 | Date now = new Date(); 41 | 42 | if (now.after(d)) { 43 | return; 44 | } 45 | 46 | AlarmManager manager = (AlarmManager) context 47 | .getSystemService(Context.ALARM_SERVICE); 48 | PendingIntent pendingIntent = getPendingIntent(session); 49 | manager.set(AlarmManager.RTC_WAKEUP, newCalendar.getTimeInMillis(), pendingIntent); 50 | } 51 | 52 | /** 53 | * Creates a PendingIntent to be sent when the alarm for this session goes off. 54 | */ 55 | private PendingIntent getPendingIntent(SessionDB ss) { 56 | Intent intent = new Intent(); 57 | intent.putExtra("postid", ss.getPost_id()); 58 | intent.putExtra("wcid", ss.getWc_id()); 59 | intent.setClass(context, SessionNotifierReceiver.class); 60 | return PendingIntent.getBroadcast(context, 0, intent, 61 | PendingIntent.FLAG_ONE_SHOT); 62 | } 63 | 64 | /** 65 | * Cancels any alarm scheduled for the given session. 66 | */ 67 | public void unFavoriteSession(SessionDB sdb) { 68 | AlarmManager manager = (AlarmManager) context 69 | .getSystemService(Context.ALARM_SERVICE); 70 | PendingIntent pendingIntent = getPendingIntent(sdb); 71 | manager.cancel(pendingIntent); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /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/org/wordcamp/android/networking/WCHurlStack.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.networking; 2 | 3 | import com.android.volley.AuthFailureError; 4 | import com.android.volley.Request; 5 | import com.android.volley.toolbox.HttpStack; 6 | 7 | import org.apache.http.HttpEntity; 8 | import org.apache.http.HttpResponse; 9 | import org.apache.http.ProtocolVersion; 10 | import org.apache.http.StatusLine; 11 | import org.apache.http.entity.BasicHttpEntity; 12 | import org.apache.http.message.BasicHttpResponse; 13 | import org.apache.http.message.BasicStatusLine; 14 | 15 | import java.io.IOException; 16 | import java.io.InputStream; 17 | import java.net.HttpURLConnection; 18 | import java.net.URL; 19 | import java.util.HashMap; 20 | import java.util.Map; 21 | 22 | import javax.net.ssl.HttpsURLConnection; 23 | 24 | /** 25 | * Created by shah.aagam on 30/07/15. 26 | */ 27 | public class WCHurlStack implements HttpStack { 28 | 29 | 30 | @Override 31 | public HttpResponse performRequest(Request request, Map additionalHeaders) throws IOException, AuthFailureError { 32 | 33 | String url = request.getUrl(); 34 | HashMap map = new HashMap<>(); 35 | map.putAll(request.getHeaders()); 36 | map.putAll(additionalHeaders); 37 | 38 | 39 | if(!url.startsWith("https")){ 40 | url = url.replace("http","https"); 41 | } 42 | URL parsedUrl = new URL(url); 43 | HttpURLConnection http = null; 44 | 45 | if (parsedUrl.getProtocol().toLowerCase().equals("https")) { 46 | HttpsURLConnection https = (HttpsURLConnection) parsedUrl.openConnection(); 47 | http = https; 48 | } else { 49 | http = (HttpURLConnection) parsedUrl.openConnection(); 50 | } 51 | 52 | 53 | StatusLine responseStatus = new BasicStatusLine(new ProtocolVersion("HTTP",1,1), 54 | http.getResponseCode(), http.getResponseMessage()); 55 | 56 | BasicHttpResponse response = new BasicHttpResponse(responseStatus); 57 | response.setEntity(entityFromConnection(http)); 58 | return response; 59 | } 60 | 61 | private static HttpEntity entityFromConnection(HttpURLConnection connection) { 62 | BasicHttpEntity entity = new BasicHttpEntity(); 63 | InputStream inputStream; 64 | try { 65 | inputStream = connection.getInputStream(); 66 | } catch (IOException ioe) { 67 | inputStream = connection.getErrorStream(); 68 | } 69 | entity.setContent(inputStream); 70 | entity.setContentLength(connection.getContentLength()); 71 | entity.setContentEncoding(connection.getContentEncoding()); 72 | entity.setContentType(connection.getContentType()); 73 | return entity; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | repositories{ 4 | maven { 5 | url 'http://dl.bintray.com/amulyakhare/maven' 6 | } 7 | } 8 | 9 | android { 10 | useLibrary 'org.apache.http.legacy' 11 | 12 | compileSdkVersion 23 13 | buildToolsVersion "23.0.1" 14 | 15 | defaultConfig { 16 | applicationId "org.wordcamp.android" 17 | minSdkVersion 14 18 | targetSdkVersion 23 19 | versionCode 8 20 | versionName "1.1" 21 | } 22 | 23 | buildTypes { 24 | release { 25 | debuggable false 26 | minifyEnabled true 27 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 28 | buildConfigField "String", "CENTRAL_WORDCAMP_URL", '"' + project.properties["default.central_wordcamp_url"] + '"' 29 | } 30 | 31 | debug { 32 | debuggable true 33 | buildConfigField "String", "CENTRAL_WORDCAMP_URL", '"' + project.properties["default.central_wordcamp_url"] + '"' 34 | } 35 | 36 | localdebug.initWith(buildTypes.debug); 37 | localdebug { 38 | buildConfigField "String", "CENTRAL_WORDCAMP_URL", '"' + project.properties["local.central_wordcamp_url"] + '"' 39 | } 40 | } 41 | } 42 | 43 | dependencies { 44 | compile 'com.android.support:design:23.0.1' 45 | compile 'com.android.support:appcompat-v7:23.0.1' 46 | compile 'com.android.support:cardview-v7:23.0.1' 47 | compile 'com.android.support:recyclerview-v7:23.0.1' 48 | compile 'com.google.code.gson:gson:2.3.1' 49 | compile 'com.squareup.picasso:picasso:2.4.0' 50 | compile 'se.emilsjolander:stickylistheaders:2.6.0' 51 | compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1' 52 | compile 'com.parse.bolts:bolts-android:1.2.0' 53 | compile 'de.hdodenhof:circleimageview:1.3.0' 54 | compile 'com.mcxiaoke.volley:library:1.0.17' 55 | } 56 | 57 | android.buildTypes.all { buildType -> 58 | project.properties.any { property -> 59 | if (property.key.toLowerCase().startsWith("wc.")) { 60 | buildType.buildConfigField "String", property.key.replace("wc.", "").replace(".", "_").toUpperCase(), 61 | "\"${property.value}\"" 62 | } 63 | } 64 | } 65 | 66 | // For app signing release build type 67 | if (["storeFile", "storePassword", "keyAlias", "keyPassword"].count { !project.hasProperty(it) } == 0) { 68 | android { 69 | signingConfigs { 70 | release { 71 | storeFile = file(project.storeFile) 72 | storePassword = project.storePassword 73 | keyAlias = project.keyAlias 74 | keyPassword = project.keyPassword 75 | } 76 | } 77 | } 78 | android.buildTypes.release.signingConfig = android.signingConfigs.release 79 | } 80 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/adapters/SpeakersListAdapter.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.adapters; 2 | 3 | import android.content.Context; 4 | import android.support.v7.widget.RecyclerView; 5 | import android.view.LayoutInflater; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | import android.widget.TextView; 9 | 10 | import com.squareup.picasso.Picasso; 11 | 12 | import org.wordcamp.android.R; 13 | import org.wordcamp.android.objects.SpeakerDB; 14 | import java.util.List; 15 | 16 | import de.hdodenhof.circleimageview.CircleImageView; 17 | 18 | /** 19 | * Created by aagam on 30/1/15. 20 | */ 21 | public class SpeakersListAdapter extends RecyclerView.Adapter { 22 | 23 | private Context context; 24 | private LayoutInflater inflater; 25 | private List speakerDBList; 26 | private OnSpeakerSelectedListener speakerSelectedListener; 27 | 28 | public SpeakersListAdapter(Context ctx, List speakerDBList) { 29 | this.context = ctx; 30 | inflater = LayoutInflater.from(this.context); 31 | this.speakerDBList = speakerDBList; 32 | } 33 | 34 | public void setOnSpeakerSelectedListener(OnSpeakerSelectedListener listener) { 35 | speakerSelectedListener = listener; 36 | } 37 | 38 | public interface OnSpeakerSelectedListener { 39 | void onSpeakerSelected(SpeakerDB speakerDB); 40 | } 41 | 42 | @Override 43 | public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 44 | View v = inflater.inflate(R.layout.item_speaker, parent, false); 45 | ViewHolder holder = new ViewHolder(v); 46 | return holder; 47 | } 48 | 49 | @Override 50 | public void onBindViewHolder(ViewHolder holder, int position) { 51 | final SpeakerDB speakerDB = speakerDBList.get(position); 52 | holder.title.setText(speakerDB.getName()); 53 | Picasso.with(context).load(speakerDB.getGravatar()) 54 | .placeholder(R.drawable.ic_account_circle_grey600).into(holder.dp); 55 | 56 | holder.itemView.setOnClickListener(new View.OnClickListener() { 57 | @Override 58 | public void onClick(View view) { 59 | speakerSelectedListener.onSpeakerSelected(speakerDB); 60 | } 61 | }); 62 | } 63 | 64 | @Override 65 | public long getItemId(int position) { 66 | return position; 67 | } 68 | 69 | @Override 70 | public int getItemCount() { 71 | return speakerDBList.size(); 72 | } 73 | 74 | static class ViewHolder extends RecyclerView.ViewHolder { 75 | TextView title; 76 | CircleImageView dp; 77 | 78 | public ViewHolder(View itemView) { 79 | super(itemView); 80 | title = (TextView) itemView.findViewById(R.id.speaker_name); 81 | dp = (CircleImageView) itemView.findViewById(R.id.speaker_avatar); 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/networking/WPAPIClient.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.networking; 2 | 3 | import android.content.Context; 4 | 5 | import com.android.volley.Response; 6 | 7 | import org.wordcamp.android.BuildConfig; 8 | import org.wordcamp.android.WordCampApplication; 9 | import org.wordcamp.android.objects.speaker.Session; 10 | import org.wordcamp.android.objects.speaker.SpeakerNew; 11 | import org.wordcamp.android.objects.wordcamp.WordCampNew; 12 | 13 | /** 14 | * Created by aagam on 14/1/15. 15 | */ 16 | public class WPAPIClient { 17 | 18 | private static final String QUERY_PARAM_SPEAKERS = "wp-json/posts?type=wcb_speaker&filter[posts_per_page]=100"; 19 | 20 | private static final String QUERY_PARAM_WORDCAMP_LIST = "wp-json/posts?type=wordcamp&filter[order]=DESC&filter[posts_per_page]=50"; 21 | 22 | private static final String QUERY_PARAM_SCHEDULE = "wp-json/posts?type=wcb_session&filter[order]=DESC&filter[orderby]=modified&filter[posts_per_page]=100"; 23 | 24 | private static final String QUERY_PARAM_SINGLEWC = "wp-json/posts/"; 25 | 26 | private static String normalizeWordCampUrl(String wordcampURL) { 27 | if (!wordcampURL.endsWith("/")) { 28 | wordcampURL = wordcampURL + "/"; 29 | } 30 | return wordcampURL; 31 | } 32 | 33 | public static void getAllWCs(Context context, Response.ErrorListener errorListener, 34 | ResponseListener responseListener){ 35 | WCRequest request = new WCRequest(BuildConfig.CENTRAL_WORDCAMP_URL + QUERY_PARAM_WORDCAMP_LIST, 36 | WordCampNew[].class, errorListener, responseListener); 37 | request.setTag(context); 38 | WordCampApplication.requestQueue.cancelAll(context); 39 | WordCampApplication.requestQueue.add(request); 40 | } 41 | 42 | 43 | public static void getWordCampSpeakersVolley(String wordcampURL, Context context, Response.ErrorListener errorListener, 44 | ResponseListener responseListener){ 45 | WCRequest request = new WCRequest(normalizeWordCampUrl(wordcampURL) + QUERY_PARAM_SPEAKERS, 46 | SpeakerNew[].class, errorListener, responseListener); 47 | request.setTag(context); 48 | WordCampApplication.requestQueue.add(request); 49 | } 50 | 51 | public static void getWordCampScheduleVolley(String wordcampURL, Context context, Response.ErrorListener errorListener, 52 | ResponseListener responseListener){ 53 | WCRequest request = new WCRequest(normalizeWordCampUrl(wordcampURL) + QUERY_PARAM_SCHEDULE, 54 | Session[].class, errorListener, responseListener); 55 | request.setTag(context); 56 | WordCampApplication.requestQueue.add(request); 57 | } 58 | 59 | public static void getSingleWCVolley(int wcid, Context context, Response.ErrorListener errorListener, 60 | ResponseListener responseListener){ 61 | WCRequest request = new WCRequest(BuildConfig.CENTRAL_WORDCAMP_URL + QUERY_PARAM_SINGLEWC + wcid, 62 | WordCampNew.class, errorListener, responseListener); 63 | request.setTag(context); 64 | WordCampApplication.requestQueue.add(request); 65 | } 66 | 67 | public static void cancelAllRequests(Context ctx) { 68 | WordCampApplication.requestQueue.cancelAll(ctx); 69 | } 70 | 71 | 72 | } 73 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/session/WcbTrack.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.session; 3 | 4 | 5 | import com.google.gson.annotations.Expose; 6 | 7 | 8 | class WcbTrack { 9 | 10 | @Expose 11 | private int ID; 12 | @Expose 13 | private String name; 14 | @Expose 15 | private String slug; 16 | @Expose 17 | private String description; 18 | @Expose 19 | private Object parent; 20 | @Expose 21 | private int count; 22 | @Expose 23 | private String link; 24 | @Expose 25 | private Meta__ meta; 26 | 27 | /** 28 | * 29 | * @return 30 | * The ID 31 | */ 32 | public int getID() { 33 | return ID; 34 | } 35 | 36 | /** 37 | * 38 | * @param ID 39 | * The ID 40 | */ 41 | public void setID(int ID) { 42 | this.ID = ID; 43 | } 44 | 45 | /** 46 | * 47 | * @return 48 | * The name 49 | */ 50 | public String getName() { 51 | return name; 52 | } 53 | 54 | /** 55 | * 56 | * @param name 57 | * The name 58 | */ 59 | public void setName(String name) { 60 | this.name = name; 61 | } 62 | 63 | /** 64 | * 65 | * @return 66 | * The slug 67 | */ 68 | public String getSlug() { 69 | return slug; 70 | } 71 | 72 | /** 73 | * 74 | * @param slug 75 | * The slug 76 | */ 77 | public void setSlug(String slug) { 78 | this.slug = slug; 79 | } 80 | 81 | /** 82 | * 83 | * @return 84 | * The description 85 | */ 86 | public String getDescription() { 87 | return description; 88 | } 89 | 90 | /** 91 | * 92 | * @param description 93 | * The description 94 | */ 95 | public void setDescription(String description) { 96 | this.description = description; 97 | } 98 | 99 | /** 100 | * 101 | * @return 102 | * The parent 103 | */ 104 | public Object getParent() { 105 | return parent; 106 | } 107 | 108 | /** 109 | * 110 | * @param parent 111 | * The parent 112 | */ 113 | public void setParent(Object parent) { 114 | this.parent = parent; 115 | } 116 | 117 | /** 118 | * 119 | * @return 120 | * The count 121 | */ 122 | public int getCount() { 123 | return count; 124 | } 125 | 126 | /** 127 | * 128 | * @param count 129 | * The count 130 | */ 131 | public void setCount(int count) { 132 | this.count = count; 133 | } 134 | 135 | /** 136 | * 137 | * @return 138 | * The link 139 | */ 140 | public String getLink() { 141 | return link; 142 | } 143 | 144 | /** 145 | * 146 | * @param link 147 | * The link 148 | */ 149 | public void setLink(String link) { 150 | this.link = link; 151 | } 152 | 153 | /** 154 | * 155 | * @return 156 | * The meta 157 | */ 158 | public Meta__ getMeta() { 159 | return meta; 160 | } 161 | 162 | /** 163 | * 164 | * @param meta 165 | * The meta 166 | */ 167 | public void setMeta(Meta__ meta) { 168 | this.meta = meta; 169 | } 170 | 171 | } 172 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/session/Foo.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.session; 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | 10 | 11 | public class Foo { 12 | 13 | @SerializedName("_edit_last") 14 | @Expose 15 | private List EditLast = new ArrayList(); 16 | @SerializedName("_wcb_session_speakers") 17 | @Expose 18 | private List WcbSessionSpeakers = new ArrayList(); 19 | @SerializedName("_wcpt_session_time") 20 | @Expose 21 | private List WcptSessionTime = new ArrayList(); 22 | @SerializedName("_wcpt_session_type") 23 | @Expose 24 | private List WcptSessionType = new ArrayList(); 25 | @SerializedName("_wcpt_speaker_id") 26 | @Expose 27 | private List WcptSpeakerId = new ArrayList(); 28 | @SerializedName("_edit_lock") 29 | @Expose 30 | private List EditLock = new ArrayList(); 31 | 32 | /** 33 | * 34 | * @return 35 | * The EditLast 36 | */ 37 | public List getEditLast() { 38 | return EditLast; 39 | } 40 | 41 | /** 42 | * 43 | * @param EditLast 44 | * The _edit_last 45 | */ 46 | public void setEditLast(List EditLast) { 47 | this.EditLast = EditLast; 48 | } 49 | 50 | /** 51 | * 52 | * @return 53 | * The WcbSessionSpeakers 54 | */ 55 | public List getWcbSessionSpeakers() { 56 | return WcbSessionSpeakers; 57 | } 58 | 59 | /** 60 | * 61 | * @param WcbSessionSpeakers 62 | * The _wcb_session_speakers 63 | */ 64 | public void setWcbSessionSpeakers(List WcbSessionSpeakers) { 65 | this.WcbSessionSpeakers = WcbSessionSpeakers; 66 | } 67 | 68 | /** 69 | * 70 | * @return 71 | * The WcptSessionTime 72 | */ 73 | public List getWcptSessionTime() { 74 | return WcptSessionTime; 75 | } 76 | 77 | /** 78 | * 79 | * @param WcptSessionTime 80 | * The _wcpt_session_time 81 | */ 82 | public void setWcptSessionTime(List WcptSessionTime) { 83 | this.WcptSessionTime = WcptSessionTime; 84 | } 85 | 86 | /** 87 | * 88 | * @return 89 | * The WcptSessionType 90 | */ 91 | public List getWcptSessionType() { 92 | return WcptSessionType; 93 | } 94 | 95 | /** 96 | * 97 | * @param WcptSessionType 98 | * The _wcpt_session_type 99 | */ 100 | public void setWcptSessionType(List WcptSessionType) { 101 | this.WcptSessionType = WcptSessionType; 102 | } 103 | 104 | /** 105 | * 106 | * @return 107 | * The WcptSpeakerId 108 | */ 109 | public List getWcptSpeakerId() { 110 | return WcptSpeakerId; 111 | } 112 | 113 | /** 114 | * 115 | * @param WcptSpeakerId 116 | * The _wcpt_speaker_id 117 | */ 118 | public void setWcptSpeakerId(List WcptSpeakerId) { 119 | this.WcptSpeakerId = WcptSpeakerId; 120 | } 121 | 122 | /** 123 | * 124 | * @return 125 | * The EditLock 126 | */ 127 | public List getEditLock() { 128 | return EditLock; 129 | } 130 | 131 | /** 132 | * 133 | * @param EditLock 134 | * The _edit_lock 135 | */ 136 | public void setEditLock(List EditLock) { 137 | this.EditLock = EditLock; 138 | } 139 | 140 | } 141 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/objects/speaker/WcbTrack.java: -------------------------------------------------------------------------------- 1 | 2 | package org.wordcamp.android.objects.speaker; 3 | 4 | import com.google.gson.annotations.Expose; 5 | 6 | public class WcbTrack { 7 | 8 | @Expose 9 | private int ID; 10 | @Expose 11 | private String name; 12 | @Expose 13 | private String slug; 14 | @Expose 15 | private String description; 16 | @Expose 17 | private String taxonomy; 18 | @Expose 19 | private Object parent; 20 | @Expose 21 | private int count; 22 | @Expose 23 | private String link; 24 | @Expose 25 | private Meta____ meta; 26 | 27 | /** 28 | * 29 | * @return 30 | * The ID 31 | */ 32 | public int getID() { 33 | return ID; 34 | } 35 | 36 | /** 37 | * 38 | * @param ID 39 | * The ID 40 | */ 41 | public void setID(int ID) { 42 | this.ID = ID; 43 | } 44 | 45 | /** 46 | * 47 | * @return 48 | * The name 49 | */ 50 | public String getName() { 51 | return name; 52 | } 53 | 54 | /** 55 | * 56 | * @param name 57 | * The name 58 | */ 59 | public void setName(String name) { 60 | this.name = name; 61 | } 62 | 63 | /** 64 | * 65 | * @return 66 | * The slug 67 | */ 68 | public String getSlug() { 69 | return slug; 70 | } 71 | 72 | /** 73 | * 74 | * @param slug 75 | * The slug 76 | */ 77 | public void setSlug(String slug) { 78 | this.slug = slug; 79 | } 80 | 81 | /** 82 | * 83 | * @return 84 | * The description 85 | */ 86 | public String getDescription() { 87 | return description; 88 | } 89 | 90 | /** 91 | * 92 | * @param description 93 | * The description 94 | */ 95 | public void setDescription(String description) { 96 | this.description = description; 97 | } 98 | 99 | /** 100 | * 101 | * @return 102 | * The taxonomy 103 | */ 104 | public String getTaxonomy() { 105 | return taxonomy; 106 | } 107 | 108 | /** 109 | * 110 | * @param taxonomy 111 | * The taxonomy 112 | */ 113 | public void setTaxonomy(String taxonomy) { 114 | this.taxonomy = taxonomy; 115 | } 116 | 117 | /** 118 | * 119 | * @return 120 | * The parent 121 | */ 122 | public Object getParent() { 123 | return parent; 124 | } 125 | 126 | /** 127 | * 128 | * @param parent 129 | * The parent 130 | */ 131 | public void setParent(Object parent) { 132 | this.parent = parent; 133 | } 134 | 135 | /** 136 | * 137 | * @return 138 | * The count 139 | */ 140 | public int getCount() { 141 | return count; 142 | } 143 | 144 | /** 145 | * 146 | * @param count 147 | * The count 148 | */ 149 | public void setCount(int count) { 150 | this.count = count; 151 | } 152 | 153 | /** 154 | * 155 | * @return 156 | * The link 157 | */ 158 | public String getLink() { 159 | return link; 160 | } 161 | 162 | /** 163 | * 164 | * @param link 165 | * The link 166 | */ 167 | public void setLink(String link) { 168 | this.link = link; 169 | } 170 | 171 | /** 172 | * 173 | * @return 174 | * The meta 175 | */ 176 | public Meta____ getMeta() { 177 | return meta; 178 | } 179 | 180 | /** 181 | * 182 | * @param meta 183 | * The meta 184 | */ 185 | public void setMeta(Meta____ meta) { 186 | this.meta = meta; 187 | } 188 | 189 | } 190 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/notifs/SessionNotifierReceiver.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.notifs; 2 | 3 | import android.app.Notification; 4 | import android.app.NotificationManager; 5 | import android.app.PendingIntent; 6 | import android.content.BroadcastReceiver; 7 | import android.content.Context; 8 | import android.content.Intent; 9 | import android.support.v4.app.NotificationCompat; 10 | import android.support.v4.app.TaskStackBuilder; 11 | import android.text.Html; 12 | 13 | import org.wordcamp.android.BaseActivity; 14 | import org.wordcamp.android.R; 15 | import org.wordcamp.android.WordCampDetailActivity; 16 | import org.wordcamp.android.db.DBCommunicator; 17 | import org.wordcamp.android.objects.MiniSpeaker; 18 | import org.wordcamp.android.objects.SessionDB; 19 | import org.wordcamp.android.objects.WordCampDB; 20 | import org.wordcamp.android.wcdetails.SessionDetailsActivity; 21 | 22 | import java.util.ArrayList; 23 | import java.util.HashMap; 24 | 25 | /** 26 | * Created by aagam on 10/3/15. 27 | */ 28 | public class SessionNotifierReceiver extends BroadcastReceiver { 29 | 30 | @Override 31 | public void onReceive(Context context, Intent intent) { 32 | 33 | int postid = intent.getIntExtra("postid", 0); 34 | int wcid = intent.getIntExtra("wcid", 0); 35 | DBCommunicator dbc = new DBCommunicator(context); 36 | dbc.start(); 37 | SessionDB sdb = dbc.getSession(wcid, postid); 38 | final HashMap names = dbc.getSpeakersForSession(wcid, postid); 39 | ArrayList speakerList = new ArrayList<>(names.keySet()); 40 | WordCampDB wordCampDB = dbc.getWC(wcid); 41 | 42 | dbc.close(); 43 | 44 | showStartNotification(sdb, context, speakerList, wordCampDB); 45 | 46 | } 47 | 48 | private static void showStartNotification(SessionDB session, final Context context, ArrayList speakerList, WordCampDB wordCampDB) { 49 | Intent sessionDetailIntent = new Intent(context, SessionDetailsActivity.class); 50 | sessionDetailIntent.putExtra("session", session); 51 | 52 | Intent wcDetailIntent = new Intent(context, WordCampDetailActivity.class); 53 | wcDetailIntent.putExtra("wc", wordCampDB); 54 | 55 | Intent home = new Intent(context, BaseActivity.class); 56 | 57 | TaskStackBuilder stackBuilder = TaskStackBuilder.create(context); 58 | stackBuilder.addNextIntent(home); 59 | stackBuilder.addNextIntent(wcDetailIntent); 60 | stackBuilder.addNextIntent(sessionDetailIntent); 61 | 62 | PendingIntent talkPendingIntent = stackBuilder.getPendingIntent(session.getPost_id(), 63 | PendingIntent.FLAG_UPDATE_CURRENT); 64 | 65 | NotificationCompat.Builder builder = new NotificationCompat.Builder(context); 66 | builder.setSmallIcon(R.drawable.ic_favorite_white_24dp); 67 | builder.setContentTitle(Html.fromHtml(session.getTitle())); 68 | if (session.getLocation() != null) { 69 | builder.setContentText("Starts in 30 minutes in " + session.getLocation()); 70 | } else { 71 | builder.setContentText("Starts in 30 minutes"); 72 | } 73 | if (speakerList.size() > 1) 74 | builder.setContentInfo(speakerList.get(0) + " & " + (speakerList.size() - 1) + " more"); 75 | else 76 | builder.setContentInfo(speakerList.get(0)); 77 | builder.setContentIntent(talkPendingIntent); 78 | builder.setAutoCancel(true); 79 | builder.setDefaults(Notification.DEFAULT_SOUND | Notification.DEFAULT_LIGHTS | Notification.DEFAULT_VIBRATE); 80 | Notification notification = builder.build(); 81 | 82 | NotificationManager manager = (NotificationManager) context 83 | .getSystemService(Context.NOTIFICATION_SERVICE); 84 | manager.notify("session", session.getPost_id(), notification); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/wcdetails/MySessionsActivity.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.wcdetails; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.support.v7.widget.Toolbar; 7 | import android.view.MenuItem; 8 | import android.view.View; 9 | import android.widget.AdapterView; 10 | 11 | import org.wordcamp.android.R; 12 | import org.wordcamp.android.adapters.SessionsListAdapter; 13 | import org.wordcamp.android.db.DBCommunicator; 14 | import org.wordcamp.android.notifs.FavoriteSession; 15 | import org.wordcamp.android.objects.SessionDB; 16 | 17 | import java.util.HashMap; 18 | import java.util.List; 19 | 20 | import se.emilsjolander.stickylistheaders.StickyListHeadersListView; 21 | 22 | /** 23 | * Created by aagam on 12/2/15. 24 | */ 25 | public class MySessionsActivity extends AppCompatActivity implements SessionsListAdapter.OnAddToMySessionListener { 26 | 27 | private Toolbar toolbar; 28 | private DBCommunicator communicator; 29 | private int wcid; 30 | private FavoriteSession favoriteSession; 31 | 32 | @Override 33 | protected void onCreate(Bundle savedInstanceState) { 34 | super.onCreate(savedInstanceState); 35 | setContentView(R.layout.activity_my_sessions_list); 36 | wcid = getIntent().getIntExtra("wcid", 0); 37 | favoriteSession = new FavoriteSession(this); 38 | communicator = new DBCommunicator(this); 39 | communicator.start(); 40 | initGUI(); 41 | } 42 | 43 | private void initGUI() { 44 | toolbar = (Toolbar) findViewById(R.id.toolbar); 45 | toolbar.setTitle(getString(R.string.my_sessions_title)); 46 | setSupportActionBar(toolbar); 47 | getSupportActionBar().setDefaultDisplayHomeAsUpEnabled(true); 48 | getSupportActionBar().setDisplayHomeAsUpEnabled(true); 49 | 50 | final List sessionDBList = communicator.getFavoriteSessions(wcid); 51 | final HashMap speakersForSession = communicator.getSpeakersforAllSessions(wcid); 52 | final SessionsListAdapter sessionsListAdapter = new SessionsListAdapter(this, sessionDBList, speakersForSession, this); 53 | StickyListHeadersListView mySessionList = (StickyListHeadersListView) findViewById(R.id.sessionList); 54 | mySessionList.setEmptyView(findViewById(R.id.empty_view)); 55 | mySessionList.setAdapter(sessionsListAdapter); 56 | mySessionList.setOnItemClickListener(new AdapterView.OnItemClickListener() { 57 | @Override 58 | public void onItemClick(AdapterView parent, View view, int position, long id) { 59 | Intent detail = new Intent(getApplicationContext(), SessionDetailsActivity.class); 60 | detail.putExtra("session", sessionsListAdapter.getItem(position)); 61 | startActivity(detail); 62 | } 63 | }); 64 | } 65 | 66 | @Override 67 | public void onResume() { 68 | super.onResume(); 69 | if (communicator == null) { 70 | communicator = new DBCommunicator(this); 71 | } else { 72 | communicator.restart(); 73 | } 74 | 75 | } 76 | 77 | @Override 78 | public void onPause() { 79 | super.onPause(); 80 | if (communicator != null) 81 | communicator.close(); 82 | } 83 | 84 | @Override 85 | public void onDestroy() { 86 | super.onDestroy(); 87 | if (communicator != null) 88 | communicator.close(); 89 | } 90 | 91 | @Override 92 | public boolean onOptionsItemSelected(MenuItem item) { 93 | switch (item.getItemId()) { 94 | case android.R.id.home: 95 | finish(); 96 | break; 97 | } 98 | return super.onOptionsItemSelected(item); 99 | } 100 | 101 | @Override 102 | public void addMySession(SessionDB db) { 103 | favoriteSession.favoriteSession(db); 104 | communicator.addToMySession(db); 105 | } 106 | 107 | @Override 108 | public void removeMySession(SessionDB db) { 109 | favoriteSession.unFavoriteSession(db); 110 | communicator.removeFromMySession(db); 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/FeedbackActivity.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android; 2 | 3 | import android.app.ProgressDialog; 4 | import android.content.Intent; 5 | import android.net.Uri; 6 | import android.os.AsyncTask; 7 | import android.os.Bundle; 8 | import android.support.v7.app.AppCompatActivity; 9 | import android.support.v7.widget.SwitchCompat; 10 | import android.support.v7.widget.Toolbar; 11 | import android.view.Menu; 12 | import android.view.MenuItem; 13 | import android.widget.EditText; 14 | 15 | import org.wordcamp.android.utils.Utils; 16 | 17 | import java.io.BufferedReader; 18 | import java.io.IOException; 19 | import java.io.InputStreamReader; 20 | 21 | /** 22 | * Created by aagam on 27/5/15. 23 | */ 24 | public class FeedbackActivity extends AppCompatActivity { 25 | 26 | private EditText title, descr; 27 | private SwitchCompat bugSwitch; 28 | 29 | @Override 30 | protected void onCreate(Bundle savedInstanceState) { 31 | super.onCreate(savedInstanceState); 32 | setContentView(R.layout.activity_feedback); 33 | initUI(); 34 | } 35 | 36 | private void initUI() { 37 | setSupportActionBar((Toolbar) findViewById(R.id.toolbar)); 38 | getSupportActionBar().setTitle(getString(R.string.help_and_feedback)); 39 | getSupportActionBar().setDisplayHomeAsUpEnabled(true); 40 | title = (EditText) findViewById(R.id.titleFeedback); 41 | descr = (EditText) findViewById(R.id.descrFeedback); 42 | bugSwitch = (SwitchCompat) findViewById(R.id.bugSwitch); 43 | } 44 | 45 | @Override 46 | public boolean onCreateOptionsMenu(Menu menu) { 47 | getMenuInflater().inflate(R.menu.menu_feedback, menu); 48 | return true; 49 | } 50 | 51 | @Override 52 | public boolean onOptionsItemSelected(MenuItem item) { 53 | int id = item.getItemId(); 54 | if (id == R.id.sendFeedback) { 55 | new SendFeedback().execute(); 56 | return true; 57 | } else if (id == android.R.id.home) { 58 | finish(); 59 | } 60 | return super.onOptionsItemSelected(item); 61 | } 62 | 63 | public class SendFeedback extends AsyncTask { 64 | private ProgressDialog dialog; 65 | 66 | @Override 67 | protected void onPreExecute() { 68 | super.onPreExecute(); 69 | dialog = new ProgressDialog(FeedbackActivity.this); 70 | dialog.setMessage("Preparing..."); 71 | dialog.setCancelable(false); 72 | dialog.setCanceledOnTouchOutside(false); 73 | dialog.setIndeterminate(true); 74 | dialog.show(); 75 | } 76 | 77 | @Override 78 | protected String doInBackground(String... params) { 79 | if (bugSwitch.isChecked()) { 80 | try { 81 | Process process = Runtime.getRuntime().exec("logcat -d"); 82 | BufferedReader bufferedReader = new BufferedReader( 83 | new InputStreamReader(process.getInputStream())); 84 | 85 | StringBuilder log = new StringBuilder(); 86 | String line; 87 | while ((line = bufferedReader.readLine()) != null) { 88 | log.append(line); 89 | log.append("\n"); 90 | } 91 | return log.toString(); 92 | } catch (IOException e) { 93 | e.printStackTrace(); 94 | } 95 | } 96 | 97 | return null; 98 | } 99 | 100 | @Override 101 | protected void onPostExecute(String appLogs) { 102 | super.onPostExecute(appLogs); 103 | dialog.dismiss(); 104 | StringBuilder emailMessage = new StringBuilder(descr.getText().toString()); 105 | emailMessage.append("\n\n\n=================================\n"); 106 | emailMessage.append(Utils.getDeviceInfo()); 107 | emailMessage.append("\n\n\nApp Infos:\n"); 108 | emailMessage.append("App version: "); 109 | emailMessage.append(BuildConfig.VERSION_NAME); 110 | if (appLogs != null) { 111 | emailMessage.append("\n\n\nApp Logs:\n"); 112 | emailMessage.append(appLogs); 113 | } 114 | Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts("mailto", 115 | BuildConfig.FEEDBACK_MAIL, null)); 116 | emailIntent.putExtra(Intent.EXTRA_SUBJECT, title.getText().toString()); 117 | emailIntent.putExtra(Intent.EXTRA_TEXT, emailMessage.toString()); 118 | startActivity(emailIntent); 119 | } 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/utils/WordCampUtils.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.utils; 2 | 3 | import org.wordcamp.android.objects.WordCampDB; 4 | import org.wordcamp.android.objects.speaker.Session; 5 | import org.wordcamp.android.objects.wordcamp.PostMetum; 6 | import org.wordcamp.android.objects.wordcamp.WordCampNew; 7 | 8 | import java.text.DateFormat; 9 | import java.util.Calendar; 10 | import java.util.Date; 11 | import java.util.HashMap; 12 | import java.util.List; 13 | import java.util.Locale; 14 | import java.util.TimeZone; 15 | 16 | /** 17 | * Created by aagam on 29/1/15. 18 | */ 19 | public class WordCampUtils { 20 | 21 | public static String getProperDate(WordCampDB wdb) { 22 | DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.getDefault()); 23 | df.setTimeZone(TimeZone.getTimeZone("GMT")); 24 | if (!wdb.getWc_end_date().isEmpty()) { 25 | Date d = new Date(Long.parseLong(wdb.getWc_start_date()) * 1000); 26 | Date d1 = new Date(Long.parseLong(wdb.getWc_end_date()) * 1000); 27 | return df.format(d) + " – " + df.format(d1); 28 | } else { 29 | Date d = new Date(Long.parseLong(wdb.getWc_start_date()) * 1000); 30 | return df.format(d); 31 | } 32 | } 33 | 34 | public static Date getProperDate(String s) { 35 | return new Date(Long.parseLong(s) * 1000); 36 | } 37 | 38 | public static String getFormattedDate(int date) { 39 | Date d = new Date((long) date * 1000); 40 | DateFormat df = DateFormat.getDateInstance(DateFormat.LONG, Locale.getDefault()); 41 | df.setTimeZone(TimeZone.getTimeZone("GMT")); 42 | return df.format(d); 43 | } 44 | 45 | public static String getFormattedTime(int date) { 46 | Date d = new Date((long) date * 1000); 47 | Calendar calendar = Calendar.getInstance(); 48 | calendar.setTime(d); 49 | int minutes = 5 * (Math.round(calendar.get(Calendar.MINUTE) / 5)); 50 | if (minutes == 60) { 51 | minutes = 0; 52 | calendar.set(Calendar.HOUR, (calendar.get(Calendar.HOUR) + 1)); 53 | } 54 | calendar.set(Calendar.MINUTE, minutes); 55 | d = calendar.getTime(); 56 | DateFormat df = DateFormat.getTimeInstance(DateFormat.SHORT, Locale.getDefault()); 57 | df.setTimeZone(TimeZone.getTimeZone("GMT")); 58 | return df.format(d); 59 | } 60 | 61 | public static int findFirstUpcomingFrag(List wcdb) { 62 | int counter = -1; 63 | if (wcdb != null) { 64 | long now = System.currentTimeMillis(); 65 | 66 | for (int i = 0; i < wcdb.size(); i++) { 67 | long wcDate; 68 | if (!wcdb.get(i).getWc_end_date().isEmpty()) { 69 | wcDate = Long.parseLong(wcdb.get(i).getWc_end_date()) * 1000; 70 | } else { 71 | wcDate = Long.parseLong(wcdb.get(i).getWc_start_date()) * 1000; 72 | } 73 | long diffDate = (wcDate - now) / (1000 * 60 * 60 * 24); 74 | if (diffDate > -1) { 75 | counter = i; 76 | break; 77 | } 78 | } 79 | } 80 | return counter; 81 | } 82 | 83 | public static int formatProperTimeHash(int time) { 84 | Date d = new Date((long) time * 1000); 85 | Calendar calendar = Calendar.getInstance(); 86 | calendar.setTime(d); 87 | int minutes = 5 * (Math.round(calendar.get(Calendar.MINUTE) / 5)); 88 | if (minutes == 60) { 89 | minutes = 0; 90 | calendar.set(Calendar.HOUR, (calendar.get(Calendar.HOUR) + 1)); 91 | } 92 | calendar.set(Calendar.MINUTE, minutes); 93 | d = calendar.getTime(); 94 | 95 | return d.hashCode(); 96 | } 97 | 98 | public static HashMap getTwitterAndUrl(WordCampNew wcn) { 99 | List meta = wcn.getPostMeta(); 100 | 101 | HashMap map = new HashMap<>(); 102 | for (int i = 0; i < meta.size(); i++) { 103 | PostMetum metum = meta.get(i); 104 | map.put(metum.getKey(), metum.getValue()); 105 | } 106 | 107 | return map; 108 | } 109 | 110 | public static HashMap getTimeAndTypeSession(Session ss) { 111 | List meta = ss.getPostMeta(); 112 | 113 | HashMap map = new HashMap<>(); 114 | for (int i = 0; i < meta.size(); i++) { 115 | org.wordcamp.android.objects.speaker.PostMetum metum = meta.get(i); 116 | map.put(metum.getKey(), metum.getValue()); 117 | } 118 | 119 | return map; 120 | } 121 | 122 | public static String getHighResGravatar(String gravatar){ 123 | return gravatar.substring(0, gravatar.length() - 6) + "?s=500"; 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/adapters/SessionsListAdapter.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.adapters; 2 | 3 | import android.content.Context; 4 | import android.text.Html; 5 | import android.view.LayoutInflater; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | import android.widget.BaseAdapter; 9 | import android.widget.LinearLayout; 10 | import android.widget.TextView; 11 | 12 | import org.wordcamp.android.R; 13 | import org.wordcamp.android.objects.SessionDB; 14 | import org.wordcamp.android.utils.WordCampUtils; 15 | 16 | import java.util.HashMap; 17 | import java.util.List; 18 | 19 | import se.emilsjolander.stickylistheaders.StickyListHeadersAdapter; 20 | 21 | /** 22 | * Created by aagam on 8/2/15. 23 | */ 24 | public class SessionsListAdapter extends BaseAdapter implements StickyListHeadersAdapter { 25 | private List list; 26 | private HashMap speakersForSession; 27 | private Context ctx; 28 | private LayoutInflater inflater; 29 | private OnAddToMySessionListener listener; 30 | private int singleLineSize, doubleLineSize; 31 | 32 | public SessionsListAdapter(Context ctx, List dbList, HashMap speakersForSession, OnAddToMySessionListener listener) { 33 | this.ctx = ctx; 34 | this.listener = listener; 35 | this.list = dbList; 36 | this.speakersForSession = speakersForSession; 37 | inflater = LayoutInflater.from(ctx); 38 | singleLineSize = (int) ctx.getResources().getDimension(R.dimen.single_line_list_item); 39 | doubleLineSize = (int) ctx.getResources().getDimension(R.dimen.double_line_list_item); 40 | } 41 | 42 | @Override 43 | public View getView(final int position, View convertView, ViewGroup parent) { 44 | final ViewHolder holder; 45 | if (convertView == null) { 46 | convertView = inflater.inflate(R.layout.item_session, parent, false); 47 | holder = new ViewHolder(convertView); 48 | convertView.setTag(holder); 49 | } else { 50 | holder = (ViewHolder) convertView.getTag(); 51 | } 52 | 53 | final SessionDB sessionDB = list.get(position); 54 | 55 | holder.title.setText(Html.fromHtml(sessionDB.getTitle())); 56 | 57 | if (sessionDB.getLocation() == null || sessionDB.getLocation().isEmpty()) { 58 | holder.locationContainer.setVisibility(View.GONE); 59 | } else { 60 | holder.locationContainer.setVisibility(View.VISIBLE); 61 | holder.location.setText(Html.fromHtml(sessionDB.getLocation())); 62 | if (speakersForSession.containsKey(sessionDB.getPost_id())) { 63 | holder.speakers.setVisibility(View.VISIBLE); 64 | holder.speakers.setText(ctx.getString(R.string.separator) 65 | + speakersForSession.get(sessionDB.getPost_id())); 66 | } else { 67 | holder.speakers.setVisibility(View.GONE); 68 | } 69 | } 70 | return convertView; 71 | } 72 | 73 | @Override 74 | public View getHeaderView(int i, View view, ViewGroup viewGroup) { 75 | if (view == null) { 76 | view = inflater.inflate(R.layout.header_time_session, viewGroup, false); 77 | } 78 | 79 | TextView date = (TextView) view.findViewById(R.id.headerListDate); 80 | date.setText(WordCampUtils.getFormattedDate(list.get(i).getTime())); 81 | TextView time = (TextView) view.findViewById(R.id.headerListTime); 82 | time.setText(WordCampUtils.getFormattedTime(list.get(i).getTime())); 83 | return view; 84 | } 85 | 86 | @Override 87 | public boolean isEnabled(int position) { 88 | return !list.get(position).category.equals("custom"); 89 | } 90 | 91 | @Override 92 | public long getHeaderId(int i) { 93 | return (long) WordCampUtils.formatProperTimeHash(list.get(i).getTime()); 94 | } 95 | 96 | @Override 97 | public int getCount() { 98 | return list.size(); 99 | } 100 | 101 | @Override 102 | public SessionDB getItem(int position) { 103 | return list.get(position); 104 | } 105 | 106 | @Override 107 | public long getItemId(int position) { 108 | return position; 109 | } 110 | 111 | public static class ViewHolder { 112 | public TextView title; 113 | public TextView location; 114 | public TextView speakers; 115 | public LinearLayout locationContainer; 116 | 117 | public ViewHolder(View v) { 118 | title = (TextView) v.findViewById(R.id.titleSession); 119 | location = (TextView) v.findViewById(R.id.locationSession); 120 | speakers = (TextView) v.findViewById(R.id.speakersSession); 121 | locationContainer = (LinearLayout) v.findViewById(R.id.location_container); 122 | } 123 | } 124 | 125 | public interface OnAddToMySessionListener { 126 | void addMySession(SessionDB db); 127 | 128 | void removeMySession(SessionDB db); 129 | } 130 | 131 | } 132 | -------------------------------------------------------------------------------- /app/src/main/java/org/wordcamp/android/wcdetails/SpeakerFragment.java: -------------------------------------------------------------------------------- 1 | package org.wordcamp.android.wcdetails; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | import android.os.Bundle; 6 | import android.support.annotation.Nullable; 7 | import android.support.v4.app.Fragment; 8 | import android.support.v4.widget.SwipeRefreshLayout; 9 | import android.support.v7.widget.LinearLayoutManager; 10 | import android.support.v7.widget.RecyclerView; 11 | import android.view.LayoutInflater; 12 | import android.view.View; 13 | import android.view.ViewGroup; 14 | 15 | import org.wordcamp.android.R; 16 | import org.wordcamp.android.WordCampDetailActivity; 17 | import org.wordcamp.android.adapters.SpeakersListAdapter; 18 | import org.wordcamp.android.objects.SpeakerDB; 19 | 20 | import java.util.Collections; 21 | import java.util.Comparator; 22 | import java.util.List; 23 | 24 | /** 25 | * Created by aagam on 29/1/15. 26 | */ 27 | public class SpeakerFragment extends Fragment implements SpeakersListAdapter.OnSpeakerSelectedListener { 28 | 29 | private RecyclerView lv; 30 | private View emptyView; 31 | private SpeakersListAdapter adapter; 32 | private List speakerDBList; 33 | private int wcid; 34 | private SwipeRefreshLayout refreshLayout; 35 | private SpeakerFragmentListener listener; 36 | 37 | @Override 38 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { 39 | return inflater.inflate(R.layout.fragment_wcdetails_speaker, container, false); 40 | } 41 | 42 | @Override 43 | public void onActivityCreated(@Nullable Bundle savedInstanceState) { 44 | super.onActivityCreated(savedInstanceState); 45 | wcid = ((WordCampDetailActivity) getActivity()).wcid; 46 | speakerDBList = ((WordCampDetailActivity) getActivity()).communicator.getAllSpeakers(wcid); 47 | sortList(); 48 | 49 | View v = getView(); 50 | refreshLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_refresh_layout); 51 | refreshLayout.setColorSchemeResources(R.color.swipe_refresh_color1, 52 | R.color.swipe_refresh_color2, R.color.swipe_refresh_color3); 53 | refreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { 54 | @Override 55 | public void onRefresh() { 56 | startRefreshSpeakers(); 57 | } 58 | }); 59 | 60 | lv = (RecyclerView) v.findViewById(R.id.speaker_list); 61 | lv.setHasFixedSize(true); 62 | LinearLayoutManager mLayoutManager = new LinearLayoutManager(getActivity()); 63 | lv.setLayoutManager(mLayoutManager); 64 | 65 | emptyView = v.findViewById(R.id.empty_view); 66 | adapter = new SpeakersListAdapter(getActivity(), speakerDBList); 67 | adapter.setOnSpeakerSelectedListener(this); 68 | if (speakerDBList.size() == 0) { 69 | startRefreshSpeakers(); 70 | } 71 | 72 | updateEmptyView(); 73 | lv.setAdapter(adapter); 74 | } 75 | 76 | private void updateEmptyView() { 77 | if (adapter.getItemCount() < 1) { 78 | emptyView.setVisibility(View.VISIBLE); 79 | } else { 80 | emptyView.setVisibility(View.GONE); 81 | } 82 | } 83 | 84 | @Override 85 | public void onSpeakerSelected(SpeakerDB speakerDB) { 86 | Intent t = new Intent(getActivity(), SpeakerDetailsActivity.class); 87 | t.putExtra("speaker", speakerDB); 88 | getActivity().startActivity(t); 89 | } 90 | 91 | private void sortList() { 92 | Collections.sort(speakerDBList, new Comparator() { 93 | @Override 94 | public int compare(SpeakerDB lhs, SpeakerDB rhs) { 95 | return lhs.getName().compareTo(rhs.getName()); 96 | } 97 | }); 98 | } 99 | 100 | public void startRefreshSpeakers() { 101 | refreshLayout.post(new Runnable() { 102 | @Override 103 | public void run() { 104 | refreshLayout.setRefreshing(true); 105 | listener.startRefreshSpeakers(); 106 | } 107 | }); 108 | } 109 | 110 | public void stopRefreshSpeaker() { 111 | refreshLayout.setRefreshing(false); 112 | } 113 | 114 | public void updateSpeakers(List newSpeakerDBList) { 115 | speakerDBList = newSpeakerDBList; 116 | sortList(); 117 | adapter = new SpeakersListAdapter(getActivity(), speakerDBList); 118 | adapter.setOnSpeakerSelectedListener(this); 119 | updateEmptyView(); 120 | lv.swapAdapter(adapter, false); 121 | } 122 | 123 | public interface SpeakerFragmentListener { 124 | void startRefreshSpeakers(); 125 | } 126 | 127 | @Override 128 | public void onAttach(Activity activity) { 129 | super.onAttach(activity); 130 | 131 | try { 132 | listener = (WordCampDetailActivity) activity; 133 | } catch (ClassCastException e) { 134 | throw new ClassCastException(activity.toString() 135 | + " must implement SpeakerFragmentListener"); 136 | } 137 | } 138 | } 139 | --------------------------------------------------------------------------------