GithubHelp home page GithubHelp logo

tchigher / wordpress-android Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wordpress-mobile/wordpress-android

0.0 0.0 0.0 262.79 MB

WordPress for Android

Home Page: http://android.wordpress.org

License: GNU General Public License v2.0

Java 67.76% Python 0.03% Shell 0.22% HTML 0.12% CSS 0.03% Kotlin 30.71% Ruby 0.70% TSQL 0.43%

wordpress-android's Introduction

WordPress for Android

CircleCI

If you're just looking to install WordPress for Android, you can find it on Google Play. If you're a developer wanting to contribute, read on.

Build Instructions

  1. Make sure you've installed Android Studio.
  2. git clone [email protected]:wordpress-mobile/WordPress-Android.git in the folder of your preference.
  3. cd WordPress-Android to enter the working directory.
  4. cp gradle.properties-example gradle.properties to set up the sample app credentials file.
  5. In Android Studio, open the project from the local repository. This will auto-generate local.properties with the SDK location.
  6. Go to Tools → AVD Manager and create an emulated device.
  7. Run.

Notes:

  • To use WordPress.com features (login to WordPress.com, access Reader and Stats, etc) you need a WordPress.com OAuth2 ID and secret. Please read the OAuth2 Authentication section.

OAuth2 Authentication

In order to use WordPress.com functions you will need a client ID and a client secret key. These details will be used to authenticate your application and verify that the API calls being made are valid. You can create an application or view details for your existing applications with our WordPress.com applications manager.

When creating your application, you should select "Native client" for the application type. The applications manager currently requires a "redirect URL", but this isn't used for mobile apps. Just use "https://localhost".

Once you've created your application in the applications manager, you'll need to edit the ./gradle.properties file and change the wp.oauth.app_id and wp.oauth.app_secret fields. Then you can compile and run the app on a device or an emulator and try to login with a WordPress.com account. Note that authenticating to WordPress.com via Google is not supported in development builds of the app, only in the official release.

Note that credentials created with our WordPress.com applications manager allow login only and not signup. New accounts must be created using the official app or on the web. Login is restricted to the WordPress.com account with which the credentials were created. In other words, if the credentials were created with [email protected], you will only be able to login with [email protected]. Using another account like [email protected] will cause the Client cannot use "password" grant_type error.

For security reasons, some account-related actions aren't supported for development builds when using a WordPress.com account with 2-factor authentication enabled.

Read more about OAuth2 and the WordPress.com REST endpoint.

Build and Test

To build, install, and test the project from the command line:

$ ./gradlew assembleVanillaDebug                        # assemble the debug .apk
$ ./gradlew installVanillaDebug                         # install the debug .apk if you have an
                                                        # emulator or an Android device connected
$ ./gradlew :WordPress:testVanillaDebugUnitTest         # assemble, install and run unit tests
$ ./gradlew :WordPress:connectedVanillaDebugAndroidTest # assemble, install and run Android tests

Directory structure

.
├── libs                    # dependencies used to build debug variants
├── tools                   # script collection
├── gradle.properties       # properties imported by the build script
├── WordPress
│   |-- build.gradle        # main build script
│   └── src
│       ├── androidTest     # Android test assets, resources and code
│       ├── test            # Unit tests
│       ├── main
│       │   ├── assets      # main project assets
│       │   ├── java        # main project java code
│       │   └── res         # main project resources
│       ├── debug           # debug variant
│       └── wasabi          # wasabi variant specific resources and manifest

Google Configuration

Google Sign-In is only available for WordPress.com accounts through the official app. Contributors can build and run the app without issue, but Google Sign-In will always fail. Google Sign-In requires configuration files which contain client and server information that can't be shared publicly. More documentation and guides can be found on the Google Identity Platform website.

Contributing

Read our Contributing Guide to learn about reporting issues, contributing code, and more ways to contribute.

Security

If you happen to find a security vulnerability, we would appreciate you letting us know at https://hackerone.com/automattic and allowing us to respond before disclosing the issue publicly.

Getting in Touch

If you have questions or just want to say hi, join the WordPress Slack and drop a message on the #mobile channel.

Documentation

Please read our Wiki for more.

Resources

License

WordPress for Android is an Open Source project covered by the GNU General Public License version 2. Note: code in the libs/ directory comes from external libraries, which might be covered by a different license compatible with the GPLv2.

wordpress-android's People

Contributors

0nko avatar aerych avatar aforcier avatar amandariu avatar beaucollins avatar cassgenerator avatar daniloercoli avatar hypest avatar javondavis avatar jkmassel avatar jorgecasariego avatar jtreanor avatar khaykov avatar kwonye avatar loremattei avatar malinajirka avatar marecar3 avatar maxme avatar mzorz avatar nbradbury avatar oguzkocer avatar planarvoid avatar roundhill avatar sendhil avatar shiki avatar theck13 avatar tonyr59h avatar tug avatar tylermarien avatar willnorris avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.