box / box/box-android-apptoapp-sdk

Dynamic BoxAuthentication lauout

Open
#9 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
57
Forks
27
PR merge metrics
No merged PRs in 30d

Description

Please remove resources used in BoxAuthentication. This will allow using this library in other apps as a compiled .jar file, not as source-based library.

This can be done easily:

``` java
@Override
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

mApiKey = getIntent().getStringExtra("API_KEY").trim();
if (mApiKey == null || mApiKey.length() == 0) {
setResult(AUTH_RESULT_FAIL);
finish();
return;
}

// setContentView(R.layout.box_authentication);

FrameLayout layout = new FrameLayout(this);
layout.setLayoutParams(new ViewGroup.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
mLoginWebView = new WebView(this);
mLoginWebView.setLayoutParams(new FrameLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
layout.addView(mLoginWebView);
setContentView(layout);
...
}
```

Contributor guide

Open the contributing guide

Research direction

Locate BoxAuthentication and the box_authentication layout resource, then inspect how the authentication screen is created. Confirm which resources are used only by BoxAuthentication and replace that dependency with the programmatic layout described in the issue. Done means the SDK can be consumed as a compiled .jar without those resources.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
authentication, mobile
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.