GithubHelp home page GithubHelp logo

kickstarter / android-oss Goto Github PK

View Code? Open in Web Editor NEW
5.7K 160.0 995.0 44.17 MB

Kickstarter for Android. Bring new ideas to life, anywhere.

Home Page: https://www.kickstarter.com/mobile

License: Apache License 2.0

Ruby 0.41% Makefile 0.07% Java 7.02% Shell 0.12% Kotlin 92.38%
android-development android functional-programming rxjava functional-reactive-programming frp kotlin-android

android-oss's Introduction

Kickstarter for Android™

CircleCI codecov ktlint

Welcome to Kickstarter's open source Android app! Come on in, take your shoes off, stay a while—explore how Kickstarter's native squad has built and continues to build the app, discover our implementation of RxJava in logic- filled view models, and maybe even create an issue or two.

We've also open sourced our iOS app, written in Swift: check it out here. Read more about our journey to open source here.

Getting Started

Follow these instructions to build and run the project with mock data..

  1. Clone this repository.
  2. Download the appropriate JDK for your system. We are currently on JDK 8.
  3. Install Android Studio.
  4. cd into the project repo and run make bootstrap to bootstrap your Android development environment. Keep an eye on the output to see if any manual steps are required.
  5. Import the project. Open Android Studio, click Open an existing Android Studio project and select the project. Gradle will build the project.
  6. Run the app. Click Run > Run 'app'. After the project builds you'll be prompted to build or launch an emulator.

Documentation

While we're at it, why not share our docs? Check out the native docs we have written so far for more documentation.

Contributing

We intend for this project to be an educational resource: we are excited to share our wins, mistakes, and methodology of Android development as we work in the open. Our primary focus is to continue improving the app for our users in line with our roadmap.

The best way to submit feedback and report bugs is to open a Github issue. Please be sure to include your operating system, device, version number, and steps to reproduce reported bugs. Keep in mind that all participants will be expected to follow our code of conduct.

Code of Conduct

We aim to share our knowledge and findings as we work daily to improve our product, for our community, in a safe and open space. We work as we live, as kind and considerate human beings who learn and grow from giving and receiving positive, constructive feedback. We reserve the right to delete or ban any behavior violating this base foundation of respect.

Find this interesting?

We do too, and we’re hiring!

License

Copyright 2020 Kickstarter, PBC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

android-oss's People

Contributors

amancevice avatar arkariang avatar blinsay avatar christopherwright avatar eoji avatar hadia avatar hodanny avatar hotchemi avatar jadebyfield89 avatar jgsamudio avatar jorgecasariego avatar justinswart avatar kyeah avatar leighdouglas avatar lovehandle avatar luoser avatar mbrandonw avatar mkano9 avatar mtgriego avatar plastix avatar rcureton avatar scollaco avatar stephencelis avatar sunday-okpoluaefe avatar swoopej avatar talaris avatar theginbin avatar toyamah avatar undeadly avatar ycheng-kickstarter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-oss's Issues

make bootstrp error

bogon:android-oss-master DanielHan$ make bootstrap
git submodule sync --recursive
fatal: Not a git repository (or any of the parent directories): .git
make: *** [submodules] Error 128
bogon:android-oss-master DanielHan$

background in View is better than in RelativeLayout?

`

<View
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:background="@color/white_alpha_60"/>

<ProgressBar
  android:id="@+id/loading_indicator"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:layout_centerVertical="true"
  android:layout_centerHorizontal="true"/>

`

background in View is better than in RelativeLayout?
thank you.

New Logo For Kickstarter

Hello.
I wanted to contribute to kickstarter and I designed a logo for kickstarter. If you like it, you can use it. I'll send you files and pr, is there anything you want ?
kickstarter

Application architecture

I'm little bit confused about the application architecture if we can add more about the application architecture in read me file will be awesome.

Couldn't request network

When I run app success, I can not get data from network. and print log like this:

04-24 11:12:31.870 31832-31877/com.kickstarter.kickstarter.debug V/MixpanelAPI.DChecker: Cannot get https://decide.mixpanel.com/decide?version=1&lib=android&token=koala&distinct_id=648a9a4c-4d30-474e-b242-dcfc79f2b868, file not found.
java.io.FileNotFoundException: https://decide.mixpanel.com/decide?version=1&lib=android&token=koala&distinct_id=648a9a4c-4d30-474e-b242-dcfc79f2b868
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:238)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)
at com.mixpanel.android.util.HttpService.performRequest(HttpService.java:91)
at com.mixpanel.android.mpmetrics.DecideChecker.getUrls(DecideChecker.java:290)
at com.mixpanel.android.mpmetrics.DecideChecker.getDecideResponseFromServer(DecideChecker.java:233)
at com.mixpanel.android.mpmetrics.DecideChecker.runDecideCheck(DecideChecker.java:88)
at com.mixpanel.android.mpmetrics.DecideChecker.runDecideChecks(DecideChecker.java:70)
at com.mixpanel.android.mpmetrics.AnalyticsMessages$Worker$AnalyticsMessageHandler.handleMessage(AnalyticsMessages.java:269)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
04-24 11:12:31.942 31832-31877/com.kickstarter.kickstarter.debug V/MixpanelAPI.Messages: Cannot post message to http://dev/null. (Thread 4550)
java.net.ConnectException: failed to connect to dev/127.0.53.53 (port 80) after 2000ms: isConnected failed: ECONNREFUSED (Connection refused)
at libcore.io.IoBridge.isConnected(IoBridge.java:234)
at libcore.io.IoBridge.connectErrno(IoBridge.java:171)
at libcore.io.IoBridge.connect(IoBridge.java:122)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:452)
at java.net.Socket.connect(Socket.java:884)
at com.android.okhttp.internal.Platform.connectSocket(Platform.java:117)
at com.android.okhttp.internal.http.SocketConnector.connectRawSocket(SocketConnector.java:160)
at com.android.okhttp.internal.http.SocketConnector.connectCleartext(SocketConnector.java:67)
at com.android.okhttp.Connection.connect(Connection.java:152)
at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:185)
at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:433)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:114)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:245)
at com.mixpanel.android.util.HttpService.performRequest(HttpService.java:83)
at com.mixpanel.android.mpmetrics.AnalyticsMessages$Worker$AnalyticsMessageHandler.sendData(AnalyticsMessages.java:423)
at com.mixpanel.android.mpmetrics.AnalyticsMessages$Worker$AnalyticsMessageHandler.sendAllData(AnalyticsMessages.java:393)
at com.mixpanel.android.mpmetrics.AnalyticsMessages$Worker$AnalyticsMessageHandler.handleMessage(AnalyticsMessages.java:268)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: android.system.ErrnoException: isConnected failed: ECONNREFUSED (Connection refused)
at libcore.io.IoBridge.isConnected(IoBridge.java:223)
at libcore.io.IoBridge.connectErrno(IoBridge.java:171) 
at libcore.io.IoBridge.connect(IoBridge.java:122) 
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183) 
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:452) 
at java.net.Socket.connect(Socket.java:884) 
at com.android.okhttp.internal.Platform.connectSocket(Platform.java:117) 
at com.android.okhttp.internal.http.SocketConnector.connectRawSocket(SocketConnector.java:160) 
at com.android.okhttp.internal.http.SocketConnector.connectCleartext(SocketConnector.java:67) 
at com.android.okhttp.Connection.connect(Connection.java:152) 
at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:185) 
at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128) 
at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341) 
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330) 
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248) 
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:433) 
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:114) 
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:245) 
at com.mixpanel.android.util.HttpService.performRequest(HttpService.java:83) 
at com.mixpanel.android.mpmetrics.AnalyticsMessages$Worker$AnalyticsMessageHandler.sendData(AnalyticsMessages.java:423) 
at com.mixpanel.android.mpmetrics.AnalyticsMessages$Worker$AnalyticsMessageHandler.sendAllData(AnalyticsMessages.java:393) 
at com.mixpanel.android.mpmetrics.AnalyticsMessages$Worker$AnalyticsMessageHandler.handleMessage(AnalyticsMessages.java:268) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:148) 

How should I solve this problem?

Unable to run ./script/bootstrap - Function Not Found

So I encountered #16 but on manually doing the file commands, that seemed to fix it.
Now this script ./script/bootstrap is giving this error.

./script/bootstrap
./script/bootstrap: 3: ./script/bootstrap: function: not found

./script/bootstrap: 6: ./script/bootstrap: Syntax error: "}" unexpected
Makefile:2: recipe for target 'bootstrap' failed
make: *** [bootstrap] Error 2

It seems as tho its failing on function "say" in the script. Whats that function for?

@kickstarter This code you threw up online is not running...

Error:Execution failed for task ':app:processExternalMin21DebugGoogleServices'. > File google-services.json is missing. The Google Services Plugin cannot function without it.

Error:Execution failed for task ':app:processExternalMin21DebugGoogleServices'.

File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
F:\android\android-oss-master\app\src\externalMin21\debug\google-services.json
F:\android\android-oss-master\app\src\debug\externalMin21\google-services.json
F:\android\android-oss-master\app\src\externalMin21\google-services.json
F:\android\android-oss-master\app\src\debug\google-services.json
F:\android\android-oss-master\app\google-services.json

Toolbar shadow disappears sometimes

If you scroll very quickly and very far down, the shadow will disappear. Scrolling back up will make it appear again. Is this intended behaviour?

Content is empty

I have install it to the phone..

From android catlog see like this

05-19 23:24:32.341 16936-16986/com.kickstarter.kickstarter.debug V/MixpanelAPI.DChecker: Querying decide server, urls:
>> https://decide.mixpanel.com/decide?version=1&lib=android&token=koala&distinct_id=5df63f94-9e5e-4a0e-ba1f-7352c250e3e4
05-19 23:24:32.341 16936-16986/com.kickstarter.kickstarter.debug V/MixpanelAPI.Message: ConnectivityManager says we are online
Attempting request to https://decide.mixpanel.com/decide?version=1&lib=android&token=koala&distinct_id=5df63f94-9e5e-4a0e-ba1f-7352c250e3e4
05-19 23:24:33.243 16936-16986/com.kickstarter.kickstarter.debug V/MixpanelAPI.DChecker: Cannot get https://decide.mixpanel.com/decide?version=1&lib=android&token=koala&distinct_id=5df63f94-9e5e-4a0e-ba1f-7352c250e3e4, file not found.
java.io.FileNotFoundException: https://decide.mixpanel.com/decide?version=1&lib=android&token=koala&distinct_id=5df63f94-9e5e-4a0e-ba1f-7352c250e3e4
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:250)

Question: how are secrets handled in android-oss?

I'm interested to learn how secrets are handled in the Android oss repo. There are usually API keys and other credentials required to build the app that shouldn't be open sourced. I think Kickstarter is using a git submodule?

I'd like to replicate a similar setup for my apps. Any details would be appreciated.

can't not find some class

Error:(14, 34) 错误: 找不到符号
符号: 类 Secrets
位置: 程序包 com.kickstarter.libs.utils

Error:(46, 32) 错误: 找不到符号
符号: 类 KSWebViewClient
位置: 程序包 com.kickstarter.services
Error:(71, 103) 错误: 程序包KSWebViewClient不存在

Some enhancement ideas

Hello, I would like to point out some feature enhancement idea that might actually be useful, here they are:

  1. Interface overhaul on home project listing to be more compact and simple.
    The current “home” project list interface only shows a little portion of the project’s description in the project overview. It also leaves a lot of wasted blank space, which I would like to improve to make the interface a bit more compact.

  2. Interface overhaul on search project listing to list out more details.
    Project overview in search session leaves some crucial information such as the number of backers, and also it has a tiny thumbnail. The size is a problem because the thumbnail was designed with a desktop monitor size in mind, so making it more tiny than usual is not a wise choice in my opinion. I would like to improve this by listing a few more project details and a bigger thumbnail so the user can more easily see it.

  3. Adds search result counter (for example, “549 results were found”) in the search listing.
    This is straightforward, I think it would be a nice improvement to let the user know how many results/projects were found with the keyword.

  4. Adds tagging/filtering in the search listing. (for example, list only projects with “board game” tag.)
    This might be the most important, this app still does not have a filtering search result feature.

  5. Adds number counter in project listing (#1, #2, #3, etc.)
    A nice addition since there are so many projects being listed that user might want to keep track of where they are.

These ideas might already be around for a while but I'd only wanted to point it out again, thanks for reading this!

Espresso?

I see androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' but it looks like there are no Espresso tests?

BUILD_DATE dynamic field causes slower builds

BUILD_DATE is dynamically created out of current date. It includes seconds as well.
This means that every time someone builds, BuildConfig class changes. That causes java compilation.

This is not necessary while running tests and changing only xml layouts. In those cases, the builds can be faster.

To prevent it, you can persist the date (and even git-sha) inside a file in build folder. And project clean will create the right ones.

Here I have an example implementation:
https://github.com/gdg-x/frisbee/blob/develop/app/build.gradle#L206

Why do you reassign view model onResume()?

Trying to understand the purpose of the following code in the onResume() function of your BaseActivity:

assignViewModel(null);
    if (viewModel != null) {
      viewModel.onResume(this);
    }

In which scenario(s) does viewModel end up being null here?

And isn't the null check right after reassigning viewModel a little too defensive?

Cannot compile project

Hello,
I just downloaded the project and tried to compile it but I got some errors:

  1. No resource found that matches the given name (at 'value' with value '@string/koala_endpoint'). [main/AndroidManifest.xml:428]
    to fix it fast I changed @string/koala_endpoint with an empty string and then compiled it again.
  2. error: cannot find symbol class KSWebViewClient [CheckoutActivity:46]
    I'm running macOS 10.12.1 and Android Studio 2.2.3.
    What am I going wrong?

Not clear how to run unit tests

I tried to run the tests from the command line using:

./gradlew test

But the result is the following:

com.kickstarter.viewmodels.RewardViewModelTest > testUsdConversionForNonUSProject FAILED
    java.lang.AssertionError at RewardViewModelTest.java:457

com.kickstarter.viewmodels.RewardViewModelTest > testMinimumTextViewText FAILED
    java.lang.AssertionError at RewardViewModelTest.java:344

com.kickstarter.viewmodels.RewardViewModelTest > testUsdConversionTextRoundsUp FAILED
    java.lang.AssertionError at RewardViewModelTest.java:516

com.kickstarter.viewmodels.ViewPledgeViewModelTest > testShipping_withShippingLocation FAILED
    java.lang.AssertionError at ViewPledgeViewModelTest.java:256

com.kickstarter.viewmodels.ViewPledgeViewModelTest > testRewardMinimumAndDescriptionTextViewText FAILED
    java.lang.AssertionError at ViewPledgeViewModelTest.java:172

com.kickstarter.viewmodels.ViewPledgeViewModelTest > testBackingAmountAndDateTextViewText FAILED
    java.lang.AssertionError at ViewPledgeViewModelTest.java:74

347 tests completed, 6 failed
:app:testExternalMin21ReleaseUnitTest FAILED

If I run from Android Studio the result is:

340 tests done: 268 failing

java.lang.RuntimeException: java.lang.RuntimeException: build/intermediates/bundles/externalMin21/debug/AndroidManifest.xml not found or not a file; it should point to your project's AndroidManifest.xml

Could you advise me on how to run the tests and then I can add that information to the README?

Unable to run `make bootstrap`

Environment: Ubuntu 14.04.1
While running make bootstrap, I get the following error:

vagrant@vagrant:~/android-oss$ make bootstrap
git submodule sync --recursive
Synchronizing submodule url for 'vendor/material-design-icons'
Synchronizing submodule url for 'vendor/native-secrets'
git submodule update --init --recursive || true
Cloning into 'vendor/native-secrets'...
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Clone of '[email protected]:kickstarter/native-secrets.git' into submodule path 'vendor/native-secrets' failed
git submodule foreach git checkout 
Entering 'vendor/material-design-icons'
# Copy java secrets over, and fallback to the example secrets if they don't exist.
cp vendor/native-secrets/android/Secrets.java app/src/main/java/com/kickstarter/libs/utils/Secrets.java \
		|| cp app/src/main/java/com/kickstarter/libs/utils/Secrets.java.example app/src/main/java/com/kickstarter/libs/utils/Secrets.java
cp: cannot stat ‘vendor/native-secrets/android/Secrets.java’: No such file or directory
cp vendor/native-secrets/ruby/secrets.rb lib/milkrun/secrets.rb || true
cp: cannot stat ‘vendor/native-secrets/ruby/secrets.rb’: No such file or directory
cp vendor/native-secrets/fonts/ss-kickstarter.otf app/src/main/assets/fonts/ss-kickstarter.otf || true
cp: cannot stat ‘vendor/native-secrets/fonts/ss-kickstarter.otf’: No such file or directory
# Copy koala endpoint configs over, and fallback to examples if they don't exist.
mkdir -p app/src/debug/res/values/
mkdir -p app/src/main/res/values/
cp vendor/native-secrets/android/koala_endpoint_debug.xml app/src/debug/res/values/koala_endpoint.xml \
		|| cp config/koala_endpoint.xml.example app/src/debug/res/values/koala_endpoint.xml
cp: cannot stat ‘vendor/native-secrets/android/koala_endpoint_debug.xml’: No such file or directory
cp vendor/native-secrets/android/koala_endpoint.xml app/src/main/res/values/koala_endpoint.xml \
		|| cp config/koala_endpoint.xml.example app/src/main/res/values/koala_endpoint.xml
cp: cannot stat ‘vendor/native-secrets/android/koala_endpoint.xml’: No such file or directory
# Copy over web client
cp -rf vendor/native-secrets/android/WebViewJavascriptInterface.java app/src/main/java/com/kickstarter/libs/WebViewJavascriptInterface.java \
		|| cp -rf config/WebViewJavascriptInterface.java app/src/main/java/com/kickstarter/libs/WebViewJavascriptInterface.java
cp: cannot stat ‘vendor/native-secrets/android/WebViewJavascriptInterface.java’: No such file or directory
cp -rf vendor/native-secrets/android/KSWebViewClient.java app/src/main/java/com/kickstarter/services/KSWebViewClient.java \
		|| cp -rf config/KSWebViewClient.java app/src/main/java/com/kickstarter/services/KSWebViewClient.java
cp: cannot stat ‘vendor/native-secrets/android/KSWebViewClient.java’: No such file or directory
./script/bootstrap
./script/bootstrap: 3: ./script/bootstrap: function: not found

./script/bootstrap: 6: ./script/bootstrap: Syntax error: "}" unexpected
make: *** [bootstrap] Error 2

What am I missing here?

project structure

hi
i know it's not a related to code
but any article or tutorial that can guide me to build same structure modelview, observables,etc
thanks

To Comment or Not to Comment?

Hello there,

There is an awesome episode that discuss code health published by google folks on their blog : googleblog.com.

Among the advices :

avoid comments that just repeat what the code does.

What I suggest is to apply this advice 👍

So this code :

interface Inputs {
    /** Call when the project context section is clicked. */
    void projectClicked();

    /** Call when the view messages button is clicked. */
    void viewMessagesButtonClicked();
  }

Will become :

interface Inputs {
    void projectClicked();

    void viewMessagesButtonClicked();
  }

google-services.json is missing error and make bootstrap

hello,I encountered this google service missing error when I try to run the app in the android studio.

here is the error:

File google-services.json is missing. The Google Services Plugin cannot function without it. Searched Location: C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\external\min21\debug\google-services.json C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\externalMin21\debug\google-services.json C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\debug\externalMin21\google-services.json C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\external\debug\google-services.json C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\external\min21\google-services.json C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\external\min21Debug\google-services.json C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\externalMin21\google-services.json C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\debug\google-services.json C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\externalMin21Debug\google-services.json C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\external\google-services.json C:\Users\naufa\AndroidStudioProjects\android-oss\app\src\externalDebug\google-services.json C:\Users\naufa\AndroidStudioProjects\android-oss\app\google-services.json

the scenario was: I imported the project in android studio (not Zip), let the gradle loads, an error pops up "please select SDK", I sync the project with gradle, error was gone, and when I try to run the app, the google-service.json missing pops up, I browse for solution and found out that a lot of people are having the same problem without receiving any clear answer or any at all, especially on windows 10.

Unable to get FacebookContentProvider

Hey, I get this error as soon as i try to run the app : java.lang.RuntimeException: Unable to get provider com.facebook.FacebookContentProvider: java.lang.ClassNotFoundException: Didn't find class "com.facebook.FacebookContentProvider" on path: DexPathList[[zip file "/data/app/com.kickstarter.kickstarter.debug-1/base.apk"],nativeLibraryDirectories=[/data/app/com.kickstarter.kickstarter.debug-1/lib/x86_64, /system/lib64, /vendor/lib64]]

I just pulled, ran "make bootstrap" and with Android Studio, simply trying running the application.

Compilation error

Compilation failed; see the compiler error output for details.

import com.kickstarter.libs.utils.SocketUtils;
                                 ^
  symbol:   class SocketUtils
  location: package com.kickstarter.libs.utils
1 error

Double Bracket initialization is bad.

hello,

I see that the app occasionally uses double bracket initialization. For example here
https://github.com/kickstarter/android-oss/blob/master/app/src/main/java/com/kickstarter/libs/KSString.java#L26-L30

and

https://github.com/kickstarter/android-oss/blob/master/app/src/main/java/com/kickstarter/libs/KSString.java#L74-L81

This should be absolutely avoided IMO. The reason is that each of them will create an inner anonymous class and they can be easily avoided.

Here is an example.

Complied using JDK 1.8.0_45

import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;


public class DoubleBracket {

    public static void main(String[] args) {
        Map<String, String> lazy = new HashMap<String, String >() {{
            put("a", "b");
            put("1", "2");

        }};
        System.out.println(lazy.toString());

        lazy = new HashMap<String, String >() {{
            put("a", "b");
            put("1", "2");

        }};
        System.out.println(lazy.toString());

        lazy = new HashMap<String, String >() {{
            put("a", "b");
            put("1", "2");

        }};
        System.out.println(lazy.toString());

        lazy = new HashMap<String, String >() {{
            put("a", "b");
            put("1", "2");

        }};
        System.out.println(lazy.toString());

        lazy = new HashMap<String, String >() {{
            put("a", "b");
            put("1", "2");

        }};
        System.out.println(lazy.toString());

        lazy = new HashMap<String, String >() {{
            put("a", "b");
            put("1", "2");

        }};
        System.out.println(lazy.toString());

        lazy = new HashMap<String, String >() {{
            put("a", "b");
            put("1", "2");

        }};
        System.out.println(lazy.toString());

        lazy = new HashMap<String, String >() {{
            put("a", "b");
            put("1", "2");

        }};
        System.out.println(lazy.toString());
    }
}

image

Here is what we see in the APK explore
image

Let me know what you think.

when i login or logout ,how can i change the CurrentUserType in Environment....

forgive my Chinglish
first time to start the app. there is no user info....so , in ApplicationModule provideCurrentUserType is null, but okhttp is building...... when i logined ,then the app got the user info.....but i cant find anywhere code to refresh the global ApplicationComponent....so , the ApplicationComponent provide's
Environment always have the old CurrentUserType...

apply plugin: 'com.android.application' twice

apply plugin: 'com.android.application' is found both at the top and the bottom of the app's build.gradle. Is this intentional, or something being overlooked? Just curious. Happy to make a PR if it is not on purpose 👍

Getting error on "make bootstrap"

Getting below error on "make bootstrap":

`git submodule sync --recursive
Synchronizing submodule url for 'vendor/material-design-icons'
git submodule update --init --recursive || true
git submodule foreach git checkout
Entering 'vendor/material-design-icons'

Copy java secrets over. Fallback to example secrets if they don't exist.

(Skipping secrets.)
cp vendor/native-secrets/android/Secrets.java app/src/main/java/com/kickstarter/libs/utils/Secrets.java
|| cp app/src/main/java/com/kickstarter/libs/utils/Secrets.java.example app/src/main/java/com/kickstarter/libs/utils/Secrets.java
cp: cannot stat ‘vendor/native-secrets/android/Secrets.java’: No such file or directory
cp vendor/native-secrets/ruby/secrets.rb lib/milkrun/secrets.rb || true
cp: cannot stat ‘vendor/native-secrets/ruby/secrets.rb’: No such file or directory
cp vendor/native-secrets/fonts/ss-kickstarter.otf app/src/main/assets/fonts/ss-kickstarter.otf || true
cp: cannot stat ‘vendor/native-secrets/fonts/ss-kickstarter.otf’: No such file or directory

Copy kola configs over. Fallback to examples if they don't exist.

mkdir -p app/src/debug/res/values/
mkdir -p app/src/main/res/values/
cp vendor/native-secrets/android/koala_endpoint_debug.xml app/src/debug/res/values/koala_endpoint.xml
|| cp config/koala_endpoint.xml.example app/src/debug/res/values/koala_endpoint.xml
cp: cannot stat ‘vendor/native-secrets/android/koala_endpoint_debug.xml’: No such file or directory
cp vendor/native-secrets/android/koala_endpoint.xml app/src/main/res/values/koala_endpoint.xml
|| cp config/koala_endpoint.xml.example app/src/main/res/values/koala_endpoint.xml
cp: cannot stat ‘vendor/native-secrets/android/koala_endpoint.xml’: No such file or directory

Copy web client over.

cp -rf vendor/native-secrets/android/WebViewJavascriptInterface.java app/src/main/java/com/kickstarter/libs/WebViewJavascriptInterface.java
|| cp -rf config/WebViewJavascriptInterface.java app/src/main/java/com/kickstarter/libs/WebViewJavascriptInterface.java
cp: cannot stat ‘vendor/native-secrets/android/WebViewJavascriptInterface.java’: No such file or directory
cp -rf vendor/native-secrets/android/KSWebViewClient.java app/src/main/java/com/kickstarter/services/KSWebViewClient.java
|| cp -rf config/KSWebViewClient.java app/src/main/java/com/kickstarter/services/KSWebViewClient.java
cp: cannot stat ‘vendor/native-secrets/android/KSWebViewClient.java’: No such file or directory
mkdir -p app/src/main/assets/www/
cp vendor/native-secrets/android/WebViewJavascript.html app/src/main/assets/www/WebViewJavascript.html || true
cp: cannot stat ‘vendor/native-secrets/android/WebViewJavascript.html’: No such file or directory
./script/bootstrap
E:\android\examples\android-oss\script\bootstrap: line 5: ruby: command not found
find: warning: you have specified the -depth option after a non-option argument -name, but options are not positional (-depth affects tests specified before it as well as those specified after it). Please specify options before other arguments.

find: paths must precede expression: 1
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
E:\android\examples\android-oss\script\bootstrap: line 5: ruby: command not found
E:\android\examples\android-oss\script\bootstrap: line 28: bundle: command not found
E:\android\examples\android-oss\script\bootstrap: line 5: ruby: command not found
cp: cannot stat ‘vendor/native-secrets/android/externalMin21Debug/google-services.json’: No such file or directory
cp: cannot stat ‘vendor/native-secrets/android/externalPre21Debug/google-services.json’: No such file or directory
cp: cannot stat ‘vendor/native-secrets/android/externalMin21Release/google-services.json’: No such file or directory
cp: cannot stat ‘vendor/native-secrets/android/externalPre21Release/google-services.json’: No such file or directory
cp: cannot stat ‘vendor/native-secrets/android/internalMin21Debug/google-services.json’: No such file or directory
cp: cannot stat ‘vendor/native-secrets/android/internalPre21Debug/google-services.json’: No such file or directory
cp: cannot stat ‘vendor/native-secrets/android/internalMin21Release/google-services.json’: No such file or directory
cp: cannot stat ‘vendor/native-secrets/android/internalPre21Release/google-services.json’: No such file or directory
E:\android\examples\android-oss\script\bootstrap: line 5: ruby: command not found
mv: cannot move ‘/tmp/pidcat’ to ‘/usr/local/bin/pidcat’: No such file or directory
E:\android\examples\android-oss\script\bootstrap: line 5: ruby: command not found
E:\android\examples\android-oss\script\bootstrap: line 5: ruby: command not found
E:\android\examples\android-oss\script\bootstrap: line 5: ruby: command not found
make: *** [bootstrap] Error 127
`

proguard file?

I don't find your proguard file. I am to know curious what all proguard rules did you write in proguard in order to achieve the apk size of around 4MB.

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.