WordPress for Android

Overview

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. Install npm using Node Version Manager(nvm), as described in step one from the Block Editor Quickstart guide
  3. git clone --recurse-submodules [email protected]:wordpress-mobile/WordPress-Android.git in the folder of your preference. Or if you already have the project cloned, initialize and update the submodules:
    git submodule init
    git submodule update
    
  4. cd WordPress-Android to enter the working directory.
  5. cp gradle.properties-example gradle.properties to set up the sample app credentials file.
  6. git submodule update --init --recursive to pull the submodules (optionally use --depth=1 --recommend-shallow flags to skip pulling full submodules' history).
  7. In Android Studio, open the project from the local repository. This will auto-generate local.properties with the SDK location.
  8. Recommended: The CI uses JDK11 to build the app and run the tests. Some tests won't pass on the JDK embedded in Android Studio (JDK8). You might want to set JAVA_HOME and JDK location in Android Studio to JDK11.
  9. Go to Tools → AVD Manager and create an emulated device.
  10. 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.
  • While loading/building the app in Android Studio ignore the prompt to update the gradle plugin version as that will probably introduce build errors. On the other hand, feel free to update if you are planning to work on ensuring the compatibility of the newer version.

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 the docs 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.

Comments
  • Bump git from 1.5.0 to 1.11.0 in /libs/mocks

    Bump git from 1.5.0 to 1.11.0 in /libs/mocks

    Bumps git from 1.5.0 to 1.11.0.

    Release notes

    Sourced from git's releases.

    Release v1.11.0

    Full Changelog

    • 292087e Supress unneeded test output (#570)
    • 19dfe5e Add support for fetch options "--force/-f" and "--prune-tags/-P". (#563)
    • 018d919 Fix bug when grepping lines that contain numbers surrounded by colons (#566)
    • c04d16e remove from maintainer (#567)
    • 291ca09 Address command line injection in Git::Lib#fetch
    • 521b8e7 Release v1.10.2 (#561)

    Release v1.10.2

    Full Changelog

    • 57f941c Release v1.10.2
    • c987a74 Add create-release, setup, and console dev scripts (#560)
    • 12e3d03 Store tempfile objects to prevent deletion during tests (#555)

    Release v1.10.1

    Full Changelog

    • c7b12af Release v1.10.1
    • ea28118 Properly escape double quotes in shell commands on Windows (#552)
    • db060fc Properly unescape diff paths (#504)
    • ea47044 Add Ruby 3.0 to CI build (#547)
    • cb01d2b Create a Docker image to run the changelog (#546)

    v.1.10.0

    Full Changelog

    • 8acec7d Release v1.10.0 (#545)
    • 8feb4ff Refactor directory initialization (#544)
    • 3884314 Add -ff option to git clean (#529)
    • 984ff7f #533 Add --depth options for fetch call (#534)
    • 6cba37e Add support for git init --initial-branch=main argument (#539)
    • ff98c42 Add support for the git merge --no-commit argument (#538)
    • 1023f85 Require pathname module (#536)

    v1.9.1

    Full Changelog

    • 58100b0 Release v1.9.1 (#527)
    • 45aeac9 Fix the gpg_sign commit option (#525)

    v1.9.0

    Full Changelog

    • 07a1167 Release v1.9.0 (#524)
    • 8fe479b Fix worktree test when git dir includes symlinks (#522)
    • 0cef8ac feat: add --gpg-sign option on commits (#518)
    • 765df7c Adds file option to config_set to allow adding to specific git-config files (#458)

    ... (truncated)

    Changelog

    Sourced from git's changelog.

    v1.11.0

    • 292087e Supress unneeded test output (#570)
    • 19dfe5e Add support for fetch options "--force/-f" and "--prune-tags/-P". (#563)
    • 018d919 Fix bug when grepping lines that contain numbers surrounded by colons (#566)
    • c04d16e remove from maintainer (#567)
    • 291ca09 Address command line injection in Git::Lib#fetch
    • 521b8e7 Release v1.10.2 (#561)

    See https://github.com/ruby-git/ruby-git/releases/tag/v1.11.0

    v1.10.2

    See https://github.com/ruby-git/ruby-git/releases/tag/v1.10.2

    1.10.1

    See https://github.com/ruby-git/ruby-git/releases/tag/v1.10.1

    1.10.0

    See https://github.com/ruby-git/ruby-git/releases/tag/v1.10.0

    1.9.1

    See https://github.com/ruby-git/ruby-git/releases/tag/v1.9.1

    1.9.0

    See https://github.com/ruby-git/ruby-git/releases/tag/v1.9.0

    1.8.1

    See https://github.com/ruby-git/ruby-git/releases/tag/v1.8.1

    1.8.0

    See https://github.com/ruby-git/ruby-git/releases/tag/v1.8.0

    1.7.0

    See https://github.com/ruby-git/ruby-git/releases/tag/v1.7.0

    1.6.0

    See https://github.com/ruby-git/ruby-git/releases/tag/v1.6.0

    1.6.0.pre1

    See https://github.com/ruby-git/ruby-git/releases/tag/v1.6.0.pre1

    Commits
    • 546bc03 Release v1.11.0
    • 292087e Supress unneeded test output (#570)
    • 19dfe5e Add support for fetch options "--force/-f" and "--prune-tags/-P". (#563)
    • 018d919 Fix bug when grepping lines that contain numbers surrounded by colons (#566)
    • c04d16e remove from maintainer (#567)
    • 291ca09 Address command line injection in Git::Lib#fetch
    • 521b8e7 Release v1.10.2 (#561)
    • c987a74 Add create-release, setup, and console dev scripts (#560)
    • 12e3d03 Store tempfile objects to prevent deletion during tests (#555)
    • 735b083 Release v1.10.1 (#553)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    bot: dependencies update ruby 
    opened by dependabot[bot] 103
  • Media Library: Allow uploading any file

    Media Library: Allow uploading any file

    Currently we only support uploading image & video files in the app. A user is asking to upload mp3 files for example (#144231-h). We should probably support every file type we currently support in wp-admin.

    Summary with a list of remaining work can be found pOhUr-47V-p2 + comments.

    [Type] Enhancement [Pri] Medium Media 
    opened by oguzkocer 64
  • First version of Calypso Stats

    First version of Calypso Stats

    The UI still need to be refined, but major features are all there. We want to start testing new Stats for real asap, and meanwhile refine stats UI with smaller PRs.

    Keeping track of opening issues here:

    • [x] There's no selection highlight on any of the tappable views, which is even more important on Lollipop where ripples are used. The simplest way to provide this is to use android:background="?android:selectableItemBackground" on any tappable view (this will automatically provide the ripple on Lollipop and a selection highlight on earlier version).
    • [x] Try to get rid of the setEntryTextViewClickListener() hack. See comment below
    • [x] Make sure the correct date/datetime for the blog. Seems there is a offset of 1hr.
    • [x] I recommend selecting the "Stats" folder in Android Studio then selecting Analyze > Inspect Code > Current Directory
    • [x] The selection highlight for list items seems off. It should highlight the entire row - including padding - but instead it highlights just the text. selection
    Stats 
    opened by daniloercoli 45
  • Revert local changes

    Revert local changes

    Mobile request originally reported by @rachelmcr

    WPAndroid 6.8 includes this change:
    
    >    Changed the post list behavior on tap: open the editor instead of the preview.
    
    This behavior feels right to me, but now I can’t figure out how to revert local changes on a post. In the past, here’s how it worked:
    
        Open a published post.
        Make edits to the post.
        Tap the back arrow to exit the editor. (Edits are saved as local changes.)
        Tap on the post to open the preview.
        Tap on “Revert” at the bottom of the preview to revert local changes.
    
    Now, I can’t figure out how to revert those local changes. I don’t see a prompt anywhere, and even if I open the post in the editor and undo the change I made locally the post still shows as having local changes. I can’t find where to revert them.
    
    **Update**
    
    After starting this post, but before publishing it, I realized that I could choose “Preview” on the post list and revert the local changes from that preview (since the preview was where I had that option before). However, it doesn’t feel at all intuitive to go to the preview to revert local changes on a post.
    
    Could we include a toast message or other prompt to save or revert local changes when the user opens the post in the editor? That’s where I was looking for the revert option, and it seems more intuitive to include that as part of the editor instead of the post preview.
    

    Follow ups by: @catehstn

    the best thing to do is to track this as some design work surrounding Aztec and posting and then close this.

    @0nko

    [...] a Discard button could be added to the activity menu, which is shared by all editors.

    [Type] Enhancement Mobile Request 
    opened by aerych 38
  • Crash report 7.2: IllegalArgumentException: reportSizeConfigurations

    Crash report 7.2: IllegalArgumentException: reportSizeConfigurations

    Fatal Exception: java.lang.IllegalArgumentException: reportSizeConfigurations: ActivityRecord not found for: Token{e1fb44f ActivityRecord{8954eaed0 u0 org.wordpress.android/.ui.main.WPMainActivity t13 f}}
           at android.os.Parcel.readException(Parcel.java:1697)
           at android.os.Parcel.readException(Parcel.java:1646)
           at android.app.ActivityManagerProxy.reportSizeConfigurations(ActivityManagerNative.java:8325)
           at android.app.ActivityThread.reportSizeConfigurations(ActivityThread.java:3069)
           at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3012)
           at android.app.ActivityThread.-wrap14(ActivityThread.java)
           at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
           at android.os.Handler.dispatchMessage(Handler.java:102)
           at android.os.Looper.loop(Looper.java:154)
           at android.app.ActivityThread.main(ActivityThread.java:6688)
           at java.lang.reflect.Method.invoke(Method.java)
           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
    
    
    [Pri] High Notifications [Type] Crash 
    opened by mzorz 37
  • Implement Offline actions - posting/scheduling/deleting while offline

    Implement Offline actions - posting/scheduling/deleting while offline

    When you create a post and you hit “publish now” a toast “Device is offline, changes saved locally” is shown

    Decision

    Offline Actions

    Android

    • [x] Improve labels according to the design https://github.com/wordpress-mobile/WordPress-Android/issues/10207
    • [x] Add support for the Cancel action https://github.com/wordpress-mobile/WordPress-Android/issues/10206
    • [ ] Add support for trashing/restoring posts in offline https://github.com/wordpress-mobile/WordPress-Android/issues/10205
    • [x] Automatically upload all local changes not just local drafts https://github.com/wordpress-mobile/WordPress-Android/issues/10174
    [Type] Bug [Pri] Medium Offline Support 
    opened by diegoreymendez 34
  • My Profile

    My Profile

    I wanted to open this PR to get some early feedback. @tonyr59h and I were discussing that his "Site Settings" implementation might have some components we can use in "My Profile" as well. I am also not completely sure I have the best approach to a couple things.

    The first question I had is about the layout. When we were working on the v1 of Calypsoification of the app with @nbradbury we opted not to use a list view for the Me fragment and I've taken a similar approach. I've used styles extensively here, so the code feels clear to me and there is not much need for a lot of switch statements. Having said that, it looks like "Site Settings" is implemented with list view, so I wanted to check in if I had the best approach for this.

    My second question is about the usage of dialogs. I have looked into the WPAlertDialogFragment and it doesn't have a builder with an input in it. So for now, I have added the dialog inside the MyProfileActivity. Should I be looking to move that implementation to WPAlertDialogFragment instead? Also, note that the current dialog only works for "first name" and I thought I'd pass a tag to showInputDialog method and use a switch statement to make it work for all labels. I actually wanted to make it work with some kind of callback mechanism but couldn't really find a way to do that. Would that be possible? If not, I don't think the method would be generic enough to add inside of WPAlertDialogFragment.

    For reference, here is the complete design for my profile page: https://cloudup.com/cGvJQYVBE0B And here are some screenshots from the actual implementation: https://cloudup.com/ciJn7zQjKfx

    Anyone can review the PR, I am just ping Maxime to add a name here. Thanks! Needs review: @maxme

    Calypsofication /Me 
    opened by oguzkocer 34
  • Drop jetifier

    Drop jetifier

    Merge Instructions:

    1. ~Review and approve (don't merge) - https://github.com/wordpress-mobile/gutenberg-mobile/pull/4361~
    2. ~Review this PR~
    3. ~Merge Aztec https://github.com/wordpress-mobile/AztecEditor-Android/pull/946/files~
    4. ~Merge Stories https://github.com/Automattic/stories-android/pull/717~
    5. ~Merge GB PR - https://github.com/wordpress-mobile/gutenberg-mobile/pull/4361~
    6. ~Merge GB PR which updates Aztec Version - it doesn't exist yet~
    7. ~Update GB hash/version in this repo~
    8. ~Review and Merge upgrade of test dependencies - https://github.com/wordpress-mobile/WordPress-Android/pull/16170 (technically not a blocker)~
    9. ~Merge the branch in .mobile-secrets into trunk~
    10. ~Update hash and branch in .configure~ (9f811ea608958fb7acbe781672b4c4c91318c5d4)
    11. ~Remove "Not ready for merge" label~
    12. ~Merge this PR~
    13. Optional: Ping the team that they can change android.enableJetifier=true to android.enableJetifier=false in their gradle.properties or run ./gradlew configureApply.

    This PR migrates all libraries to versions which are migrated to AndroidX so we can disable jetifier on our builds. Jetifier was always intended to be used only temporarily and is planned to be removed from future versions of AGP.

    List of changes

    • Bumps Stetho version to 1.6.0 - the only change is that the version is migrated to AndroidX - https://github.com/facebook/stetho/releases
    • Bumps ExoPlayer from 2.9.3 to 2.12.3 -> this was the most challenging task as ExoPlayer is used in both MediaPreivewFragment and Gutenberg-Mobile => we had to bump the version in both Gutenberg and MediaPreviewFragment. (This work isn't done yet, the GB part is still WIP)
    • Updates WordPress utils version to a version which is migrated to AndroidX -> I bumped the version in all the modules to make the version consistent
    • Adds our S3 repo to Analytics and Networking modules so the new version of WordPress utils is reachable
    • Disables jetifier - updated gradle.properties and .configure
    • "Manually" (using cmd tool) Jetified the Tenor library since it hasn't been updated since 2018 and I don't think it'll get updated any time soon
    • Updated Aztec version with version that uses the updated version of WordPress utils

    To test: Make sure to disable Jetifier in your local gradle.properties => Smoke test the app - anything you can think of.

    1. Open Media Library
    2. Open a detail of a video
    3. Tap on the preview
    4. Make sure the preview is displayed correctly and you can play the video

    1. Create a new post
    2. Add image block
    3. Select "Choose from Tenor"
    4. Type "Cat"
    5. Add a gif

    1. Create a new post
    2. Add Cover block
    3. Add Video
    4. Choose a video file
    5. Make sure the video preview works

    Regression Notes

    1. Potential unintended areas of impact
    • Video previews (media library)
    • Video blocks in Gutenberg
    • Adding gifs from Tenor
    1. What I did to test those areas of impact (or what existing automated tests I relied on) The above "to test" section

    2. What automated tests I added (or what prevented me from doing so)

    None - this is a technical improvement which doesn't change the UX

    PR submission checklist:

    • [x] I have completed the Regression Notes.
    • [x] I have considered adding accessibility improvements for my changes.
    • [x] I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.
    Tech Debt 
    opened by malinajirka 33
  • Crash when drawing the editor on devices running Android 8

    Crash when drawing the editor on devices running Android 8

    It appears we're getting a crash specific to Android devices with Android 8.x, prevalently Huawei devices.

    The relevant bits of the stack trace:

    Fatal Exception: java.lang.ArrayIndexOutOfBoundsException: length=79; index=-19
           at android.text.DynamicLayout.getBlockIndex(DynamicLayout.java:646)
           at android.widget.Editor.drawHardwareAccelerated(Editor.java:1744)
           at android.widget.Editor.onDraw(Editor.java:1713)
           at android.widget.TextView.onDraw(TextView.java:7034)
           at android.view.View.draw(View.java:19314)
           at android.view.View.updateDisplayListIfDirty(View.java:18250)
           at android.view.View.draw(View.java:19042)
           at android.view.ViewGroup.drawChild(ViewGroup.java:4271)
           at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4054)
           at android.view.View.updateDisplayListIfDirty(View.java:18241)
           at android.view.View.draw(View.java:19042)
           at android.view.ViewGroup.drawChild(ViewGroup.java:4271)
           at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4054)
           at android.view.View.updateDisplayListIfDirty(View.java:18241)
           at android.view.View.draw(View.java:19042)
           at android.view.ViewGroup.drawChild(ViewGroup.java:4271)
           at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4054)
           at android.view.View.draw(View.java:19317)
           at android.widget.ScrollView.draw(ScrollView.java:1777)
           at android.view.View.updateDisplayListIfDirty(View.java:18250)
           at android.view.View.draw(View.java:19042)
           at android.view.ViewGroup.drawChild(ViewGroup.java:4271)
           at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4054)
           at android.view.View.draw(View.java:19317)
           at android.view.View.updateDisplayListIfDirty(View.java:18250)
           at android.view.View.draw(View.java:19042)
           at android.view.ViewGroup.drawChild(ViewGroup.java:4271)
           at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4054)
           at android.view.View.draw(View.java:19317)
           at android.support.v4.view.ViewPager.draw(ViewPager.java:2420)
           at android.view.View.updateDisplayListIfDirty(View.java:18250)
           at android.view.View.draw(View.java:19042)
           at android.view.ViewGroup.drawChild(ViewGroup.java:4271)
           at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4054)
           at android.view.View.updateDisplayListIfDirty(View.java:18241)
           at android.view.View.draw(View.java:19042)
           at android.view.ViewGroup.drawChild(ViewGroup.java:4271)
           at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4054)
           at android.view.View.updateDisplayListIfDirty(View.java:18241)
           at android.view.View.draw(View.java:19042)
           at android.view.ViewGroup.drawChild(ViewGroup.java:4271)
           at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4054)
           at android.view.View.updateDisplayListIfDirty(View.java:18241)
           at android.view.View.draw(View.java:19042)
           at android.view.ViewGroup.drawChild(ViewGroup.java:4271)
           at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4054)
           at android.view.View.updateDisplayListIfDirty(View.java:18241)
           at android.view.View.draw(View.java:19042)
           at android.view.ViewGroup.drawChild(ViewGroup.java:4271)
           at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4054)
           at android.view.View.updateDisplayListIfDirty(View.java:18241)
           at android.view.View.draw(View.java:19042)
           at android.view.ViewGroup.drawChild(ViewGroup.java:4271)
           at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4054)
           at android.view.View.draw(View.java:19317)
           at com.android.internal.policy.DecorView.draw(DecorView.java:915)
           at android.view.View.updateDisplayListIfDirty(View.java:18250)
           at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:684)
           at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:690)
           at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:804)
           at android.view.ViewRootImpl.draw(ViewRootImpl.java:3199)
           at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2997)
           at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2526)
           at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1515)
           at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7266)
           at android.view.Choreographer$CallbackRecord.run(Choreographer.java:981)
           at android.view.Choreographer.doCallbacks(Choreographer.java:790)
           at android.view.Choreographer.doFrame(Choreographer.java:721)
           at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:967)
           at android.os.Handler.handleCallback(Handler.java:808)
           at android.os.Handler.dispatchMessage(Handler.java:101)
           at android.os.Looper.loop(Looper.java:166)
           at android.app.ActivityThread.main(ActivityThread.java:7529)
           at java.lang.reflect.Method.invoke(Method.java)
           at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
    

    It seems likely that this is related to #8827 – both are platform-specific Android 8 issues.

    reference: 5a76a4fa8cb3c2fa634286c6-fabric reference: 5af4233111e9fa0aa513dfa0-fabric marked as high priority as it's happening ~35 times/day and affecting ~800 users

    [Pri] Low [Type] Crash Aztec 
    opened by jkmassel 33
  • Add a Dark Theme

    Add a Dark Theme

    A user requested that the app have a dark theme instead of the current holo lite theme: ​http://android.forums.wordpress.org/topic/switch-themes-feature?replies=1

    [Type] Enhancement [Pri] Low Core 
    opened by roundhill 33
  • Crash: InflateException: Binary XML file line #26: Error inflating class org.wordpress.android.l...

    Crash: InflateException: Binary XML file line #26: Error inflating class org.wordpress.android.l...

    Sentry Issue: https://sentry.io/share/issue/136cee38cb79491db456071ee0c686a0/

    NotFoundException: Unable to find resource ID #0x7f0800bb
        at org.wordpress.android.util.widgets.WPTextInputLayout.<init>(WPTextInputLayout.java:20)
        at org.wordpress.android.login.widgets.WPLoginInputRow.init(WPLoginInputRow.java:67)
        at org.wordpress.android.login.widgets.WPLoginInputRow.<init>(WPLoginInputRow.java:58)
        at org.wordpress.android.login.LoginBaseFormFragment.createMainView(LoginBaseFormFragment.java:100)
        at org.wordpress.android.login.LoginBaseFormFragment.onCreateView(LoginBaseFormFragment.java:106)
    ...
    (60 additional frame(s) were not displayed)
    
    NotFoundException: Drawable (missing name) with resource ID #0x7f0800bb
    NotFoundException: File res/drawable-v21/design_password_eye.xml from drawable resource ID #0x7f0800bd
        at org.wordpress.android.util.widgets.WPTextInputLayout.<init>(WPTextInputLayout.java:20)
        at org.wordpress.android.login.widgets.WPLoginInputRow.init(WPLoginInputRow.java:67)
        at org.wordpress.android.login.widgets.WPLoginInputRow.<init>(WPLoginInputRow.java:58)
        at org.wordpress.android.login.LoginBaseFormFragment.createMainView(LoginBaseFormFragment.java:100)
        at org.wordpress.android.login.LoginBaseFormFragment.onCreateView(LoginBaseFormFragment.java:106)
    ...
    (49 additional frame(s) were not displayed)
    
    NotFoundException: Drawable org.wordpress.android:drawable/design_password_eye with resource ID #0x7f0800bd
    InvocationTargetException: None
        at org.wordpress.android.login.widgets.WPLoginInputRow.init(WPLoginInputRow.java:67)
        at org.wordpress.android.login.widgets.WPLoginInputRow.<init>(WPLoginInputRow.java:58)
        at org.wordpress.android.login.LoginBaseFormFragment.createMainView(LoginBaseFormFragment.java:100)
        at org.wordpress.android.login.LoginBaseFormFragment.onCreateView(LoginBaseFormFragment.java:106)
    ...
    (37 additional frame(s) were not displayed)
    
    InflateException: Binary XML file line #21: Error inflating class org.wordpress.android.util.widgets.WPTextInputLayout
    InflateException: Binary XML file line #21: Binary XML file line #21: Error inflating class org.wordpress.android.util.widgets.WPTextInputLayout
    InvocationTargetException: None
        at org.wordpress.android.login.LoginBaseFormFragment.createMainView(LoginBaseFormFragment.java:100)
        at org.wordpress.android.login.LoginBaseFormFragment.onCreateView(LoginBaseFormFragment.java:106)
    ...
    (24 additional frame(s) were not displayed)
    
    InflateException: Binary XML file line #26: Error inflating class org.wordpress.android.login.widgets.WPLoginInputRow
    InflateException: Binary XML file line #26: Binary XML file line #26: Error inflating class org.wordpress.android.login.widgets.WPLoginInputRow
    
    Binary XML file line #26: Binary XML file line #26: Error inflating class org.wordpress.android.login.widgets.WPLoginInputRow
    
    [Type] Crash Login 
    opened by sentry-io[bot] 32
  • Issue: App only shows posts in default language (multilingual site)

    Issue: App only shows posts in default language (multilingual site)

    Hello! I have a self-hosted multilingual site using Polylang. My posts are in two languages, Portuguese and English with the former set as the default language in the plugin. But the WP app only shows posts in the default language (Portuguese); it doesn't show posts in the other language (English). Therefore, I cannot open/edit many of my posts using the app.

    Expected behavior

    Show all posts without filtering by language.

    Actual behavior

    As a test, I created two posts, one in Portuguese and one in English as seen in the web regular admin:

    When I open the app and Menu > Posts > Drafts, I can only see the post in Portuguese (default language):

    If I change the default language in the plugin to English, then only posts in English are shown:

    Curiously, the Drafts card in the app Home shows posts in both languages:

    Clicking on the card, however, leads to the default-language-only list of draft posts.

    I guess the app is filtering out posts in languages other than the default, but it doesn't do it for listing the posts in the Drafts card.

    Steps to reproduce the behavior

    1. Self-hosted WP with Polylang.
    2. Posts in multiple languages.
    3. Connect to site to WP app.
    4. Open Menu > Posts or Pages.

    Polylang needs to be installed. If deactivated, then all posts show up in the app. I don't know whether the same happens with other similar multilingual plugins. It could simply be a Polylang-specific issue or perhaps a more general issue on how the app handles posts in different languages.

    Any help figuring this out is greatly appreciated! Thanks!

    Cheers, Bruno

    Tested on Samsung SM-G930F, Android 8.0.0, WPAndroid 21.4-rc-2
    opened by bruvellu 1
  • [Blogging Prompts] Create Prompts List item

    [Blogging Prompts] Create Prompts List item

    Part of #17125

    Add the UI component for the Prompts List item matching UI specs, and use it in the Prompts List screen.

    Note: this is still using mocked data!

    Video Demo:

    https://user-images.githubusercontent.com/5091503/210013429-48318b86-b773-4b95-94b1-12358fe4f41d.mp4

    To test:

    1. Do the steps to enable the Prompts List feature flag found in the test section of #17675
    2. Sign in (if not signed in already)
    3. Go to the home dashboard (My Site -> Home)
    4. Verify the Prompts card is shown
    5. Tap the 3-dot menu in the Prompts card
    6. Tap the "View more prompts" option
    7. Verify the Prompts List activity is shown
    8. Verify it shows a "Loading..." text for a while
    9. Verify the content is updated with a fake list of 11 items, matching the design spec

    Regression Notes

    1. Potential unintended areas of impact N/A

    2. What I did to test those areas of impact (or what existing automated tests I relied on) N/A

    3. What automated tests I added (or what prevented me from doing so) UI changes only, which are not currently covered by tests.

    PR submission checklist:

    • [X] I have completed the Regression Notes.
    • [X] I have considered adding accessibility improvements for my changes.
    • [X] I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.
    Blogging Prompts Enhancement 
    opened by thomashorta 2
  • Use Kotlin official code style

    Use Kotlin official code style

    Fixes #17704

    Remove Kotlin-specific configuration in the .idea/codeStyles/Project.xml file in favor of using the default Kotlin official style conventions:

    <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
    

    Also, reformat all Kotlin files according to this new style to ensure consistency after the above changes.

    Most of the changes in this PR is related to the reformatting of .kt files, but the important changes related to the code styles and checks that need revision are in the following files:

    • .idea/codeStylesProject.xml
    • config/checkstyle.xml - changes here to make sure the @Inject rules target only Java files

    To test:

    Regression Notes

    1. Potential unintended areas of impact App compilation errors, linting errors, or runtime errors.

    2. What I did to test those areas of impact (or what existing automated tests I relied on) Limited manual testing (change affects only formatting, should not introduce behavior changes)

    3. What automated tests I added (or what prevented me from doing so) N/A

    PR submission checklist:

    • [X] I have completed the Regression Notes.
    • [X] I have considered adding accessibility improvements for my changes.
    • [X] I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.
    Tech Debt 
    opened by thomashorta 1
  • Use official Kotlin code style conventions

    Use official Kotlin code style conventions

    There were some internal discussions regarding code style and current configurations in this repository (paqN3M-OJ-p2) and there was an overall feeling that we should focus on using the official Kotlin code style as close as possible and maybe stop committing IDE-specific code style configs to Git, as files such as .idea/codeStyles/Project.xml.

    That file frequently has its content updated because of IDE changes but is rarely updated. Besides that, having that file in the repo also makes us use outdated conventions. Another option, if we decide to keep the codeStyles files would be to make sure we maintain those code styles configs up-to-date.

    The initial plan is to get this repo closer to what WooCommerce has in terms of code-styling, which allows us to always use Android Studio official updated conventions, and avoid conflicts in IDE config files.

    Tasks:

    • [ ] Update .editorconfig to keep some required settings (if needed)
    • [ ] Remove Kotlin code-style settings from .idea/codeStyles/Project.xml or set it to the official defaults (KOTLIN_OFFICIAL code style defaults option in Project.xml)
    • [ ] Reformat ALL Kotlin files in the project according to the up-to-date official code style in IDE
    • [ ] Update coding-style.md with some instructions for manual IDE configurations (if needed)

    Ideally, we would also completely remove the Project.xml file and migrate some configs to .editorconfig for other languages (XML and Java) BUT I was playing with that for a bit and that will introduce quite some different formatting (or just inflate the .editorconfig file with IntelliJ specific rules) so it's something to be discussed a bit more.

    [Type] Enhancement Tech Debt 
    opened by thomashorta 1
  • Reset migration state when interrupted

    Reset migration state when interrupted

    Fixes #17625

    Description

    This PR resets the migration state so that the user may retry the migration flow

    To test

    Exit the flow with back navigation

    1. Prerequisite: WordPress app should be installed and logged in
    2. Uninstall Jetpack App if installed or clear the app data
    3. Run the Jetpack app from this branch
    4. On the migration welcome screen press back
    5. Close the App
    6. Restart the app
    7. Verify that the migration flow starts from the beginning

    Exit the flow and login

    1. Prerequisite: WordPress app should be installed and logged in
    2. Uninstall Jetpack App if installed or clear the app data
    3. Run the Jetpack app from this branch
    4. On the migration welcome screen press back
    5. Login
    6. Verify that your data are not migrated (if you used the same account)

    Interrupt the flow

    1. Prerequisite: WordPress app should be installed and logged in
    2. Uninstall Jetpack App if installed or clear the app data
    3. Run the Jetpack app from this branch
    4. Interrupt the app (e.g. by answering a phone call or putting it in the background)
    5. Open the app
    6. Verify that the migration flow continues

    Note that the case when the migration is interrupted by killing the app is not covered with this PR

    Regression Notes

    1. Potential unintended areas of impact Migration flow

    2. What I did to test those areas of impact (or what existing automated tests I relied on) Manual testing

    3. What automated tests I added (or what prevented me from doing so) Relied on existing tests

    PR submission checklist:

    • [x] I have completed the Regression Notes.
    • [x] I have considered adding accessibility improvements for my changes.
    • [x] I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.
    [Type] Bug [Status] Not Ready for Merge Jetpack Focus 
    opened by antonis 2
  • [Blogging prompts] Add new analytics events for create sheet and

    [Blogging prompts] Add new analytics events for create sheet and "My Site" card

    Fixes #17689

    To test: 1 - Launch JP and log in; 2 - Select a site that is a blog; 3 - Select "My Site" and HOME; 4 - Prompt card should be visible. Logcat should show that blogging_prompts_my_site_card_viewed was tracked: I/WordPress-STATS: 🔵 Tracked: blogging_prompts_my_site_card_viewed

    5 - Tap the FAB image

    6 - The create sheet should be displayed. Logcat should show that blogging_prompts_create_sheet_card_viewed was tracked: I/WordPress-STATS: 🔵 Tracked: blogging_prompts_create_sheet_card_viewed

    Regression Notes

    1. Potential unintended areas of impact None

    2. What I did to test those areas of impact (or what existing automated tests I relied on) Manual testing and unit tests

    3. What automated tests I added (or what prevented me from doing so) Updated MySiteViewModelTest.kt, BloggingPromptsCardAnalyticsTrackerTest.kt and WPMainActivityViewModelTest.kt.

    PR submission checklist:

    • [x] I have completed the Regression Notes.
    • [x] I have considered adding accessibility improvements for my changes.
    • [x] I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.
    [Type] Task Blogging Prompts Enhancement 
    opened by RenanLukas 2
Releases(21.3)
Android cutout screen support Android P. Android O support huawei, xiaomi, oppo and vivo.

CutoutScreenSupport Android cutout screen support Android P. Android O support huawei, xiaomi, oppo and vivo. Usage whether the mobile phone is cutout

hacket 5 Nov 3, 2022
FoldingNavigationDrawer-Android This is a sample project present how to use Folding-Android to add Folding Efect to Navigation Drawer.

FoldingNavigationDrawer-Android Sample (Play Store Demo) This is a sample project present how to use Folding-Android to add Folding Efect to Navigatio

null 242 Nov 25, 2022
Twidere-Android Twidere is a powerful twitter client for Android 1.6+ 1 , which gives you a full Holo experience and nearly full Twitter's feature.

Twidere for Android Material Design ready and feature rich Twitter/Mastodon/Fanfou app for Android 4.1+. Enjoy Fediverse now! Twidere-Android is maint

Twidere Project 2.7k Jan 2, 2023
:movie_camera: Movie discovery app showcasing Android best practices with Google's recommended architecture: MVVM + Repository + Offline support + Android Architecture Components + Paging library & Retrofit2.

Popular Movies Stage 1 + Stage 2 Discover the most popular and top rated movies playing. Movies data fetched using themoviedb.org API. ✨ Screenshots M

Yassin AJDI 189 Nov 26, 2022
Extensible Android mobile voice framework: wakeword, ASR, NLU, and TTS. Easily add voice to any Android app!

Spokestack is an all-in-one solution for mobile voice interfaces on Android. It provides every piece of the speech processing puzzle, including voice

Spokestack 57 Nov 20, 2022
Aggregated Android news, articles, podcasts and conferences about Android Development

DroidFeed Curated news feed for Android Developers! Stay up to date with the latest Android Development news. Built for the Android developer communit

Dogan Gulcan 183 Dec 2, 2022
Shreyas Patil 2.1k Dec 30, 2022
A simple app to showcase Androids Material Design and some of the cool new cool stuff in Android Lollipop. RecyclerView, CardView, ActionBarDrawerToggle, DrawerLayout, Animations, Android Compat Design, Toolbar

#Android-LollipopShowcase This is a simple showcase to show off Android's all new Material Design and some other cool new stuff which is (new) in Andr

Mike Penz 1.8k Nov 10, 2022
The Android startup used to schedule tasks, jobs while launching Android App.

Android Startup, schedule your startup jobs Introduction AndroidStartup is an open source project used to refine your Andriod App startup. Compared wi

ShouHeng 46 Aug 24, 2022
Android playground project with modularization by feature (android libraries), unit tests, MVVM & MVI.

Movies Movies is a simple project to study and play with some android components, architecture and tools for Android development. Tech Stack This proj

Christopher Elias 333 Dec 30, 2022
🌄 Photo editor using native modules for iOS and Android. Inherit from 2 available libraries, Brightroom (iOS) and PhotoEditor (Android)

React Native Photo Editor (RNPE) ?? Image editor using native modules for iOS and Android. Inherit from 2 available libraries, Brightroom (iOS) and Ph

Baron Ha. 242 Dec 28, 2022
Ride-Sharing Uber Lyft Android App - Learn to build a ride-sharing Android Taxi Clone App like Uber, Lyft - Open-Source Project By MindOrks

Ride-Sharing Uber Lyft Android App - Learn to build a ride-sharing Android Taxi Clone App like Uber, Lyft - Open-Source Project By MindOrks

MindOrks 1.2k Dec 29, 2022
A simple Android app to demonstrate the use of Hover SDK for M-PESA Send Money while offline. This SDK does not require an internet connection, it automates USSD sessions in the background of an android application.

HoverSDKDemo Hover SDK is an Android SDK that lets mobile developers to add money features to the applications. This SDK does not require an internet

Joel Kanyi 9 Dec 21, 2022
Source code of JekyllEx Android App which can manage your Jekyll blog directly from your Android device!

JekyllEx Android App Built with ❤︎ by Gourav Khunger ?? Introduction JekyllEx is an Android App that allows you to manage a Jekyll Blog directly from

JekyllEx 24 Nov 8, 2022
A Simple and Minimal Quotes Android Application to demonstrate the Modern Android Development tools

Quotee Android ?? A Simple and Minimal Quotes Android Application to demonstrate the Modern Android Development tools. Developed with ❤️ by Aminullah

null 12 Aug 24, 2022
🎥 A Simple and Minimal Movies Android Application to demonstrate the Modern Android Development and Jetpack Compose.

ComposeMovie Android ?? A Simple and Minimal Movies Android Application to demonstrate the Modern Android Development and Jetpack Compose. Built with

null 13 Oct 1, 2022
Android Studio project wrapper around the Elixir TodoApp Desktop app to run on Android including the Erlang runtime

TodoApp Android: An Android Sample App This Android Studio project wraps the Desktop Sample App to run on an Android phone. How to build & run Install

elixir-desktop 78 Dec 10, 2022
GmailCompose is an Android application 📱 for showcasing Jetpack Compose for building declarative UI in Android.

GmailCompose GmailCompose Demo GmailCompose is an Android application ?? for showcasing Jetpack Compose for building declarative UI in Android. About

Baljeet Singh 35 Nov 29, 2022
Parsing and re-packing Android boot.img/vbmeta.img, supporting Android 12(preview)

Android_boot_image_editor A tool for reverse engineering Android ROM images. Getting Started install required packages Mac: brew install lz4 xz dtc Li

null 615 Dec 30, 2022