Skip to content

Provide download for SDK in Android mode #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
codeanticode opened this issue Oct 12, 2015 · 18 comments
Closed

Provide download for SDK in Android mode #156

codeanticode opened this issue Oct 12, 2015 · 18 comments

Comments

@codeanticode
Copy link
Contributor

Moved from processing/processing#3986:

If the user attempts to use Android mode and does not have the SDK, the popup should offer instructions on how to obtain and install the developer tools.

@codeanticode
Copy link
Contributor Author

@gingerdeadshot It this the popup you refer to:

image

? It points users to the http://developer.android.com/sdk

@serebit
Copy link

serebit commented Oct 12, 2015

Yes, except this popup does not appear for me. The popup that appears on my computer simply says "Android SDK could not be loaded - Android mode will be all but disabled."

@codeanticode
Copy link
Contributor Author

what version of the mode are you using?

@serebit
Copy link

serebit commented Oct 12, 2015

The latest version available.
On Mon, Oct 12, 2015 at 11:38 AM codeanticode [email protected]
wrote:

what version of the mode are you using?


Reply to this email directly or view it on GitHub
#156 (comment)
.

@codeanticode
Copy link
Contributor Author

@omerjerk I noticed that often the "It's gonna to be a bad day" popup shows up several times when the SDK is not available:

image

and the SDK installation dialog does not consistently appear instead of it. Do you have some time to look at the startup logic of the mode, so we make sure that the right dialog is displayed?

@serebit
Copy link

serebit commented Oct 13, 2015

Yeah, that's the popup that comes up, the "it's gonna be a bad day" one.
On Tue, Oct 13, 2015 at 11:42 AM codeanticode [email protected]
wrote:

@omerjerk https://github.com/omerjerk I noticed that often the "It's
gonna to be a bad day" popup shows up several times when the SDK is not
available:

[image: image]
https://cloud.githubusercontent.com/assets/62246/10459812/549a277e-719f-11e5-9658-75d11d3e61ec.png

and the SDK installation dialog does not consistently appear instead of
it. Do you have some time to look at the startup logic of the mode, so we
make sure that the right dialog is displayed?


Reply to this email directly or view it on GitHub
#156 (comment)
.

@codeanticode
Copy link
Contributor Author

ok, if you try to switch to the android mode from the PDE, after closing the "bad day" popup, you should get the SDK installation dialog. It does not work very consistently, but it should show up at some point. Anyways, we will try to fix the startup logic so it is not confusing.

@serebit
Copy link

serebit commented Oct 13, 2015

Perfect. Thanks.
On Tue, Oct 13, 2015 at 11:57 AM codeanticode [email protected]
wrote:

ok, if you try to switch to the android mode from the PDE, after closing
the "bad day" popup, you should get the SDK installation dialog. It does
not work very consistently, but it should show up at some point. Anyways,
we will try to fix the startup logic so it is not confusing.


Reply to this email directly or view it on GitHub
#156 (comment)
.

@kasperkamperman
Copy link

Same problem here. "It's gonna be a bad day". Switching to Android Mode worked to locate the SDK. However it might be smart to pop-up this SDK directly (or remove the "bad day" warning if you are not in Android mode).

@bonsaipanda
Copy link
Contributor

There is also a chance that the user gets stuck with a pop up saying "This version of Android Mode is not compatible with this version of Processing etc" and Processing won't start up - maybe fall back to Java mode if that error happens? [this might fall into a totally different issue category]

@omerjerk
Copy link
Contributor

I'll fix this asap.

@codeanticode
Copy link
Contributor Author

@omerjerk Thanks! I think we need to revise the logic of when the different popups are shown to the user.

For instance, right after installing the mode, it is very likely that the SDK is not available yet. Should we show the "bad day" popup right away, or ask for the SDK installation? I'd prefer the latter.

What @Loadus mentions is also a related issue, which I have experienced myself. If an incompatible version of the mode is installed, you cannot even start Processing, unless you delete the mode files manually.

@kasperkamperman
Copy link

@codeanticode I prefer the SDK installation warning or no message at all. It won't be nice if whole Processing (including all the other modes) will be blocked if just the Android mode doesn't work.

@omerjerk
Copy link
Contributor

I was looking at the logic and as far as I think, the "Locate SDK" dialogue should always come up instead of the "bad day" one. https://github.com/processing/processing-android/blob/master/src/processing/mode/android/AndroidMode.java#L140
The possible reason could be that parent in the above mentioned code is null.

Unfortunately, I'm not able to build Processing from eclipse and unable to see the console output.
Let me fix my eclipse build first.

@codeanticode
Copy link
Contributor Author

fixed after merging Umair's PR. Tested on Mac OS X 10.10 and Processing 3.0

@codeanticode
Copy link
Contributor Author

@omerjerk actually, there are some instances where the "bad day" message still show up after the fix. For example, quit the PDE when using the Android mode, delete the SDK inside the mode folder, and run the PDE. Then the install SDK dialog shows up, but on top of it the "bad day" popup, which you need to dismiss twice to get to install the SDK again.

I also noticed that if you close the install dialog SDK using the close button, without selecting any option, then it still downloads the SDK.

So, we need to tweak the UI logic a bit more.

@codeanticode codeanticode reopened this Nov 1, 2015
@codeanticode codeanticode added this to the Final 3.0 release milestone Apr 16, 2016
@codeanticode
Copy link
Contributor Author

codeanticode commented Apr 16, 2016

This should be finally fixed in RC3. @kasperkamperman, @omerjerk, @gingerdeadshot could you check?

@codeanticode
Copy link
Contributor Author

no confirmation from original posters, and the download logic is fixed in PR3. There are still some issues, but addressed here and here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants