Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Report: My first "hello world" using Android Studio freeware on Windows worked just fine (in about an hour)

370 views
Skip to first unread message

Arlen Holder

unread,
Oct 26, 2018, 6:45:56 PM10/26/18
to
Report: My first "hello world" using Android Studio freeware on Windows
worked just fine (total elapsed time was about an hour).
<http://www.bild.me/bild.php?file=7570013helloworld01.jpg>
<http://www.bild.me/bild.php?file=4072224helloworld02.jpg>
<http://www.bild.me/bild.php?file=7646977helloworld03.jpg>
<http://www.bild.me/bild.php?file=3369563helloworld04.jpg>

The main issues to deal with are:
o OEM USB Drivers for your phone (I had driver issues but surmounted them)
o Phone set to USB Debugging Mode (already a basic setup for most users)
o Android Studio (freeware, easily installed & seemingly powerful)
o Android SDK (Android Studio handles this well)
o Java (Android Studio handles this well, at least for Hello World)

Getting a "hello world" to work on an Android phone may sound like an
accomplishment, but it's not really that much since all you do is punch
buttons, given that the Google Android Studio freeware literally writes the
entire app for you.
<https://developer.android.com/studio/>

What takes the hour elapsed time is that Android Studio downloads a
separate SDK, and a few other things, plus there was, in my case, a minor
hardware emulation issue on my old desktop, and a USB debugging issue
(perhaps because I've been playing a lot with my USB MTP drivers lately).
<https://groups.google.com/forum/#!topic/comp.mobile.android/SHR2YmpfVwo>

The installation of Android Studio takes about an hour to download stuff:
<https://developer.android.com/studio/install>

You want to plan ahead to decide where you want to put things though:
o Studio: c:\app\hardware\android\studio\
o SDK: c:\app\hardware\android\sdk\
o Projects: c:\tmp\android\projects\myfirstapp\
o c:\users\<you>\.android\ (I'm not sure why stuff was put here)
o c:\users\<you>\.AndroidStudio3.2\ (I'm not sure why stuff is here)
etc.

My main noob mistake was to keep this default, which I should have removed:
[x]Performance Intel HAXM
Hardware-assisted virtual engine to speed up Android app emulation

Another noob mistake I made was that I had to re-install the original
OEM (LG Stylo 3 Plus) USB drivers before Android Studio could see it:
<https://developer.android.com/studio/run/oem-usb#Drivers>

Even though Windows had no problem seeing the phone over USB, Android
Studio didn't see the phone until I installed the OEM LG drivers from
<https://developer.android.com/studio/run/oem-usb#Drivers>

Specifically the LG TP450 driver for the $130 LG Stylo 3 Plus:
<https://www.lg.com/us/support/software-firmware-drivers?search=lg+tpe450#>=

Then all you do is follow their step by step tutorial which just works:
<https://developer.android.com/training/basics/firstapp/>

This is my first (baby) step to writing simple Android/iOS apps that are:
o Forever free
o No ads
o No servers
o No spyware
o Simple user interface to do a given simple job the simplest way possible
<http://www.bild.me/bild.php?file=7570013helloworld01.jpg>

One catch-22 was that emulation required hardware acceleration, but that
wouldn't work for me, so I can _only_ run on the phone right now (which
isn't too bad, for now) until I figure out a way around that gotcha.

Later, I'll deal with getting a hello world to work on the iOS devices.
<https://www.androidauthority.com/developing-for-android-vs-ios-697304/>

Diesel

unread,
Oct 27, 2018, 1:39:50 AM10/27/18
to
Arlen Holder <a%rlenh...@no.spam.net>
news:pr05f2$t0d$1...@news.mixmin.net Fri, 26 Oct 2018 22:45:55 GMT in
alt.comp.freeware, wrote:

> Report: My first "hello world" using Android Studio freeware on
> Windows worked just fine (total elapsed time was about an hour).
> <http://www.bild.me/bild.php?file=7570013helloworld01.jpg>
> <http://www.bild.me/bild.php?file=4072224helloworld02.jpg>
> <http://www.bild.me/bild.php?file=7646977helloworld03.jpg>
> <http://www.bild.me/bild.php?file=3369563helloworld04.jpg>

What does this have to do with alt.comp.freeware or the various other
usenet newsgroups you've spammed this to?

> The main issues to deal with are:
> o OEM USB Drivers for your phone (I had driver issues but
> surmounted them) o Phone set to USB Debugging Mode (already a
> basic setup for most users) o Android Studio (freeware, easily
> installed & seemingly powerful) o Android SDK (Android Studio
> handles this well) o Java (Android Studio handles this well, at
> least for Hello World)

These are only issues for people like you who don't know what you're
doing and don't bother reading documentation. Others who download it
realize it's a programming environment and are most likely well aware
of the 'main issues' you had trouble with, and likely won't require
help dealing with them. Unlike yourself.

> The installation of Android Studio takes about an hour to download
> stuff:
> <https://developer.android.com/studio/install>

Nopers, not for me it didn't. More like 20 minutes or so. You must
have a shitty amount of bandwidth allocated to you. I'll have 1gbit
input to my home and office very soon for the same price as I'm
paying now for the 100mbit connection I have at both places; which is
quite nice considering.

> You want to plan ahead to decide where you want to put things
> though

Coders and/or serious programmers already do this when we setup the
compiler/programming package(s) we're using. I don't know why you
feel it necessary to re-invent the wheel here. And again, don't know
why you felt it necessary to include all of these groups:

comp.mobile.android
alt.comp.freeware
microsoft.public.windowsxp.general

What the fuck does windows XP general (especially considering that
your previous comments in another thread concerning XP entirely
dismiss it as old news) have to do with your recent discovery here?

> My main noob mistake was to keep this default, which I should have
> removed:

No, it wasn't. You've made much better noob mistakes. Your first one
was calling me a moron when I've been a certified (having multiple
certifications) professional computer repair technician for over two
decades. Have you succesfully gotten a drive letter to represent
either the internal and/or external memory on your phone yet? It's
been almost two weeks since your first thread creation asking how.

> Another noob mistake I made was that I had to re-install the
> original OEM (LG Stylo 3 Plus) USB drivers before Android Studio
> could see it:
> <https://developer.android.com/studio/run/oem-usb#Drivers>

That wasn't actually necessary. Your system had the physical files
from your previous installation. It was missing the registry
settings.

> Even though Windows had no problem seeing the phone over USB,
> Android Studio didn't see the phone until I installed the OEM LG
> drivers from
> <https://developer.android.com/studio/run/oem-usb#Drivers>
>
> Specifically the LG TP450 driver for the $130 LG Stylo 3 Plus:
> <https://www.lg.com/us/support/software-firmware-drivers?search=lg
> +tpe450#>=

That only applies to your stylus, due to the firmware revision your
using. Others may/may not have to do the same. Still yet, they may
have to select other 'generic' drivers to use their Android product.

Do you understand yet, Arlen that not all Android devices are created
equally? Or, do you need more time and yet more examples of that
before it sinks in?

> Then all you do is follow their step by step tutorial which just
> works:
> <https://developer.android.com/training/basics/firstapp/>
>
> This is my first (baby) step to writing simple Android/iOS apps
> that are:

Ayep, baby step. You haven't got the foggiest idea what you're doing.
Do you expect to pickup coding (well, scripting, even if it's java)
overnight or something? Are you planning to make the next great thing
in a couple of days time? You don't have the experience yet to write
code at the level I and many of my peers do, Arlen.

In other words, I don't expect to see freeware created entirely by
you anytime soon. Perhaps, you'll release something 2019 or first
part of 2020 if you keep with it. At the rate you're going getting a
drive letter to represent internal/external memory on an Android
phone over wifi and/or usb though, it's looking more like 2020...


> One catch-22 was that emulation required hardware acceleration,
> but that wouldn't work for me, so I can _only_ run on the phone
> right now (which isn't too bad, for now) until I figure out a way
> around that gotcha.

*yawn* I didn't know usenet was your personal journal?



--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit here:
https://tekrider.net/pages/david-brooks-stalker.php
===================================================
110 people once tied for second prize in the Powerball Lottery after
playing the same lucky numbers from a fortune cookie.

Arlen Holder

unread,
Oct 27, 2018, 4:38:53 AM10/27/18
to
On Sat, 27 Oct 2018 05:39:49 -0000 (UTC), Diesel wrote:

> What does this have to do with alt.comp.freeware or the various other
> usenet newsgroups you've spammed this to?

It's all about Windows & Android freeware, whether you realize it or not:
o It's a test of Android Studio freeware (which downloads SDK freeware)
o And it's about _writing_ Android freeware that does not yet exist

The whole reason I tried the Windows freeware was so that I could overcome
basic issues with current Android freeware, such as the fact that Android
doesn't have non-ad, non server, non spyware, etc., freeware that...
o Sets native Screenshot file output to a folder on the external sdcard
o Creates a single press "10" minute alarm that requires no other action
o Pops up a keyboard that _defaults_ to the microphone (for God's sake!)
o Camera that works better with gloves under a vehicle in awkward positions
o Outputs an editable file of all apps installed & versions & URLs
o Single press surreptitious recording of ambient conversations
o Keyword-driven locally processed custom virtual assistant
etc.
As per this recent thread:
What are the most fundamental basic apps that are (apparently) lacking on Android?
<https://groups.google.com/forum/#!topic/comp.mobile.android/SZk_fXWqg88>

> Nopers, not for me it didn't. More like 20 minutes or so. You must
> have a shitty amount of bandwidth allocated to you.

You might have cable. We are too far away from civilization for that.

There are no wires or pipes that come or go from my house to a "public
utility" other than the power lines (and even they fall down about a dozen
times a year, which is a perennial beef we have with our power company).

And we have both a femtocell & a cellular repeater for our cell signal:
<http://www.bild.me/bild.php?file=8809135cellular01.jpg>
Which I've tested to see which works best in which room of the house:
<http://www.bild.me/bild.php?file=8831319cellular04.jpg>
Where we get pretty good at cellular & WiFi signal-debugging freeware:
<http://www.bild.me/bild.php?file=3792112cellular02.jpg>
But if you know of better WiFi debugging freeware, please let us know:
<http://www.bild.me/bild.php?file=1851937cellular03.jpg>
Because we're _always_ looking for better WiFi & cellular debug freeware!
<http://www.bild.me/bild.php?file=1793606cellular07.jpg>

> I'll have 1gbit
> input to my home and office very soon for the same price as I'm
> paying now for the 100mbit connection I have at both places; which is
> quite nice considering.

Our net speeds are nothing like yours with cable at the price you pay.

Our WISP Internet comes through the air from quite a few miles away, so
we're all pretty good at setting up radio antennas, and our plots are
large, so we have plenty of spare radios where I personally have about a
dozen access points like this one scattered about the house and property:
<http://www.bild.me/bild.php?file=5562233cellular06.jpg>

> Ayep, baby step. You haven't got the foggiest idea what you're doing.
> Do you expect to pickup coding (well, scripting, even if it's java)
> overnight or something? Are you planning to make the next great thing
> in a couple of days time? You don't have the experience yet to write
> code at the level I and many of my peers do, Arlen.

While we're both very old men, the big difference between me, and you,
Diesel, is that I'm an average adult of average intelligence.

Even so, I _hate_ coding, where the _last_ time I wrote in a bona-fide
programming language (not just shell scripts) was when I took COBOL, PL/1
(yes, this is before "C"), IBM Assembly language (yes, in the days when
"duplex" was a big deal), and Fortran (yes, before Fortran 77 even
existed).

I hated "write(x,y)" statements then, and I'd likely hate them now. :)
Same with "Error 42" codes that we looked up in a big fat book outside the
paper output bins and the punch-card readers.

The problem is that I hate software that doesn't do the simplest of things,
as I described above. So I'm going to see if I can write it.

All my software will always be
o freeware
o no ads
o no servers
o no spyware
o simple as can be to do a single job well

It will _always_ be provided so that _everyone_ can use it for free.
You can either help, or complain.

In short, to answer your question about freeware, this thread happens to be
o About Windows freeware
o To write Android freeware

Bill

unread,
Oct 29, 2018, 8:16:36 PM10/29/18
to
In message <pr05f2$t0d$1...@news.mixmin.net>, Arlen Holder
<a%rlenh...@no.spam.net> writes
>Getting a "hello world" to work on an Android phone may sound like an
>accomplishment, but it's not really that much since all you do is punch
>buttons, given that the Google Android Studio freeware literally writes
>the
>entire app for you.
> <https://developer.android.com/studio/>

Thanks, Arlen, for posting this. I hadn't heard about it before, and it
looks as though it might be useful as a way to knock up one or two
specialist apps in the future.

I tried building the Hello World app and got it working without any
problems. But, it took me a whole afternoon on a i5-2520M laptop with
8GB of ram, and during that time everything else on the machine became
almost totally unresponsive. The processor appears to support HAXM, but
I missed the place to check to install this.
Everything was so slow that I kept thinking the installation/build had
crashed.

Can I ask the spec of your old desktop?
--
Bill

---
This email has been checked for viruses by AVG.
https://www.avg.com

Arlen Holder

unread,
Oct 30, 2018, 3:51:21 PM10/30/18
to
On Tue, 30 Oct 2018 00:14:40 +0000, Bill wrote:

> Thanks, Arlen, for posting this. I hadn't heard about it before, and it
> looks as though it might be useful as a way to knock up one or two
> specialist apps in the future.

Thank you Bill for posting that it helped you, as that's my goal, which is
to help everyone at the same time that I help myself. I've always been that
way, so I'm completely different than most people who are only about
themselves.

Maybe we can help each other.
I am hoping to use Android Studio to write a "beep in ten minutes app".

Here's my current status of the "hello world" in Android Studio:
<http://www.bild.me/bild.php?file=9210567androidstudio05.jpg>
Where this is the result on the Android Nougat 7.0 LG Stylo 3 Plus:
<http://www.bild.me/bild.php?file=2116419androidstudio06.jpg>

I haven't spent a lot of time with Android Studio (just that first hello
world), but I'm willing to get the first app to work, which, I hope to be a
simple timer app that has the fewest buttons possible, and that goes away
and of course, no ads, no servers, no spyware, nothing but the basic app.
- Press here to beep in 5 minutes (and then go away until beep).
- Press here to beep in 10 minutes (and then go away until beep).
- Press here to beep in 30 minutes (and then go away until beep).
- Press here to beep in 1 hour (and then go away until beep).
- Enter the time to beep [___]minutes (and then go away until beep).
etc.

The _great_ news about Android Studio is that it literally _writes_ your
first app for you and puts it on your phone, and the app actually works!

From there, it's learning how to add bits and buttons. :)
Layout file:
Source file:

> I tried building the Hello World app and got it working without any
> problems.

Good for you. I can't get the emulation to work on my old Win10 desktop.
<http://www.bild.me/bild.php?file=5625744androidstudio01.jpg>
But the app works perfectly on the phone (Nougat LG Stylo 3 Plus, 64GB).

Here's the error I get during emulation:
<http://www.bild.me/bild.php?file=3629764androidstudio03.jpg>
o Emulator: emulator: ERROR: x86 emulation currently requires hardware acceleration!
o Emulator: Warning: Quick Boot / Snapshots not supported on this machine. A CPU with EPT + UG features is currently needed. We will address this in a future release.
o Emulator: Process finished with exit code 1
o Gradle build finished in 1 m 15 s 77 ms

> But, it took me a whole afternoon on a i5-2520M laptop with
> 8GB of ram, and during that time everything else on the machine became
> almost totally unresponsive.

Truth be told, all DIYs are "idealized" in that they take longer than the
person said they did, where my initial efforts also took longer.

I just said an hour as a guess, but I let it run and so the elapsed time
was overnight but I didn't calculate exactly how much time was idle so I
"assumed" about an hour of actual actions (but it was likely longer).

In reality, I agree with you that it takes longer, so double that, or
triple that or something, but Diesel's assessment of '20 minutes' is just
dead wrong, and unachievable, I would think. (Diesel is always trying to
prove how smart he is so take anything he says with a grain of salt.)

I have no desire to prove I'm smart, so I have no problems admitting when I
screw up, or when I'm wrong, or when I'm ignorant of something, so you can
trust me more than you can trust most people who can't admit when they're
stupid.

If I were to have a gun put to my head, I'd assess the time at, oh, a "few"
hours, so the "whole afternoon" seems reasonable to me, as it does have to
download and then unpack a _lot_ of stuff the first time around (and the
Google site is super sloooooooooooooooooow where it gets stuff from).

> The processor appears to support HAXM, but
> I missed the place to check to install this.

I first had HAXM (whatever that is) turned on by Android Studio by default,
and then I had to turn it off so when I re-installed Android Studio (which
takes less time than the first install because the SDK is already there by
then), I turned off the HAXM (whatever that is).

I think you won't _see_ the Android Studio HAXM setting unless you ask to
do a _custom_ install.

I have no idea what HAXM is, by the way, and I didn't google it because
HAXM isn't what I want to do right now. If you have a clue what HAXM is,
and how to tell if my machine has it, that would be useful, but don't go to
any trouble unless you already know offhand as I could look it up.

> Everything was so slow that I kept thinking the installation/build had
> crashed.

The zip files from Google take a looooooooooong time to download. I just
walked away and came back later, so my _elapsed_ time was likely as long as
yours was (I didn't actually count the time).

> Can I ask the spec of your old desktop?

Sure. Ask anything. We can help each other.

My old desktop has 16GB of RAM, so that's the one good thing, and it's
Win10, so that's another good thing, but everything else is just old. It's
an HP Pavilion P6230, 2.6Hhz, AMD Phenom2 CPU, with an Nvidia graphics
card. Nothing fancy.

I'm working on simply getting the "hello world" button to beep.
<https://developer.android.com/training/basics/firstapp/building-ui>
Here's the crappy look at the moment, but it's my first button.
<http://www.bild.me/bild.php?file=3610557androidstudio04.jpg>
The buttons don't do anything yet, but they'll eventually ring an alarm:
<http://www.bild.me/bild.php?file=2116419androidstudio06.jpg>

If we can work together on something like this, or if others have a
suggestion, it would be nice to get a handful of interested folks to pick a
SIMPLE action (like ring a bell) and then work together toward that goal.

That would make Usenet very useful, don't you think?

Arlen Holder

unread,
Oct 30, 2018, 4:13:41 PM10/30/18
to
On Tue, 30 Oct 2018 19:51:20 -0000 (UTC), Arlen Holder wrote:

> I think you won't _see_ the Android Studio HAXM setting unless you ask to
> do a _custom_ install.

Hi Bill,

Does your Windows computer motherboard have an Intel CPU or AMD CPU?
<http://www.bild.me/bild.php?file=3945600androidstudio07.jpg>

Apparently, "HAXM" isn't on Windows, by default, nor, apparently, will it
install on AMD computers (which mine is).
o Intel Virtualization Technology (VT, VT-x, vmx) extensions
o AMD Virtualization (AMD-V, SVM) extensions (only supported for Linux)

If your motherboard has an Intel CPU, this HAXM information may help you.

Installation instructions for installing HAXM on Windows
<https://github.com/intel/haxm/wiki/Installation-Instructions-on-Windows>

Download software for Intel Hardware Accelerated Execution Manager
<https://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager-intel-haxm>

Diesel

unread,
Oct 31, 2018, 1:51:26 AM10/31/18
to
Arlen Holder <a%rlenh...@no.spam.net>
news:pracn5$el0$1...@news.mixmin.net Tue, 30 Oct 2018 19:51:20 GMT in
alt.comp.freeware, wrote:

>> But, it took me a whole afternoon on a i5-2520M laptop with
>> 8GB of ram, and during that time everything else on the machine
>> became almost totally unresponsive.
>
> Truth be told, all DIYs are "idealized" in that they take longer
> than the person said they did, where my initial efforts also took
> longer.
>
> I just said an hour as a guess, but I let it run and so the
> elapsed time
> was overnight but I didn't calculate exactly how much time was
> idle so I "assumed" about an hour of actual actions (but it was
> likely longer).
>
> In reality, I agree with you that it takes longer, so double that,
> or triple that or something, but Diesel's assessment of '20
> minutes' is just dead wrong, and unachievable, I would think.
> (Diesel is always trying to prove how smart he is so take anything
> he says with a grain of salt.)

Incorrect. Are either of you familiar with 8th and now, 9th gen
unlocked Intel processors? You both might want to educate yourselfs a
bit. Lookup the specs to an i7-8700K and tell me I'm full of shit,
again. :) Not only that, but I've got full (as in, actually have it)
100mbit cable modem to house and office. I'm not pissing in the wind
on DSL or wifi here, I've got real bandwidth and I'm about to have
1gbit capacity at both places very soon. Essentially as soon as the
new modems get here and I install them.

> I have no desire to prove I'm smart, so I have no problems
> admitting when I screw up, or when I'm wrong, or when I'm ignorant
> of something, so you can trust me more than you can trust most
> people who can't admit when they're stupid.

You might want to use a dictionary and lookup the word stupid. Then
lookup the word, Dumb. Everyone suffers from the latter in something,
but, if you suffer from the former, there's no fix for that. And I
can't very well do what I've done for a living (decades) if I were
stupid.

> If I were to have a gun put to my head, I'd assess the time at,
> oh, a "few" hours, so the "whole afternoon" seems reasonable to
> me, as it does have to download and then unpack a _lot_ of stuff
> the first time around (and the Google site is super
> sloooooooooooooooooow where it gets stuff from).
>
>> The processor appears to support HAXM, but
>> I missed the place to check to install this.
>
> I first had HAXM (whatever that is) turned on by Android Studio by
> default, and then I had to turn it off so when I re-installed
> Android Studio (which takes less time than the first install
> because the SDK is already there by then), I turned off the HAXM
> (whatever that is).

Your box can't support HAXM regardless of you having it turned on, or
off. And you call me stupid? Yea.. okay.

> I have no idea what HAXM is, by the way, and I didn't google it
> because HAXM isn't what I want to do right now. If you have a clue
> what HAXM is, and how to tell if my machine has it, that would be
> useful, but don't go to any trouble unless you already know
> offhand as I could look it up.

You *can't* 'do HAXM'. it's NOT a feature of AMD, shit for brains.
It's an Intel thing.

> The zip files from Google take a looooooooooong time to download.
> I just walked away and came back later, so my _elapsed_ time was
> likely as long as yours was (I didn't actually count the time).

Because of your particular connection to the internet, it took so
long. I'm using full on 100mbit here. My dl/ul speeds are nothing
like yours. I could easily (as in, seriously, easily) overload your
connection and saturate your happy ass with a simple ping flood and I
wouldn't even notice the loss of bandwidth. I wouldn't actually do
something as trivial and lame, but, I could. easily enough.

>> Can I ask the spec of your old desktop?
>
> Sure. Ask anything. We can help each other.
>
> My old desktop has 16GB of RAM, so that's the one good thing, and
> it's Win10, so that's another good thing, but everything else is
> just old. It's an HP Pavilion P6230, 2.6Hhz, AMD Phenom2 CPU, with
> an Nvidia graphics card. Nothing fancy.

*puke* it's a pile of shit.


> If we can work together on something like this, or if others have
> a suggestion, it would be nice to get a handful of interested
> folks to pick a SIMPLE action (like ring a bell) and then work
> together toward that goal.

You might be able to do that, if you can keep your unprofessional
personal attacks at bay.



--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit here:
https://tekrider.net/pages/david-brooks-stalker.php
===================================================
The most beautiful adventures aren't those we go to seek-
R.L.Stevenson

Diesel

unread,
Oct 31, 2018, 1:51:27 AM10/31/18
to
Arlen Holder <a%rlenh...@no.spam.net>
news:prae1i$gqd$1...@news.mixmin.net Tue, 30 Oct 2018 20:13:41 GMT in
alt.comp.freeware, wrote:

> Hi Bill,
>
> Does your Windows computer motherboard have an Intel CPU or AMD
> CPU?
> <http://www.bild.me/bild.php?file=3945600androidstudio07.jpg>
>
> Apparently, "HAXM" isn't on Windows, by default, nor, apparently,
> will it install on AMD computers (which mine is).
> o Intel Virtualization Technology (VT, VT-x, vmx) extensions
> o AMD Virtualization (AMD-V, SVM) extensions (only supported for
> Linux)
>
> If your motherboard has an Intel CPU, this HAXM information may
> help you.

Did you miss this part?


Message-ID: <Pz3jrhdw...@end.of.the.universe>

But, it took me a whole afternoon on a i5-2520M laptop with
8GB of ram, and during that time everything else on the machine
became almost totally unresponsive. The processor appears to support
HAXM, but I missed the place to check to install this.

***end snippit paste

Do you see the i5? That's an Intel designation. He has (wait for it)
an Intel based system. Do watch who you refer to as dumb, ignorant,
stupid, or any other choice assinine comments you have for others,
next time around; n00b.


--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit here:
https://tekrider.net/pages/david-brooks-stalker.php
===================================================
Modem: A great deterrent to phone solicitors

Diesel

unread,
Oct 31, 2018, 1:51:29 AM10/31/18
to
Arlen Holder <a%rlenh...@no.spam.net>
news:pr186r$m6i$1...@news.mixmin.net Sat, 27 Oct 2018 08:38:52 GMT in
alt.comp.freeware, wrote:

> On Sat, 27 Oct 2018 05:39:49 -0000 (UTC), Diesel wrote:
>
>> What does this have to do with alt.comp.freeware or the various
>> other usenet newsgroups you've spammed this to?
>
> It's all about Windows & Android freeware, whether you realize it
> or not: o It's a test of Android Studio freeware (which downloads
> SDK freeware) o And it's about _writing_ Android freeware that
> does not yet exist

Fair enough. What does it have to do with Windows XP specifically
though? You've previously dismissed WIndows XP as being irrelevant in
this day and age. You incorrectly assume that no person and/or
business still makes use of it. In fact, you really have no idea how
much in use it still is.

alt.comp.freeware isn't actually a programming newsgroup though. I
don't know if the others you've selected are, but, alt.comp.freeware
isn't. There are newsgroups specifically for discussing programming
in a wide variety of languages. You may want to check and see if your
news server(s) carry one or more. You may find help more specifically
tailored towards programming on them.

>> Nopers, not for me it didn't. More like 20 minutes or so. You
>> must have a shitty amount of bandwidth allocated to you.
>
> You might have cable. We are too far away from civilization for
> that.

Indeed, I do. Spectrum. I've also got a spiffy Intel box that I used
to examine the SDK with; hence my times aren't anything like yours.
The intel box I used has all the requirements and then some... :)

If it helps, it's an i7-8700K (that's an unlocked chip my friend)
with 32gigs of gskill ram running at 3400 in pairs. (2x16) With a
half tb SSD drive that was used for the download and install. [g]
Sitting on an MSI z370 pro series mainboard, WD drives, EVGA super
nova 1kw power supply. Nvidia 2080K series (gross overkill and has
nothing to do with the Android SDK)..

Yes, it's liquid cooled; as in refrigerant with a small compressor
just like you'd find on your window based air conditioner unit. It
easily cruises upto 5ghz and remains stable as fuck, thanks to that
cooling system. I've got *alot more* CPU horsepower than your AMD
phenom 2 ever even thought about. And that's just ONE machine here.
suffice to say, it's a fucking monster.

I've got more cores, more threads on each core, and a shitload more
cache as well as clock cycles. Your AMD can't touch it. One of the
perks of being a certified technician, you actually know WTF you're
doing and are more than capable of spec'ing a build as well as final
assembly. I can do it in my damn sleep.

> Our net speeds are nothing like yours with cable at the price you
> pay.

No, they aren't. I have a package deal at both places, so, I'm not
paying much for what I'm getting.

> While we're both very old men, the big difference between me, and
> you, Diesel, is that I'm an average adult of average intelligence.

That's just one difference. That being said, I would like to see the
post I wrote to you where I ever claimed I was a genius? I'm not an
idiot, by no means, but... genius? That depends on what you consider
genius to be and in what field specifically. Or trait.

> It will _always_ be provided so that _everyone_ can use it for
> free. You can either help, or complain.

Actually, I have a third option. I can choose to do neither. :)



--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit here:
https://tekrider.net/pages/david-brooks-stalker.php
===================================================
There's always more going on than you think. And it's always worse
than you imagine.

Arlen Holder

unread,
Oct 31, 2018, 3:26:02 AM10/31/18
to
On Wed, 31 Oct 2018 05:51:26 -0000 (UTC), Diesel wrote:

> Do watch who you refer to as dumb, ignorant,
> stupid, or any other choice assinine comments you have for others,
> next time around; n00b.

This post is for Bill, where it is apparently considered normal for it to
take a long time for Android Studio to initially set itself up for you.
<http://www.ntu.edu.sg/home/ehchua/programming/Android/Android_HowTo.html>
Notice that site agrees with you, Bill, in that:
"The installation and many operations take a LONG time to complete."
"It takes time - from 30 minutes to n hours to forever."

While the Android Studio IDE takes care of everything, here are the parts:
1. Java JDK (includes JRE)
<https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html>
(The Android Studio IDE will download & unpack the JDK for you.)
2. Android SDK
<https://developer.android.com/sdk/older_releases>
(The Android Studio IDE will download & unpack the SDK for you.)
3. Android Studio IDE
<https://developer.android.com/studio/install>
(This is all you need since it will set up the SDK & JDK for you.)

Bill

unread,
Oct 31, 2018, 6:56:18 AM10/31/18
to
In message <pracn5$el0$1...@news.mixmin.net>, Arlen Holder
<a%rlenh...@no.spam.net> writes
>On Tue, 30 Oct 2018 00:14:40 +0000, Bill wrote:
>
>> Thanks, Arlen, for posting this. I hadn't heard about it before, and it
>> looks as though it might be useful as a way to knock up one or two
>> specialist apps in the future.
>
>Thank you Bill for posting that it helped you, as that's my goal, which is
>to help everyone at the same time that I help myself. I've always been that
>way, so I'm completely different than most people who are only about
>themselves.
>
>Maybe we can help each other.

That all sounds good, and I'm happy to give it a go, although I'm unsure
how much I can contribute.
Just so we understand each other, I am not young and in the '70'sgot in
to building hardware based devices using Z80 and earlier processors. I
bypassed cp/m and worked with MS based PC's for years, doing some C++
(related to broadcasting work) programming, then retired.
Since then, I have spent some time helping friends with their PC
problems and, more recently, reviving decrepit laptops to give to family
and friends when they had computing emergencies. Currently we have a
family crisis and are looking after an awkward elderly relative, so I'm
dividing my time between urgently trying to clear the house of years of
accumulated computer, boatbuilding and musical junk and trying to keep
vaguely up to date with things - hence my interest in trying to learn
about Android. I should have time to do and learn something, but there
are long periods when life gets in the way.


>I am hoping to use Android Studio to write a "beep in ten minutes app".
>
>Here's my current status of the "hello world" in Android Studio:
> <http://www.bild.me/bild.php?file=9210567androidstudio05.jpg>
>Where this is the result on the Android Nougat 7.0 LG Stylo 3 Plus:
> <http://www.bild.me/bild.php?file=2116419androidstudio06.jpg>
>
>I haven't spent a lot of time with Android Studio (just that first hello
>world), but I'm willing to get the first app to work, which, I hope to be a
>simple timer app that has the fewest buttons possible, and that goes away
>and of course, no ads, no servers, no spyware, nothing but the basic app.
>- Press here to beep in 5 minutes (and then go away until beep).
>- Press here to beep in 10 minutes (and then go away until beep).
>- Press here to beep in 30 minutes (and then go away until beep).
>- Press here to beep in 1 hour (and then go away until beep).
>- Enter the time to beep [___]minutes (and then go away until beep).
>etc.

That all sounds like something I would be interested in "helping" with.
>
>The _great_ news about Android Studio is that it literally _writes_ your
>first app for you and puts it on your phone, and the app actually works!
>
>From there, it's learning how to add bits and buttons. :)
>Layout file:
>Source file:

Yes. Latterly with C++, I used Borland C++ Builder, which helped with
the heavy lifting in a similar way.
>
>> I tried building the Hello World app and got it working without any
>> problems.
>
>Good for you. I can't get the emulation to work on my old Win10 desktop.
> <http://www.bild.me/bild.php?file=5625744androidstudio01.jpg>
>But the app works perfectly on the phone (Nougat LG Stylo 3 Plus, 64GB).
>
>Here's the error I get during emulation:
> <http://www.bild.me/bild.php?file=3629764androidstudio03.jpg>
>o Emulator: emulator: ERROR: x86 emulation currently requires hardware
>acceleration!
>o Emulator: Warning: Quick Boot / Snapshots not supported on this
>machine. A CPU with EPT + UG features is currently needed. We will
>address this in a future release.
>o Emulator: Process finished with exit code 1
>o Gradle build finished in 1 m 15 s 77 ms

I have it working both on the Android 6 phone ( cheap generic badged
THL) and the emulator. The current base machine is, indeed, an Intel
based Lenovo X220T (tablet) laptop, but see below. I suspect that the
hardware acceleration referred to is the HAXM feature of Intel.
>
<Snip>
>
>I have no desire to prove I'm smart, so I have no problems admitting when I
>screw up, or when I'm wrong, or when I'm ignorant of something, so you can
>trust me more than you can trust most people who can't admit when they're
>stupid.
>
I'm ignorant of most Android's workings, and also have always had a
terrible memory, so am very likely to appear slow most of the time.
>
>I'm working on simply getting the "hello world" button to beep.
> <https://developer.android.com/training/basics/firstapp/building-ui>
>Here's the crappy look at the moment, but it's my first button.
> <http://www.bild.me/bild.php?file=3610557androidstudio04.jpg>
>The buttons don't do anything yet, but they'll eventually ring an alarm:
> <http://www.bild.me/bild.php?file=2116419androidstudio06.jpg>
>
>If we can work together on something like this, or if others have a
>suggestion, it would be nice to get a handful of interested folks to pick a
>SIMPLE action (like ring a bell) and then work together toward that goal.
>
>That would make Usenet very useful, don't you think?

I have, in the past, worked with other people, but usually via email. It
would be interesting to see if this could work on usenet. If we did
this, I think the cross-posting might be a problem. I am only on
comp.mobile.android.

I haven't done anything more with Android Studio, but today's plan is to
install from scratch on a different machine (older generation Intel i3
processor) to free up the main machine again. This will take time!

BurfordTJustice

unread,
Oct 31, 2018, 7:11:06 AM10/31/18
to
past name calling you have nothing as usual...LOL!!




"Diesel" <m...@privacy.net> wrote in message
news:XnsA98C14...@3Y3w3.zZV3L2KG.TO...
: Arlen Holder <a%rlenh...@no.spam.net>

BurfordTJustice

unread,
Oct 31, 2018, 7:12:44 AM10/31/18
to
Still only 2 bit "brag" and name calling...LOL







"Diesel" <m...@privacy.net> wrote in message
news:XnsA98C14...@3Y3w3.zZV3L2KG.TO...
: Arlen Holder <a%rlenh...@no.spam.net>

Bill

unread,
Nov 1, 2018, 8:21:27 AM11/1/18
to
On 31/10/2018 07:26, Arlen Holder wrote:
> This post is for Bill, where it is apparently considered normal for it to
> take a long time for Android Studio to initially set itself up for you.
> <http://www.ntu.edu.sg/home/ehchua/programming/Android/Android_HowTo.html>
> Notice that site agrees with you, Bill, in that:
> "The installation and many operations take a LONG time to complete."
> "It takes time - from 30 minutes to n hours to forever."

Here is where I'm up to.

I moved from the Lenovo X220T machine to an older X201 - Intel i3 (1st
generation) and have started again.
Setting up Android studio seemed much quicker this time - somewhere
around 1.5 hours. No obvious reason why.

The Hello World app was set up quickly onto an emulated phone. All fine
except for a warning that there had been reports of instability of the
drivers for my Intel GPU when displaying the emulator. It looked OK and
I'm using the latest drivers.

Started the button and text box next stage of the app and all went well
until I reached the end of the "Make the text box size flexible"
section, where suddenly both the text box and button vanished from the
blueprint display. Edit->Undo didn't bring them back. I don't think this
is a graphics problem.

I have now started again, but with, hopefully, all the files in a real
directory rather than the stupid Windows Users directories. This might
make it simpler to poke around and understand where some of the files
are and what they do.

I'm in the UK. back in the mists of time I took a Java course at
Liverpool University. It is now clear that I have forgotten all of it!

Diesel

unread,
Nov 1, 2018, 7:44:10 PM11/1/18
to
Arlen Holder <a%rlenh...@no.spam.net>
news:prble9$utq$1...@news.mixmin.net Wed, 31 Oct 2018 07:26:01 GMT in
alt.comp.freeware, wrote:

> On Wed, 31 Oct 2018 05:51:26 -0000 (UTC), Diesel wrote:
>
>> Do watch who you refer to as dumb, ignorant,
>> stupid, or any other choice assinine comments you have for
>> others, next time around; n00b.
>
> This post is for Bill

So you responded to me specifically (and snipped a considerable
amount of my post, clearly showing your ignorance concerning the
machine Bill already told you he had as well as HAXM, etc. [g])
for what reason, then?

Here's what you snipped for reasons not known to me...:

Did you miss this part?


Message-ID: <Pz3jrhdw...@end.of.the.universe>

But, it took me a whole afternoon on a i5-2520M laptop with
8GB of ram, and during that time everything else on the machine
became almost totally unresponsive. The processor appears to support
HAXM, but I missed the place to check to install this.

***end snippit paste

Do you see the i5? That's an Intel designation. He has (wait for it)
an Intel based system.

One could say you practically edited my post prior to responding to
it, intending the reply to be for another person? You know what that
smells like, right, Arlen?

, where it is apparently considered normal
> for it to take a long time for Android Studio to initially set
> itself up for you.

It depends on several variables, as I already wrote above...

Now, for the purposes of downloading, just to show you how wrong and
off base you actually are...

The main .zip file, downloaded from the 3rd url you provided (on
linux of course) was 1004 or so megabytes in size. Average dl speed
was just under 23megabytes (yea, megabytes) a second.

The oracle SDK linuxx64 bit rpm package was 168megs and took roughly
35 seconds or so to leech. The megabytes bounced from just below 12
to averaging out at around 4.5 for the remainder.

grabbed the largest sdk from your older versions url. 248megs, got in
less than 25 seconds. rofl.

The remainder of the 20 minutes, give or take a few; I was doing
several things at once at the time on various machines here was spent
doing the actual 'installation' phases. So yea, within 20 minutes or
so, I was up and running, IDE open on the primary desktop screen,
ready for use. That's a properly cooled and configured, I7-8700K for
you.

Installation times (not dl times) would vary if I were to install it
on various other machines here, due to hardware specification
differences and only that. Bandwidth isn't the issue. [g]

> <http://www.ntu.edu.sg/home/ehchua/programming/Android/Android_How
> To.html>
> Notice that site agrees with you, Bill, in that:
> "The installation and many operations take a LONG time to
> complete." "It takes time - from 30 minutes to n hours to
> forever."

The site doesn't disagree with me, either, Arlen. The entire time
table is an estimate. It depends on several variables which most
likely, would exceed your level of expertise to delve into. Suffice
to say,

> While the Android Studio IDE takes care of everything, here are
> the parts: 1. Java JDK (includes JRE)
> <https://www.oracle.com/technetwork/java/javase/downloads/jdk8-d
> ownloads-2133151.html> (The Android Studio IDE will download &
> unpack the JDK for you.)
> 2. Android SDK
> <https://developer.android.com/sdk/older_releases>
> (The Android Studio IDE will download & unpack the SDK for
> you.)
> 3. Android Studio IDE
> <https://developer.android.com/studio/install>
> (This is all you need since it will set up the SDK & JDK for
> you.)

Yep. It doesn't take very long for me to download or install it on
the machine I provided some specs on previously, Arlen. What you
wrote below is entirely, false. Further, you yourself provided time
table estimates which DIRECTLY CONTRADICT what you wrote and yet,
support what I told you, the first time. What you specifically
attacked me for in this snippit of one of your posts, below:

MID: <pracn5$el0$1...@news.mixmin.net>

In reality, I agree with you that it takes longer, so double that,
or triple that or something, but Diesel's assessment of '20 minutes'
is just dead wrong, and unachievable, I would think. (Diesel is
always trying to prove how smart he is so take anything he says with
a grain of salt.)

** end snippit

You have an older machine which has an older cpu that you prior to a
few days ago, knew next to nothing about. You didn't even know that
it couldn't possibly support HAXM regardless of your desire to
enable/disable it.

MID: <pracn5$el0$1...@news.mixmin.net>

I have no desire to prove I'm smart, so I have no problems admitting
when I screw up, or when I'm wrong, or when I'm ignorant of
something, so you can trust me more than you can trust most people
who can't admit when they're stupid.

*** end snippit

When do you plan to admit you were wrong and screwed up quite badly
here? You went out of your way to attack me in a reply supposedly
written for Bill. Are you going to own up to your mistake, Arlen?

As i've suggested before, You should watch whom you refer to as
stupid in the future. As, sadly, you've actually demonstrated you
suffer from it on multiple levels, yourself.

--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit here:
https://tekrider.net/pages/david-brooks-stalker.php
===================================================
System error 4C: kernel panic

Diesel

unread,
Nov 1, 2018, 7:44:10 PM11/1/18
to
"BurfordTJustice" <burford/asso...@uk.MI15>
news:prc2nb$1vv$1...@dont-email.me Wed, 31 Oct 2018 11:12:40 GMT in
alt.comp.freeware, wrote:

> Still only 2 bit "brag" and name calling...LOL

Burford, we already know technical subjects aren't your forte. Why the
need to embarrass yourself (further) and put on another demonstration?




--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit here:
https://tekrider.net/pages/david-brooks-stalker.php
===================================================

Arlen_Holder

unread,
Nov 1, 2018, 11:04:10 PM11/1/18
to
On Thu, 1 Nov 2018 12:21:22 +0000, Bill wrote:

> Here is where I'm up to.

Hi Bill,

I'm like you, in a way, in that I only put a few minutes per day to this
and that I'm on an older machine (very old) and that I don't know java.

> I moved from the Lenovo X220T machine to an older X201 - Intel i3 (1st
> generation) and have started again.

I started again also, this time on app02 ... which is pictured below.
<http://www.bild.me/bild.php?file=9813868app02.gif>

> Setting up Android studio seemed much quicker this time - somewhere
> around 1.5 hours. No obvious reason why.

Good for you. I've had "issues" getting back to the main GUI where I had to
delete and re-install Android Studio a few times myself, just to get back
to the point that matched the documentation I was following. :)
o activity_main.xml ==> this is what your design looks like
o MainActivity.java ==> this is your java code

BTW, I made _one_ change to the default settings:
File > Settings > Editor > General > Auto Import >
Change from:
[_]Add unambiguous imports on the fly
[_]Optimize imports on the fly (for current project)
Change to:
[x]Add unambiguous imports on the fly
[x]Optimize imports on the fly (for current project)
I'm told that will make things easier if/when problems occur.

> The Hello World app was set up quickly onto an emulated phone. All fine
> except for a warning that there had been reports of instability of the
> drivers for my Intel GPU when displaying the emulator. It looked OK and
> I'm using the latest drivers.

Good for you that it works with emulation. I found lots of people on the
net asking about AMD emulation, which, if I get around to it, I'll explore.

For now, I'm running on the actual phone, which seems to work fine for me.

> Started the button and text box next stage of the app and all went well
> until I reached the end of the "Make the text box size flexible"
> section, where suddenly both the text box and button vanished from the
> blueprint display. Edit->Undo didn't bring them back. I don't think this
> is a graphics problem.

I feel for you, in that I too have had "issues" with putting buttons and
text boxes where I want them to go. Luckily, the graphical editor is
amenable to experimentation, where those 'constraints' don't seem to take
every time (for some odd reason).
<http://www.bild.me/bild.php?file=1608334app02a.gif>

> I have now started again, but with, hopefully, all the files in a real
> directory rather than the stupid Windows Users directories.

Yup. I always put absolutely nothing in "Users" although there are two
"dot" directories that go in Users by default by the Android Studio IDE:
o c:\users\<you>\.android\ (I'm not sure why stuff was put here)
o c:\users\<you>\.AndroidStudio3.2\ (I'm not sure why stuff is here)

Here's where I put the stuff that Android Studio downloaded:
o Android Studio IDE: c:\app\hardware\android\studio\
o Java SDK: c:\app\hardware\android\sdk\
o Projects: c:\tmp\android\{app01,app02,app03,etc.}

In the Android Studio IDE, these seem to be the most important files:
Android > app
manifests = (which activity is the starter activity)
java folder (where all java code goes)
o package1 = official package
* MainActivity = *** important ***
resources
o drawable package = application icon, pictures included
o layout package = what the app looks like
* activity_main.xml = *** important ***
o values package = holds string names such as app name
* strings.xml = *** important ***

> This might
> make it simpler to poke around and understand where some of the files
> are and what they do.

I agree completely that there is a _steep_ learning curve.

Here are the critical files, as I see them, so far:
Android > app
manifests = (which activity is the starter activity)
java folder (where all java code goes)
o package1 = official package
* MainActivity =
o package2 = testing package
o package3 = testing package
resources
o drawable package = application icon, pictures included
o layout package = what the app looks like
* activity_main.xml =
o mipmap package =
o values package = holds string names such as app name
* strings.xml = where your strings are defined

> I'm in the UK. back in the mists of time I took a Java course at
> Liverpool University. It is now clear that I have forgotten all of it!

I am old. My last class was COBOL and Fortran _before_ 77 existed.
I took IBM assembly language and PL/1 before C existed (AFAIK).
But those were many decades ago. Obviously. I haven't coded since.
Coding isn't an issue though, as I can learn what I need to learn.

Luckily, so far, everything has been cut and paste and graphical:
<http://www.bild.me/bild.php?file=1608334app02a.gif>

I've almost given up on that original text tutorial, simply because I was
spending ten seconds reading a sentence and then ten minutes trying to find
the button the tutorial said to press.
<https://developer.android.com/training/basics/firstapp/>

Instead, I looked for *better* tutorials, specifically in YouTube
o EVERY step now has a graphical point-and-click direction, and,
o My rather smallish desktop monitor is freed up for the Android Studio IDE

Here are 8 Android Studio beginner tutorials I think "might" be good,
bearing in mind I sorted them by year, and I removed any that didn't sound
intelligible or useful in the first 30 seconds, so I've only skimmed this
bunch - hence consider it only the first cut of the tutorials on the net
that _may_ be useful.
----------------------------------------------------------------------------
a) 3. Introduction to Android Studio (AS 3.1.3)
by Johan Jurrius, Published on Jul 16, 2018 (mp4)
https://youtu.be/_418iSKJuOk
----------------------------------------------------------------------------
b) How to Make an Android App for Beginners
by Treehouse, Published on Apr 20, 2018 (mkv)
https://youtu.be/EOfCEhWq8sg
----------------------------------------------------------------------------
c) Android App Development for Beginners (2018 Edition):
by Daniel Malone, Published on Dec 31, 2017 (webm, mkv, mp4)
(Uses Kotlin)
https://youtu.be/LN8fBh7LH9k (part 1)
https://youtu.be/u5Gj-_ifxUo (part 2)
https://youtu.be/axwFF4oSDi8 (part 3)
https://youtu.be/ASzpxZ504Es (part 4)
https://youtu.be/GR_JtJWzh4Y (part 5)
----------------------------------------------------------------------------
d) Android Studio For Beginners Part 1, 2, 3, 4
by Bill Butterfield, Published on Jun 13, 2017 (mp4)
(It's a slightly older version of Android Studio.)
(You build a basic calculator adding app.)
https://youtu.be/dFlPARW5IX8 (part 1)
https://youtu.be/6ow3L39Wxmg (part 2)
https://youtu.be/rdGpT1pIJlw (part 3)
https://youtu.be/bu5Y3uZ6LLM (part 4)
----------------------------------------------------------------------------
e) How to Make Android Apps with Android Studio and Java - Ep 1 - Start Here
by London App Brewery, Published on Apr 20, 2017 (webm, mkv)
https://youtu.be/agk01JKps8w (part 1)
https://youtu.be/NSoFTHDHY40 (part 2)
https://youtu.be/fFzpWuHGyhc (part 3)
https://youtu.be/gSRKhxuXTw4 (part 4)
https://youtu.be/g3jPYU9wCKg (part 5)
https://youtu.be/G4SJFk8PdAc (part 6)
https://youtu.be/e_Xe4sTWxTw (part 7)
https://youtu.be/qS9rZV-Qbpk (part 8)
https://youtu.be/8IZfYuTbCnY (part 9)
https://youtu.be/A6YE5jadnGo (part 10)
https://youtu.be/YeR2y3HdO1Q (part 11)
https://youtu.be/z87fVhI4Yt0 (part 12)
https://youtu.be/xIwFd-u6yKw (part 13)
https://youtu.be/wHA0AnURQ_M (part 14)
https://youtu.be/nYqxyfKOXBw (part 15)
----------------------------------------------------------------------------
f) Android Studio Tutorial - Streaming Video
by EDMT Dev, Published on Mar 12, 2017 (webm)
https://youtu.be/oEgpGv2CF1U
----------------------------------------------------------------------------
g) Writing your first Android app - everything you need to know
by Android Authority (Gary Sims), Published on Jun 30, 2015 (webm)
https://youtu.be/mAJeK283j0I
----------------------------------------------------------------------------
h) Tutorial: Android Studio, from zero knowledge to something basic
by Jonathan Warner, Published on Feb 2, 2015 (mkv)
https://youtu.be/-igAiudpBng
----------------------------------------------------------------------------
Bill,
This tutorial from the list above seems pretty good, which makes a simple
addition calculator app, which I've been following for about an hour
o d) Android Studio For Beginners Part 1, 2, 3, 4
o by Bill Butterfield, Published on Jun 13, 2017
After about an hour of that tutorial stop and go, stop and go, stop and go,
I have this:
<http://www.bild.me/bild.php?file=9813868app02.gif>
<http://www.bild.me/bild.php?file=1608334app02a.gif>

Arlen_Holder

unread,
Nov 1, 2018, 11:33:23 PM11/1/18
to
On Wed, 31 Oct 2018 10:54:30 +0000, Bill wrote:

> hence my interest in trying to learn
> about Android. I should have time to do and learn something, but there
> are long periods when life gets in the way.

Hi Bill,
We're in the same boat, give or take, just on opposite sides of the pond.

Do you have a tablet?
o Is it Android (then it will be easy to use to get the tutorial videos)
o Or, is it iOS (like mine is, which means everything is a _lot_ harder)

Or, can you put two monitors side by side, from two different desktops?

If you have a tablet, you can download the 8 sets of tutorial videos onto
that tablet using the youtube-dl.exe Windows freeware (plus ffmpeg & C++
freeware).

For example, what I'm doing now, since my monitor is downright puny, is I
will download all those videos, en masse, and then boot momentarily to
Ubuntu 18.04, which allows me to slide the videos over to the iPad which
mounts read/write on Ubuntu essentially as a USB drive. (If your tablet is
Android, you won't have to deal with that issue of turning the iPad into a
read/write USB drive as Android already acts like a read/write USB drive
when connected to Windows).

The process for installing youtube-dl.exe is a bit complex, unfortunately:
1. Install Microsoft Visual C++ 2010 Redistributable Package (x86)
<https://www.microsoft.com/en-US/download/details.aspx?id=5555>
2. Upate Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update
<https://www.microsoft.com/en-us/download/details.aspx?id=26999>
3. Get ffmpeg
<http://ffmpeg.zeranoe.com/builds/>
Put the three executables in the same directory as the youtube-dl.exe
ffmpeg.exe
ffplay.exe
ffprobe.exe
4. Then get the right youtube-dl.exe that uses Visual C & not python!
<https://youtube-dl.org/>
<http://rg3.github.io/youtube-dl/download.html>
5. Then download a video as an OPUS file:
youtube-dl.exe http://any_url.com
6. Download a video as an MP4 file:
youtube-dl.exe -f 18 http://any_url.com
7. Download and extract just the audio as an M4A:
youtube-dl.exe -f 140 http://any_url.com
8. Download and extract just the audio as an MP3:
youtube-dl.exe -x --audio-format mp3 --audio-quality 0 http://any_ourl.com
9. Download the videos in a playlist text file:
youtube-dl.exe -ciwo "%(title)s.%(ext)s" -a playlist.txt
Where that playlist is a line-by-line set of URLs as shown below.
10. To download the 8 tutorials, you can run this freeware command:
C:\> mkdir c:\tmp\android\video
C:\> cd c:\tmp\android\video
C:\> youtube-dl.exe -ciwo "%(title)s.%(ext)s" -a download.txt
Where the "download.txt" file is the following set of 8 tutorials:
#
https://youtu.be/_418iSKJuOk
#
https://youtu.be/EOfCEhWq8sg
#
https://youtu.be/LN8fBh7LH9k
https://youtu.be/u5Gj-_ifxUo
https://youtu.be/axwFF4oSDi8
https://youtu.be/ASzpxZ504Es
https://youtu.be/GR_JtJWzh4Y
#
https://youtu.be/dFlPARW5IX8
https://youtu.be/6ow3L39Wxmg
https://youtu.be/rdGpT1pIJlw
https://youtu.be/bu5Y3uZ6LLM
#
https://youtu.be/agk01JKps8w
https://youtu.be/NSoFTHDHY40
https://youtu.be/fFzpWuHGyhc
https://youtu.be/gSRKhxuXTw4
https://youtu.be/g3jPYU9wCKg
https://youtu.be/G4SJFk8PdAc
https://youtu.be/e_Xe4sTWxTw
https://youtu.be/qS9rZV-Qbpk
https://youtu.be/8IZfYuTbCnY
https://youtu.be/A6YE5jadnGo
https://youtu.be/YeR2y3HdO1Q
https://youtu.be/z87fVhI4Yt0
https://youtu.be/xIwFd-u6yKw
https://youtu.be/wHA0AnURQ_M
https://youtu.be/nYqxyfKOXBw
#
https://youtu.be/oEgpGv2CF1U
#
https://youtu.be/mAJeK283j0I
#
https://youtu.be/-igAiudpBng
#

The reason for this effort is twofold:
o My monitor is too small to handle the videos & the IDE
o The videos show you what buttons to hit (the text tutorials don't)

If someone here has _experience_ in _learning_ Android, that would help,
where I've pretty much given up on the _text_ tutorials because I find I
spend ten seconds reading what to do, and then ten minutes searching for
the buttons they told us to hit.

The video tutorials at least show every button; but you have to be able to
start and stop them constantly, which is why it's handy to have them on the
iPad.

As you may be aware, everything sucks on iOS compared to Android, so if you
have an Android tablet, you can easily just download _any_ video you want
using NewPipe freeware on Android, which works _perfectly_.
<https://f-droid.org/en/packages/org.schabi.newpipe/>

If you're on iOS, like I am, then everything sucks compared to Android,
when it comes to flexibility, power, functionality, and usefulness. Sigh.

Arlen_Holder

unread,
Nov 2, 2018, 2:29:20 AM11/2/18
to
On Thu, 1 Nov 2018 23:44:10 -0000 (UTC), Diesel wrote:

> Bill already told you he had as well as HAXM, etc. [g])
> for what reason, then?

Woo hoo!

This is for Bill, where my first app (named "app01") was the
"Hello World" app from the Android text tutorial, but where
I was finding that I was taking 10 seconds to read an
instruction but then 10 minutes to find the button they
said to hit (since the text tutorial didn't _show_ the
buttons well).
<https://developer.android.com/training/basics/firstapp/>

My second app (named "app02") went a _lot_ smoother!

If Bill (or Diesel, or anyone else who is a noob but who
wants to write Android apps using freeware) wants to follow
along, here is my running log file of app02, which worked
after I realized that the older Android Studio used in the
tutorial had a very slight syntax differnece with the new
Android Studio, which caused a "compiler error".
==========================================================================
app02.log
============================================================================
Screenshots:
<http://www.bild.me/bild.php?file=9813868app02.gif>
<http://www.bild.me/bild.php?file=1608334app02a.gif>
<http://www.bild.me/bild.php?file=9175315app02b.gif>
============================================================================
Following this video:
d) Android Studio For Beginners Part 1, 2, 3, 4
by Bill Butterfield, Published on Jun 13, 2017 (mp4)
(It's a slightly older version of Android Studio.)
(You build a basic calculator adding app.)
https://youtu.be/dFlPARW5IX8 (part 1)
https://youtu.be/6ow3L39Wxmg (part 2)
https://youtu.be/rdGpT1pIJlw (part 3)
https://youtu.be/bu5Y3uZ6LLM (part 4)
============================================================================
This is what we accomplished in the first video above:
https://youtu.be/dFlPARW5IX8 (part 1)
a. Set up an Android Studio Project
b. Create a simple calculator app that added two integer numbers
c. Debugging step by step through the code
============================================================================
CHANGEFROM:
============================================================================
package com.app2company.app02;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
============================================================================
Note that the tutorial uses 'view' but the Android Studio uses 'v'.
Tutorial: public void onClick(View view) {
AndroidStudio: public void onClick(View v) {
This alone seems to have caused a compiler error, which complained about
a missing semicolon (;), but where there was no missing semicolon. Go figure.
============================================================================
CHANGETO:
============================================================================
public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

Button addBtn = (Button) findViewById(R.id.addBtn);
addBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
EditText firstNumEditText = (EditText) findViewById(R.id.firstNumEditText);
EditText secondNumEditText = (EditText) findViewById(R.id.secondNumEditText);
TextView resultTextView = (TextView) findViewById(R.id.resultTextView);

int num1 = Integer.parseInt(firstNumEditText.getText().toString());
int num2 = Integer.parseInt(secondNumEditText.getText().toString());
int result = num1 + num2;
resultTextView.setText(result + "");
}
});

}
}
============================================================================
Screenshots:
<http://www.bild.me/bild.php?file=9813868app02.gif>
<http://www.bild.me/bild.php?file=1608334app02a.gif>
<http://www.bild.me/bild.php?file=9175315app02b.gif>
============================================================================


Diesel

unread,
Nov 2, 2018, 4:03:33 AM11/2/18
to
Bill <Billa...@gmail.com>
news:q4haJM5m...@end.of.the.universe Wed, 31 Oct 2018 10:54:30
GMT in alt.comp.freeware, wrote:

> In message <pracn5$el0$1...@news.mixmin.net>, Arlen Holder
> <a%rlenh...@no.spam.net> writes
>>If we can work together on something like this, or if others have
>>a suggestion, it would be nice to get a handful of interested
>>folks to pick a SIMPLE action (like ring a bell) and then work
>>together toward that goal.
>>
>>That would make Usenet very useful, don't you think?
>
> I have, in the past, worked with other people, but usually via
> email. It would be interesting to see if this could work on
> usenet. If we did this, I think the cross-posting might be a
> problem. I am only on comp.mobile.android.

I've recently subbed to that newsgroup myself, Bill. You may want to
take a lurking peek inside some of the other threads Arlen has taken
the time to create there and here (alt.comp.freeware) before
continuing with this too much further.

You too will be his best friend, (read:useful idiot), until you
invariably wind up writing something they don't like. Then, it's
moron, and stupid for you. As it was with several others, including
myself. No need to take my word for any of this mind you, browse the
comp.mobile.android newsgroup a bit and see for yourself.

Just passing along some friendly intended advice. Do with it what you
will.


--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit here:
https://tekrider.net/pages/david-brooks-stalker.php
===================================================
Anarchy: Such a good idea, it should be the law.

Diesel

unread,
Nov 2, 2018, 4:03:33 AM11/2/18
to
Arlen_Holder <a%rle%20nh....@no.spam.net>
news:prgqrv$mff$1...@news.mixmin.net Fri, 02 Nov 2018 06:29:20 GMT in
alt.comp.freeware, wrote:

> On Thu, 1 Nov 2018 23:44:10 -0000 (UTC), Diesel wrote:
>
>> Bill already told you he had as well as HAXM, etc. [g])
>> for what reason, then?
>
> Woo hoo!
>
> This is for Bill, where my first app (named "app01") was the
> "Hello World" app from the Android text tutorial, but where
> I was finding that I was taking 10 seconds to read an
> instruction but then 10 minutes to find the button they
> said to hit (since the text tutorial didn't _show_ the
> buttons well).
> <https://developer.android.com/training/basics/firstapp/>
>
> My second app (named "app02") went a _lot_ smoother!
>
> If Bill (or Diesel, or anyone else who is a noob but who
> wants to write Android apps using freeware) wants to follow
> along, here is my running log file of app02, which worked
> after I realized that the older Android Studio used in the
> tutorial had a very slight syntax differnece with the new
> Android Studio, which caused a "compiler error".

a noob at what specifically? Writing code for Android, specifically
or writing code in general? You'd be wrong on both counts... <big
fucking grin>; Remember when I told you freeware existed to do what
you wanted? I might not have mentioned I may have written something
for the task and might have shared the apk with you, and entire
source code for that matter; had you not been a prick towards me.

You only stated it had to be freeware; you didn't say any of it
couldn't be home brew. ROFL!

And no, I wasn't trying to trick you; only one of the solutions I
know of to get those drive letters you want is of my own doing. The
others (except for one) are freeware written by other people.
Sometimes, an entire team of programmers.

Btw, I did try to get the app on google play; for reason(s) unknown
and not clearly explained to me, it wasn't approved. It contains no
adware, spyware, nothing of the sort, but, wasn't allowed. Maybe I
violated some rule with the way in which I got access to the device?
Like I said, google wasn't forthcoming with any real explanation.


Is there a specific reason you're responding to my replies but
addressing Bill rather than me? And why do you still refer to me as a
noob when it's clear as day that you're the only n00b in the thread?

--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit here:
https://tekrider.net/pages/david-brooks-stalker.php
===================================================
If you consider television dangerous but routinely carry explosives
in your clothing, you may be a Muslim.

Bill

unread,
Nov 2, 2018, 3:51:09 PM11/2/18
to
Hi Arlen,

I'm replying without quoting for space reasons, so hope this makes sense.

I am using 2 Windows laptops, side by side. The X201 (W10) has the
development system running, the X220T (W7) is there to run text and/or
videos. The latter is a tablet-convertible laptop, so can be folded to
just take the space of the screen. Both have 12" screens, and this seems
to work OK.

I do have a 7" Android tablet and a 10" Windows 8 tablet, but they are
too small, so I think I'll stick with the Lenovo X-series.

I totally agree about the text guide and wasting time searching for
buttons. I had already been looking up and at some videos - specifically
the Bill Butterfield ones, but decided to plough on until I get the
first text based one working. Your list of videos will be a great help,
and I can download them. I am an Apple-free zone.

Now to the problem! I have now got the button and text box sitting
there. It worked on the second try. So it's on to Java, where I start
with a blank mind.


This is what I start with, which works:
--------------------------------------------------
package com.example.my1stapplication;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import static android.icu.lang.UCharacter.GraphemeClusterBreak.V;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
-------------------------------------------------

and this is what I am told to do:


-------------------------------------------------

In the file app > java > com.example.myfirstapp > MainActivity, add the
sendMessage() method stub as shown below:


class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
}

/** Called when the user taps the Send button */
fun sendMessage(view: View) {
// Do something in response to button
}
}

-----------------------------------------------

If I just append the second bunch of code to the bottom of the first
block, the whole of the second block is just underlined in red squiggle,
which I assume implies an error.

I tried commenting out the curly bracket at the end of the first code
block and adding one at the bottom of the second. This reduced the red
squiggle count, but hovering over almost every word shows an error.

I've dug out an old Java book and done a search for Java basics on the
'net, but without success so far. The Usenet Java group I've looked at
seemed to die in 2012.
It seems to me that I need to have a basic grasp of Java whatever
tutorial I follow, and this seems like a very basic stumbling block.

Bill

unread,
Nov 2, 2018, 4:10:10 PM11/2/18
to
OOops, sorry, forgot to delete the quote. :-(

Arlen_Holder

unread,
Nov 2, 2018, 6:01:43 PM11/2/18
to
On Fri, 2 Nov 2018 08:03:33 -0000 (UTC), Diesel wrote:

> Btw, I did try to get the app on google play; for reason(s) unknown
> and not clearly explained to me, it wasn't approved. It contains no
> adware, spyware, nothing of the sort, but, wasn't allowed. Maybe I
> violated some rule with the way in which I got access to the device?
> Like I said, google wasn't forthcoming with any real explanation.

Hi Diesel,
What is the trick to get Android Studio to _use_ the MS Android Emulator?

Thanks for your helpful advice, Diesel, where I'll return the favor by
letting folks know that _before_ they install the Android Studio IDE,
they need to consider whether they're on an Intel or AMD CPU.
o If they're on Intel, the HAXM emulation will likely work for them
o If they're on AMD, the HAXM defaults will prevent emulation from working

If they are on an Intel CPU, these two URLs will help them out:
o Installation instructions for installing HAXM on Windows
o <https://github.com/intel/haxm/wiki/Installation-Instructions-on-Windows>
o Download software for Intel Hardware Accelerated Execution Manager
o <https://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager-intel-haxm>

If they're on AMD, like I am, there are AVD decisions to be made, where I
suggest that they not check the AVD box when installing Android Studio:
o [x]Android Studio
o [_]Android Virtual Device
Where I suggest they install an AMD-compatible Android emulator separately.
============================================================================
The Android emulator "booted" up, standalone, on Windows with the AMD CPU!
<http://www.bild.me/bild.php?file=8562677amd_emulation_05.jpg>
============================================================================
I'm not sure how to get Android Studio to output _to_ that emulator though!
I've hit a hundred buttons in Android Studio, but Android Studio still
won't download the app to the Android emulator yet.

*What's the trick to get Android Studio to _use_ the MS Android Emulator?*
<http://www.bild.me/bild.php?file=3799337amd_emulation_01.jpg>
<http://www.bild.me/bild.php?file=5017616amd_emulation_02.jpg>
<http://www.bild.me/bild.php?file=8615530amd_emulation_03.jpg>
<http://www.bild.me/bild.php?file=9950110amd_emulation_04.jpg>
<http://www.bild.me/bild.php?file=8562677amd_emulation_05.jpg>
============================================================================
AMD owners can use the Microsoft Visual Studio Emulator for Android stub:
o <https://visualstudio.microsoft.com/vs/msft-android-emulator/>

Microsoft documentation (from 2014) is here:
o Introducing Visual Studio┬ Emulator for Android
o <https://blogs.msdn.microsoft.com/devops/2014/11/12/introducing-visual-studios-emulator-for-android/>

Which says, about Hyper-V...
o Conflict with Hyper-V on Windows.
o Many emulators require you to disable Hyper-V
o Or they don┤ work as well with Hyper-V as they do without Hyper-V
o Using Hyper-V is part of the setup for many developer activities
o Restarting (multiple times a day) to toggle Hyper-V is not acceptable

It says, about ADB...
o The emulator is ADB-connected
o So it also works well with your Android Studio projects
o See: Using Visual Studio Emulator for Android from Android Studio
o <https://blogs.msdn.microsoft.com/devops/2015/07/20/using-the-visual-studio-emulator-for-android-from-android-studio-or-eclipse-with-adt/>
o Which says:
o Weâ–”e made the Visual Studio Emulator for Android available
without needing to also download Visual Studio.
o By default, Android Studio will want to debug to the slow Android SDK emulator.
o You can configure Android Studio to allow you to select a target
a. In Android Studio,
b. Run > Edit Configurations > Defaults / Android Application
c. Set Target Device to Show chooser dialog
d. Check Use same device for future launches
... then nothing makes sense because the doc doesn't match the reality ...
============================================================================
The MS stub is extremely dumb, in that it doesn't ask where to be put. :(
You know you will have problems the moment you see programs _this_ dumb!

The stupid MS program installer is so utterly dumb that there was no indication
whatsoever _where_ it put itself, but rooting around found changes inside:
o C:\ProgramData\Package Cache (234MB in 17 directories)
o C:\Program Files (x86)\Microsoft Visual Studio Emulator for Android (183 MB)
o C:\Program Files (x86)\Microsoft Emulator Manager (1MB)
o C:\Program Files (x86)\Microsoft XDE (30MB)

I hate when stupid programs pollute the nice clean neighborhood like this
where they defy any attempt to control them (like a pack of rabid dogs).

You're going to *need* those paths though, since Android Studio can't find
that emulator unless and until you tell Android Studio where to find it!
============================================================================
When installing, the stub will download from the net
Microsoft Visual Studio Emulator for Android API 19 Platform
============================================================================
There is documentation on setting up the Hyper-V on Windows 10:
o <https://blogs.msdn.com/b/visualstudioalm/archive/2014/11/12/introducing-visual-studio-s-emulator-for-android.aspx>
============================================================================
At this point, I wiped out Android Studio, & all user settings, & started over.
(This has to be the 20th time I've had to wipe out Android Studio. Sigh.)
o First I installed the Microsoft Visual Studio Editor for Android
o Then I installed Android Studio sans the AVD option checked
o Android Studio went into C:\app\editor\android\studio\.
============================================================================
There were no projects in C:\tmp\android (since I wiped them out).
So in the Android Studio version 3.2.1 GUI at the bottom left, I made
this one setting change (which is unrelated to the AVD setup):
o Configure > Project defaults > Settings > Auto Import >
o [x]Add unambiguous imports on the fly
o [x]Optimize imports on the fly (for current project)
============================================================================
This isn't related to the AVD setup:
o Configure > SDK Manager > Appearance & Behavior > System Settings >
Android SDK > Android SDK Location: C:\app\hardware\android\sdk
(I need to move that, later, to the C:\app\editor\android\sdk location.)
o Configure > Project Defaults > Project Structure >
Android SDK location:C:\app\hardware\android\sdk
JDK location: C:\app\editor\android\studio\jre [x]Use embedded JDK (recommended)
Android NDK location: (empty) More info here: <https://developer.android.com/ndk/>
============================================================================
This is related to the AVD setup:
o Configure > Project Defaults > Run Configurations > Defaults >
Android App > General > Depoloyment Target Options >
Open Select Deployment Target Dialog
[x]Use same device for future launches
This will prompt you to select an ADB-connected device when you debug the
first time, then remember that device for subsequent debugging sessions.
============================================================================
This is related to the AVD setup:
o C:\Users\x\Desktop>emulatorcmd.exe /sku:Android list /type:device
Identifier | Name | Version
-------------------------------------+------------------------------+------------
226C76AC-9E9A-4EBD-A495-79E8C5C5292F | 7" KitKat (4.4) XHDPI Tablet | 1.0.60404.1
363F7AED-462C-46BD-9FEC-F1DD3B79916C | 5" KitKat (4.4) XXHDPI Phone | 1.0.60404.1
============================================================================
o Configure > Settings > Tools > External Tools > (click the green "+" sign)
Name: MS Android Emulator Group: External Tools
Description: Quick Launch 4.4 XXHDPI Phone
Tool Settings:
Program: C:\Program Files (x86)\Microsoft Emulator Manager\1.0\emulatorcmd.exe
Arguments: /sku:Android launch /id:363F7AED-462C-46BD-9FEC-F1DD3B79916C
Working directory: C:\Program Files (x86)\Microsoft Emulator Manager\1.0
Show in: [x]Main menu [x]Editor menu [x]Project views [x]Search result

Advanced Options
[x]Synchronize files after execution
[x]Open console for tool output
[_]Make console active on message in stdout
[_]Make console active on message in stderr
============================================================================
At this point I wanted to customize the menus to add it, but I needed to
"Create an Android Project" first, I guess, in order to get the main toolbar.

Start a new Android Project >
o Application name: My Application (change to: app00)
o Company domain: ap00.com (notice the single "p")
o Project location: c:\tmp\android\app00

Hmmm.... the Microsoft Android emulator didn't work...
============================================================================
After pressing "Run", I get this in the Android Studio IDE:
Select Deployment Target > Connected Devices > LGTP45071afb6a4
[UNAUTHORIZED - Press OK in the 'Allow USB Debugging' dialog on your device.]
On the phone, it says:
Allow USB Debugging?
The computer's RSA key fingerprint is:
AF:F9:F4:2B:BB:45:A3:4F:BC:AF:D3:BF:DD:5E:22:AA
[_]Always allow from this computer
[Cancel][OK]
============================================================================
Even after pressing "Run" a few times and setting up "emulation" devices,
it still didn't work, so I don't remember all the buttons I pressed by now.
============================================================================
At some point, I tried the following...

Android Studio: Tools > AVD Manager > Create Virtual Device >
Category > Phone > Import Hardware Profiles > Select path:
C:\Program Files (x86)\Microsoft Visual Studio Emulator for Android\1.0\Default\Devices\5_KitKat_(4.4)_XXHDPI_Phone.cfg
OK
The only "Select a system image" that works is "Pie".
But that failed miserably ... (same emulation error as always).
Sigh.
============================================================================
Then, I tried the following...
Android Studio: Tools > External Tools > MS Android Emulator
That put a Run windows on the bottom, saying:
"C:\Program Files (x86)\Microsoft Emulator Manager\1.0\emulatorcmd.exe" /sku:Android launch /id:363F7AED-462C-46BD-9FEC-F1DD3B79916C
Validating emulator arguments...
Determining if emulator is already running...
Preparing virtual machine...
You were previously added to the Hyper-V Administrators security group, but the permissions have not taken effect. Please sign out of your computer for the permissions to take effect.

Process finished with exit code 5
============================================================================
Hmmm.... OK. I guess I'll sign out of Windows and sign back in I guess.
I didn't exit out of Android Studio before signing out so I restarted
Android Studio when I signed back into Windows.
============================================================================
Android Studio: Tools > External Tools > MS Android Emulator
That put a Run windows on the bottom, saying:
"C:\Program Files (x86)\Microsoft Emulator Manager\1.0\emulatorcmd.exe" /sku:Android launch /id:363F7AED-462C-46BD-9FEC-F1DD3B79916C
Validating emulator arguments...
Determining if emulator is already running...
Preparing virtual machine...

Up pops a dialog:
Visual Studio Emulator for Android
Click "Retry" to run the emulator in elevated mode.
You do not have permission to modify internal Hyper-V network adapter
settings, which are required to run the emulator.
[Retry][Close]

I hit the "Run" at the very bottom left of Android Studio
(which I had never seen or hit before)

Woo hoo!
The Android emulator "booted" up, standalone, on Windows with the AMD CPU!
<http://www.bild.me/bild.php?file=8562677amd_emulation_05.jpg>
============================================================================
I'm not sure how to get Android Studio to output _to_ that emulator though!
I've hit a hundred buttons in Android Studio, but Android Studio still
won't download the app to the Android emulator yet.

*What's the trick to get Android Studio to _use_ the MS Android Emulator?*
<http://www.bild.me/bild.php?file=3799337amd_emulation_01.jpg>
<http://www.bild.me/bild.php?file=5017616amd_emulation_02.jpg>
<http://www.bild.me/bild.php?file=8615530amd_emulation_03.jpg>
<http://www.bild.me/bild.php?file=9950110amd_emulation_04.jpg>
<http://www.bild.me/bild.php?file=8562677amd_emulation_05.jpg>
============================================================================
Diesel,
Do you know the trick to get Android Studio to _use_ that MS Android Emulator?

Arlen_Holder

unread,
Nov 2, 2018, 7:16:56 PM11/2/18
to
On Fri, 2 Nov 2018 19:51:07 +0000, Bill wrote:

> I'm replying without quoting for space reasons, so hope this makes sense.

Hi Bill,
I've been on Usenet for decades where I never understood why people quote
so much since it's _all_ already there in the post that they're responding
to.

With me, you can quote _just_ the 1 or 1/2 sentence you're responding to!
:)

> I am using 2 Windows laptops, side by side.
Good for you! That makes it easier for you than for me to
o Follow instructions (which take up an entire screen), and,
o At the same time, perform actions (which also take up an entire screen).

o The X201 (W10) has the
> development system running, the X220T (W7) is there to run text and/or
> videos. The latter is a tablet-convertible laptop, so can be folded to
> just take the space of the screen. Both have 12" screens, and this seems
> to work OK.

Since the second machine is Windows, you won't have the horror of what I
have to go through to get videos onto the iPad. Lucky you. The three videos
I plan on doing are these three, where I ditched a bunch of other videos in
favor of this guy, where the only (slight) problem is that his Android
Studio is slightly older than ours (so some buttons moved a bit).
o https://youtu.be/dFlPARW5IX8 (I've done this - and I think it's great)
o https://youtu.be/6ow3L39Wxmg (This is the one I plan on doing next)
o https://youtu.be/rdGpT1pIJlw (Then I plan on doing this one after that)
o https://youtu.be/bu5Y3uZ6LLM (Don't bother with this as it's too deep)

> I do have a 7" Android tablet and a 10" Windows 8 tablet, but they are
> too small, so I think I'll stick with the Lenovo X-series.

Good for you. My iPad is the $300 Costco 9.7-inch WiFi-only iPad from 2017.
It's pretty small for my tired old eyes - but - it's better than nothing.

> I totally agree about the text guide and wasting time searching for
> buttons.

Yup.
I've learned what you learned, but only after running through the original
text tutorial that it sucks becasue I can't find the buttons it says to hit
<https://developer.android.com/training/basics/firstapp/>

*In hindsight, I recommend noobs _start_ with the _video_ tutorials first!*

I'm sure _after_ I'm familiar with all the billions of buttons in Android
Studio, that the tutorial above will work great - but it sucks - IMHO - for
a noob simply because they don't show a graphic with an arrow to the
buttons they say to hit.

> I had already been looking up and at some videos - specifically
> the Bill Butterfield ones, but decided to plough on until I get the
> first text based one working.

I gave up on the text-based tutorial (for now); I'll go back to it later.
For now, I'm doing the Bill Butterfield 3 of 4 videos.
I've only done the first one so far (as I spent today on trying to install
the Microsoft Android Emulator since I'm on an AMD CPU - which you don't
have to deal with):
o <https://visualstudio.microsoft.com/vs/msft-android-emulator/>

I have the Microsoft Android emulator working inside Android Studio:
o <http://www.bild.me/bild.php?file=8562677amd_emulation_05.jpg>
But I don't yet have Android Studio _using_ it for emulation! :(

> Your list of videos will be a great help,
> and I can download them.

The good news is that the videos, while a pain in a different way, at least
show EVERY click on the screen!

> I am an Apple-free zone.

Lucky you!

I have Apple equipment because I help people use Apple products.
Except in marketing, compared to Windows/Linux/Android, iOS stinks.

A lot of people _think_ they have solutions that work cross platform, but
until they get their shit working on iOS, they don't know what cross
platofrm means!

That means, eventually, all my apps will also work on iOS; but that will
happen way later (if ever).
o What are the most fundamental basic apps that are (apparently) lacking on Android?
o <https://groups.google.com/forum/#!topic/comp.mobile.android/SZk_fXWqg88>

> Now to the problem! I have now got the button and text box sitting
> there. It worked on the second try. So it's on to Java, where I start
> with a blank mind.

I don't know the "java" syntax yet - but it's extremely "syntactical"!
That's for sure! :)

I see you have a followup message, so I'll look at that.

We really should both be working the same tutorial if we want to help each
other ... so ... I guess what I should do, to help you, is go _back_ to the
original text tutorial - which I had abandoned in favor of the video
tutorials.
<https://developer.android.com/training/basics/firstapp/>

To be sure, is _that_ the tutorial you're working on currently?

Bill

unread,
Nov 2, 2018, 8:03:41 PM11/2/18
to
In message <prilt6$mei$1...@news.mixmin.net>, Arlen_Holder
<a%rle%20nh....@no.spam.net> writes
>We really should both be working the same tutorial if we want to help
>each other ... so ... I guess what I should do, to help you, is go
>_back_ to the original text tutorial - which I had abandoned in favor
>of the video tutorials.
> <https://developer.android.com/training/basics/firstapp/>
>
>To be sure, is _that_ the tutorial you're working on currently?

Yes, that's the one, and I'm at the page saying " Start another
activity".

I still haven't progressed any further. Searches still haven't helped
and I don't really want to embark on a full Java training course again.
I'm almost certainly doing something really stupid.

I'll have a go at following the Butterfield addition app video in the
next day or so.

Arlen_Holder

unread,
Nov 2, 2018, 9:44:35 PM11/2/18
to
On Sat, 3 Nov 2018 00:03:03 +0000, Bill wrote:

> Yes, that's the one, and I'm at the page saying " Start another
> activity".

Thanks Bill,
(I wonder what "editor" people use to edit xml & java outside the IDE?)

I'm in California, so we're a half day (roughly) apart - where
neither of us is doing this full time ... I'm hitting it sporadically
- but I do plan on being successful with the first five or ten apps
(whatever they may be).

My ultimate goal, if I get there, would be
o free apps on Google Play and/or F-droid that do one thing well
o no ads, no servers, no funny games, no non-necessary permissions

> I still haven't progressed any further. Searches still haven't helped
> and I don't really want to embark on a full Java training course again.
> I'm almost certainly doing something really stupid.

Since it's helpful if we both work on the same app, I'll go back to
that tutorial that you're working on, where I've blown away Android Studio
at least 20 times by now, so I will start at the beginning again.

> I'll have a go at following the Butterfield addition app video in the
> next day or so.

Be careful about the "v" versus "view" in the Butterfield video,
where his code uses "view" but the current Android Studio uses "v"
which gave me a misplaced semicolon error (which made no sense to me)
which I only found by stepping through the code, line by line
(which is a classic debugging tactic, of course).

If you do the Butterfield first video, here's the XML code
(which is the layout) and the java code (which is the guts)
that I found successful.
o C:\tmp\android\app02\app\src\main\java\com\app2company\app02\MainActivity.java
o C:\tmp\android\app02\app\src\main\res\layout\activity_main.xml
===== java =====
package com.app2company.app02;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

Button addBtn = (Button) findViewById(R.id.addBtn);
addBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
EditText firstNumEditText = (EditText) findViewById(R.id.firstNumEditText);
EditText secondNumEditText = (EditText) findViewById(R.id.secondNumEditText);
TextView resultTextView = (TextView) findViewById(R.id.resultTextView);

int num1 = Integer.parseInt(firstNumEditText.getText().toString());
int num2 = Integer.parseInt(secondNumEditText.getText().toString());
int result = num1 + num2;
resultTextView.setText(result + "");
}
});

}
}

===== java =====
===== xml =====
<?xml version="1.0" encoding="UTF-8"?>

-<android.support.constraint.ConstraintLayout tools:context=".MainActivity" android:layout_height="match_parent" android:layout_width="match_parent" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android">

<EditText android:layout_height="wrap_content" android:layout_width="wrap_content" tools:layout_editor_absoluteY="8dp" tools:layout_editor_absoluteX="85dp" android:inputType="textPersonName|number" android:hint="Enter a number" android:ems="10" android:id="@+id/firstNumEditText"/>

<EditText android:layout_height="wrap_content" android:layout_width="wrap_content" tools:layout_editor_absoluteX="85dp" android:inputType="textPersonName|number" android:hint="Enter another number" android:ems="10" android:id="@+id/secondNumEditText" app:layout_constraintTop_toBottomOf="@+id/firstNumEditText" android:layout_marginTop="8dp"/>

<Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/addBtn" app:layout_constraintTop_toBottomOf="@+id/secondNumEditText" android:layout_marginTop="144dp" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" android:text="Add"/>

<TextView android:layout_height="0dp" android:layout_width="wrap_content" android:id="@+id/resultTextView" app:layout_constraintTop_toBottomOf="@+id/addBtn" android:layout_marginTop="92dp" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" android:text="Result" android:textSize="48sp"/>

</android.support.constraint.ConstraintLayout>
===== xml =====

BTW, for Windows experts, what editor do you use for XML & Java code?
<https://groups.google.com/forum/#!topic/alt.comp.freeware/FloSeAKJfUE>

Diesel

unread,
Nov 2, 2018, 10:00:33 PM11/2/18
to
Arlen_Holder <a%rle%20nh....@no.spam.net>
news:prihg6$fq7$1...@news.mixmin.net Fri, 02 Nov 2018 22:01:43 GMT in
alt.comp.freeware, wrote:

> Hi Diesel,
> What is the trick to get Android Studio to _use_ the MS Android
> Emulator?

It's not really a trick Arlen. There's a bug of sorts. I haven't
isolated it to a specific package. IE: I can't say for sure it's
Android SDK or the MS Android emulator that's causing it. A registry
key is sometimes not created or, it is created with the wrong
setting. Either of which causes the issue you're having although it's
not the only way it can happen.

I already know you aren't using default install paths, so this too
can become a problem; especially with programming packages that
support 3rd party plugins and/or other tools/packages as well. Some
may be semi hard coded to look in specific places for support files,
be it configuration data, drivers, required support libraries, etc.
If one or more can't find their 'shit' essentially, it doesn't work
as you'd expect.

I think your first order of business should be to completely
uninstall ALL of the packages you've downloaded to program on Android
with and reinstall them, one by one, using default settings (except
for the ones that deal specifically with your CPU; you already know
HAXM can't be toggled on in your case so make sure it's off). The
default settings includes their installation paths, Arlen. Don't
change any of it.

Once you've done all of that, start the MS Android Emulator and bring
the Android SDK online. See if it can see the emulator and send your
program to it, then. If it doesn't do so, follow the rest of the
instructions I left for you below. And, report back your results so
that others may benefit if this resolves the issue and/or learn more
ways in which to troubleshoot and fix it, if it does not.

> Thanks for your helpful advice, Diesel

Hmm. Haven't you been reading my previous replies, Arlen? I didn't
ask for a thank you. I've asked you for an apology for your unfounded
personal attacks. I *shouldn't* have to do that. You should be mature
enough to 0wn your screwup and take the necessary action to correct
it, entirely on your own without any prodding from me.

[snip amd/intel differences]

> ========= I'm not sure how to get Android Studio to output _to_
> that emulator though! I've hit a hundred buttons in Android
> Studio, but Android Studio still won't download the app to the
> Android emulator yet.
> *What's the trick to get Android Studio to _use_ the MS Android
> Emulator?*

I don't owe you anything, but, just to prove a small point.. I'll do
this for you...

> o Weâ–”e made the Visual Studio Emulator for Android available
> without needing to also download Visual Studio.
> o By default, Android Studio will want to debug to the slow
> Android SDK emulator. o You can configure Android Studio to allow
> you to select a target
> a. In Android Studio,
> b. Run > Edit Configurations > Defaults / Android Application
> c. Set Target Device to Show chooser dialog
> d. Check Use same device for future launches
> ... then nothing makes sense because the doc doesn't match the
> reality ...

You seem to have the worst times with hand holding GUI based
interfaces, Arlen.

Anyways.. Make sure you have the MS emulator up and running.

Goto Tools>Android>Enable ADB integration if you haven't already done
so. If you have already done so, try disabling and re-enabling; this
sometimes clears it up for you. If that doesn't work, proceed with
the following (and report, always report, back your results;
troubleshooting is a two way street you understand)

First (You can skip this part of my advice if you so desire, It's a
general thing I highly suggest people do before playing in the
registry) obtain a copy of erunt. Install and execute ERUNT as
administrator; follow the prompts, let it do it's backup. Remember
where it stores it, in the event you do something really bad in the
next few minutes by not following my directions to the letter.

Now, with that done (you really should have done it) let's proceed.

Open regedit, navigate to

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools

If you don't have this key, create it-- That means, add the key
'Android SDK Tools' under Wow6432Node as you see above.

Under the key if it already exists is a string variable called Path.
edit it to point to the location of your Android SDK Installation.
Example: C:\Program Files (x86)\Android\android-sdk
(If you haven't mucked with the default installs, that example
*should* be what you need to add. Verify for yourself, though.

If the key had to be created , be sure you create the string
variable, Path and input the information above. Close regedit.
Obviously by information above, I specifically mean the location to
where Android SDK installed by default.

Close your emulators and the SDK.

Open a console window, type the following:

adb kill-server
adb start-server

Now, relaunch your emulator and fire up the SDK.

As a precautionary measure, you may wish to go ahead and restart your
machine before firing the emulator and SDK back up.


> You're going to *need* those paths though, since Android Studio
> can't find that emulator unless and until you tell Android Studio
> where to find it!

Ayep. Changing default installation folders because they don't make
sense to you isn't always helpful either. Sadly, some programs still
use what's known as 'hard coded' paths/filenames. You should keep
that in mind as you're opting for custom installations based on your
own folder configuration.

> o Android Studio went into C:\app\editor\android\studio\.

And that's where you went wrong. :) That's not the default install
location. So you need to let it know this, by following the
instructions above, carefully. You're going to be editing the
registry Arlen; back it up before you do so.

Yes, I could easily have written you a simple registry import key and
posted it here that would do it for you, but, it's time you learn to
do somethings yourself. I've provided what you should need to get up
and running. report back your results, please.

> ========= This isn't related to the AVD setup:
> o Configure > SDK Manager > Appearance & Behavior > System
> Settings >
> Android SDK > Android SDK Location: C:\app\hardware\android\sdk
> (I need to move that, later, to the C:\app\editor\android\sdk
> location.)
> o Configure > Project Defaults > Project Structure >
> Android SDK location:C:\app\hardware\android\sdk
> JDK location: C:\app\editor\android\studio\jre [x]Use embedded
> JDK (recommended) Android NDK location: (empty) More info here:
> <https://developer.android.com/ndk/>

Arlen,

I mean this in the most sincere kindest way I can possibly express
it, given the circumstances. Please, STOP changing the default
installation folders (especially on programming packages and support
files) because you have your own folder style layout.

You're going to have all kinds of little issues like the one you've
already run into because of what you did there. :( The Android sdk is
still under development. It's experimental and should be treated as
such. That means, DON'T CHANGE default install folders; some aspects
of it (and support libraries/plugins,etc) aren't going to properly
work if you don't leave those settings alone. There's a reason it
wants to be in specific folders. The fact it doesn't make sense to
you doesn't matter.


> ===================================================================
> ========= Even after pressing "Run" a few times and setting up
> "emulation" devices, it still didn't work, so I don't remember all
> the buttons I pressed by now.

I'm sure you've butchered it quite nicely, Arlen. I'd actually advise
you to completely uninstall it and all associated programs. Reboot
your machine, reinstall them, keeping default installation folders
and settings as they are; aside from the ones you learned your
machine doesn't support. Don't be playing around with installation
paths like this. You're only going to cause yourself unnecessary
headache and aggravation. Stop assuming you know more than the
developers of the software and supported OSes. It may not make sense
to you, but, it makes sense to them and many others who are in
various I.T related fields.

In other words, Stop trying to sort the folders and files in your own
unique style. You cannot do that with alot of software unless you
really know what you're doing and understand how to configure various
other aspects of that software package that may not be aware it's no
longer in default install paths and must (if possible) be told where
to find it's necessary files. Your luck is going to vary on that,
from program to program.

> But that failed miserably ... (same emulation error as always).
> Sigh.

You've (without realizing it of course) provided me alot of useful
information for the purposes of troubleshooting various
problems/queries you've created threads about, going back a
considerable amount of time. Despite not having laid eyes upon the
machine sitting in front of you, I don't feel it's too far a stretch
to get the impression that many of your issues are the result (direct
result) of your own efforts to tinker.

The issues you have are what I enjoy (and am paid well for) doing as
a tech for the most part. Any tech/non tech (some atleast) can build
a computer from parts, toss windows/linux on it and call it a day.
Troubleshooting, data recovery, etc, on the other hand, seperates the
wannabes (regardless of certs/college hours) from the real, hands on,
actually knows this stuff, techs (who may/may not have any/as many
certs or any/as many college hours) as the wannabes who look nicer on
paper, like a brightly shining polished turd. (Yea, I had to
interview one today for a position I'll open soon) - Needless to say,
the college instructor who suggested this particular asshat to me is
going to be hearing from me about how things went. It's actually more
difficult to find competent help in my own field than I originally
thought. :(

Basically, if you have to resort to wipe and reload to 'fix' most
issues, you're a lousy technician. I actually know several certified
techs that opt for doing that; but it's a time savings thing vs
inability to fix the issue at hand. As for me, I have the forethought
to know what a pain in the arse a reinstall from scratch can be,
especially for Windows so, if I can save the machine and stabilize it
without it looking like a patched up wall that's been blasted to hell
and back with a double barrel, that's the route i'm taking. Unless
it's just not realistically feasable to accomplish within a normal
amount of time. Then, I have to make the call to the client to see
what they want to do; how important is it to them to keep the machine
as it is (with the problem fixed of course) vs reloading.

Do they have installation media for all of their software? Is there
email stored locally on the machine or do they obtain it online via
web browser? Do they have all of the installation/product keys for
software they've acquired since initially getting the computer? If
you get a no to one or more of those questions and it's something
they care about, wipe and reload just became a last resort; mainly an
issue of cash at this point. How much are they willing to spend, and
how good are you. Can you get it done within a reasonable amount of
time, at all, or what. That's what I live for, Arlen. You don't want
to have to bill them 300 or more (I bill by the hour, like most
shops) for a computer that's not worth 150 or so. So you need to know
the trade well and need to know those telltale signs of what's wrong
with the box, so you can get it taken care of in a reasonable amount
of time.

The client isn't paying you to learn how to do this shit, that's what
you should already know. And, if you do have to do some research to
fix the problem (we all have, many times); you shouldn't be counting
that (or much of it anyway) as bench time (billable time), but,
that's just my own opinion and how I run my business myself. That
may/may not work for others. I'm not a greedy bastard and my overhead
is insanely low, so I can afford to do it this way and not starve.

Yes, I know, you think I'm crazy by writing that, right? Well, After
doing alot of local linux distro installs the past few years, I've
actually found the majority to be easier (yes, easier) to install
than DVD boot and load of Windows 10. Linux Mint (the older 17.3
flavor; i'm biased towards the later versions) and MXLinux are just
two excellent, imho, examples of distros that are very easy to
install and use right away for many users, power users, and techs
alike. I've even gone so far as to perform some semi controlled
social experiments by switching some local guinea pigs machines from
windows to one of those two aforementioned linux distros and taking a
seat back to observe.

Most of the people weren't even aware it wasn't windows, it just
looked a little different to them. I noticed the malware issues they
previously reported on went from so many per month stats to zero; as
in, none, whatsoever. And this from two who were well known for
clicking anything and everything to get access to that 'free porn'
was especially uplifting to me.

I've also converted two small businesses in this area from Windows
based small network to entirely Linux powered. From the workstations
to their file server, it's all linux now. The software they use in
house works just fine under Wine. They have access to their
documents, notes, spreadsheets, etc via libre office. They have full
access to their laser printers, even via their Android powered cells
and tablets. Even the few iOS devices present in one particular
office has access to the printers (after some research was put into
it; as I told you before, I'm not a mac person). The file server
automatically backs up any documents stored on it to several
different locations, two of which are off site via a simple automated
bash script that runs every so many hours. It even has user specific
access restrictions. [g]

I can't convert all of my clients, Linux isn't for all situations,
but..it's for many others. I know you like Windows 10 based on
reading your other threads, but, I don't and many others I know
prefer not to have it, if possible. So, I always have to have
options; it's one of the reasons people pay me. I fix whats broken.

I told you, and I wasn't bullshitting you then or now Arlen, I am a
certified technician with over two decades experience doing it
professionally for a living. I'm not some fresh out of college asshat
with a degree and no actual experience outside the classroom.
Computers have been a passion of mine since I was a kid in the single
digit age. My interest and appreciation of them has never waivered in
the entire time i've been alive, Arlen. Nor has my undying thirst to
learn more about them.

I'm not bragging when I tell you this, it's just how things are; you
aren't going to find many people like me with the knowledge I have
due to the countless hours I've lost sitting or standing in front of
one of these machines when I should have been doing something else
with the time.

I didn't spend all that time playing video games or otherwise fucking
around with them. I spent it learning, how to code, how the hardware
worked, how the software interacted with it. It increased my love for
electronics which got me into the computers in the first place. I was
the kid who took the radio and tv apart when he was five years old to
fix it, not the kid who didn't do much of anything besides watch
cartoons on it.

I'd appreciate it if in the future you wish to interact with me, you
treat me with a bit more respect than you have previously. That is,
if you want useful technical information and civil interaction with
me in the future. Prior to reading this civil post of yours, I was
about to resume filtering since I don't have time to play silly games
back and forth with you and I have no interest in any of the
political nonsense burp and fart seems intent on flooding
alt.comp.freeware with. I have no use for remailing cowards, and,
unfortunately for you, that's what you're using to post here; so the
filtering would catch you as well, even though you wouldn't be
specifically targetted.

If you just want to continue being an asshole towards me, these
series of posts will be the last ones from me to you for the
aforementioned reasons.


> Diesel, Do you know the trick to get Android Studio to _use_ that
> MS Android Emulator?

Read above. Specifically lines 55 thru 96 *should* if correctly
followed and your installations aren't just fux0red due to your non
default install paths get the studio to use the MS emulator. Again,
report back your results.



--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit here:
https://tekrider.net/pages/david-brooks-stalker.php
===================================================
The Archbishop of Canterbury and The Royal Commission for Political
Correctness announced today that the climate in the UK should no
longer be referred to as "English Weather".
Rather than offend a sizeable portion of the UK population, it will
now be referred to as "Muslim Weather" - (Partly Sunni, but mostly
Shi'ite).

Diesel

unread,
Nov 2, 2018, 10:00:35 PM11/2/18
to
Arlen_Holder <a%rle%20nh....@no.spam.net>
news:prilt6$mei$1...@news.mixmin.net Fri, 02 Nov 2018 23:16:55 GMT in
alt.comp.freeware, wrote:

> Since the second machine is Windows, you won't have the horror of
> what I have to go through to get videos onto the iPad.

What horrors? I just setup an ipad this afternoon to access one of
those linux networks I recently setup. I had to install a file
manager to access the samba shares. and the user has to copy the
video he or she wants to watch over to the ipad to view it, but,
otherwise, I didn't run across any horrors with the process.

I'm not a mac person either and didn't run into any serious issues
with that. Getting the printers available to it however is another
story, entirely. Apple certainly likes doing that aspect their own
way.


> Yup.
> I've learned what you learned, but only after running through the
> original text tutorial that it sucks becasue I can't find the
> buttons it says to hit
> <https://developer.android.com/training/basics/firstapp/>

That may actually have something to do with your completely
unnecessary desire not to use default installation folders.

> I'm sure _after_ I'm familiar with all the billions of buttons in
> Android Studio, that the tutorial above will work great - but it
> sucks - IMHO - for a noob simply because they don't show a graphic
> with an arrow to the buttons they say to hit.

You shouldn't be having such trouble and require that level of hand
holding, Arlen. How do you expect to become proficient at programming
or scripting if you have trouble following text based instructions or
video instructions that don't have pics available for your review for
every step?

> I gave up on the text-based tutorial (for now); I'll go back to it
> later. For now, I'm doing the Bill Butterfield 3 of 4 videos.
> I've only done the first one so far (as I spent today on trying to
> install the Microsoft Android Emulator since I'm on an AMD CPU -
> which you don't have to deal with):
> o <https://visualstudio.microsoft.com/vs/msft-android-emulator/>

How much time in hours have you spent trying to get it working today?

> The good news is that the videos, while a pain in a different way,
> at least show EVERY click on the screen!

I'm gobsmacked, really.

> I have Apple equipment because I help people use Apple products.

You do what? Tell me you aren't actually charging people for that
help?

> Except in marketing, compared to Windows/Linux/Android, iOS
> stinks.

Huh?

> That means, eventually, all my apps will also work on iOS; but
> that will happen way later (if ever).

Umm. more likely the latter...Baby steps Arlen. Let's concentrate on
properly installing your programming environment before you try
tackling builds specifically for android vs builds specifically for
iOS.


> We really should both be working the same tutorial if we want to
> help each other ... so ... I guess what I should do, to help you,
> is go _back_ to the original text tutorial - which I had abandoned
> in favor of the video tutorials.
> <https://developer.android.com/training/basics/firstapp/>

You should both take this to email if you wish to assist each other
and get any actual progress done as you do so. None of the groups
you're chatting in about this have anything specifically to do with
programming.

Those you think might benefit from your shared discussion would check
a programming newsgroup long before coming here expecting to find
programming information. And most likely, they wouldn't be completely
new to it, as you and Bill are. So, this conversation between the two
of you would really only benefit the two of you and should be taken
to email.

If anyone here has programming questions, they'll be checking
newsgroups specifically intended for that purpose, not reading a play
by play as you and bill learn how to install the programming package
and begin your first hello world program together. I hope it works
out, don't get me wrong, but I don't need the play by play and I
doubt anyone else reading in these newsgroups does either.


--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit here:
https://tekrider.net/pages/david-brooks-stalker.php
===================================================
Never attempt to distract a masturbating gorilla.

Bill

unread,
Nov 3, 2018, 7:57:10 AM11/3/18
to
In message <XnsA98EE2...@5t05cEN5k6D.R80GNo8TET>, Diesel
<m...@privacy.net> writes
>Those you think might benefit from your shared discussion would check a
>programming newsgroup long before coming here expecting to find
>programming information. And most likely, they wouldn't be completely
>new to it, as you and Bill are. So, this conversation between the two
>of you would really only benefit the two of you and should be taken to
>email.
>
This is almost certainly correct, and I agree that Arlen and I would
probably be better with our first steps carried out on email, but with
occasional reports/questions to _a_ newsgroup.

>If anyone here has programming questions, they'll be checking
>newsgroups specifically intended for that purpose, not reading a play
>by play as you and bill learn how to install the programming package
>and begin your first hello world program together. I hope it works out,
>don't get me wrong, but I don't need the play by play and I doubt
>anyone else reading in these newsgroups does either.

This is all very well, but a search shows 244 usenet groups with
"programming" in the name and none with any combination of "programming"
and "java". A recommendation of a specific programming group would be a
great help.

The other thing I would like to comment on is the use or need to stick
to the specific default directory setup with Android Studio. I wanted to
be able to locate and understand the various elements of the IDE and the
program. The whole point of doing this is to learn and having elements
in "phantom" directories is not helpful. If something IDE based doesn't
work, it is usually fairly simple to detect where something is looking
and revert to defaults if necessary.
A release version of any program should be able to be installed where
the user wants or should clearly state, or define , where it must be
installed.

I do appreciate any help and discussion here.

Apd

unread,
Nov 3, 2018, 11:33:51 AM11/3/18
to
"Bill" wrote:
>In message <XnsA98EE2...@5t05cEN5k6D.R80GNo8TET>, Diesel
><m...@privacy.net> writes
>>Those you think might benefit from your shared discussion would check a
>>programming newsgroup long before coming here expecting to find
>>programming information. And most likely, they wouldn't be completely
>>new to it, as you and Bill are. So, this conversation between the two
>>of you would really only benefit the two of you and should be taken to
>>email.
>
> This is almost certainly correct, and I agree that Arlen and I would
> probably be better with our first steps carried out on email, but with
> occasional reports/questions to _a_ newsgroup.

comp.mobile.android (to which I've directed followups) is appropriate
together with a java one.

>>If anyone here has programming questions, they'll be checking
>>newsgroups specifically intended for that purpose, not reading a play
>>by play as you and bill learn how to install the programming package
>>and begin your first hello world program together. I hope it works out,
>>don't get me wrong, but I don't need the play by play and I doubt
>>anyone else reading in these newsgroups does either.
>
> This is all very well, but a search shows 244 usenet groups with
> "programming" in the name and none with any combination of "programming"
> and "java".

Why do that? The obvious thing to do is search for "java" then narrow.
it down. There's no reason for "programming" to be in the title. The
traditional place to look would be the comp.lang.* hierarchy and any
alt.* variants of that.

> A recommendation of a specific programming group would be a
> great help.

I've not looked but the obvious first places to check for activity
would be comp.lang.java.programmer and alt.comp.lang.java. There are
several groups in the comp.lang.java.* hierarchy. Ignore hierarchies
starting with prefixes like, for example, "fr." or "de." unless you
speak those languages and ignore "javascript" which is not the same
thing at all.


Bill

unread,
Nov 3, 2018, 2:45:23 PM11/3/18
to
In message <prkf4t$p3m$1...@gioia.aioe.org>, Apd <n...@all.invalid> writes
>Why do that? The obvious thing to do is search for "java" then narrow.
>it down. There's no reason for "programming" to be in the title. The
>traditional place to look would be the comp.lang.* hierarchy and any
>alt.* variants of that.
>
>> A recommendation of a specific programming group would be a
>> great help.
>
>I've not looked but the obvious first places to check for activity
>would be comp.lang.java.programmer and alt.comp.lang.java. There are
>several groups in the comp.lang.java.* hierarchy. Ignore hierarchies
>starting with prefixes like, for example, "fr." or "de." unless you
>speak those languages and ignore "javascript" which is not the same
>thing at all.
>
But that's basically what I did. Neither of the obvious groups mentioned
seem to have any postings since 2012.

There seem to be some Google groups relating to Android that are not
usenet groups. Maybe that's where I should look.

Arlen_Holder

unread,
Nov 4, 2018, 1:56:28 AM11/4/18
to
On Sat, 3 Nov 2018 02:00:32 -0000 (UTC), Diesel wrote:

> It's not really a trick Arlen. There's a bug of sorts. I haven't
> isolated it to a specific package.

Thanks for the help where I spent a few hours on the problem today.
I made no progress, where the current status is the same as before:
o I can pop up the Microsoft Android Emulator from Android Studio 3.2.1
o But Android Studio 3.2.1 "adb" will not send the java file to the emulator

It turns out very many people have the issue I'm having which is simply
that Android Studio won't send the app to the Microsoft Android Emulator.

A key problem that is critical to keep in mind for anyone trying
to solve this is that there are Intel & AMD CPUs out there.
o Any solution for Intel CPUs does _not_ apply to AMD CPUs.
o Any solution for AMD CPUs does _not_ apply to Intel CPUs.

This is a key distinction because _most_ of the solutions are Intel only.
Hence, if a solution doesn't list AMD, by name, that solution is worthless.

It turns out that AMD was only recently supported by Google in July 2018.
<https://www.infoq.com/news/2018/07/android-emulator-amd-hyperv>

Which says as of Android Studio beta 3.2 emulation should work on AMD CPUs
<https://android-developers.googleblog.com/2018/07/android-emulator-amd-processor-hyper-v.html>

As far as I know, I meet the requirements, but Android Studio 3.2.1 is
still not sending the java files to execute on the Microsoft Android Emulator yet.
[x]AMD Processor
[x]Android Studio 3.2 Beta or higher (I'm using Android Studio 3.2.1)
[x]Android Emulator v27.3.8+ (I'm using the latest MS Android Emulator)
[x]x86 Android Virtual Device (AVD) - Create AVD
[x]Windows 10 with April 2018 Update
[x]Enable via Windows Features: "Windows Hypervisor Platform"

I also added "adb" (which is in the SDK) to the path and I added the registry
key which is supposedly what the Microsoft Android Emulator is hard coded to,
but neither worked any better than nothing.
https://www.clearlyagileinc.com/agile-blog/using-the-visual-studio-android-emulator-with-android-studio

1. Start the Microsoft Android Emulator set to the device to be emulated:
emulatorcmo.exe /sku:Android launch /id:363F7AED-462C-46BD-9FEC-F1DD3B79916C
2. Start your Android Studio and open up your project:
3. Configure Android Studio to use your new emulator by navigating to:
AndroidStudio321:Run > Edit Configurations > Defaults > Android App
General > Deployment Target Options > Open Select Deployment Target Dialog
[x] Use same device for future launches
4. Run your app in Android Studio
AndroidStudio321:Run > Run app
5. You'll be prompted to "Select Deployment Target"
6. Notice your MS Android Emulator is completely missing from the selections!
7. The issue really boils down to where the new emulator is looking for the
Android SDK. In most default installations of Android Studio bundled
with the SDK, the SDK is stored under:
C:\Users\[USER]\AppData\Local\Android\Sdk
The developers who wrote the MS Android Emulator hard-coded the path
to the SDK as: C:\Program Files (x86)\Android\android-sdk
AndroidStudio321: File > Project Structure > SDK Location
Android SDK location = C:\app\hardware\android\sdk
8. The developers of the MS Android Emulator store this hard-coded path
to the Android SDK in the Windows registry:
Start > Run > regedit
9. This key is "supposed" to exist, but it doesn't exist for me:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools\
10. What exists for me is only:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\
11. So I created this key:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools\
12. And set its string value to:
C:\app\hardware\android\sdk
13. It still didn't show up, so I rebooted the Windows 10 Pro desktop.
a. I started Android Studio 3.2.1
b. I started the MS Android Emulator
AndroidStudio3.2.1: Tools > External Tools > MS Android Emulator
c. I ran the app to get the "Select Deployment Target" window
It says "Initializing ADB" (so it's "adb" that doesn't see it!)
Drat. The MS Android Emulator _still_ doesn't show up.
c:\app\hardware\android\sdk\platform-tools\adb.exe

The question is which to add to the path?
c:\app\hardware\android\sdk
or
c:\app\hardware\android\sdk\platform-tools

Start > Run > %windir%\System32\rundll32.exe sysdm.cpl,EditEnvironmentVariables
BEFORE:
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Microsoft Emulator Manager\1.0\;C:\Users\[user]\AppData\Local\Microsoft\WindowsApps;

AFTER:
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Microsoft Emulator Manager\1.0\;C:\Users\[user]\AppData\Local\Microsoft\WindowsApps;c:\app\hardware\android\sdk\platform-tools;c:\app\hardware\android\sdk\platform-tools;

Arlen_Holder

unread,
Nov 4, 2018, 2:50:32 AM11/4/18
to
On Sun, 4 Nov 2018 06:56:28 -0000 (UTC), Arlen_Holder wrote:

> I made no progress, where the current status is the same as before:
> o I can pop up the Microsoft Android Emulator from Android Studio 3.2.1
> o But Android Studio 3.2.1 "adb" will not send the java file to the emulator

Here are related screenshots showing that everything is close,
where the _only_ thing not working, is that the Android IDE isn't sending
the java code to the Microsoft Android Emulator.

The java code from the IDE runs perfectly on the Android phone over USB:
o <http://www.bild.me/bild.php?file=2116419androidstudio06.jpg>

But the emulation does not work yet on the AMD CPU:
o <http://www.bild.me/bild.php?file=3945600androidstudio07.jpg>

Windows 10 Pro has the virtualization technology enabled:
o <http://www.bild.me/bild.php?file=5832994androidstudio08.jpg>

Which is compatible with AMD CPUs according to AMD checking tools:
o <http://www.bild.me/bild.php?file=3975030androidstudio09.jpg>

The MS Android Emulator pops up from from within Android Studio 3.2.1:
o <http://www.bild.me/bild.php?file=2583074androidstudio10.jpg>

But Android Studio 3.2.1 won't _send_ the java files to that emulator!
o <http://www.bild.me/bild.php?file=6690816androidstudio11.jpg>

Where I can't get the Microsoft Android Emulator to show up in the choices!
o <http://www.bild.me/bild.php?file=2685733androidstudio12.jpg>

Even though I have run the "Import Hardware Profile" GUI many times:
o <http://www.bild.me/bild.php?file=1910896androidstudio13.jpg>

Pointing to the cfg file provided by Microsoft for the Android emulator:
o <http://www.bild.me/bild.php?file=8075950androidstudio14.jpg>

Diesel

unread,
Nov 4, 2018, 3:46:02 AM11/4/18
to
Arlen_Holder <a%rle%20nh....@no.spam.net>
news:prm56r$plp$1...@news.mixmin.net Sun, 04 Nov 2018 06:56:28 GMT in
alt.comp.freeware, wrote:

> On Sat, 3 Nov 2018 02:00:32 -0000 (UTC), Diesel wrote:
>
>> It's not really a trick Arlen. There's a bug of sorts. I haven't
>> isolated it to a specific package.
>
> Thanks for the help where I spent a few hours on the problem
> today. I made no progress, where the current status is the same as
> before

It shouldn't have taken you a few hours to do what I suggested,
previously.

> It turns out very many people have the issue I'm having which is
> simply that Android Studio won't send the app to the Microsoft
> Android Emulator.

Yes, it's a common and known issue. As is the suggested fix I
provided for you, which works most of the time, when properly
followed. I'm not surprised to see that you didn't follow it to the
letter as I previously wrote for you to be doing...

> A key problem that is critical to keep in mind for anyone trying
> to solve this is that there are Intel & AMD CPUs out there.

Wow. Really? :) It's not a key problem though.

> o Any solution for Intel CPUs does _not_ apply to AMD CPUs.
> o Any solution for AMD CPUs does _not_ apply to Intel CPUs.

Obviously this is not accurate. The possibly working solution (as I
said, this works the majority of the time, pending no serious
corruption issues with the SDK installation) I presented to you
already doesn't care what CPU you're using.

> This is a key distinction because _most_ of the solutions are
> Intel only. Hence, if a solution doesn't list AMD, by name, that
> solution is worthless.

I really don't know where you get this information from...The
solutions you're writing about have to do with tweaking the
emulation/stabilizing it, etc. Not getting it initially up and going
with your application on it. Readers would be well advised to ignore
the 'advice' you've provided on this subject at this point, Arlen...

> As far as I know, I meet the requirements, but Android Studio
> 3.2.1 is still not sending the java files to execute on the
> Microsoft Android Emulator yet.

Nope, it's not. You did not follow the instructions I provided you. I
don't know what you spent hours doing, exactly, but it sure as hell
wasn't doing what I wrote for you to do...

> I also added "adb" (which is in the SDK) to the path and I added
> the registry key which is supposedly what the Microsoft Android
> Emulator is hard coded to, but neither worked any better than
> nothing.

adb being added to the path is more for your convenience than much
else. The actual issue is the newly created, but, incomplete registry
key. It's incomplete because you (a) didn't follow my instructions
and (b) are too arrogant to ask for clarification or further help
with that. You just made assumptions and rolled with them. Which,
clearly, didn't give you the results you were hoping for.

> 8. The developers of the MS Android Emulator store this hard-coded
> path
> to the Android SDK in the Windows registry:

It's not a hard coded path if you can change it, Arlen... [g]

> Start > Run > regedit
> 9. This key is "supposed" to exist, but it doesn't exist for me:
> HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools\
> 10. What exists for me is only:
> HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\
> 11. So I created this key:
> HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools\
> 12. And set its string value to:
> C:\app\hardware\android\sdk

Did you actually set Android SDK Tools 'string value' to 'C:\app
\hardware\android\sdk'? :(

So you glanced over this part of my instructions then?

*** begin copy
If the key had to be created , be sure you create the string
variable, Path and input the information above. Close regedit.
Obviously by information above, I specifically mean the location to
where Android SDK installed by default.
*** end copy

Not only did I specifically tell you to reinstall the programs using
their default settings, I also provided very specific instructions
concerning the creation of the key as well as a very specific piece
of it, if it wasn't already present on your machine. You clearly
didn't follow through with all of the instructions. Despite them
being present...



> The question is which to add to the path?
> c:\app\hardware\android\sdk
> or
> c:\app\hardware\android\sdk\platform-tools

add to the path? I didn't tell you to add anything to the path,
Arlen...

MID: <XnsA98EE2...@5t05cEN5k6D.R80GNo8TET>

Open regedit, navigate to

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools

If you don't have this key, create it-- That means, add the key
'Android SDK Tools' under Wow6432Node as you see above.

Under the key if it already exists is a string variable called Path.
edit it to point to the location of your Android SDK Installation.
Example: C:\Program Files (x86)\Android\android-sdk
(If you haven't mucked with the default installs, that example
*should* be what you need to add. Verify for yourself, though.

If the key had to be created , be sure you create the string
variable, Path and input the information above. Close regedit.
Obviously by information above, I specifically mean the location to
where Android SDK installed by default.
*** end snippit

I don't know where you got PATH= out of what I wrote to you...I
specifically wrote 'string variable' which needs to be named, Path
and set to the installation folder for the SDK; which would be
default, had you done what I wrote for you to do, to the letter, as I
told you to do. There was a specific reason I wrote for you to do it
as I wrote it to be done, Arlen.

Are you fucking playing games with me, Arlen, or do we have a
communications issue of some kind going on here? I suppose it could
be both at this point...

One last time, either follow the instructions as I wrote them to the
fucking letter Arlen, or I leave you to piss in the wind on this one
too.

Go back and re-read my post. Follow the instructions, to the fucking
letter, every single one of them. Report back your results.

The following url will provide you with most of the post I already
wrote (that you skipped and partially ignored) containing the
instructions that most likely will get the emulator up and going for
you. That is, if you follow them all.

http://al.howardknight.net/msgid.cgi?ID=154132021900

Last chance, Arlen, then I'm done wasting time on your dumb ass.
Unless you can demonstrate in the future that you can read and
understand what you're reading by following the fucking directions,
i'm going to refer to you as a dumb ass.

It's not a simple matter of a single fuckup on your part, this is the
second easily shown one in a matter of days; you clearly don't
understand what you read and make poor decisions based on what you
thought you read, rather than ask for clarification or further
assistance. Those are two classic ear marks of a dumb ass.



--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit here:
https://tekrider.net/pages/david-brooks-stalker.php
===================================================
Nobody expects the Spanish Inquisition!

Diesel

unread,
Nov 4, 2018, 3:46:02 AM11/4/18
to
Arlen_Holder <a%rle%20nh....@no.spam.net>
news:prm8c7$vfq$1...@news.mixmin.net Sun, 04 Nov 2018 07:50:32 GMT in
alt.comp.freeware, wrote:

> Where I can't get the Microsoft Android Emulator to show up in the
> choices! o
> <http://www.bild.me/bild.php?file=2685733androidstudio12.jpg>

Covered in another reply. Long and short of it is though, because
you're a dumbass. You're a dumbass because you didn't follow
directions, obviously didn't understand the directions as written and
didn't seek additional clarification or assistance before attempting
(and failing) to act on them.


--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit here:
https://tekrider.net/pages/david-brooks-stalker.php
===================================================
The wife suggested I get myself one of those penis enlargers, so I did.
She's 21, and her name's Kathy.

Diesel

unread,
Nov 4, 2018, 3:46:03 AM11/4/18
to
Bill <Billa...@gmail.com>
news:1PftkjlZ...@end.of.the.universe Sat, 03 Nov 2018 11:56:09
GMT in alt.comp.freeware, wrote:

> This is all very well, but a search shows 244 usenet groups with
> "programming" in the name and none with any combination of
> "programming" and "java". A recommendation of a specific
> programming group would be a great help.

I think you'll find leaving out the word programming and searching
for java (not javascript .js; different creatures) would yield far
better results. :)

> The other thing I would like to comment on is the use or need to
> stick to the specific default directory setup with Android Studio.
> I wanted to be able to locate and understand the various elements
> of the IDE and the program. The whole point of doing this is to
> learn and having elements in "phantom" directories is not helpful.
> If something IDE based doesn't work, it is usually fairly simple
> to detect where something is looking and revert to defaults if
> necessary. A release version of any program should be able to be
> installed where the user wants or should clearly state, or define
> , where it must be installed.

For experienced users, that's fine. Arlen isn't what I consider an
experienced or very knowledgeable user (Despite their claims to the
contrary), so, for the purposes of troubleshooting (and making my
life easier in the process), it's best that they allow the default
settings along with default suggested install folders to be used.

Once (if they can leave their attitude and arrogance at the door and
do what I tell them, specifically to do) we get it up and going, they
are more than welcome to reinstall it any place they like, assuming
all previously mentioned risks by doing so.

> I do appreciate any help and discussion here.

I try to help when possible, time permitting, those who aren't
complete assholes towards me for no valid reason. Arlen for whatever
reason, is one of the latter.


--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit here:
https://tekrider.net/pages/david-brooks-stalker.php
===================================================
Hard work never hurt anyone, but then neither did a whole lot of good
rest. --Richard Arthur Hassell

Arlen_Holder

unread,
Nov 5, 2018, 12:04:01 PM11/5/18
to
On Sun, 4 Nov 2018 08:46:02 -0000 (UTC), Diesel wrote:

> You're a dumbass because you didn't follow
> directions, obviously didn't understand the directions as written and
> didn't seek additional clarification or assistance before attempting
> (and failing) to act on them.

I openly admit I am only of average intelligence (if that), where I concede
easily that I still haven't gotten the java code to work on an Android
emulator on the Windows AMD-based desktop.

Moving forward on that problem, it seems that Microsoft may have induced
Google to attempt to fix their hardware acceleration bugs on AMD-based
Widnows desktops.

It appears that Microsoft implies the following sequence of events:
<http://www.bild.me/bild.php?file=5287229emulation01.jpg>
a. Google (apparently) didn't support hardware acceleration on Windows
b. So Microsoft built an Android Emulator that did work on Windows
c. Some time thereafter, Google responded by fixing their bugs

At least that's implied when you read the orange header here:
<https://visualstudio.microsoft.com/vs/msft-android-emulator/>
"Note: After we released the Visual Studio Emulator for Android,
Google updated their Android emaulator to use hardware acceleration.
[Hence] We recommend you use Google's emulator when you can, as it
offers access to the latest Android OS images and Google Play services.
If you have enabled Hyper-V, try out our Hyper-V Android emulator
compatibility preview to run Google's emulator on Hyper-V directly"
<https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?tabs=vswin&pivots=windows>

The good news is that this implies that Google's Android emulator "should"
work with hardware acceleration on Windows PCs, where I've learned the hard
way that Intel-based Windows PCs are far better supported for hardware
acceleration than are AMD-based Windows PCs.

It turns out that any reference that does not mention AMD is worthless when
it comes to getting an AMD-based Windows desktop to work with emulation.

The good news is that the reference above _does_ mention AMD, so it's at
least useful for those of us on the lowly AMD-based Windows desktops.

Arlen_Holder

unread,
Nov 5, 2018, 1:32:27 PM11/5/18
to
On Mon, 5 Nov 2018 17:04:01 -0000 (UTC), Arlen_Holder wrote:

> The good news is that the reference above _does_ mention AMD, so it's at
> least useful for those of us on the lowly AMD-based Windows desktops.

This is a classic Windows hardware acceleration setup problem, I think.

The problem is emulation hardware acceleration on Windows, since the java
code works perfectly on the phone itself when sent over from Windows:
<http://www.bild.me/bild.php?file=2596267androidstudio06.jpg>

What complicates things is that any reference that talks about emulation
and/or acceleration without mentioning AMD, is utterly worthless for
debugging on AMD-based Windows desktops because HAXM just won't fly:
<http://www.bild.me/bild.php?file=4100603androidstudio07.jpg>

Even though I was sure that Hyper-V was enabled on Windows 10 Pro based on
the output from the Windows "System Information" dialog box:
Start > Run > %windir%\system32\msinfo32.exe

It seems that Windows 10 was reporting false information:
<http://www.bild.me/bild.php?file=1288358androidstudio08.jpg>

I was also sure that Hyper-V was working based on the output from
the AMD-supplied AMD-based Windows Hyper-V checking tool:

<http://download.amd.com/techdownloads/AMD-VwithRVI_Hyper-V_CompatibilityUtility.zip>

Which (erroneously?) reported that all was well with Hyper-V:
<http://www.bild.me/bild.php?file=8692170androidstudio09.jpg>

And yet, there were hardware-acceleration errors when sending *.java code
from Android Studio to the Microsoft Android Emulator on an AMD desktop:
<http://www.bild.me/bild.php?file=7953529androidstudio10.jpg>

However, it seems I missed a step in enabling Hyper-V on Windows 10 Pro:
<https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?tabs=vswin&pivots=windows>

Which recommended first that we run the Windows winver command:
Start > Run > winver
<http://www.bild.me/bild.php?file=9332564androidstudio20.jpg>

And then we run the far-more-detailed systeminfo command:
C:> systeminfo > c:\tmp\systeminfo.txt
Should show Hyper-V (& Windows Version 1803 to at least OS Build 17134.1).

And then which suggested we run the Windows "OptionalFeatures" command:
C:\Windows\System32\OptionalFeatures.exe
In order to ensure that Windows is set to:
Enable both Hyper-V and Windows Hypervisor Platform:
Where my first results were, astoundingly, after all this, as follows:
<http://www.bild.me/bild.php?file=9981202androidstudio18.jpg>

*Now how did _that_ happen, even after the AMD & Windows checks?*

Moving on, obviously I checked that "Windows Hypervisor Platform" box!
<http://www.bild.me/bild.php?file=9740339androidstudio19.jpg>
and rebooted.

*That checkbox made a _huge_ difference in Windows hardware acceleration!*

The result was that, back in Android Studio 3.2.1, for the first time, the
default Google Android Emulator finally pops up for the very first time!
<http://www.bild.me/bild.php?file=1034642androidstudio23.jpg>

But it is blank and unresponsive, where Android Studio displays a
completely different set of errors that were not seen prior:
Emulator: Warning: Quick Boot / Snapshots not supported on this machine. A CPU with EPT + UG features is currently needed. We will address this in a future release.
Emulator: emulator: WARNING: Host CPU is missing the following feature(s) required for x86 emulation: SSSE3
Emulator: Hardware-accelerated emulation may not work properly!

Arlen_Holder

unread,
Nov 5, 2018, 3:47:48 PM11/5/18
to
On Mon, 5 Nov 2018 18:32:27 -0000 (UTC), Arlen_Holder wrote:

> Emulator: Hardware-accelerated emulation may not work properly!

Regarding these errors:
Emulator: Warning: Quick Boot / Snapshots not supported on this machine. A CPU with EPT + UG features is currently needed. We will address this in a future release.
Emulator: emulator: WARNING: Host CPU is missing the following feature(s) required for x86 emulation: SSSE3
Emulator: Hardware-accelerated emulation may not work properly!

These "EPT" & "UG" & "SSSE3" features seem to indicate:
o EPT = Extended Page Tables (aka SLAT second level address translation)
o UG = Unrestricted Guest (aka "real mode")
O SSSE3 = Supplemental Streaming SIMD Extensions 3 (cpu instructions)
<https://en.wikipedia.org/wiki/SSSE3>

Windows PowerShell will report your processor family:
PowerShell> gwmi win32_processor

The Sysinternals "coreinfo" tool tells us which features exist in a CPU
<https://docs.microsoft.com/en-us/sysinternals/downloads/coreinfo>
Sysinternals coreinfo output shows either an asterisk or a dash where
"*" means the feature is present
"-" means it is missing
<https://social.technet.microsoft.com/wiki/contents/articles/1401.hyper-v-list-of-slat-capable-cpus-for-hosts.aspx>

This tells me EPT (aka SLAT) is not supported on my CPU:
C:\> coreinfo -v
HYPERVISOR * Hypervisor is present
SVM - Supports AMD hardware-assisted virtualization
NP - Supports AMD nested page tables (SLAT)

Wikipedia says my AMD FPU supports SSE3 but not SSSE3 & coreinfo concurs:
C:\> coreinfo | findstr "SSSE3"
SSSE3 - Supports Supplemental SIMD Extensions 3

So I may have to give up getting Android emulation to work on my AMD CPU,
but there's one more test I can run, I think, which is to use an ARM CPU:
<https://youtu.be/OjD9t1bfYsY?t=193>
Where the guy says we can "just click on the ARM processor".

Arlen_Holder

unread,
Nov 5, 2018, 6:43:04 PM11/5/18
to
On Mon, 5 Nov 2018 20:47:48 -0000 (UTC), Arlen_Holder wrote:

> So I may have to give up getting Android emulation to work on my AMD CPU,
> but there's one more test I can run, I think, which is to use an ARM CPU:
> <https://youtu.be/OjD9t1bfYsY?t=193>
> Where the guy says we can "just click on the ARM processor"


Solved ... sort of.

I'm not sure exactly how I solved it since I tried many things,
but here's the current status (which has a few glitches remaining)
and where I'm not sure which "trick" is what made it finally work.
o I think it was the "Windows Hypervisor Platform" checkbox
FROM: <http://www.bild.me/bild.php?file=9981202androidstudio18.jpg>
TO: <http://www.bild.me/bild.php?file=9740339androidstudio19.jpg>
o Also changing the Google emulator to run on ARM instead of X86
<http://www.bild.me/bild.php?file=2999468androidstudio24.jpg>

These are the three devices I currently tried to emulate:
<http://www.bild.me/bild.php?file=7607398androidstudio31.jpg>
o Rounded corners: Nexus S API 25 ARM (Android 7.1.1, API 25)
o Squarish corners: Nexus 5X API 25 ARM (Android 7.1.1, API 25)
o Bottom Right: MS Android Emulator x86 (Android 5.1.1, API 22)
<http://www.bild.me/bild.php?file=3093498androidstudio30.jpg>

One issue with ARM over X86 emulation is that ARM is 10x slower:
<http://www.bild.me/bild.php?file=2999468androidstudio24.jpg>

The Microsoft emulator (right) was, by far, _faster than Google_:
<http://www.bild.me/bild.php?file=4854975androidstudio25.jpg>

But, eventually, all three emulators (Google, ARM, & MS) came up:
<http://www.bild.me/bild.php?file=6567987androidstudio26.jpg>

All 3 had some issues with Android OS apps pre-installed on them.
<http://www.bild.me/bild.php?file=8587828androidstudio27.jpg>

But all three were invoked by the IDE; where only 1 ran the app:
<http://www.bild.me/bild.php?file=1405186androidstudio28.jpg>

It's preliminary to confirm that it's working, but my tentative
recommendation is to run the Microsoft Emulator choosing x86
instead of running the Google emulators on x86 or ARM.
<http://www.bild.me/bild.php?file=7301488androidstudio29.jpg>

Since this problem is extremely common on AMD Windows machines,
I found a lot of "guesses", many of which I tried, where I
"think" the two that finally worked, sort of, were:
1. Running the Google emulators as ARM (not x86) enabled
the Android Studio IDE to invoke them and for them to
populate their operating system - but - the Android IDE
"adb" command did not send the APK to run on the emulated
Nexus devices.

2. Running the Microsoft emulator as x86 worked almost
perfectly, in that it was more than 10 times faster
than the Google emulations running as ARM, and better
yet, the Android Studio IDE "adb" was able to send the
"Hello World" APK to the Microsoft emulator, where the
only minor glitch was that there were apps that had
to be stopped in the background for some reason.

My tentative recommendation for AMD Windows users is:
o You can run the Google emulators as ARM (but not x86)
o But it's better to run the Microsoft emulator & as x86.

Arlen_Holder

unread,
Nov 5, 2018, 7:57:51 PM11/5/18
to
On Sat, 3 Nov 2018 02:00:34 -0000 (UTC), Diesel wrote:

> I didn't run across any horrors with the process.

Hi Diesel,

Thank you for all your help and kind advice.

If you dual-booted to Linux to plug in the iOS iPad via USB without iTunes,
the task that takes technical knowledge is knowing how to _write_ to the
entire visible file system of the non-jailbroken iPad over USB without
iTunes from Linux or Windows, which includes the critically important
_DCIM_ directory tree of the non-jailbroken iOS iPad.

Keep in mind what I said above entails technical detail of...
1. No jailbreak
2. No iTunes
3. Write access to the entire visible iOS file system
For example, *write access to the /DCIM/APPLE101/ folder!*
4. Over USB

> I'm not a mac person either and didn't run into any serious issues
> with that.

It's binary:
a. People either can write to the visible file system, or they can not;
b. If they can not, then they don't understand what I'm talking about.

A simple yes:no litmus test is:
a. Can people write to the DCIM hierarchy of the iOS iPad or not?
b. If they can't, then they don't comprehend what I'm explaining.

> That may actually have something to do with your completely
> unnecessary desire not to use default installation folders.

This post shows that the paths were a red-herring guess:
<https://groups.google.com/d/msg/comp.mobile.android/aW64zYeBtF0/PDMW1--EBAAJ>

Arlen_Holder

unread,
Nov 5, 2018, 8:27:42 PM11/5/18
to
On Sun, 4 Nov 2018 08:46:02 -0000 (UTC), Diesel wrote:

> it's best that they allow the default settings along with
> default suggested install folders to be used.

Hi Diesel,

Thank you for your help & kind advice about paths & programming.
Part of debugging is understanding where problems lie in complex systems.

The task is to be logically consistent.

Since it was clear that _everyone_ with older AMD CPUs on Windows was
having the _same_ errors with the Google emulators set to x86 (but not arm)
that I was getting, simple logic rules out the specific paths that I used.

It's no different than organizing your tools in your garage at home.
It's always logically consistent!

You don't let the Home Depot guy organize your tools in your toolbox.
He would put all the Home Depot tools in one drawer, called "Home Depot".

You don't let the Lowes tool guy organize your tools in your toolbox.
He would put all the Lowes tools in one drawer, called "Lowes".

IMHO, people should organize their tools to be logically consistent.
Their tools should be organized the way they think.

I happen to think of tools in terms of "functionality".
I organize my tools by what they "do".

For example, these new "things" needed places to go:
1. JDKs & JREs (e.g., Oracle Java development kits & runtime environments)
2. SDKs (e.g., the Google Android SDK at various API levels)
3. Emulators (e.g., Google, Genymotion, & Microsoft Android emulators)
4. IDE's (e.g., Google & Microsoft & Eclipse development environments)
5. CPU tools (e.g., Intel HAXM & AMD Hyper-V debugging tools)
6. Project files (e.g., APK hierarchies)
7. Tutorial files (e.g., videos)

Just like you put your tools in your garage tool boxes where you can find
them (which is likely not in the same place your wife would leave them), I
can't tell you where to put your tools.

However, I can tell you that each of these tools, if you let it default,
will go in a completely different location than the other tools.

To keep control over where things go, I put them _all_ in logical places!
A. I put the tools in C:\app\editor\android (I never use plurals)
B. I put my projects in C:\tmp\android (I use short names when possible)

That's it.

Whenever I need to *find* something, it's either a tool (which is in a
single tool directory) or it's my temporary files (which are in a single
project directory).

For example on tools, both the Android IDE & the Microsoft IDE are in:
C:\app\editor\android\ide\{android_studio,visual_studio}

Note that the installers follow the same logical hierarchy:
C:\software\editor\android\ide\{android_studio,visual_studio}

Note that the menus follow the same logical hierarchy:
Start > Menu > editor > android > ide > {android_studio,visual_studio}

The same logical consistency carries over to all the components.

It's all very well thought out, and very logical, and, it carries over from
one machine to another, such that the menus from Windows XP work perfectly
when literally copied over to Windows 10, for example.

I'm logically consistent where I organize my tools by what they do.

Arlen_Holder

unread,
Nov 5, 2018, 9:56:47 PM11/5/18
to
On Sat, 3 Nov 2018 11:56:09 +0000, Bill wrote:

> The other thing I would like to comment on is the use or need to stick
> to the specific default directory setup with Android Studio.

Hi Bill,

I apologize for going "dark" as I tried to solve the emulation problems,
where I was successful with emulation.
<http://www.bild.me/bild.php?file=7301488androidstudio29.jpg>

I now can offer noob Android users 20:20 hindsight of the following:
1. If you're on older AMD CPUs on Windows - don't even think of emulation!
2. If you must emulate, don't use the Google emulators (arm or x86)!
3. The best emulator, for older AMD, is the Microsoft Android Emulator.

With this 20:20 hindsight, I don't recommend bothering with emulation.

Nor do I recommend bothering with text tutorials after the first "hello
world" works using the Google tutorial you and I both used, Bill.

With 20/20 hindsight, I recommend people start with a good video tutorial.
I haven't chosen the best video tutorial yet, but this one is pretty good:
https://youtu.be/dFlPARW5IX8 (Bill Butterfield, an adder app)

Given that it's human nature for each tutorial writer to name their apps in
a way that makes sense to them, my 20/20 hindsight advice to you and any
other noob writing their first Android apps, is to name the first app
"app01" and to name the second app "app02" and to name the third app
"app03", etc.

That way they organize themselves consistently as you jump around from
tutorial to tutorial.

In 20/20 hindsight, I also recommend you choose a consistent *short*
company name, e.g., I'm now using "kiss" as the company name, as all the
apps will have that same company name for consistency.

While I break down my installed programs into categories, I haven't seen
the need (yet) to break down the projects into categories, so all my
projects fit nicely into c:\tmp\android\{app01,app02,app03,etc.}

In stark contrast, my installers are saved in the following hierarchies:
1. JDKs
2. SDKs
3. EMUs
4. IDEs
5. CPUs
6. APKs
7. VIDs

For example,
1. The java jdk/jre is saved to C:\software\editor\android\jdk\oracle\.
2. The Android SDK is saved to C:\software\editor\android\sdk\google\.
3. The MS emulator is saved to C:\software\editor\android\emu\microsoft\.
4. The IDE is saved to c:\software\editor\android\ide\android_studio\.
5. The HAXM software is saved to C:\software\editor\android\cpu\haxm\.
6. The final APKs are copied to C:\software\editor\android\apk\app01\.
7. Downloaded videos are saved to C:\software\editor\android\vid\bradsaw\.
etc.

Of course, none of this did I know _before_ I started, where I'm learning
where things logically fit only with 20:20 hindsight.

I just now deleted the entire setup, and started over because I had
installed so many hacks that I wanted to start with a clean slate.

When you try to wipe out everything, you find stuff in the strangest places
though, Bill, so take note of some of these strange locations...
o %USERPROFILE%\appData\Local\Android
o %USERPROFILE%)\.android\ (I'm not sure why stuff was put here)
o %USERPROFILE%)\.AndroidStudio3.2\ (I'm not sure why stuff is here either)
o %USERPROFILE%)\.gradle\ (I'm not sure why stuff is here either)
o %USERPROFILE%)\.m2\ (I'm not sure why stuff is here either)
o %APPDATA%\JetBrains\ (where did that come from?)
o C:\Program Files\Android\
o %LOCALAPPDATA%\Android\
o %USERPROFILE%\AndroidStudioProjects
etc.

In summary, I think the perfect place for noobs to share how they got their
first few Android apps working using Windows freeware is exactly these
newsgroups.

The hope is that scores of people will follow in our footsteps, benefiting
from our now 20:20 hindsight!

Certainly I _wish_ I knew a week ago what I know now about choices to be
made when a noob decides to code their first few Android apps using Windows
freeware on older desktops.

Arlen_Holder

unread,
Nov 5, 2018, 10:20:12 PM11/5/18
to
On Sun, 4 Nov 2018 08:46:01 -0000 (UTC), Diesel wrote:

> Open regedit, navigate to
> HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools

Hi Diesel,

Thanks for your help and advice as I admit I'm an Android noob.

I just snapped this snapshot for you so you can see what I have:
<http://www.bild.me/bild.php?file=3834577androidstudio32.jpg>

Maybe Bill can tell us what his registry key looks like, since he has the
same tools installed.

Arlen_Holder

unread,
Nov 5, 2018, 10:20:13 PM11/5/18
to
On Tue, 6 Nov 2018 02:56:46 -0000 (UTC), Arlen_Holder wrote:

> Given that it's human nature for each tutorial writer to name their apps in
> a way that makes sense to them, my 20/20 hindsight advice to you and any
> other noob writing their first Android apps, is to name the first app
> "app01" and to name the second app "app02" and to name the third app
> "app03", etc.
>
> That way they organize themselves consistently as you jump around from
> tutorial to tutorial.

In addition to long apnames truncating to gibberish on the Android
homescreen, but in the beginning, all our noob apps have exactly the same
homescreen icon!

That's why I suggest we noobs name them app01, app02, app03, etc.

Using that naming convention, we noobs can logically fit a hundred noob
apps on your Android homescreen, if we name them accordingly...
o app01 === hello world
o app02 === hello world with actions
o app03 === a simple adder
o app04 === a simple adder that has multiple screens
o app05 === a simple 10-minute timer
etc.

This, I learned in hindsight that I share with other noobs, who are only a
few days behind us, Bill, in their Android app-writing endeavors.

Arlen_Holder

unread,
Nov 6, 2018, 4:26:01 AM11/6/18
to
On Fri, 2 Nov 2018 08:03:32 -0000 (UTC), Diesel wrote:

> Just passing along some friendly intended advice.

Woo hoo! *EVERYTHING WORKED PERFECTLY!*

Thank you Diesel for all your friendly helpful advice.
I deleted everything & started fresh with my 20:20 hindsight experience!

Only one Windows freeware package is needed on newer Intel & AMD CPUs:
a. Android Studio freware

Only two Windows freeware packages are needed on old AMD CPUs
a. Android Studio freware
b. Microsoft Emulator freeware

Once I figured out the tricks, everything worked flawlessly!
o The Microsoft Emulator freeware popped up without any errors:
<http://www.bild.me/bild.php?file=9766951androidstudio33.jpg>
o And the Android Studio IDE freeware ran on that emulator sans errors:
<http://www.bild.me/bild.php?file=8780131androidstudio34.jpg>

The result is that any apps we write using this Windows freeware...
o Can run in the Samsung Galaxy S5 emulation on Windows, or,
o They can run directly on my LG Stylo 3 Plus phone over USB.

Given my new 20:20 hindsight experience, the solution is this simple!
0. You enable Hyper-V & Hypervision in the BIOS & in Windows
1. You install the Android Studio IDE (which installs the SDK & the JDK)
2. You install the Microsoft Emulator (if you're on an old AMD CPU)
3. You configure the MS Emulator in the Android Studio IDE
(I configured it for Android 7.0, API 24, x86 Samsung Galaxy S5)
4. You start the MS Emulator from within the IDE & run the Hello World app!
Voila!

With experience of 20:20 hindsight, even on old AMD CPUs, it's that easy!

Diesel

unread,
Nov 6, 2018, 10:33:23 AM11/6/18
to
Arlen_Holder <a%rle%20nh....@no.spam.net>
news:prqoue$cg1$1...@news.mixmin.net Tue, 06 Nov 2018 00:57:51 GMT in
alt.comp.freeware, wrote:

> On Sat, 3 Nov 2018 02:00:34 -0000 (UTC), Diesel wrote:
>
>> I didn't run across any horrors with the process.
>
> Hi Diesel,
>
> Thank you for all your help and kind advice.
>
> If you dual-booted to Linux to plug in the iOS iPad via USB
> without iTunes,

I don't dual boot.

> the task that takes technical knowledge is knowing
> how to _write_ to the entire visible file system of the
> non-jailbroken iPad over USB without iTunes from Linux or Windows,
> which includes the critically important _DCIM_ directory tree of
> the non-jailbroken iOS iPad.

I couldn't help but notice you now specifically use the words,
'visible' file system; instead of full access as you previously (yet
incorrectly) assumed that 3rd party driver you thought only you knew
about (hahaha) gave you.

> Keep in mind what I said above entails technical detail of...
> 1. No jailbreak
> 2. No iTunes
> 3. Write access to the entire visible iOS file system
> For example, *write access to the /DCIM/APPLE101/ folder!*
> 4. Over USB

Ayep...

>> I'm not a mac person either and didn't run into any serious
>> issues with that.
>
> It's binary:
> a. People either can write to the visible file system, or they can
> not; b. If they can not, then they don't understand what I'm
> talking about.

I do question why what I recently wrote, that you're quoting, has to
do with writing to iOS file system via 3rd party software?

> This post shows that the paths were a red-herring guess:

Erm, no, it doesn't. It shows me that you don't comprehend basic
registry activities and don't want to discuss where and how you
fucked up very simple instructions left for you. I do understand why
you'd prefer to dodge that, being the logical person you are. [g]

I just don't have time to continue doing this with you, Arlen. You're
wasting my time.


--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit here:
https://tekrider.net/pages/david-brooks-stalker.php
===================================================
Cats must lurk under the bed and pounce on the unsuspecting human's
feet.

Diesel

unread,
Nov 6, 2018, 10:33:23 AM11/6/18
to
Arlen_Holder <a%rle%20nh....@no.spam.net>
news:prqqmd$gro$1...@news.mixmin.net Tue, 06 Nov 2018 01:27:42 GMT in
alt.comp.freeware, wrote:

> On Sun, 4 Nov 2018 08:46:02 -0000 (UTC), Diesel wrote:
>
>> it's best that they allow the default settings along with
>> default suggested install folders to be used.
>
> Hi Diesel,
>
> Thank you for your help & kind advice about paths & programming.
> Part of debugging is understanding where problems lie in complex
> systems.

I'm well aware of what debugging entails...

> The task is to be logically consistent.
>
> Since it was clear that _everyone_ with older AMD CPUs on Windows
> was having the _same_ errors with the Google emulators set to x86
> (but not arm) that I was getting, simple logic rules out the
> specific paths that I used.

No, everyone wasn't...You were, some others were based on forum
reading I did, but, not everyone. Some people (not you) understand
what the software package is and what it's hardware conditions are
for use and configured their systems for it. You did not, I suspect
some of them didn't either.

> It's no different than organizing your tools in your garage at
> home. It's always logically consistent!

Sadly, I've been in more than one or two homes where that isn't the
case...

> You don't let the Home Depot guy organize your tools in your
> toolbox. He would put all the Home Depot tools in one drawer,
> called "Home Depot".
>
> You don't let the Lowes tool guy organize your tools in your
> toolbox. He would put all the Lowes tools in one drawer, called
> "Lowes".

I'd hope not. I'd fully expect screwdrivers not to be in the same
place as my hammers, etc.

> IMHO, people should organize their tools to be logically
> consistent. Their tools should be organized the way they think.

Logically consistent <>!= 'organized the way they (a person) thinks'.
People don't typically think in a purely logical manner.

> To keep control over where things go, I put them _all_ in logical
> places! A. I put the tools in C:\app\editor\android (I never use
> plurals) B. I put my projects in C:\tmp\android (I use short names
> when possible)
>
> That's it.

This methodology worked better on systems of the past, before the OS
itself became a complex beast in it's own right...

> For example on tools, both the Android IDE & the Microsoft IDE are
> in:
> C:\app\editor\android\ide\{android_studio,visual_studio}

Non default install paths, invalid registry key(s) pointing to wrong
location; forcing programs which either expect the default install
path or a properly configured key to point them to it will either
fail to find required support files, or be forced to search for them
on it's own.

As you've been told before and completely chose to ignore, You don't
make the decisions concerning how most things are laid out on your
system.

> Note that the installers follow the same logical hierarchy:
> C:\software\editor\android\ide\{android_studio,visual_studio}
>
> Note that the menus follow the same logical hierarchy:
> Start > Menu > editor > android > ide >
> {android_studio,visual_studio}

The menus hide the details behind the scenes and provide you with an
icon to click. For graphical representation, it can be as simple and
as 'logical' as you want it to appear to be.

> The same logical consistency carries over to all the components.

Yes, but, not in the way you think. It's logical from the point of
view of the developers, not what you personally think.



--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit here:
https://tekrider.net/pages/david-brooks-stalker.php
===================================================
System error 4C: kernel panic

Bill

unread,
Nov 6, 2018, 11:58:28 AM11/6/18
to
That registry key does not exist on either of the Intel machines here. A
search finds nothing obviously relating to the Android sdk.

I have the 2 machines the newer tablet laptop X220T on W7 and with
Android Studio using defaults
and the older X201 straight laptop running W10, with non-default
directories.

On both, the "Appearance and Behaviour" SDK Tools listing is identical
to yours, wxcept that the HAXM is ticked.

The X201 seems to be working well and the emulator is fine. There is a
warning about the display drivers, but I have a good display.

The X220T came to me with a WWAN module installed and, presumably
working. To fit the mSATA boot SSD, this had to be removed to free the
slot.
As soon as I started trying to get the emulator to work, there were
error messages relating to the WWAN. I assume the emulator was trying to
connect to the phone components of the laptop. I have now removed all
the WWAN related software on the machine, but the emulator still doesn't
fully appear. I get the surround, but with a transparent screen.

There hasn't been time to do much more. I'm still on the text based app.

Arlen_Holder

unread,
Nov 6, 2018, 2:06:19 PM11/6/18
to
On Tue, 6 Nov 2018 15:33:23 -0000 (UTC), Diesel wrote:

> I couldn't help but notice you now specifically use the words,
> 'visible' file system; instead of full access as you previously (yet
> incorrectly) assumed that 3rd party driver you thought only you knew
> about (hahaha) gave you.

Hi Diesel,
I think I may have not been clear, so I apologize that you seem to have
misunderstood what "visible" means, where I've used the term
umpteen times on Windows, Linux, Android, and iOS contexts, so I simply
assumed you understood what it means in the context of the typical user.

It's all about read/write permission.

What visible indicates is what a typical "user" can read/write to.
o On Linux home desktops, that's typically everything
o On Windows home desktops, it's typically everything

However, if you're at the local public library, then the "visible" file
system (aka, the area the user can read and write to), may be vastly
limited.

Given the context of a desktop writing to a mobile device, I don't expect
the desktop to write to the "non visible" portion of the mobile device
(without rooting/jailbreaking).

Does that clarification make sense to you yet?

It's my fault that you seemed to miscomprehend what "visible file system"
means, where you seem to have attributed, seemingly, some sort of sinister
intent, but it just means what the user can read and write to.
o On Android, it's typically _not_ the entire file system
o On iOS, it's even far less of the file system

To the point of the "visible" file system on Android, there's no problem
for a typical user to read _and write_ to that _entire_ visible file system
from the desktop (e.g., from Windows).

But the trick, always, in cross platform read/write compatibility, is not
Android and Windows, but iOS and Windows (or iOS and Linux).

Put another way, it's easy to claim cross platform compatibility if you
ignore either iOS, or if you ignore the entire visible file system on iOS.

A simple test of the ability to _write_ to the entire visible file system
of iOS is to simply write to the DCIM directy from the desktop over USB.
o I can easily do that
o But almost nobody else can

Why not?
They don't know what I know about writing to the iOS visible file system.

To wit:
o I can read _and write_ to the entire visible iOS file system
o But most people can't do that.

How can I prove that most people can't do that?
o Just slide a file from their desktop onto the iOS DCIM directory.

IMHO, 999 out of 1,000 people will fail at that simple task.
And yet, DCIM is clearly a component of the iOS visible file system.

I hear a _lot_ of people _claim_ they can do it, but if they can't tell me
how they did it, then I _know_ they're just making up those claims (hoping
that nobody realizes that they don't actually know how to do it).

You're not one of those people Diesel, who would make a claim without being
able to actually do it - but a lot of people _think_ they're far smarter
than they really are ...

And the proof (in this case) is simple:
o If they can write from the desktop to the DCIM directory
Then what they claim is true
o If they can _not_ write from the desktop to the DCIM directory
Then what they claim is false.

As I said, it's binary (where the DCIM directory is just _one_ of the many
directories in the typical iOS visible file system).

Arlen_Holder

unread,
Nov 6, 2018, 4:43:19 PM11/6/18
to
On Tue, 6 Nov 2018 16:58:26 +0000, Bill wrote:

> That registry key does not exist on either of the Intel machines here. A
> search finds nothing obviously relating to the Android sdk.

Thank you very much, Bill, for that independent confirmation!
As as admitted Android noob, _all_ this is _new_ to me.
So your confirmation of even simple things - helps a LOT!

THANKS!!!!!!!

In 20/20 hindsight, I think this registry edit was a red herring.
I've since _deleted_ it, and everything _still_ works perfectly!
<http://www.bild.me/bild.php?file=7301488androidstudio29.jpg>

> I have the 2 machines the newer tablet laptop X220T on W7 and with
> Android Studio using defaults and the older X201 straight laptop
> running W10, with non-default directories.

Thanks for that information as our experience can help each other if we
trust what we say (where you can always trust what I say as fact).

Like you, I prefer to put things where I can find them, where I've already
explained in gory detail where I put stuff.

Early this morning, I wiped everything out & started fresh where I decided
to let Android Studio do all the downloading of everything but the
Microsoft Emulator (which you don't need since you're on Intel CPUs).

Here are the main three installation steps.
1. Install the Android Studio IDE (which adds the JDK & Google Emulators)
C:\app\editor\android\ide\android_studio
2. Optionally (if you're on older AMD), install the MS Emulation Manager
C:\Program Files (x86)\Microsoft Emulator Manager
3. Configure that MS Emulation Manager to run inside the Android Studio IDE

Then, to run the apk on either a physical phone or on an emulated phone:
A Start the Android Studio IDE
B Start the MS Emulation Manager
(AndroidStudio:Tools > External Tools > MS Emulation Manager)
C Pick any desired Android device under test & Android API
(e.g., Galaxy S5 on Android 7.0 using x86)
D Send your app from the Android Studio IDE to your device under test
(AndroidStudio: Run > Run 'app')
Voila!
<http://www.bild.me/bild.php?file=9175315app02b.gif>


> On both, the "Appearance and Behaviour" SDK Tools listing is identical
> to yours, wxcept that the HAXM is ticked.

Thank you Bill for kindly confirming those checkbox settings inside the
Android Studio IDE.

It helps GREATLY that you confirmed the settings are the same, with the
expected exception of the HAXM checkbox because I'm on AMD while you're on
Intel.

Since you have HAXM, you can use the Google-supplied emulators; but I have
to use the Microsoft x86 emulator - which - in the end - is the same thing
since we're noobs at this stage - so _any_ emulator that works is a good
emulator.

One "choice" I don't understand yet is why we even have the choice of "arm"
or "x86", when we choose an emulator, since both work, but the arm choice
is clearly more than ten times slower than the x86, and since the X86 is
the default.
<arm slow http://www.bild.me/bild.php?file=2999468androidstudio24.jpg>

> The X201 seems to be working well and the emulator is fine. There is a
> warning about the display drivers, but I have a good display.

I too get a bunch of warnings, but everything is working so I'm not even
looking at those warnings.

I'm curious, Bill ... does your emulation work about the same speed as your
physical phone?

I haven't timed it yet, but, while the ARM emulation is dog slow...
<http://www.bild.me/bild.php?file=4100603androidstudio07.jpg>

The x86 emulation seems 'about the same' so far for me, but I haven't timed
it - but it's not egregious either way.
<http://www.bild.me/bild.php?file=2999468androidstudio24.jpg>

How is the emulation versus the real thing for you on speed?

> The X220T came to me with a WWAN module installed and, presumably
> working. To fit the mSATA boot SSD, this had to be removed to free the
> slot.
> As soon as I started trying to get the emulator to work, there were
> error messages relating to the WWAN. I assume the emulator was trying to
> connect to the phone components of the laptop. I have now removed all
> the WWAN related software on the machine, but the emulator still doesn't
> fully appear. I get the surround, but with a transparent screen.

That's interesting.

I haven't actually "played" with the emulated phone yet.
It would be interesting to see "what" it does, in terms of functionality,
e.g., it would be _great_ if it can make actual phone calls (but I suspect
it can't).

Like you ... right now ... I'm just dealing with getting the basics going,
where the difference between you and me is that I had some hell to learn
about getting emulation working on older AMD-based Windows where you
skipped that hell because you're on an Intel-based Windows. (Lucky you!)

In a posteriori 20/20 hindsight, I'd suggest that noobs _start_ on
Intel-based CPUs (if they can), or, if they can't, to start on _newer_
AMD-based CPUs.

Or, if they're on older AMD-based CPUs, to just run apps on a spare phone!
That why they'd skip the emulator hell I went through. :)

BTW, Bill ... I don't remember if you said whether you're using a spare
phone or if you're running on your main phone?

I don't have a spare phone with a good screen (I crushed them all,
literally), so I only have two choices:
o Load all those apps onto my main phone, or,
o Run everything in emulation

Do you run on a spare phone or your main phone?

> There hasn't been time to do much more. I'm still on the text based app.

Now that I've gotten past the AMD-specific horrors, I can try to at least
"catch up" to you.

I'll post back when I have something to report of interest to all.
<http://www.bild.me/bild.php?file=2596267androidstudio06.jpg>

Bill

unread,
Nov 7, 2018, 11:39:26 AM11/7/18
to
In message <prt1tm$u0o$1...@news.mixmin.net>, Arlen_Holder
<a%rle%20nh....@no.spam.net> writes
>On Tue, 6 Nov 2018 16:58:26 +0000, Bill wrote:
>
>> The X201 seems to be working well and the emulator is fine. There is a
>> warning about the display drivers, but I have a good display.
>
>I too get a bunch of warnings, but everything is working so I'm not even
>looking at those warnings.
>
>I'm curious, Bill ... does your emulation work about the same speed as your
>physical phone?
>
>I haven't timed it yet, but, while the ARM emulation is dog slow...
><http://www.bild.me/bild.php?file=4100603androidstudio07.jpg>
>
>The x86 emulation seems 'about the same' so far for me, but I haven't timed
>it - but it's not egregious either way.
><http://www.bild.me/bild.php?file=2999468androidstudio24.jpg>
>
>How is the emulation versus the real thing for you on speed?
>
I haven't really checked any speeds. The emulation seems quite slow to
appear, but, because I've stayed with the text instructions, I haven't
actually got any buttons to press that do anything on the emulator. I am
still stuck where I enter the java message stub under the heading "Start
another activity". I haven't had much time and have spent it mainly
trying to get the instance of the program on the other machine - with
default settings everywhere - working.

>> The X220T came to me with a WWAN module installed and, presumably
>> working. To fit the mSATA boot SSD, this had to be removed to free the
>> slot.
>> As soon as I started trying to get the emulator to work, there were
>> error messages relating to the WWAN. I assume the emulator was trying to
>> connect to the phone components of the laptop. I have now removed all
>> the WWAN related software on the machine, but the emulator still doesn't
>> fully appear. I get the surround, but with a transparent screen.
>
Further to that, there is a transient error message that appears, but it
is beneath the visible parts of the emulator, and I haven't managed to
move the emulator to see the message. I have run Sysinternals Process
Monitor, which shows a bunch of entries like this.

" 23:55:27.9635626 emulator64-crash-service.exe 6968 CreateFile
C:\Windows\Prefetch\EMULATOR64-CRASH-SERVICE.EXE-C784D2C2.pf NAME NOT
FOUND Desired Access: Generic Read, Disposition: Open, Options:
Synchronous IO Non-Alert, Attributes: n/a, ShareMode: None,
AllocationSize: n/a "

but I haven't investigated further.


<Snip about cpu types >
>
>BTW, Bill ... I don't remember if you said whether you're using a spare
>phone or if you're running on your main phone?
>
>I don't have a spare phone with a good screen (I crushed them all,
>literally), so I only have two choices:
>o Load all those apps onto my main phone, or,
>o Run everything in emulation
>
>Do you run on a spare phone or your main phone?

I have a spare Android 6 phone that I've been using. I also have an
Android 4 phone and a couple of Android 4 tablets, but haven't tried any
of these. ( I've kept them all because each has a special feature eg an
A4 tablet receives off air TV)
>
>> There hasn't been time to do much more. I'm still on the text based app.
>
>Now that I've gotten past the AMD-specific horrors, I can try to at least
>"catch up" to you.
>
"Catch up" is not the right phrase!

I will probably concentrate on the machine where the emulator works,
concentrate on getting the java to work, and then look at where to go
from there. I think the timer app is a great basic thing to aim for, and
have at least one idea of my own for a further "one button" app.

Arlen_Holder

unread,
Nov 8, 2018, 4:59:45 AM11/8/18
to
On Tue, 6 Nov 2018 09:26:01 -0000 (UTC), Arlen_Holder wrote:

> With experience of 20:20 hindsight, even on old AMD CPUs, it's that easy!

Woo hoo!

Now that I finally was able to get the Microsoft Emulator working with
Android Studio 3.2.1 on an old AMD-based Windows desktop, I was able to
easily run the official Google Android Studio "Your first app" tutorial to
completion:
<https://developer.android.com/training/basics/firstapp/>

o The app running in a Nexus 7 emulation displays a screen for text input:
<http://www.bild.me/bild.php?file=5614359androidstudio42.jpg>
o You enter any desired text and hit the "Send" button:
<http://www.bild.me/bild.php?file=1062599androidstudio43.jpg>
o That sends the text to the next level (where all the back buttons work):
<http://www.bild.me/bild.php?file=6870342androidstudio44.jpg>

That seems to be the ONLY step-by-step tutorial on those web page (but
maybe I need to root around more?).

Given I'm an average noob (if even that), I wish I could speak with the
writer where what I would tell her would IMPROVE the tutorial for noobs
without adding any complexity.

I suspect it would take her a half hour on the phone to hear me out, and
then another few hours to make her edits, and those improvements alone
would be exponentially better.

Anyway, the first Android Studio tutorial is successfully completed, such
that the app works for what it was intended to do.

For those of you who have never created an Android app, this method of
handholding works, where the hardest part for me was completely unrelated
to the tutorial itself - but was a hardware/software configuration issue
which only shows up on AMD-based systems.

Arlen_Holder

unread,
Nov 8, 2018, 5:24:15 AM11/8/18
to
On Wed, 7 Nov 2018 16:39:06 +0000, Bill wrote:

> I haven't really checked any speeds.

Hi Bill,

Good news!

Now that I got all the old-AMD-induced emulations problems worked out,
I just completed the official Android Studio "My First App" tutorial:
<https://developer.android.com/training/basics/firstapp/>
Where the emulation speed is "about the same" as the physical speed,
although, again, I haven't timed it with a stopwatch, and I'm counting
assuming the emulator is already up and ready to take files just as a phone
would be as it's connected via USB to the computer.

> The emulation seems quite slow to
> appear, but, because I've stayed with the text instructions, I haven't
> actually got any buttons to press that do anything on the emulator.

In that first app, there are only three buttons that you can test.
o One is called "Send", which will send the text to the next screen
o The other two are the top & bottom "back" buttons on the second screen

Here is a set of screenshots showing those events on the MS emulator:
o The app running in a Nexus 7 emulation displays a screen for text input:
<http://www.bild.me/bild.php?file=5614359androidstudio42.jpg>
o You enter any desired text and hit the "Send" button:
<http://www.bild.me/bild.php?file=1062599androidstudio43.jpg>
o That sends the text to the next level (where all the back buttons work):
<http://www.bild.me/bild.php?file=6870342androidstudio44.jpg>

> I am
> still stuck where I enter the java message stub under the heading "Start
> another activity". I haven't had much time and have spent it mainly
> trying to get the instance of the program on the other machine - with
> default settings everywhere - working.

Here are the two main java files which worked for me.
==========
C:\tmp\android\app02\app\src\main\java\com\kiss\app02\MainActivity.java
==========
package com.kiss.app02;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

public class MainActivity extends AppCompatActivity {
public static final String EXTRA_MESSAGE =
"com.example.myfirstapp.MESSAGE";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}

/** Called when the user taps the Send button */
public void sendMessage(View view) {
Intent intent = new Intent(this, DisplayMessageActivity.class);
EditText editText = (EditText) findViewById(R.id.editText);
String message = editText.getText().toString();
intent.putExtra(EXTRA_MESSAGE, message);
startActivity(intent);
}
}
==========
C:\tmp\android\app02\app\src\main\java\com\kiss\app02\DisplayMessageActivity.java
==========
package com.kiss.app02;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;

public class DisplayMessageActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_display_message);

// Get the Intent that started this activity and extract the string
Intent intent = getIntent();
String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);

// Capture the layout's TextView and set the string as its text
TextView textView = findViewById(R.id.textView);
textView.setText(message);
}
}
==========
> I have a spare Android 6 phone that I've been using. I also have an
> Android 4 phone and a couple of Android 4 tablets, but haven't tried any
> of these. ( I've kept them all because each has a special feature eg an
> A4 tablet receives off air TV).

Thanks for letting me know you've been emulating but that you can run the
apps on the phones. My main warning to you on running the apps on the
phones is that it clutters them up with your test apps, but otherwise I
have run all the test on the physical phone and it works just fine either
way (on the emulator, or on the phone).

The emulator is more convenient because I can pick any emulator I want.

> I will probably concentrate on the machine where the emulator works,
> concentrate on getting the java to work, and then look at where to go
> from there.

Let me know if you need me to post any code for you.

These are most likely the six files that you may want to look at:
C:\tmp\android\app02\app\src\main\java\com\kiss\app02\MainActivity.java
C:\tmp\android\app02\app\src\main\res\layout\activity_main.xml
...
C:\tmp\android\app02\app\src\main\java\com\kiss\app02\DisplayMessageActivity.java
C:\tmp\android\app02\app\src\main\res\layout\activity_display_message.xml
...
C:\tmp\android\app02\app\src\main\AndroidManifest.xml
C:\tmp\android\app02\app\src\main\res\values\strings.xml
...

BTW, I'm curious what happens when you doubleclick on those *.java
and *.xml files. What editor comes up for you? Can you change that editor?

> I think the timer app is a great basic thing to aim for, and
> have at least one idea of my own for a further "one button" app.

I think it would be great if we both work on a simple timer app as our
first app that strays off the trail that the tutorials provide to us.

The timer seems simple enough in that you hit an icon, and ten minutes
later a timer rings. It would have utility to millions of people as the
_simplest_ timer on the planet!

My intention, if I ever develop apps, would be that they be
o Always free
o Always ad free, cloud free, spyware free, permission free, etc.
o And that they perform a simple KISS functionality

That's why I named the "company" field "kiss". :)

Bill

unread,
Nov 8, 2018, 12:52:51 PM11/8/18
to
Hi Arlen, It seems to me that the tutorial has mistakes and is
misleading! I think by adjusting my code to yours, I have cleared all
the errors.

Re the tutorial, this is what I would like to concentrate on, if I may:

In message <ps12sc$8j4$1...@news.mixmin.net>, Arlen_Holder
<a%rle%20nh....@no.spam.net> writes
>Here are the two main java files which worked for me.
> ==========
>C:\tmp\android\app02\app\src\main\java\com\kiss\app02\MainActivity.jav
>a

That line seems similar to mine.
> ==========
>package com.kiss.app02;
>
>import android.content.Intent;

I don't have this import, but maybe that comes later.

>import android.support.v7.app.AppCompatActivity;
>import android.os.Bundle;
>import android.view.View;
Check, same here. I then have, and don't know where it has come from,

import static android.icu.lang.UCharacter.GraphemeClusterBreak.V;

>import android.widget.EditText;
>
Maybe comes later.
>public class MainActivity extends AppCompatActivity {

Check
> public static final String EXTRA_MESSAGE =
>"com.example.myfirstapp.MESSAGE";

Not there yet presume OK

> @Override
> protected void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.activity_main);
> }
Check
>
> /** Called when the user taps the Send button */
> public void sendMessage(View view) {

I have fun sendMessage(view: View){
*cf what the tutorial says. View and view are in reverse order, with a
colon between and "fun" is referred to in the code in the tutorial that
says
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
}
*

> Intent intent = new Intent(this, DisplayMessageActivity.class);
> EditText editText = (EditText) findViewById(R.id.editText);
> String message = editText.getText().toString();
> intent.putExtra(EXTRA_MESSAGE, message);
> startActivity(intent);
These 5 lines will, I hope appear later
> }
>}

I haven't yet tried to progress any further (lack of time - we have a
lot of family matters here), but would be interested to know how, for
example, you came to reverse View and view.

The external editor I'm using is Notepad++. I had difficulty making it
the default editor on the Windows 10 machine, but by digging through the
Settings menu to the "Default Options by File type" and then pointing it
to the Notepad++ .exe file.
I understand there is an intermittent bug in W10 that stops Notepad++
being selected and retained, but it worked here. They seem to be raking
out the good bits of Control Panel and gradually destroying it.

I will try to catch up over the next few days. Many thanks for getting
me past this problem.

Arlen_Holder

unread,
Nov 8, 2018, 2:27:00 PM11/8/18
to
On Thu, 8 Nov 2018 17:45:16 +0000, Bill wrote:

> Hi Arlen, It seems to me that the tutorial has mistakes and is
> misleading! I think by adjusting my code to yours, I have cleared all
> the errors.

Hi Bill,

That's *fantastic* that the code helped you clear the errors!
I'm always all about helping people help each other working together!

Hence, I'm very glad I could help, as that's the whole point of Usenet!
People helping each other, where, in this case, we're both noobs!

I'm not afraid to admit that it took me three or four runs (maybe even
more, as I didn't count them) through the tutorial myself before I had a
successful outcome.

So we're both in the same boat! :)

[As an aside, the people to be afraid of are the ones who can't admit that
they're noobs!]

>>import android.content.Intent;
>
> I don't have this import, but maybe that comes later.

I agree these "import" lines are tricky.
I'm not sure what they really mean yet though.

> import static android.icu.lang.UCharacter.GraphemeClusterBreak.V;

The problem with the import lines is that you can accidentally add them
very easily, since the Android Studio practically writes the code for you.

For an example, if you type a letter, and then hit tab, it will auto fill
out a lot of the time (if it matches stuff) and then if you hit return, a
bunch of automatic things just happen. So it's very very very easy to add
stuff you may not have meant to add, simply by hitting simple keys like tab
and return!

I think I realize, looking at what you wrote, is that I gave you my *final*
code, but I should have given you the code at the exact point where you are
in the tutorial.

Can you tell me the link again, so that I'm sure exactly which page in the
tutorial you are stuck at?

o Page 1 of 5: Build your first app
<https://developer.android.com/training/basics/firstapp/>
o Page 2 of 5: Create an Android project
<https://developer.android.com/training/basics/firstapp/creating-project>
o Page 3 of 5: Run your app
<https://developer.android.com/training/basics/firstapp/running-app>
o Page 4 of 5: Build a simple user interface
<https://developer.android.com/training/basics/firstapp/building-ui>
o Page 5 of 5: Start another activity
<https://developer.android.com/training/basics/firstapp/starting-activity>

Maybe I can re-run the tutorial and stop at _that_ page for you to show the
code, where we can presume that noobs following in our footsteps will have
the exact same issues that you're having.

> I haven't yet tried to progress any further (lack of time - we have a
> lot of family matters here), but would be interested to know how, for
> example, you came to reverse View and view.

I am also only working on this sporadically. There may be a day or two
between efforts, or maybe only ten minutes between efforts.

I did run a test this morning where it took 26 seconds from the time I hit
run to the time that the display showed up on the Microsoft emulator. I
then ran that test again where the device under test was the phone, which
took about the same amount of time (give or take a second or two).

So, at this stage, I'm going to mostly run on emulation since it clutters
up my extremely neat phone desktop screen otherwise. :)

> The external editor I'm using is Notepad++. I had difficulty making it
> the default editor on the Windows 10 machine, but by digging through the
> Settings menu to the "Default Options by File type" and then pointing it
> to the Notepad++ .exe file.

Ah. My default text editor is gVIM (because I grew up on UNIX), where
Windows just will NOT accept gVim as the default text editor for either XML
or java files!
o What editor do you use to edit "java" & "xml"
<http://www.pcbanter.net/showthread.php?t=1106289>

Most Windows users seem to be on the same editor you're on, so that's good
for you that you can get a doubleclick to open the files in your editor.

> I will try to catch up over the next few days. Many thanks for getting
> me past this problem.

If you can find another tutorial for both of us to try, Bill, that would be
useful as we can do it at the same time (where, as a result, anyone reading
this thread, now or in the future, can benefit).

[That's the entire point of Usenet, after all. Helpful collaboration.]

Meanwhile, I ran that Bill Butterfield tutorial (for the third or fourth
time) this morning where I re-did the adder that I had created last time
(but which I had deleted in my clean-slate wipeouts as I organized the
files).

Just as like what happened with the original Google "Hello World" tutorial,
each time I run though this Bill Butterfield tutorial, I get fewer and
fewer and fewer mishaps - and things work faster and faster and faster.

This last rev took less than a half hour (or so ... as I wasn't counting).

Here is a screenshot of the adder app that resulted from that tutorial:
<http://www.bild.me/bild.php?file=8515596androidstudio46.jpg>

You'll note I positioned the buttons differently but that is just window
dressing. I moved them up because the keyboard kept getting in the way on
the phone (but not in the emulation, oddly enough).

It's the "Android Studio For Beginners Part 1", by Bill Butterfield.
o Published on Jun 13, 2017 (mp4)
o https://youtu.be/dFlPARW5IX8 (part 1 of 4)
===========
Here's the java code (so that you and others can use it directly)
C:\tmp\android\app03\app\src\main\java\com\kiss\app03\MainActivity.java
===========
package com.kiss.app03;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

Button addBtn = (Button) findViewById(R.id.addBtn);
addBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
EditText firstNumEditText = (EditText)
findViewById(R.id.firstNumEditText);
EditText secondNumEditText = (EditText)
findViewById(R.id.secondNumEditText);
TextView resultTextView = (TextView)
findViewById(R.id.resultTextView);

int num1 =
Integer.parseInt(firstNumEditText.getText().toString());
int num2 =
Integer.parseInt(secondNumEditText.getText().toString());
int result = num1 + num2;
resultTextView.setText(result + "");
}
});

}
}
===========
Here's the xml layout (so that you and others can use it directly)
C:\tmp\android\app03\app\src\main\res\layout\activity_main.xml
===========
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
tools:layout_editor_absoluteY="81dp">

<android.support.constraint.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content
===========

With respect to my positioning the buttons differently from the tutorial:
<http://www.bild.me/bild.php?file=8515596androidstudio46.jpg>

Two things I learned (which is why I repositioned the buttons):
1. The keyboard acts slightly differently in emulation because the emulator
uses your real keyboard and not a pop-up keyboard (which the phone uses).
2. On the phone, I need a way to make the keyboard go away in the app, so
as to eliminate the step of closing the keyboard manually.

Bill

unread,
Nov 8, 2018, 3:47:54 PM11/8/18
to
In message <ps22m3$39s$1...@news.mixmin.net>, Arlen_Holder
<a%rle%20nh....@no.spam.net> writes
I'm part way down this page, and have adjusted the files so they build
without errors.
This is all I will have time for today and tomorrow morning we have a
bricklayer coming to take down and rebuild the gatepost I hit with the
car. The forecast is gales and torrential rain.

I don't want to create any work for you or anyone, so I need to reach
the next snag before asking again, hence this quick and short reply!

Arlen_Holder

unread,
Nov 9, 2018, 6:40:40 AM11/9/18
to
On Thu, 8 Nov 2018 20:43:35 +0000, Bill wrote:

> I'm part way down this page, and have adjusted the files so they build
> without errors.

Hi Bill,
Thanks for letting me know you're doing fine with that first app!
(It makes me feel good to have helped you, as you had also helped me.)

I'll be working on the next video in the Bill Butterfield series when I get
the chance, and where I'll report back if I have something to report of
general use to anyone else who is following along writing their own apps.

BTW, there must be some "magic" that needs to be added (later) to enable
the APK to be installed by others!

I ran this experiment just now, which failed:

1. On the phone, I wiped out all my recently installed "appxx" apps.
2. On the desktop, I used the Android Studio IDE to put app03 on my phone
3. On the phone, I backed up app03 to the APK for app03.apk
4. On the phone, I wiped out the app "app03"
5. On the phone, I tried to re-install from the backed-up app03.apk
6. That failed, saying... "The package appears to be corrupt"
<http://www.bild.me/bild.php?file=5351195apk.jpg>

Hmmmmnmnmmm....

The app03 worked just moments prior …
So, the app-to-apk-back-to-app process may need "fancy stuff".

Diesel

unread,
Nov 9, 2018, 10:24:34 PM11/9/18
to
Arlen_Holder <a%rle%20nh....@no.spam.net>
news:ps11eg$5lm$1...@news.mixmin.net Thu, 08 Nov 2018 09:59:45 GMT in
alt.comp.freeware, wrote:

> On Tue, 6 Nov 2018 09:26:01 -0000 (UTC), Arlen_Holder wrote:
>
>> With experience of 20:20 hindsight, even on old AMD CPUs, it's
>> that easy!
>
> Woo hoo!
>
> Now that I finally was able to get the Microsoft Emulator working
> with Android Studio 3.2.1 on an old AMD-based Windows desktop, I
> was able to easily run the official Google Android Studio "Your
> first app" tutorial to completion:

That's great Arlen. It only took you over twenty (right?) repeat
installations of the software packages, likely hours spent online
'researching' your AMD based system so that you could eventually make
the proper adjustments, and, a sorted collection of completely
unnecessary posts to usenet, detailing your progress (or rather, lack
of for a considerable period of time).

For comparison, Arlen...

Someone who's interested and/or has developed software in various
other languages for sometime is likely to be familiar enough with the
host environment (that's a combination of the software and the
hardware, Arlen) to successfully install and make use of (very
important the latter, wouldn't you agree?) the programming
environment (let's just call it compiler for short, ok?) on the first
try.

I have a theory as to why it took you as much time as it did and as
much hand holding as you could acquire, here and elsewhere. It's
based entirely on prior/current interactions with you, here in
usenet. AFAIK, I don't know you in any way outside of usenet.

Here's my theory...

I believe that you're so arrogant that you feel as if it's never
necessary to read the instructions, or even give them so much as a
glance over before you jump right in, expecting excellent results, on
the first attempt.

Here's a simple example, Arlen. It's important, in some cases Arlen,
to *know* what the hardware is inside the box you're using. It *does*
matter. As you've discovered. Not only did you waste a significant
amount of your time, you wasted a small amount of mine as well... And
reinforced what I've been told since I was a child concerning making
assumptions about what someone does/doesn't know. I *assumed* you
(based on your boasting) atleast knew enough about the machine you
were doing this with to know what it physically did/didn't support
and had already made the proper configuration adjustments.

I made the mistake of thinking (not paying attention to the fact you
didn't know what HAXM is...*sigh*) that you were far enough along in
the program that you had the proper settings to match your hardware
and were still stuck. Had that been the problem and you were
experiencing what the registry key addresses, it *would have* got you
up and going. You forget Arlen, I work on systems for a living,
professionally. I don't have time to fuck around or play games with
people, and, I'm not about to give you bad advice/information
intentionally in any way shape or form. I worked hard to regain some
trust by some people, and, I'm watched (hehehe) very closely by some
naysayers just to see if I try to do something shady to someone;
and/or talk them into screwing themselves.

You might very well have been on usenet for decades as you've
claimed, but, it wasn't in the newsgroups you've been haunting as of
late; You'd have (or should I think!) have a good idea who I am by
now and wouldn't be playing silly games with me...

The registry fix I suggested for you still applies, and, I'd still
advise for you and Bill to properly create it. A computer is a very
complex piece of machinery; the software is yet another layer of
complexity. Just because neither of you has or can find the key in
your registry and everything appears to be 'just fine', doesn't mean
nor should it be misunderstood to be the case.


--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit here:
https://tekrider.net/pages/david-brooks-stalker.php
===================================================
Murphy's Law only fails when you try to demonstrate it.

Arlen_Holder

unread,
Nov 10, 2018, 12:04:34 AM11/10/18
to
On Sat, 10 Nov 2018 03:24:33 -0000 (UTC), Diesel wrote:

> I believe that you're so arrogant that you feel as if it's never
> necessary to read the instructions, or even give them so much as a
> glance over before you jump right in, expecting excellent results, on
> the first attempt.

Hi Diesel,
Thanks for your kind advice where you are far more experienced than I.
I'm a noob. I never said I wasn't a noob. So let's be clear: I'm a noob.

As a noob, I have three apps under my belt:
o app01 = Hello World
o app02 = Multi-event Hello World
o app03 = Adder
o app04 = (a copy of app03 to app04 as a starting point to move forward)
o I will be working on completing the Butterfield tutorial using "app04"

Unfortunately, since I have an old AMD-based Windows desktop, I have
been successful using the Microsoft Android Emulator, which is working
astoundingly perfectly, which allows me to test any Android phone or
tablet that I want to test with any Android API.

> The registry fix I suggested for you still applies, and, I'd still
> advise for you and Bill to properly create it.

Thanks for your advice on that registry fix.
As far as I can tell, that registry fix applies to those people who
are using the Microsoft Visual Studio as their Android IDE (I think)
with the Microsoft Android Emulator. As such, it doesn't apply to me
(I think) because I'm not using Visual Studio with the Microsoft
Emulator.

All the documentation you referenced (which I saw also of course),
was with respect to getting the Visual Studio to work with the Microsoft
Android Emulator.

None of that documentation was for getting the Android Emulator to
work with Android Studio, AFAIK.

> A computer is a very
> complex piece of machinery; the software is yet another layer of
> complexity.

The good news is that I've figured out, today, how to copy a project,
which, if anyone here has ever tried it, is _not_ intuitive.
In fact, just like everyone with older AMD had problems getting the
Google emulators to work, everyone who copies a project has problems
getting Android Studio to _recognize_ that copied project.

It took a few hours, but I got further than most people who just gave up.
The reason a copy of a project is important is for these multi-step
tutorials, at the end of one 5-part tutorial, you have app03, for
example, which is the beginning of part two.

But as insurance against screwing up on part two, you want to save
app03 in the current state (which is easy to do as a copy of the
directory), but it's nicer if you can leave it alone, and just
copy it to app04.

Well - you don't know how complex that turns out to be until you've
done it! In 20/20 hindsight, you might not want to even _think_ about it,
but I didn't know that when I first tried it.

But I was just now completely successful in doing that simple task
(which almost nobody knows how to do, it turns out).

For Bill, and for the tribal record, if anyone is interested in
doing it, here's my ad-hoc log file, where there's no doubt I
performed _more_ steps than I needed to, since it just worked
for the first time now ... so as I copy more and more projects,
I'll hone it down to the steps that it needs to be.

Needless to say, nobody on this planet knows of Google documentation
on this topic - which is sorely needed - as it's not unheard of to
want to copy app03 to app04 and have it work as app04, particularly
when you're learning, as I am...

****************************************************************************
How to make a working copy of the current projects in Android Studio 3.2.1
****************************************************************************
Testcase:
Copy "app03" in C:\tmp\android\app03\ to "app04" c:\tmp\android\app04\
============================================================================
a. Run a search on the net.
b. You'll find many "answers", most of which don't apply (e.g., Eclipse).
c. The rest of which don't work.

So this is an amalgam, of what seemed like it "might" have worked.
When I figure out the "right" answer, this note won't be needed (we hope).
============================================================================
Assumes:
o The directory "C:\tmp\android\app03"
o The project "app03"
o The app "app03"
Heaven help you if your name string isn't unique!
============================================================================
Search terms (have fun):
<https://epicsearch.in/search?pno=1&q=How+to+copy+project+Android+Studio+3.2.1>
<https://duckduckgo.com/?q=How+to+copy+project+Android+Studio&t=h_&ia=qa>
<https://www.startpage.com/do/search?&query=copy+project+android+studio>
etc.
For example, this common answer almost works:
<https://en.proft.me/2017/06/28/how-copy-project-android-studio/>
Lots and lots of people have the same problem - so it's not just me.
============================================================================
WARNING: Always wait for tasks to finish in Android Studio (they're sneaky).
============================================================================
o In Windows, copy c:\tmp\android\app03\ c:\tmp\android\app04\
o Then get app03 out of that project directory any way you can
(e.g., move app03 to c:\tmp\android\archive\app03\)
o Launch the Android Studio 3.2.1 IDE
This will most likely complain about missing projects.
Check the "x" to delete the projects in the list of missing projects.
o AndroidStudio321:File > Open > c:\tmp\android\app04\
o Doubleclick on "app | manifests | AndroidManifest.xml"
aka [app04 | app | src | main | AndroidManifest.xml]
(Do not put your cursor yet in the very touchy manifest file!)
o Notice that the manifest has the "app03" in one or two places at this point:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.kiss.app03">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
o Note: Since it's dynamic, you may see different "app_name" strings at times:
android:label="@string/app_name"
android:label="app03"
o Carefully change the single instance of "app03" to "app04"
Note that the three lines of interest may be:
- package="com.kiss.app03"> ... which you definitely need to change
- android:label="@string/app_name" ... or ... android:label="app03"
- <activity android:name=".MainActivity"> ... which will change colors
o Notice the "MainActivity" changes color from green to red after the change
o Then select "app > java > com.kiss.app03"
o Click "AndroidStudio321:Refactor > Rename"
o Click on "Rename package" when the warning form pops up advising:
"Warning: Multiple directories correspond to package com.kiss.app03:"
C:\tmp\android\app04\app\src\main\java\com\kiss\app03
C:\tmp\android\app04\app\src\androidTest\java\com\kiss\app03
C:\tmp\android\app04\app\src\java\com\kiss\app03
[Rename package][Rename directory][Cancel]
o Click on "Refactor" when the form pops up asking:
Rename package 'com.kiss.app03' and uts usages to:
[app04]
[_]Search in comments and strings [_]Search for text occurrences
[Refactor][Preview][Cancel]
o Optionally??? Check the two boxes: (I think you have to check them!)
[x]Search in comments and strings [x]Search for text occurrences
o When finished, my event log reported...
"Occurrences found in comments, strings, and non-code files (801 occurrences in 4 files) 2 usages"
"References in generated code to directory com.kiss.app03, package.com.kiss.app03 (138 references in 5 files) 934 usages"
o Click on "Do Refactor] at the bottom of the "Refactoring Preview" window
o Note the AndroidManifest.xml "MainActivity" should go from red back to green
o When finished, my event log reported...
"App is not indexable by Google Search; consider adding at least on Activity with an ACTION-VIEW intent filter."
o Select "app" in the Android Studio project tab & right click on it
o Select "Synchronize 'app'" from the resulting popup context menu
o *This next step is CRITICAL to run repeatedly and thoroughly!*
o To find leftovers (which should not exist, but they do),
Select the "app04" in the project window
Press Control+Shift+F to find "app03"
Where I found a seemingly critical instance of app03 in:
"app/src/main/res/values/strings.xml"
<resources>
<string name="app_name">app03</string>
</resources>
o Run that "Control+Shift+F" find command on _all_ five project components!
app04
.gradle
.idea (e.g., .idea/workspace.xml had instances of app03)
(e.g., app/build/intermediates/build-info/debug/build-info.xml)
app
gradle
o Run that Control+Shift+F find [In Project][Module][Directory] & [Scope]
o Than run all three "sync" commands on all five of the above
AndroidStudio321:File > Sync Project With Gradle Files
AndroidStudio321:File > Sync With File System
Rightclick on "app04" > Synchronize 'app04'
Rightclick on ".gradle" > Synchronize 'gradle'
Rightclick on ".idea" > Synchronize '.idea'
Rightclick on "app" > Synchronize 'app'
Rightclick on "gradle" > Synchronize 'gradle'
o Close Android Studio 3.2.1 before running the next step
o In Windows, delete the file C:\tmp\android\app04\app04.iml
o Note lots of folks say you have to deal with the bild.gradle but I didn't
o Others say to deal with settings.gradle, but again, I didn't need to.
o Some say to delete .idea and .gradle and C:\tmp\android\app04\app04.iml
If you delete app04.iml you get an error when you run.
Kill Android Studio 3.2.1
Delete C:\tmp\android\app04\.idea
Delete C:\tmp\android\app04\.gradle
Restart Android Studio 3.2.1 and open app04 as a project
Android Studio re-created all those, but the error remained.
============================================================================
o Restart Android Studio 3.2.1
o Click on "AndroidStudio321:Run > Run app" & choose your emulator
Mine worked perfectly.
o Click on "AndroidStudio321:Run > Run app" & choose your phone
Mine failed miserably with a plethora of errors depending on the sequence.
============================================================================
It works on the emulator but fails every time on the phone no matter
whether on the phone the app exists or not (I've deleted it long ago).
============================================================================
Application Installation Failed
Installation failed with message invalid File:
C:\tmp\android\app03\app\build\intermediates\split-apk\debug\slices\slice_6.apk
It is possible that this issue is resolved by uninstalling an existing
version of the apk if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application? [OK][Cancel]
<48>
<49>
============================================================================
11/09 13:06:13: Launching app
$ adb install-multiple -r -t
C:\tmp\android\app04\app\build\intermediates\split-apk\debug\dep\dependencies.apk
C:\tmp\android\app04\app\build\intermediates\split-apk\debug\slices\slice_1.apk
C:\tmp\android\app04\app\build\intermediates\split-apk\debug\slices\slice_2.apk
C:\tmp\android\app04\app\build\intermediates\split-apk\debug\slices\slice_0.apk
C:\tmp\android\app04\app\build\intermediates\split-apk\debug\slices\slice_3.apk
C:\tmp\android\app04\app\build\intermediates\split-apk\debug\slices\slice_4.apk
C:\tmp\android\app04\app\build\intermediates\split-apk\debug\slices\slice_5.apk
C:\tmp\android\app04\app\build\intermediates\split-apk\debug\slices\slice_6.apk
C:\tmp\android\app04\app\build\intermediates\split-apk\debug\slices\slice_7.apk
C:\tmp\android\app04\app\build\intermediates\split-apk\debug\slices\slice_8.apk
C:\tmp\android\app04\app\build\intermediates\split-apk\debug\slices\slice_9.apk
C:\tmp\android\app04\app\build\intermediates\instant-run-apk\debug\app-debug.apk
C:\tmp\android\app03\app\build\intermediates\split-apk\debug\slices\slice_6.apk
C:\tmp\android\app03\app\build\intermediates\split-apk\debug\dep\dependencies.apk
C:\tmp\android\app03\app\build\intermediates\split-apk\debug\slices\slice_1.apk
C:\tmp\android\app03\app\build\intermediates\split-apk\debug\slices\slice_4.apk
C:\tmp\android\app03\app\build\intermediates\split-apk\debug\slices\slice_3.apk
C:\tmp\android\app03\app\build\intermediates\split-apk\debug\slices\slice_9.apk
C:\tmp\android\app03\app\build\intermediates\split-apk\debug\slices\slice_0.apk
C:\tmp\android\app03\app\build\intermediates\split-apk\debug\slices\slice_7.apk
C:\tmp\android\app03\app\build\intermediates\split-apk\debug\slices\slice_2.apk
C:\tmp\android\app03\app\build\intermediates\split-apk\debug\slices\slice_5.apk
C:\tmp\android\app03\app\build\intermediates\split-apk\debug\slices\slice_8.apk
$ adb shell pm uninstall com.kiss.app04
DELETE_FAILED_INTERNAL_ERROR
Error while Installing APKs
============================================================================
The problem, of course, is the "app03" in half the lines above!
<http://www.bild.me/bild.php?file=3909800androidstudio48.jpg>
<http://www.bild.me/bild.php?file=9368106androidstudio49.jpg>
============================================================================
o Then I deleted the "build" directory (which, I think, is what fixed it!)
C:\tmp\android\app04\app\build\
a. Kill Android Studio
b. Delete the build directory C:\tmp\android\app04\app\build\
c. Then temporarily move the C:\tmp\android\app04 directory somewhere
d. Restart Android studio and remove the "memory" of app04 (hit the x)
e. Now you can move the app04 directory back
f. Restart Android Studio and open the project "app04"
g. Now it will run on the phone (go figure) and on the emulator.

Woo hoo!
Someone should tell the Android Studio doc team they need to document
the task of copying a project from one name to another. :)
===========================================================================
The next time I try this, I'll try to streamline the steps so that everyone
else will benefit from the time and energy I spent on this to document it
thoroughly.

Diesel

unread,
Nov 10, 2018, 2:04:23 AM11/10/18
to
Arlen_Holder <a%rle%20nh....@no.spam.net>
news:ps5ot0$sgi$1...@news.mixmin.net Sat, 10 Nov 2018 05:04:33 GMT in
alt.comp.freeware, wrote:

> On Sat, 10 Nov 2018 03:24:33 -0000 (UTC), Diesel wrote:
>
>> I believe that you're so arrogant that you feel as if it's never
>> necessary to read the instructions, or even give them so much as
>> a glance over before you jump right in, expecting excellent
>> results, on the first attempt.
>
> Hi Diesel,
> Thanks for your kind advice where you are far more experienced
> than I. I'm a noob. I never said I wasn't a noob. So let's be
> clear: I'm a noob.

You keep changing your position on that, Arlen. It's the second time
you've admitted that you're nowhere near me in so far as skillset
and/or knowledge is concerned, yet you tried to mock me (again) with
a reply to another poster...I know you're in no position to do that
and be able to back any of it up, but, I enjoy reminding you of your
dishonesty, since you like to claim you only deal in facts. Clearly,
you don't.

> Unfortunately, since I have an old AMD-based Windows desktop, I
> have been successful using the Microsoft Android Emulator, which
> is working astoundingly perfectly, which allows me to test any
> Android phone or tablet that I want to test with any Android API.

You chose to purchase a piece of shit without knowing what was under
the hood. Like so many (Don't get me wrong, I make good money
repairing name brand junk) others who are brand loyal. All of that
aside, Your AMD powered machine most certainly can run Android
emulators and various other kinds of emulation, should you so desire.
I have a single remaining Much older than yours AMD machine here.
I've already performed various tests with it, attempting to duplicate
the issue you were experiencing previously.

I wasn't able to duplicate the issue you experienced because unlike
you, I know what the machine is and configured it beforehand.
Something you didn't do, for atleast twenty! reinstallations that you
yourself admit to having to do. That's alot of reinstalls and time
wasted because you didn't understand what your machine was on the
hardware level and let's be honest, Arlen, didn't have a clue what
you were attempting to do.

You've managed to do a bit of fishing though with the thread and have
succesfully reeled in one person who's willing to ignore what many
others have written concerning you (along with what I've written) and
proceed to disregard all of that (including taking all of this
nonsense to email) and exchange 'programming 101' tips with you here.
So, I congratulate you for that, and to answer another posters
question, yes, there's enough suckers that you won't exhaust the
supply anytime soon.

>> The registry fix I suggested for you still applies, and, I'd
>> still advise for you and Bill to properly create it.
>
> Thanks for your advice on that registry fix.

Which you've prompty disregarded for the second or third time now.
It's probably just as well since you demonstrated a clear inability
to follow very simple directions and weren't able to create the key
with the proper setting anyway.

> All the documentation you referenced (which I saw also of course),
> was with respect to getting the Visual Studio to work with the
> Microsoft Android Emulator.

Some of what you're calling documentation is from my own notes which
haven't been published to the internet, so, contrary to what you've
written (you lied again, Arlen) you haven't 'also seen it'.

> None of that documentation was for getting the Android Emulator to
> work with Android Studio, AFAIK.

As I said, I don't know what documentation you're specifically
referencing and I'm not all that interested in arguing with a n00b
who can't set a simple registry key why they should have done so, but
I'm not going to spend alot of time trying to convince you to set the
key, either. if you feel you don't need it, and have already shown
you don't know how to work with the system registry, that's okay with
me. From my pov, everything looks great from my house.

>> A computer is a very
>> complex piece of machinery; the software is yet another layer of
>> complexity.
>
> The good news is that I've figured out, today, how to copy a
> project, which, if anyone here has ever tried it, is _not_
> intuitive.

Actually, you're wrong (again). It's not a difficult thing to do for
anyone who has programming experience under their belt, and, I'm not
talking about his/her first virgin breaking hello world job, either.

For crying out loud, you're working with a script based language. You
aren't doing any serious 'coding' on your own here.

> In fact, just like everyone with older AMD had problems
> getting the Google emulators to work, everyone who copies a
> project has problems getting Android Studio to _recognize_ that
> copied project.

There's no such fact. Not everyone had problems getting the emulators
to work on an AMD based system. The ONLY people who had trouble
getting it up and running from what I read are those who didn't know
what the hardware was and so, didn't set it up properly to run the
emulation software they elected to play with. Don't assume 'everyone
with older AMDs' had problems when infact, not everyone did.

People like you did, but, people like you, thankfully, are not
everyone.

> It took a few hours, but I got further than most people who just
> gave up.

It took more than a few hours, Arlen. There's no need for you to be
that dishonest. Naturally, you got further than anyone who gave up;
because (drum roll) they gave up. Had they bothered to do a little
more digging, they would have gotten it up and running too.

It's just as well they gave up on such a simple process as they would
have made for rather lousy programmers since they couldn't solve a
relatively simple (contrary to what you've claimed repeatedly) issue
of emulator installation and proper configuration.

> The reason a copy of a project is important is for these
> multi-step tutorials, at the end of one 5-part tutorial, you have
> app03, for example, which is the beginning of part two.

Arlen, I have alot more experience writing code for the masses than
you do, so, I don't require a history lesson in why you'd be doing
what you are doing now. It's NOT NEW to me. I've been doing this for
years. It's not exclusive to Android or any particular programming
environment either, it's just good coding practice.

> Well - you don't know how complex that turns out to be until
> you've done it!

Come back to me with how complex something turns out being when
you're looking at hundreds of thousands of lines of code in the main
project source and several thousands of lines of code in each
external module that was compiled seperatly but will become part of
the main program as part of the compiling process on the main source
code. When you've written apps like that, then you can make
suggestions on how to improve the process and/or claim (rightfully)
how complicated the process can be.

As it is right now though, you aren't doing anything complicated to
anyone with a programming background. You're a n00bie taking baby
steps. And, instead of taking selfies for attention like an attention
starved teenager, you're wasting peoples time on usenet with stupid
threads like this one. End result for you is the same, attention
cravings satisfied.

> In 20/20 hindsight, you might not want to even _think_
> about it, but I didn't know that when I first tried it.
> But I was just now completely successful in doing that simple task
> (which almost nobody knows how to do, it turns out).

almost nobody who Arlen? Other n00bs to the world of coding like
yourself?

> For Bill, and for the tribal record, if anyone is interested in

Why not just initiate the rest of this nonsense with Bill via email?
Or perhaps realtime via irc? There's no need for you to share
hundreds of lines of text to describe something to one individual who
has taken interest in what you're doing. Nobody else seems to be
interested in your troubles or boring diary/journal of your
failures/suggestions based on ignorance, etc.

> for the first time now ... so as I copy more and more projects,
> I'll hone it down to the steps that it needs to be.

Jesus, please, don't.

> Needless to say, nobody on this planet knows of Google
> documentation on this topic - which is sorely needed - as it's not
> unheard of to want to copy app03 to app04 and have it work as
> app04, particularly when you're learning, as I am...

What you're reinventing yet again Arlen is old hat, and old news to
people who actually have a programming background that they've stuck
with. IE: didn't have a passing interest for work related only like
you did.

===================================================================
> ======== The next time I try this, I'll try to streamline the
> steps so that everyone else will benefit from the time and energy
> I spent on this to document it thoroughly.

Who's everyone Arlen? Why do you continue to avoid that question and
the majority of questions I ask of you? I can't help but notice you
tend to avoid questions presented by other posters as well. That's
not a very professional stance to take, Arlen. Especially when you
consider that you're essentially flooding somewhat various newsgroups
with crossposted threads you've created for your own personal
benefit; if you can catch a fish willing to help you.

And that's exactly what you're doing with this thread and the
previous ones.




--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit here:
https://tekrider.net/pages/david-brooks-stalker.php
===================================================
I tried being reasonable once. I didn't like it.

Arlen_Holder

unread,
Nov 10, 2018, 4:57:51 AM11/10/18
to
On Sat, 10 Nov 2018 07:04:22 -0000 (UTC), Diesel wrote:

> You keep changing your position on that, Arlen.

Hi Diesel,
Thanks for all your kind and helpful advice.

I'm learning stuff by doing, where, for example, I learned just now that
if I run the Microsoft Android Emulator directly, then it "remembers" the
previously installed apps as shown here (as opposed to flushing them every
time, which happens when I run the Microsoft Emulation Manager instead):
<http://www.bild.me/bild.php?file=4126667androidstudio53.jpg>

> You chose to purchase a piece of shit without knowing what was under
> the hood.

Actually, I got the desktop for free as a broken handmedown.
It was easy to fix (it needed new hard drives, cables, WiFi card & a fan).

> Actually, you're wrong (again). It's not a difficult thing to do for
> anyone who has programming experience under their belt, and, I'm not
> talking about his/her first virgin breaking hello world job, either.

Thanks for that advice, where, based on your always on-target help,
I found the "Build" menu which rebuilt the "build" directory that
contained the generated code that had stale paths to the app03
directory structure.
<http://www.bild.me/bild.php?file=5602322androidstudio51.jpg>

> For crying out loud, you're working with a script based language. You
> aren't doing any serious 'coding' on your own here.

Nobody said there was _any_ coding being done yet.

What Bill and I are doing is "driving the car" with the passenger being
an experienced driver as the PIC (namely the passenger is the tutorial).

The coding that we will need your help and advice on happens after we
get done with our test drives, will be the following simple stuff:
1. You press an icon named "10"
2. It beeps to let you know it started
3. Ten minutes later, an alarm rings

> People like you did, but, people like you, thankfully, are not
> everyone.

I agree with you that I'm 1 out of 1,000 in that my goal always,
is to help people, where I do it for free all the time,
and I collaborate when I can.

That's who I am.
Most people are the opposite of me.

That's why all my apps will be free, with no ads, & no shenanigans.

> As it is right now though, you aren't doing anything complicated to
> anyone with a programming background. You're a n00bie taking baby
> steps.

As I said, I'm a noob. I'm not afraid to admit that I'm a noob.

If this thread gives other noobs a good starting point, then that's good.
If the resulting code benefits them, as it did for Bill, then that's good.
If we can get a simple 10-minute timer app out of this, then that's good.

To that end, here's the next Android app ... app05
<http://www.bild.me/bild.php?file=8495103androidstudio57.jpg>
where
app01 = hello world
app02 = calls an activity within the app
app03 = adder
app04 = copy of that adder
app05 = calls activity inside and outside the app

If Bill, or anyone else needs the java code, here it is:
============================================================================
C:\tmp\android\app05\app\src\main\java\com\kiss\app05\MainActivity.java
============================================================================
package com.kiss.app05;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

// Attempts to launch an activity within our own app
Button secondActivityBtn = (Button) findViewById(R.id.secondActivityBtn);
secondActivityBtn.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
Intent startIntent = new Intent(getApplicationContext(), SecondActivity.class);
// show how to pass inforation to another activity
startIntent.putExtra("com.kiss.app05.SOMETHING", "HELLO WORLD!");
startActivity(startIntent);
}
});

// Attempt to launch an activity outside our app
Button googleBtn = (Button) findViewById(R.id.googleBtn);
googleBtn.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
String google = "http://www.google.com";
Uri webaddress = Uri.parse(google);

Intent gotoGoogle = new Intent(Intent.ACTION_VIEW, webaddress);
if (gotoGoogle.resolveActivity(getPackageManager()) != null) {
startActivity(gotoGoogle);
}
}
});
}
}
============================================================================
C:\tmp\android\app05\app\src\main\java\com\kiss\app05\SecondActivity.java
============================================================================
package com.kiss.app05;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;

public class SecondActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_second);

if (getIntent().hasExtra("com.kiss.app05.SOMETHING")) {
TextView tv = (TextView) findViewById(R.id.textView);
String text = getIntent().getExtras().getString("com.kiss.app05.SOMETHING");
tv.setText(text);
}
}
}
============================================================================
<http://www.bild.me/bild.php?file=8495103androidstudio57.jpg>

Arlen_Holder

unread,
Nov 10, 2018, 5:34:30 AM11/10/18
to
On Fri, 9 Nov 2018 11:40:39 -0000 (UTC), Arlen_Holder wrote:

> The app03 worked just moments prior …
> So, the app-to-apk-back-to-app process may need "fancy stuff".

Hi Bill,

Woo hoo! I did that second Bill Butterfield tutorial which
worked the first time (after minor syntax mistakes).

Definitely never START with that second video, as he goes a _lot_
faster than he did with the first video - so do the first video
first (even though you can tell he recorded them in the opposite
order).

I finally figured out that app porting stuff, where, it turns out to
be something we don't need yet, so you can completely skip porting of
your apps (where I ported app03 to app04 but getting it working took
hours because of bugs inside of the Android Studio code):
<http://www.bild.me/bild.php?file=7456135androidstudio58.jpg>

I moved to the second video, part 2, by Bill Butterfield,
of the set "Android Studio For Beginners Part 1,2,3,4":
https://youtu.be/dFlPARW5IX8 (part 1) <=== app03 is this video
https://youtu.be/6ow3L39Wxmg (part 2) <=== app05 is this video
https://youtu.be/rdGpT1pIJlw (part 3)
https://youtu.be/bu5Y3uZ6LLM (part 4)

Here is the result on my phone:
<http://www.bild.me/bild.php?file=8495103androidstudio57.jpg>

o The app opens up to two buttons:
<http://www.bild.me/bild.php?file=6279919androidstudio54.jpg>
o When you press one button, it opens up another activity inside the app.
(This INSIDE activity just says "hello world" for now.)
<http://www.bild.me/bild.php?file=5901351androidstudio55.jpg>
o When you press the other button, it opens up an activity outside the app
(This OUTSIDE activity just goes to a web browser with a hard-coded URL)
<http://www.bild.me/bild.php?file=5790092androidstudio56.jpg>

I am not sure why that web browser call failed, but I tried to run a
call from inside the web browser in the emulator, and it failed too,
so maybe we need to do something so that the emulator web browser
can get onto the Internet? I don't know, but it doesn't matter because
it worked just fine on the phone (which is what really matters).

It's a nice learning tool, actually, because it's a good framework.
Here is my working code, if you or anyone else wants or needs it.
============================================================================
C:\tmp\android\app05\app\src\main\java\com\kiss\app05\MainActivity.java
============================================================================
package com.kiss.app05;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

// Attempts to launch an activity within our own app
Button secondActivityBtn = (Button) findViewById(R.id.secondActivityBtn);
secondActivityBtn.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
Intent startIntent = new Intent(getApplicationContext(), SecondActivity.class);
// show how to pass inforation to another activity
startIntent.putExtra("com.kiss.app05.SOMETHING", "HELLO WORLD!");
startActivity(startIntent);
}
});

// Attempt to launch an activity outside our app
Button googleBtn = (Button) findViewById(R.id.googleBtn);
googleBtn.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
String google = "http://www.google.com";
Uri webaddress = Uri.parse(google);

Intent gotoGoogle = new Intent(Intent.ACTION_VIEW, webaddress);
if (gotoGoogle.resolveActivity(getPackageManager()) != null) {
startActivity(gotoGoogle);
}
}
});
}
}
============================================================================
C:\tmp\android\app05\app\src\main\res\layout\activity_main.xml
============================================================================
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<Button
android:id="@+id/secondActivityBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Second Activity"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<Button
android:id="@+id/googleBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="8dp"
android:text="Google"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/secondActivityBtn" />
</android.support.constraint.ConstraintLayout>
============================================================================
C:\tmp\android\app05\app\src\main\java\com\kiss\app05\SecondActivity.java
============================================================================
package com.kiss.app05;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;

public class SecondActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_second);

if (getIntent().hasExtra("com.kiss.app05.SOMETHING")) {
TextView tv = (TextView) findViewById(R.id.textView);
String text = getIntent().getExtras().getString("com.kiss.app05.SOMETHING");
tv.setText(text);
}
}
}
============================================================================
C:\tmp\android\app05\app\src\main\res\layout\activity_second.xml
============================================================================
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".SecondActivity">

<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:text="TextView"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
============================================================================
Here's an example of the code when it runs on my phone (Nougat):
<http://www.bild.me/bild.php?file=8495103androidstudio57.jpg>
==========================================================================

Bill

unread,
Nov 10, 2018, 5:43:28 AM11/10/18
to
In message <ps3rnn$d8g$1...@news.mixmin.net>, Arlen_Holder
<a%rle%20nh....@no.spam.net> writes
>Thanks for letting me know you're doing fine with that first app! (It
>makes me feel good to have helped you, as you had also helped me.)

OK, call me stupid! I have only just sussed out that, in the text based
"official" first app, the words KOTLIN and JAVA above the code were
actually switches that select the code shown by the website. So I've
been trying to understand why code for Kotlin (which I suppose I'll have
to research) didn't work in Java.

I've been trying to look up java words and phrases as I've come across
them. It was trying to understand "val" that led me up various garden
paths before I finally came to.
It possibly doesn't help that my main java book (remember them?) is
dated 2002.
I am still surprised that there appears to be no sort of forum catering
for Android Studio, and how I still haven't found any living java usenet
lists.

I have now got through the text based button and message build, which
works, and am starting on the first Butterfield video.

Arlen_Holder

unread,
Nov 10, 2018, 6:36:09 AM11/10/18
to
On Sat, 10 Nov 2018 10:43:10 +0000, Bill wrote:

> OK, call me stupid! I have only just sussed out that, in the text based
> "official" first app, the words KOTLIN and JAVA above the code were
> actually switches that select the code shown by the website.

Hi Bill,
I went through the exact _same_ process as you did!

When I first noticed the Kotlin stuff was different, I rooted around, and
then realized, belatedly, what looked like an image on the web page of the
code was actually an "active" image, where you can switch from Kotlin on
the left in the web page to Java on the right of the same web page (making
it a completely different web page).

The good news is that the tutorial "remembers" your selection, so you only
have to do it once (if your browser remembers stuff). I had forgotten that
I went through that, so I apologize for not warning you.

> So I've
> been trying to understand why code for Kotlin (which I suppose I'll have
> to research) didn't work in Java.

Like you, I have absolutely no idea what "kotlin" is, nor do I want to
worry about it, for now. Aw heck, let's do a quick searchnsee:
<https://en.wikipedia.org/wiki/Kotlin_(programming_language)>

The name comes from Kotlin Island, near St. Petersburg. It's just another
language. I don't see any value in it, for we noobs, at this point in time.

> I am still surprised that there appears to be no sort of forum catering
> for Android Studio, and how I still haven't found any living java usenet
> lists.

Probably XDA Developers and other sites are good for that.
For now, I'm content to do this here as the Butterfield tutorials are good.

> I have now got through the text based button and message build, which
> works, and am starting on the first Butterfield video.

Good for you, Bill.
Let me know if you have questions.

Since I had downloaded the videos, I skipped the YouTube web page, but I
just now realized that the YouTube page has LOTS of comments (like about
five hundred for each video), where skimming them might help.

I'm running the third video (I don't think I'll do the fourth as it covers
stuff that is too advanced, I think).

Just remember he is using an older version of Android Studio than we are
(I'm using version 3.2.1) where some of his selections are in slightly
different places (but it only took me an extra minute or two to find stuff
he used).

In the third video, he uses "containers" with "ListView" objects which,
apparently, are now in the "Legacy" location, where parent constraint
matching no longer exists ... so I'm working on that problem right now, but
you will have the benefit of my solution by the time you get to that 3rd
video.

Let me know if you have any questions on that first video while you're
running it.

Arlen_Holder

unread,
Nov 10, 2018, 6:50:14 AM11/10/18
to
On Sat, 10 Nov 2018 11:36:08 -0000 (UTC), Arlen_Holder wrote:

> In the third video, he uses "containers" with "ListView" objects which,
> apparently, are now in the "Legacy" location, where parent constraint
> matching no longer exists ... so I'm working on that problem right now, but
> you will have the benefit of my solution by the time you get to that 3rd
> video.

Hi Bill,
I _highly_ recommend you read the comments in the video (which I had
skipped until now!).

For example, in the first video, some one complains that they're on AMD and
that the emulator doesn't work (sound familiar?). That guy gave up,
concluding that it doesn't work (it doesn't), but he didn't know that the
Microsoft Emulator works perfectly instead.

In the third video, I just saw this which would have saved me a few minutes
"Ryan Lackie, 5 months ago
ListView is under Legacy instead of Containers"

One caveat is that 99 out of 100 of the comments are either
o Dead wrong, or,
o Written by a fifth grader

This is my first time reading YouTube comments, so it's an eye opener how
"dumb" most of those people are, where they mostly complain without adding
any additional value (1 out of 100 adds value).

I'm used to watching YouTube using the NewPipe freeware, which doesn't show
comments (at least the way my settings are don't) & which doesn't have ads.
<https://newpipe.schabi.org/>

I'll let you know when/if I have something to report that is of general use
to you and anyone following in our footsteps.

Arlen_Holder

unread,
Nov 12, 2018, 1:04:22 AM11/12/18
to
On Sat, 10 Nov 2018 11:50:14 -0000 (UTC), Arlen_Holder wrote:

> I'll let you know when/if I have something to report that is of general use
> to you and anyone following in our footsteps.

Hi Bill,

Today I ran app06 successfully, after a few classic debugging issues:
o <http://www.bild.me/bild.php?file=1682135androidstudio61.jpg>

Android Studio For Beginners Part 1,2,3,4 by Bill Butterfield, Jun 13, 2017
o <https://youtu.be/dFlPARW5IX8> (part 1) <=== app03 is this video
o <https://youtu.be/6ow3L39Wxmg> (part 2) <=== app05 is this video
o <https://youtu.be/rdGpT1pIJlw> (part 3) <=== app06 is this video
o <https://youtu.be/bu5Y3uZ6LLM> (part 4)

Download these three pictures first (which are shrunk to 640x480):
o garlic.jpg = <http://www.bild.me/bild.php?file=1017694garlic.jpg>
o tomato.jpg = <http://www.bild.me/bild.php?file=2917965tomato.jpg>
o banana.jpg = <http://www.bild.me/bild.php?file=3954162banana.jpg>
Note: He used peach, tomato, squash (I used garlic, tomato, banana).

He's using an older version (or maybe it's the Mac) but there is no Save:
o When he clicks the "Save" icon, we don't have that icon in 3.2.1 Windows

He's using an older version so note that the "ListView" is NOT in:
o Containers > ListView
But, instead, "ListView" is located, for us, in:
o Legacy > ListView
But then there is also "RecyclerView" (which I didn't use):
o Containers > RecyclerView

He's using an older version of Android Studio on the Mac so note that the "match_parent" doesn't exist as an option in the GUI but it is the default in the text file so just skip the GUI part when he matches that constraint.

When he creates the automatic "itemAdapter", our variables differ slightly:
o The 3.2.1 adapter automation uses "position" while he uses "i"
He's using an older version (or maybe it's the Mac) but there is no Save:
o When he clicks the "Save" icon, we don't have that icon in 3.2.1 Windows

He's using an older version so note that the "ListView" is NOT in:
o Containers > ListView
But, instead, "ListView" is located in:
o Legacy > ListView
But then there is "RecyclerView"
o Containers > RecyclerView

He's using an older version so note that the "match_parent" doesn't exist
as an option in the GUI but it is the default in the text file so skip
the GUI part when he matches that constraint.

When he creates the automatic "itemAdapter", variables differ:
o The 3.2.1 adapter automation uses "position" while he uses "i"
So I did a global search & replace on "position" to convert to "i"
o The 3.2.1 adapter automation uses "parent" while he uses "viewGroup"
o The 3.2.1 adapter automation uses "convertView" while he uses "view"

Notice this line with two different variables!
public void onItemClick(AdapterView<?> parent, View view, int i, long l) {
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
I ended up manually editing to use his variables of "i" and "l".

When he creates an images view, the menus are slightly different:
o He uses Palette > Images > ImagesView
o We use Palette > Widgets > ImagesView
or
o We use Palette > Common > ImagesView

Here is the code if anyone is interested in following in our footsteps.
============================================================================
java:
C:\tmp\android\app06\app\src\main\java\com\kiss\app06\DetailActivity.java
C:\tmp\android\app06\app\src\main\java\com\kiss\app06\ItemAdapter.java
C:\tmp\android\app06\app\src\main\java\com\kiss\app06\MainActivity.java

res:
C:\tmp\android\app06\app\src\main\res\layout\activity_detail.xml
C:\tmp\android\app06\app\src\main\res\layout\activity_main.xml
C:\tmp\android\app06\app\src\main\res\layout\my_listview_detail.xml

values:
C:\tmp\android\app06\app\src\main\res\values\colors.xml
C:\tmp\android\app06\app\src\main\res\values\strings.xml
C:\tmp\android\app06\app\src\main\res\values\styles.xml
============================================================================
C:\tmp\android\app06\app\src\main\java\com\kiss\app06\DetailActivity.java
package com.kiss.app06;

import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Display;
import android.widget.ImageView;

public class DetailActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_detail);

Intent in = getIntent();
int index = in.getIntExtra("com.kiss.app06.ITEM_INDEX", -1);

if (index > -1) {
int pic = getImg(index);
ImageView img = (ImageView) findViewById(R.id.imageView);
scaleImg(img, pic);
}

}

private int getImg(int index) {
switch (index) {
case 0: return R.drawable.garlic;
case 1: return R.drawable.tomato;
case 2: return R.drawable.banana;
default: return -1;
}
}

private void scaleImg(ImageView img, int pic) {
Display screen = getWindowManager().getDefaultDisplay();
BitmapFactory .Options options = new BitmapFactory.Options();

options.inJustDecodeBounds = true;
BitmapFactory.decodeResource(getResources(), pic, options);

int imgWidth = options.outWidth;
int screenWidth = screen.getWidth();

if (imgWidth > screenWidth) {
int ratio = Math.round( (float) imgWidth / (float)screenWidth);
options.inSampleSize = ratio;
}

options.inJustDecodeBounds = false;
Bitmap scaledImg = BitmapFactory.decodeResource(getResources(), pic, options);
img.setImageBitmap(scaledImg);
}
}
============================================================================
C:\tmp\android\app06\app\src\main\java\com\kiss\app06\ItemAdapter.java
package com.kiss.app06;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class ItemAdapter extends BaseAdapter {

LayoutInflater mInflator;
String[] items;
String[] prices;
String[] descriptions;

public ItemAdapter(Context c, String[] i, String[] p, String[] d) {
items = i;
prices = p;
descriptions = d;
mInflator = (LayoutInflater) c.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}

@Override
public int getCount() {
return items.length;
}

@Override
public Object getItem(int i) {
return items[i];
}

@Override
public long getItemId(int i) {
return i;
}

@Override
public View getView(int i, View view, ViewGroup viewGroup) {

View v = mInflator.inflate(R.layout.my_listview_detail, null);
TextView nameTextView = (TextView) v.findViewById(R.id.nameTextView);
TextView descriptionTextView = (TextView) v.findViewById(R.id.descriptionTextView);
TextView priceTextView = (TextView) v.findViewById(R.id.priceTextView);

String name = items[i];
String desc = descriptions[i];
String cost = prices[i];

nameTextView.setText(name);
descriptionTextView.setText(desc);
priceTextView.setText(cost);

return v;
}
}
============================================================================
C:\tmp\android\app06\app\src\main\java\com\kiss\app06\MainActivity.java
package com.kiss.app06;

import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;

public class MainActivity extends AppCompatActivity {

ListView myListView;
String[] items;
String[] prices;
String[] descriptions;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

Resources res = getResources();
myListView = (ListView) findViewById(R.id.myListView);
items = res.getStringArray(R.array.items);
prices = res.getStringArray(R.array.prices);
descriptions = res.getStringArray(R.array.descriptions);

ItemAdapter itemAdapter = new ItemAdapter(this, items, prices, descriptions);
myListView.setAdapter(itemAdapter);

myListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int i, long l) {
Intent showDetailActivity = new Intent(getApplicationContext(), DetailActivity.class);
showDetailActivity.putExtra("com.kiss.app06.ITEM_INDEX", i);
startActivity(showDetailActivity);
}
});


}
}
============================================================================
C:\tmp\android\app06\app\src\main\res\layout\activity_detail.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".DetailActivity">

<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@mipmap/ic_launcher" />
</android.support.constraint.ConstraintLayout>
============================================================================
C:\tmp\android\app06\app\src\main\res\layout\activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<ListView
android:id="@+id/myListView"
android:layout_width="match_parent"
android:layout_height="495dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:layout_editor_absoluteY="8dp" />
</android.support.constraint.ConstraintLayout>
============================================================================
C:\tmp\android\app06\app\src\main\res\layout\my_listview_detail.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent">

<TextView
android:id="@+id/nameTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginStart="48dp"
android:layout_marginTop="45dp"
android:text="Name"
android:textSize="24sp" />

<TextView
android:id="@+id/descriptionTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/nameTextView"
android:layout_alignParentStart="true"
android:layout_marginStart="45dp"
android:layout_marginTop="1dp"
android:text="Description" />

<TextView
android:id="@+id/priceTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/nameTextView"
android:layout_alignParentEnd="true"
android:layout_marginEnd="27dp"
android:text="Price"
android:textSize="24sp" />
</RelativeLayout>
============================================================================
C:\tmp\android\app06\app\src\main\res\values\colors.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#008577</color>
<color name="colorPrimaryDark">#00574B</color>
<color name="colorAccent">#D81B60</color>
</resources>
============================================================================
C:\tmp\android\app06\app\src\main\res\values\strings.xml
<resources>
<string name="app_name">app06</string>

<string-array name="items">
<item>garlic</item>
<item>tomato</item>
<item>banana></item>
</string-array>

<string-array name="prices">
<item>$0.99</item>
<item>$1.49</item>
<item>$0.89</item>
</string-array>

<string-array name="descriptions">
<item>Fresh garlic</item>
<item>Fresh tomato</item>
<item>Fresh banana</item>
</string-array>
</resources>

============================================================================
C:\tmp\android\app06\app\src\main\res\values\styles.xml
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>

</resources>
============================================================================
I'm not sure what app07 will be as I think the 4th video is out of context
for what I'm planing on doing (ring an alarm as a 10-minute timer).

Diesel

unread,
Nov 12, 2018, 2:08:48 AM11/12/18
to
Arlen_Holder <a%rle%20nh....@no.spam.net>
news:ps6a2u$skn$1...@news.mixmin.net Sat, 10 Nov 2018 09:57:51 GMT in
alt.comp.freeware, wrote:

> On Sat, 10 Nov 2018 07:04:22 -0000 (UTC), Diesel wrote:
>
>> You keep changing your position on that, Arlen.
>
> Hi Diesel,
> Thanks for all your kind and helpful advice.

You do alot of snipping, eh? :) I'm not surprised, Arlen. I'm really
not.

> Thanks for that advice, where, based on your always on-target
> help,

ROFL. Do you think being a smartass towards me is somehow going to
convince me to help you do anything?

>> For crying out loud, you're working with a script based language.
>> You aren't doing any serious 'coding' on your own here.
>
> Nobody said there was _any_ coding being done yet.

Alas, there is. You *are* coding. I didn't say you weren't coding,
Arlen the stupid, I said you weren't doing any serious coding. ROFL.

> What Bill and I are doing is "driving the car" with the passenger
> being an experienced driver as the PIC (namely the passenger is
> the tutorial).

HAAHAHAHA.. Fuck... You are without a fuckin doubt, an idiot.

>> People like you did, but, people like you, thankfully, are not
>> everyone.
>
> I agree with you that I'm 1 out of 1,000 in that my goal always,
> is to help people, where I do it for free all the time,
> and I collaborate when I can.

I don't know what there is to agree about, Arlen, I never stated any
such thing about you. I specifically meant and fully expected anyone
reading to know that yourself and some other people who tried to use
the emulation packages didn't know about a couple of hardware
settings they might have to invoke, depending on CPU base.

> That's who I am.

I have no idea who you actually are. I can only go by how you choose
to represent yourself in this medium.

> Most people are the opposite of me.

I wouldn't know, Arlen. I have nothing to go on.

> That's why all my apps will be free, with no ads, & no
> shenanigans.

Been there, done that. Many m00ns before you, I'm afraid. Still do,
infact.

Did you need the url to the old DOS stuff again?

>> As it is right now though, you aren't doing anything complicated
>> to anyone with a programming background. You're a n00bie taking
>> baby steps.
>
> As I said, I'm a noob. I'm not afraid to admit that I'm a noob.

This is only a recent admission by you, Arlen. And, let's be frank,
it's because i've left you no possible way out of that.

> If this thread gives other noobs a good starting point, then
> that's good. If the resulting code benefits them, as it did for
> Bill, then that's good. If we can get a simple 10-minute timer app
> out of this, then that's good.

Which is your goal here right? Someone else, or someone other than
you primarily do the work, get that timer you want up and going?
That's the actual plan, isn't it Arlen?

Working them up, right? Gaining what you could be mistaking as trust?



--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit here:
https://tekrider.net/pages/david-brooks-stalker.php
===================================================
Useless Invention: Reversible garbage disposal.

Bill

unread,
Nov 12, 2018, 5:23:49 AM11/12/18
to
In message <ps6c7l$107$1...@news.mixmin.net>, Arlen_Holder
<a%rle%20nh....@no.spam.net> writes
> <http://www.bild.me/bild.php?file=5901351androidstudio55.jpg> o When
>you press the other button, it opens up an activity outside the app
> (This OUTSIDE activity just goes to a web browser with a hard-coded
>URL)
> <http://www.bild.me/bild.php?file=5790092androidstudio56.jpg>
>
>I am not sure why that web browser call failed, but I tried to run a
>call from inside the web browser in the emulator, and it failed too, so
>maybe we need to do something so that the emulator web browser can get
>onto the Internet? I don't know, but it doesn't matter because it
>worked just fine on the phone (which is what really matters).

In my Butterfield2 app, I seem to have hit a problem here in that the
app compiles without errors, and entering debug mode hasn't yet helped.

When I hit the Google button, nothing happens on either the emulator or
the phone. I don't get even the error message on either. The code checks
out against yours.

I haven't yet "stepped into" the code so maybe that will lead
somewhere.

I've now got the first Butterfield app behind me as well as the text
app. I am getting more at home with the IDE, which helps a lot.

Bill

unread,
Nov 12, 2018, 7:37:39 AM11/12/18
to
On 12/11/2018 10:20, Bill wrote:
> I haven't yet "stepped into" the code so maybe that will lead somewhere.

Stepping into didn't help at the level I have currently clambered up to,
but I've got it working.

I had repeatedly failed to see that I had missed my typo where, in the
url "http://www.google.com, I had no :

Now on to lesson 3!

Arlen_Holder

unread,
Nov 12, 2018, 3:27:05 PM11/12/18
to
On Mon, 12 Nov 2018 12:37:36 +0000, Bill wrote:

> Stepping into didn't help at the level I have currently clambered up to,
> but I've got it working.
>
> I had repeatedly failed to see that I had missed my typo where, in the
> url "http://www.google.com, I had no :
>
> Now on to lesson 3!

Hi Bill,
Yup. I went through that exact process of having a few typos before it
finally worked for me too.

Of course, the DIYs always *skip* those typos and tracking them down!

So it always *sounds* easier than it really is.

Good that you're on to lesson 3 where I wrote about it over here:
<https://groups.google.com/d/msg/comp.mobile.android/aW64zYeBtF0/kTkz1xIABwAJ>

There were about a half dozen "differences" between my code and the
tutorial, but they turned out to be non issues, but do be advised that the
"comments" of the Youtube page show a _lot_ of people had problems that I
did not have.

Like you, I'm starting to get used to this Android Studio IDE, where, for
example, I'm learning that the Android Studio IDI does _not_ like when you
move things around in the Windows file system!

For example, see these half dozen screenshots, where I clearly have a
"stale signature" of some sort. You and I both know that we never touched
anything called a "signature" so it must have been done by Android Studio.

All I want to do is re-do the app01 "hello world" that works:
o <http://www.bild.me/bild.php?file=7758838androidstudio60a.jpg>
The first problem to overcome is that .gradle files need to be wiped out!
o <http://www.bild.me/bild.php?file=7693773androidstudio60b.jpg>
But worse, there is some kind of "stale certificate" that I don't know
about!
o <http://www.bild.me/bild.php?file=9796091androidstudio60c.jpg>
Due to that state certificate, the emulation works but not the real phone!
o <http://www.bild.me/bild.php?file=3263646androidstudio60d.jpg>
IMHO, if the IDe created this "signature", then the IDE should fix it! :)
o <http://www.bild.me/bild.php?file=2938664androidstudio60e.jpg>
It may be something I need to do on the phone, but it's not USB debugging:
o <http://www.bild.me/bild.php?file=4015964androidstudio60f.jpg>
And yet, app01 still has a stale signature (certificate?) on the phone!
o <http://www.bild.me/bild.php?file=6803968androidstudio60g.jpg>

Clearly Android Studio doesn't like when you move things around in Windows
with respect to this "stale signature" (whatever that is). In fact, Android
Studio won't even run the "hello world" (app01) on my phone anymore!

That's how much Android Studio hates that I moved things around in Windows!
I'm sure the solution will be "do this and don't do that", but I'm not
going to bother right now as I'll learn about 'stale signatures' when I
need to figure out what a "signature" is. :)

Anyway, I'm going to skip that last Butterfield video, which I listened to
in its entirety, where it creates a list based on Oracle SQL database
files.

If I need to, I'll go back to that fourth tutorial, but for now I'll stop
at the penultimate tutorial and move on to writing code that creates an
alarm clock of some sort.

I'm working on that now, but since I'm going off road, I may not be able to
help you if you attack that last Bill Butterfield tutorial.

But if you have questions about the penultimate tutorial, let me know.

Arlen_Holder

unread,
Nov 12, 2018, 4:19:18 PM11/12/18
to
On Mon, 12 Nov 2018 07:08:47 -0000 (UTC), Diesel wrote:

> You do alot of snipping, eh? :) I'm not surprised...

Hi Diesel,

Thank you for recognizing that I follow the common courtesy of Usenet
snipping protocol which is to only quote that which I respond to.

Most people wouldn't be as astute as you are in noticing that I follow well
established Usenet protocols since most people just lazily quote
everything.

> Alas, there is. You *are* coding. I didn't say you weren't coding,
> Arlen the stupid, I said you weren't doing any serious coding. ROFL.

Actually, I'm not doing _any_ coding (yet) so I'm not baking my own cake.
All I'm doing is following directions (which is like following a recipe).

The main issues are when the directions differ from reality.
Which happens when I make a typo or when (as seems to always be the case),
the people making the tutorials don't mention what version of the IDE they
are on, where their version is different from mine.

> HAAHAHAHA.. Fuck... You are without a fuckin doubt, an idiot.

I agree with you Diesel that I'm a noob.
In fact, today I had a devil of a time getting the original hello-world
app01 to work due to the errors listed below...where the IDE must have
"created" a "certificate" or "signature" automatically, that it no longer
likes...

All I wanted to do was re-do the app01 "hello world" that worked before:
o <http://www.bild.me/bild.php?file=7758838androidstudio60a.jpg>
The first problem is that .gradle files need to be manually wiped out!
o <http://www.bild.me/bild.php?file=7693773androidstudio60b.jpg>
But worse, there is some kind of "stale certificate" going on?
o <http://www.bild.me/bild.php?file=9796091androidstudio60c.jpg>
Due to that state certificate, the emulation works but not the real phone!
o <http://www.bild.me/bild.php?file=3263646androidstudio60d.jpg>
IMHO, if the IDE created this "signature", then the IDE should fix it! :)
o <http://www.bild.me/bild.php?file=2938664androidstudio60e.jpg>
It may be something I need to do on the phone, but it's not USB debugging:
o <http://www.bild.me/bild.php?file=4015964androidstudio60f.jpg>
And yet, app01 still has a stale signature? (certificate?) on the phone!
o <http://www.bild.me/bild.php?file=6803968androidstudio60g.jpg>

I'm sure you already know exactly how to resolve that problem.
But me being a noob - I don't yet know what you inherently already know.

Bill

unread,
Nov 12, 2018, 6:56:18 PM11/12/18
to
In message <pscnmo$tcb$1...@news.mixmin.net>, Arlen_Holder
<a%rle%20nh....@no.spam.net> writes

<after large snip of useful info>

>Clearly Android Studio doesn't like when you move things around in Windows
>with respect to this "stale signature" (whatever that is). In fact, Android
>Studio won't even run the "hello world" (app01) on my phone anymore!
>
>That's how much Android Studio hates that I moved things around in Windows!
>I'm sure the solution will be "do this and don't do that", but I'm not
>going to bother right now as I'll learn about 'stale signatures' when I
>need to figure out what a "signature" is. :)
>
>Anyway, I'm going to skip that last Butterfield video, which I listened to
>in its entirety, where it creates a list based on Oracle SQL database
>files.
>
>If I need to, I'll go back to that fourth tutorial, but for now I'll stop
>at the penultimate tutorial and move on to writing code that creates an
>alarm clock of some sort.
>
>I'm working on that now, but since I'm going off road, I may not be able to
>help you if you attack that last Bill Butterfield tutorial.

>But if you have questions about the penultimate tutorial, let me know.

Thanks, Arlen. I'll look at your other posting again when I hit problems
on Butterfield 3!

I discovered early on that a simple rename of something I thought was
innocuous caused great problems, and that rewriting elements from
scratch again was the only way to move on quickly.

I know I had problems with the emulator at one stage, and that closing
it down completely (i.e. stopping it and then "powering it off") let it
restart in a clean condition on a rebuild of the app.

I am sure you will have tried closing the app on the real phone, then
removing it and doing a proper restart of the phone before re-trying the
latest build.

I'll watch with great interest how you get along with your timer alarm.

Diesel

unread,
Nov 12, 2018, 6:58:37 PM11/12/18
to
Arlen_Holder <a%rle%20nh....@no.spam.net>
news:pscqol$3n1$1...@news.mixmin.net Mon, 12 Nov 2018 21:19:18 GMT in
alt.comp.freeware, wrote:

> On Mon, 12 Nov 2018 07:08:47 -0000 (UTC), Diesel wrote:
>
>> You do alot of snipping, eh? :) I'm not surprised...
>
> Hi Diesel,
>
> Thank you for recognizing that I follow the common courtesy of
> Usenet snipping protocol which is to only quote that which I
> respond to.

You shouldn't be thanking me, Arlen. Once again, You're doing a bit
of, let's call it for what it is, lying your ass off. Again.

I wrote nothing of you following ANY common courtesy, usenet, or
elsewhere. I commented about your strong desire to snip and
misconstrue what the other poster wrote, intentionally.

> Most people wouldn't be as astute as you are in noticing that I
> follow well established Usenet protocols since most people just
> lazily quote everything.

No, Arlen, infact, you don't. You duck and dodge questions. You
partially snip so as to bring what you've left out of context and
write a completely different response to it, giving a n00bie reader
the very false impression that what you wrote had much/anything to do
with what the other poster wrote.

>> Alas, there is. You *are* coding. I didn't say you weren't
>> coding, Arlen the stupid, I said you weren't doing any serious
>> coding. ROFL.
>
> Actually, I'm not doing _any_ coding (yet) so I'm not baking my
> own cake. All I'm doing is following directions (which is like
> following a recipe).

Wow. You uhh, really don't get it, eh? I mean, you aren't playing
games with me. You really DON'T UNDERSTAND what you're doing...And
you seem to have no interest whatsoever in understanding it. :(

>> HAAHAHAHA.. Fuck... You are without a fuckin doubt, an idiot.
>
> I agree with you Diesel that I'm a noob.

Yes, you are that too. But, I specifically and rightfully at this
point I feel, called you an idiot. Are you agreeing with me that
you're an idiot, or do you confuse n00b as meaning one and the same
thing? Cluebyfour (here's an aspirin), they aren't.

> I'm sure you already know exactly how to resolve that problem.

I wouldn't be able to give you an answer, I snipped your problem
report, unread.



--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit here:
https://tekrider.net/pages/david-brooks-stalker.php
===================================================
If you feel like you've got to lead, at least get out of my way.

nospam

unread,
Nov 12, 2018, 8:25:19 PM11/12/18
to
In article <pscqol$3n1$1...@news.mixmin.net>, Arlen_Holder
<a%rle%20nh....@no.spam.net> wrote:

> Thank you for recognizing that I follow the common courtesy of Usenet
> snipping protocol which is to only quote that which I respond to.

no, you quote a tiny sliver of the original post, snipping nearly
everything else to intentionally alter context.

Diesel

unread,
Nov 13, 2018, 8:05:40 AM11/13/18
to
nospam <nos...@nospam.invalid>
news:121120182025199509%nos...@nospam.invalid Tue, 13 Nov 2018
Sometimes, less is more. Well stated, nospam.


--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit here:
https://tekrider.net/pages/david-brooks-stalker.php
===================================================
Experience is somthing you don't get until just after you need it.

Arlen_Holder

unread,
Nov 13, 2018, 8:52:02 PM11/13/18
to
On Mon, 12 Nov 2018 20:25:19 -0500, nospam wrote:

> no, you quote a tiny sliver of the original post, snipping nearly
> everything else to intentionally alter context.

Hehhehhehhhh...

That's funny, coming from you nospam, where you habitually _fabricate_
quoted content, just so that you can sound witty in your response.

I only speak facts.

Here's proof...
Why does nospam always FABRICATE conversations... just so he can sound "witty" in response?
<https://groups.google.com/d/msg/misc.phone.mobile.iphone/GExRc1qrFGo/JBzdCKSSAwAJ>

At least I do two things, both of which are honorable:
o I quote that which I respond to (and nothing more), and,
o I don't _fabricate_ that quoted content like you, nospam, constantly do.

You, nospam, continually fabricate quoted content just so you can respond
to it.

Bill

unread,
Nov 14, 2018, 12:59:13 PM11/14/18
to
Here's an interesting thing.

Last night I did quite a bit on my current project in Android Studio on
the Windows 10 laptop. At just after midnight, it was more or less
complete, but wouldn't compile without errors for some reason.
I closed the laptop lid putting it into sleep mode, as I had to be up at
5.30 today.
Opening the lid at 05.40, the machine rebooted from scratch. Presumably
the W10 update had either installed a W10 update silently last night, or
had woken the machine during the night to do the install.
Most of the work done last night in Android Studio was no longer there,
so I'll have to do it all over again tonight.

I know I should have done a "save all" before shutting the lid, and
should be taking backups very frequently, but it still doesn't stop me
being mad at Microsoft.

The machine is the only one here on W10 - all the main machines have
stayed with or reverted to 7 or earlier. I keep this W10 machine in the
default state to be more or less in sync with the people I "support".

arlen michael holder

unread,
Nov 14, 2018, 8:24:05 PM11/14/18
to
On Mon, 12 Nov 2018 23:55:52 +0000, Bill wrote:

> I discovered early on that a simple rename of something I thought was
> innocuous caused great problems, and that rewriting elements from
> scratch again was the only way to move on quickly.

Hi Bill,

Good news!

*I spent a few hours today SOLVING that exact problem you just outlined!*
For me. For you. For everyone!

It's extremely non intuitive, where I went down a _lot_ of useless ratholes.
So consider this first writeup below very preliminary - but - it worked!

I put the alarm clock on hold for a bit in order to port the Bill Butterfield
grocery list app (video 3 of 4) to my own personal grocery store app.

It may very well be that you will be the only person reading this who will
actually understand what an accomplishment it is to write this note below,
since it would seem so obvious to anyone if they have never done it (especially
since EVERY single darn thing I found on the net was dead wrong or incomplete).

****************************************************************************
How to (really) make a working copy of the current projects in Android Studio 3.2.1
<http://www.bild.me/bild.php?file=1580867androidstudio61.jpg>
****************************************************************************
o app06 = A grocery list app from the Bill Butterfield tutorial video #3
o app07 = An SQL lookup app from the Bill Butterfield tutorial video #4
o app08 = A customization of app06 based on a local store in my area
============================================================================
Since app08 is intended as a custom version of app06, I had to learn how to
copy an Android Studio version 3.2.1 app so as to not waste coding effort.

Everyone wants to be able to do this, but, as far as I can tell, nobody knows
how to do it (making this the only working note on the net that I know of).
============================================================================
BTW: There are so many wrong answers on the net, one wonder if any are right.
There are so many incomplete answers on the net, one wonder if any are tested.
Most are based on tools that no longer are used (Eclipse) or older versions.

This is an unabashed amalgam of at least a half dozen supposed methods.
<https://www.quora.com/How-do-I-rename-an-Android-Studio-Project-with-New-Name>
<https://coderwall.com/p/brfjma/refactor-and-rename-a-android-studio-project-or-app>
<https://stackoverflow.com/questions/18276872/change-project-name-on-android-studio#28324892>
<https://www.youtube.com/watch?v=isr3zXK42po>
etc.
HINT: They all suck for reasons of incompleteness and/or different versions.
============================================================================
Don't even think of using Android Studio "Refactor" commands (they don't work).
What would work best is a Windows global search & replace inside of text files.
Lord help you if your old and new project names are not unique strings.
============================================================================
This unique method was tested by me using Windows 10 & Android Studio 3.2.1
============================================================================
NOTE: You can subsitute your unique names for "app06" and "app08" below.
============================================================================
o Create a new project on Android Studio, named com.kiss.app08
C:\tmp\android\app08\app
Wait until you see the message "Gradle build finished in (specified time)".
o Exit Android Studio version 3.2.1
o In Windows, open two file explorer windows (top to bottom, or side by side):
OLD: C:\tmp\android\app06\app
NEW: C:\tmp\android\app08\app
o In the Windows file explorer, replace the "app08" directory:
Delete the directory C:\tmp\android\app08\app\src\main\java\com\kiss\app08\
Copy the directory C:\tmp\android\app06\app\src\main\java\com\kiss\app06\
And rename that copy to C:\tmp\android\app08\app\src\main\java\com\kiss\app08\
o In the Windows file explorer, replace the "res" directory:
Delete the directory C:\tmp\android\app08\app\src\main\res\
Copy the directory C:\tmp\android\app06\app\src\main\res\
And put that copy at C:\tmp\android\app08\app\src\main\res\
o In the Windows file explorer, replace the "libs" directory:
Delete the directory C:\tmp\android\app08\app\libs\
Copy the directory C:\tmp\android\app06\app\libs\
And put that copy at C:\tmp\android\app08\app\libs\
o In the Windows file explorer, replace the "assets" directory (if it exists):
Delete the directory C:\tmp\android\app08\app\src\main\assets\
Copy the directory C:\tmp\android\app06\app\src\main\assets\
And put that copy at C:\tmp\android\app08\app\src\main\assets\
o In the Windows file explorer, replace the "AndroidManifest.xml" file:
Delete the file C:\tmp\android\app08\app\src\main\AndroidManifest.xml
Copy the file C:\tmp\android\app06\app\src\main\AndroidManifest.xml
And put that copy at C:\tmp\android\app08\app\src\main\AndroidManifest.xml
o Now edit that new AndroidManifest.xml file:
Globally search & replace "com.kiss.app06" with "com.kiss.app08"
o In the Windows file explorer, replace the build.gradle file:
Delete the file C:\tmp\android\app08\app\build.gradle
Copy the file from C:\tmp\android\app06\app\build.gradle
Put that file here C:\tmp\android\app08\app\build.gradle
o In the Windows file explorer, replace the gradle.properties file:
Delete the file C:\tmp\android\app08\gradle.properties
Copy the file from C:\tmp\android\app06\gradle.properties
Put that file here C:\tmp\android\app08\gradle.properties
o In the Windows file explorer, replace the gradle folder:
Delete the folder C:\tmp\android\app08\gradle\wrapper\
Copy the folder from C:\tmp\android\app06\gradle\wrapper\
Put that folder here C:\tmp\android\app08\gradle\wrapper\
o Start Android Studio version 3.2.1
o Open the project app08 (if it didn't open automatically)
o Wait for the message "Gradle build finished in (time)"
o Rightclick "Project | app" > Replace in path >
Line1 = app06
Line2 = app08
Select "In Project"
And then hit the button "Replace All"
o Wait for the messages to indicate successful replacement:
In Project = 941 occurrences replaced
o Doublecheck the replacement worked for all four areas:
"In Project", "Module", "Directory", "Scope"
o AndroidStudio321:Build -> Clean Project
Wait for the message to indicate successful clean project:
"Gradle build finished in (time)"
o AndroidStudio321:Build -> Rebuild Project
Wait for the message to indicate successful rebuild project:
"Gradle build finished in (time)"
o Exit Android Studio version 3.2.1
o Start Android Studio version 3.2.1 & open the project

Voila!
Save this as it is NOT anywhere else on the net, but here!
============================================================================

Arlen_Holder

unread,
Nov 14, 2018, 8:55:08 PM11/14/18
to
On Mon, 12 Nov 2018 23:58:37 -0000 (UTC), Diesel wrote:

> I wrote nothing of you following ANY common courtesy, usenet, or
> elsewhere.

Hi Diesel,
Thanks for your kind clarification of my incorrect assumptions.

It's well established Usenet protocol for quoting that I follow,
where I deplore those who quote the entire previous post, out of
either laziness or ineptness or inexperience, or whatever.

At least I don't *fabricate* quoted content, which nospam has
been doing for years, as is noted in this proven thread below:
<https://groups.google.com/d/msg/misc.phone.mobile.iphone/GExRc1qrFGo/9fJ7cqTIBAAJ>

> You duck and dodge questions.

This is a technical thread where I'm attempting to *add value*
so that other innocent noobs to Android coding, can follow in our
footsteps.

You have immense knowledge, Diesel, that could help us all write
any Android app we wish to write that is
o Always free, and open source
o Contains zero adds or other shenanigans, and, which
o Performs a very simple useful function for the user

That's what I'm all about, Diesel. Helping others do what I can do,
and asking questions of experts when I can't do what I need to do.

Then I summarize the answers, such that anyone can follow in our
footsteps (as I decry the plethora of 'imaginary' solutions on Usenet).

> Yes, you are that too. But, I specifically and rightfully at this
> point I feel, called you an idiot.

Hi Diesel,
I agree I'm an idiot, and that you're smarter than I am.
I apologize if I implied otherwise.

Meanwhile, I need to move forward on writing Android apps for noobs.
To that end, below is hard-won information for those of us on the
older Windows AMD CPUs.
============================================================================
o AndroidStudio321 x86 emulators don't work with old Windows AMD CPUs.
o You can use the ARM EABI v7a System Image (but it's super slow).
o Most people suggest Genymotion: <https://www.genymotion.com/desktop/>
But you have to create an account to get the freeware (so I didn't).
o Or Microsoft <https://visualstudio.microsoft.com/vs/msft-android-emulator/>
o Or Andyroid: <https://www.andyroid.net/>
<https://andydownload.azureedge.net/downloads/installer/v47/Andy_47.260_1096_26_x64.exe>
o Or Blue Stacks: <https://www.bluestacks.com/>
<https://www.bluestacks.com/download.html?utm_campaign=homepage-dl-button-en>
<https://cdn3.bluestacks.com/downloads/4.31.59.3502/BlueStacks-Installer_amd64_BS4_native.exe?filename=BlueStacks-Installer_amd64_BS4_native_9c5d32d737a86304dbf0800964b9b92e.exe

REFERENCES:
<https://stackoverflow.com/questions/31815847/external-emulator-for-android-studio>
<https://www.android-examples.com/manually-install-external-apk-files-android-emulator-android-studioeclipse/>
<https://developer.android.com/studio/run/emulator>
<https://developer.android.com/studio/run/managing-avds>
<https://blogs.msdn.microsoft.com/devops/2015/07/20/using-the-visual-studio-emulator-for-android-from-android-studio-or-eclipse-with-adt/>
============================================================================
You have to run this command to get the necessary info for the AVD setup!

C:\Program Files (x86)\Microsoft Emulator Manager\1.0\emulatorcmd.exe
Which is put in your path already by the Visual Studio installer.

o C:\>emulatorcmd.exe /sku:Android list /type:device
Identifier | Name | Version
-------------------------------------+------------------------------+------------
226C76AC-9E9A-4EBD-A495-79E8C5C5292F | 7" KitKat (4.4) XHDPI Tablet | 1.0.60404.1
363F7AED-462C-46BD-9FEC-F1DD3B79916C | 5" KitKat (4.4) XXHDPI Phone | 1.0.60404.1

That output enables construction of the following commands in Android Studio.
These commands show up later in "AndroidStudio321:Tools > External Tools".
AndroidStudio321:File > Settings > External Tools > (+) >
Note they show up in the order created, first on top, last on bottom.

Name: MS 7" KitKat (4.4) XHDPI Tablet (SDK version 19)
Description: (I don't know where this matters, if at all)
Description: Emulates the Asus Google Nexus 7 tablet
Program: C:\Program Files (x86)\Microsoft Emulator Manager\1.0\emulatorcmd.exe
Arguments: /sku:Android launch /id:226C76AC-9E9A-4EBD-A495-79E8C5C5292F
Working directory: $ProjectFileDir$

Name: MS 5" KitKat (4.4) XXHDPI Phone (SDK version 19)
Description: (I don't know where this matters, if at all)
Description: Emulates the Samsung Galaxy S5 & Sony Xperia Z
Program: C:\Program Files (x86)\Microsoft Emulator Manager\1.0\emulatorcmd.exe
Arguments: /sku:Android launch /id:363F7AED-462C-46BD-9FEC-F1DD3B79916C
Working directory: $ProjectFileDir$
============================================================================
You can add Google x86 emulators all you want, but they don't seem to work.
(At least not on the older AMD Windows CPUs (they are said to work on Linux).
============================================================================

As always, if anyone knows more than I do, or if I say an incorrect fact,
please advise, correct, and clarify where needed.

The goal, always, is to enable everyone who wants to, to follow in our
footsteps, which, in this case, is to write their own Android apps.

arlen michael holder

unread,
Nov 15, 2018, 12:56:56 AM11/15/18
to
On Wed, 14 Nov 2018 17:55:38 +0000, Bill wrote:

> Most of the work done last night in Android Studio was no longer there,
> so I'll have to do it all over again tonight.
>
> I know I should have done a "save all" before shutting the lid, and
> should be taking backups very frequently, but it still doesn't stop me
> being mad at Microsoft.

Hi Bill,
I'm sorry for you on losing all your work.

It happened to me quite a few times, although for different reasons, as I
reinstalled my Android Studio and moved directories around, and changed
locations of SDKs and JDKs, etc., some of which screwed everything up.

In the future, there are a few ways to prevent that loss of all your work.
One, of course, which you found, is
AndroidStudio321:File > Save All (control+s)

Another save method is to export to a zip file:
AndroidStudio321:File > Export to zip file

Later, when we get good at trusting Android Studio, we can use
the built-in version-control menu system
AndroidStudio321:VCS > Import into version control

A method I use a lot lately is to right click in Windows file explorer
and just zip it up whenever I want to create a checkin point, where
there is app08_a.zip, app08_b.zip, app08_c.zip, etc..

This way I can get back to where I last was if/when I screw up.

BTW, once I figured out how to port app06 (grocery list) to app08,
changing that grocery list to handle any number of items was trivial.

These are real items, at my local grocery store, where I took
pictures of what I normally buy there (i.e., the best deals).

I'm curious how the prices are with respect to yours! :)

o The shopping list GUI has the things I buy at this store:
<http://www.bild.me/bild.php?file=2882721androidstudio63.jpg>
o The list scrolls for as long as needed to contain the list:
<http://www.bild.me/bild.php?file=6444469androidstudio64.jpg>
o The first item is the bar of pure chocolate, at $6/pound:
<http://www.bild.me/bild.php?file=8761584androidstudio65.jpg>
o Then the cage-free eggs, at $2/dozen:
<http://www.bild.me/bild.php?file=4179147androidstudio66.jpg>
o The free-roaming cow's whole milk, at $3/gallon:
<http://www.bild.me/bild.php?file=4022187androidstudio67.jpg>
o Fresh squeezed orange juice at $3/half gallon:
<http://www.bild.me/bild.php?file=1358712androidstudio68.jpg>
o Durham and Seminole wheat pasta at $1/pound:
<http://www.bild.me/bild.php?file=7272961androidstudio69.jpg>
o Fresh squeezed pineapple juice at $3/half gallon:
<http://www.bild.me/bild.php?file=2910438androidstudio70.jpg>
o California table wine at about $6/750ml:
<http://www.bild.me/bild.php?file=2665618androidstudio71.jpg>
o Whole wheat organie olive oil bread wraps at $3.30/14.4 ounces:
<http://www.bild.me/bild.php?file=6075024androidstudio72.jpg>

arlen michael holder

unread,
Nov 15, 2018, 2:02:35 AM11/15/18
to
On Thu, 15 Nov 2018 05:56:55 -0000 (UTC), arlen michael holder wrote:

> These are real items, at my local grocery store, where I took
> pictures of what I normally buy there (i.e., the best deals).

Hi Bill,
Here's what the "custom" shopping list looks like on the phone:
<http://www.bild.me/bild.php?file=5881250androidstudio73.jpg>

The original design is pretty good because everything is just an
item in a list, which can be of any length.

Hence, the only files that changed to create that shopping list were
C:\tmp\android\app08\app\src\main\res\values\strings.xml
C:\tmp\android\app08\app\src\main\java\com\kiss\app08\DetailActivity.java

Where these are the files:
============================================================================
I added the items to the "strings.xml" file:
C:\tmp\android\app08\app\src\main\res\values\strings.xml

<resources>
<string name="app_name">app08</string>

<string-array name="items">
<item>chocolate</item>
<item>eggs</item>
<item>milk</item>
<item>orange juice</item>
<item>pasta</item>
<item>pineapple juice</item>
<item>table wine</item>
<item>bread wrap</item>
</string-array>

<string-array name="prices">
<item>$4.99</item>
<item>$1.69</item>
<item>$2.99</item>
<item>$2.99</item>
<item>$0.99</item>
<item>$3.99</item>
<item>$5.99</item>
<item>$3.29</item>
</string-array>

<string-array name="descriptions">
<item>chocolate bar (no preservatives)</item>
<item>dozen eggs (free roaming)</item>
<item>gallon of milk (happy cows)</item>
<item>1/2 gallon of oj (fresh)</item>
<item>pound of pasta (semolina wheat)</item>
<item>half gallon of pineapple juice (fresh)</item>
<item>table wine (California)</item>
<item>bread wrap (wheat)</item>
</string-array>
</resources>
============================================================================
And I added the switches to the DetailActivity.java file:
C:\tmp\android\app08\app\src\main\java\com\kiss\app08\DetailActivity.java

package com.kiss.app08;

import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Display;
import android.widget.ImageView;

public class DetailActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_detail);

Intent in = getIntent();
int index = in.getIntExtra("com.kiss.app08.ITEM_INDEX", -1);

if (index > -1) {
int pic = getImg(index);
ImageView img = (ImageView) findViewById(R.id.imageView);
scaleImg(img, pic);
}

}

private int getImg(int index) {
switch (index) {
case 0: return R.drawable.chocolate;
case 1: return R.drawable.egg;
case 2: return R.drawable.milk;
case 3: return R.drawable.oj;
case 4: return R.drawable.pasta;
case 5: return R.drawable.pj;
case 6: return R.drawable.vino;
case 7: return R.drawable.wrap;
default: return -1;
}
}

private void scaleImg(ImageView img, int pic) {
Display screen = getWindowManager().getDefaultDisplay();
BitmapFactory .Options options = new BitmapFactory.Options();

options.inJustDecodeBounds = true;
BitmapFactory.decodeResource(getResources(), pic, options);

int imgWidth = options.outWidth;
int screenWidth = screen.getWidth();

if (imgWidth > screenWidth) {
int ratio = Math.round( (float) imgWidth / (float)screenWidth);
options.inSampleSize = ratio;
}

options.inJustDecodeBounds = false;
Bitmap scaledImg = BitmapFactory.decodeResource(getResources(),
pic, options);
img.setImageBitmap(scaledImg);
}
}
============================================================================
The rest of the files were untouched from what they were in app06.
C:\tmp\android\app08\app\src\main\java\com\kiss\app08\MainActivity.java

package com.kiss.app08;

import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;

public class MainActivity extends AppCompatActivity {

ListView myListView;
String[] items;
String[] prices;
String[] descriptions;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

Resources res = getResources();
myListView = (ListView) findViewById(R.id.myListView);
items = res.getStringArray(R.array.items);
prices = res.getStringArray(R.array.prices);
descriptions = res.getStringArray(R.array.descriptions);

ItemAdapter itemAdapter = new ItemAdapter(this, items, prices,
descriptions);
myListView.setAdapter(itemAdapter);

myListView.setOnItemClickListener(new
AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int
i, long l) {
Intent showDetailActivity = new
Intent(getApplicationContext(), DetailActivity.class);
showDetailActivity.putExtra("com.kiss.app08.ITEM_INDEX",
i);
startActivity(showDetailActivity);
}
});


}
}
============================================================================
C:\tmp\android\app08\app\src\main\java\com\kiss\app08\ItemAdapter.java

package com.kiss.app08;
C:\tmp\android\app08\app\src\main\AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
package="com.kiss.app08">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
<activity android:name=".DetailActivity"></activity>
</application>

</manifest>
============================================================================

arlen michael holder

unread,
Nov 15, 2018, 5:36:11 PM11/15/18
to
On Thu, 15 Nov 2018 01:24:05 -0000 (UTC), arlen michael holder wrote:

> Save this as it is NOT anywhere else on the net, but here!

Hi Bill,
I accidentally found out something potentially interesting today, when I
hit a button on Android while reproducing all the previous apps:
<http://www.bild.me/bild.php?file=7991068androidstudio75.jpg>

o I opened the Windows Android Studio "Device File Explorer":
<http://www.bild.me/bild.php?file=6942292androidstudio76.jpg>
o Amazingly, this displayed the root file system on Android:
<http://www.bild.me/bild.php?file=1162959androidstudio77.jpg>
o It "seems" to allow me to "edit" the root files (non rooted):
<http://www.bild.me/bild.php?file=1078724androidstudio78.jpg>
o Where it sure "looks" like we can edit root files, non root:
<http://www.bild.me/bild.php?file=1402992androidstudio79.jpg>
o But I'll need to test this further as it's unbelievable:
<http://www.bild.me/bild.php?file=2729035androidstudio80.jpg>

Since it's a holy grail to be able to write to the Android hosts
file from Windows without being root ... I need to test this further.

Certainly this web page "intimates" that we can WRITE a hosts file
BACK to Android FROM Windows, without needing to be root on Android:
<https://www.modmy.com/how-modify-hosts-file-your-android-device>

The command that web page suggests is...
C:\app\editor\android\sdk\platform-tools\adb.exe root push c:\windows\system32\drivers\etc\hosts /system/etc/

arlen michael holder

unread,
Nov 15, 2018, 5:43:33 PM11/15/18
to
On Mon, 12 Nov 2018 06:04:22 -0000 (UTC), Arlen_Holder wrote:

> I'm not sure what app07 will be as I think the 4th video is out of context
> for what I'm planing on doing (ring an alarm as a 10-minute timer).

Hi Bill,
I left a placeholder for app07, because when I made app08, I realized
instantly that it would be nice to populate the grocery list from a file on
the net which the whole family can read and write to.

So while I didn't do that last Butterfield tutorial yet (app07), I think I
will eventually come back to it since it's essential to have a better
database for populating things like grocery lists that the whole family can
access.

Meanwhile... thanks to all of Diesel's wonderful advice ...
o For practice, I re-wrote all the apps, to reinforce concepts:
<http://www.bild.me/bild.php?file=7991068androidstudio75.jpg>
o The tutorials were MUCH EASIER to follw with my new 20/20 hindsight!
<http://www.bild.me/bild.php?file=7987464androidstudio74.jpg>
o They were even easy to customize so that I created my first 'app':
<http://www.bild.me/bild.php?file=5881250androidstudio73.jpg>

So the good news is that we're no longer complete & total noobs! :)
We know enough now to at least build our own primitive apps. :)

arlen michael holder

unread,
Nov 16, 2018, 12:08:03 AM11/16/18
to
On Sat, 10 Nov 2018 10:43:10 +0000, Bill wrote:

> I have now got through the text based button and message build, which
> works, and am starting on the first Butterfield video.

Hi Bill,

Heads up!

I just finished the last Butterfield video (number 4 of 4).
Do NOT do it!

It's completely different in character from the previous 3.
Don't even _think_ of doing it. Really.

I don't think _anyone_ (at our stage) can be successful with it.
You need to set up a SQL server which he doesn't cover at all!
And he skips steps like you can't believe!
He never even scrolls through the final code so you can check for errors.

It's just not worth the effort.
I wish I knew that before I went through every step, but I know that now.

Everything below is simply detail on the information above.
Don't do that fourth Butterfield product. Let's find another that's better.
============================================================================
o Android Studio For Beginners Part 1, 2, 3, 4 by Bill Butterfield,
Published on Jun 13, 2017
https://youtu.be/dFlPARW5IX8 (part 1) a simple adder
https://youtu.be/6ow3L39Wxmg (part 2) call a program outside the app
https://youtu.be/rdGpT1pIJlw (part 3) grocery list
https://youtu.be/bu5Y3uZ6LLM (part 4) mysql grocery list
============================================================================
The first three videos are fantastic, but the fourth is almost impossible.
o You need to set up an sql server and database on port 3306
o You need to obtain & set up oracle mysql workbench
o You need to add .NET Framework & Visual C++ runtimes if you don't have them
o His video is mysql version 3 but the current version is version 8
o You need to import the java connector jar file library as a module
o He cuts and pastes entire files during the video without scrolling!
o That's critical since you can't follow easily what he's doing.

This last video is NOTHING like the prior 3 videos in terms of handholding!
============================================================================
Some of the software you need will be:
============================================================================
JDBC Driver for MySQL (Connector/J)
https://dev.mysql.com/downloads/connector/j/
Hit "Platform Independent" in the selector.
That gives a tar ball and a zip archive.
Obviously get the zip archive.
Platform Independent (Architecture Independent), ZIP Archive 8.0.13 6.4M
Download (mysql-connector-java-8.0.13.zip)
MD5: a106e8c50a616b93ce28a6f7cb991586

https://dev.mysql.com/downloads/file/?id=480292
Begin Your Download
mysql-connector-java-8.0.13.zip
https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java-8.0.13.zip
============================================================================
Unzip and move the mysql-connector-java-8.0.13 folder to
C:\app\editor\android\sql\mysql-connector-java-8.0.13\

Make a note of the path (as you'll need it later):
C:\app\editor\android\sql\mysql-connector-java-8.0.13\mysql-connector-java-8.0.13.jar
============================================================================
My Sequel Workbench
https://dev.mysql.com/downloads/workbench/
Windows (x86, 64-bit), MSI Installer 8.0.13 33.6M
Download
(mysql-workbench-community-8.0.13-winx64.msi)
MD5: 298f374a2a032bf5148fc4909a2dcab1 | Signature

https://dev.mysql.com/downloads/file/?id=480542
https://cdn.mysql.com//Downloads/MySQLGUITools/mysql-workbench-community-8.0.13-winx64.msi

Requires:
o Microsoft .NET Framework 4.5
https://www.microsoft.com/en-us/download/details.aspx?id=30653
https://download.microsoft.com/download/B/A/4/BA4A7E71-2906-4B2D-A0E1-80CF16844F5F/dotNetFx45_Full_setup.exe
o Visual C++ Redistributable for Visual Studio 2015
https://www.microsoft.com/en-us/download/details.aspx?id=48145
https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe
https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x86.exe
============================================================================
Importing the jar file is pretty easy though:
AndroidStudio321: Right click on app > new > module > import JAR/.AAR Package
C:\app\editor\android\sql\mysql-connector-java-8.0.13\mysql-connector-java-8.0.13.jar
============================================================================
Even if you get the program to work, you _still_ need to set up a SQL server!
============================================================================
Here are the main files at the point that I gave up (after about 2 hours).

o C:\tmp\android\app07\app\src\main\AndroidManifest.xml
o C:\tmp\android\app07\app\src\main\java\com\kiss\app07\mainActivity.java
o C:\tmp\android\app07\app\src\main\java\com\kiss\app07\ItemAdapter.java
o C:\tmp\android\app07\app\src\main\java\com\kiss\app07\DbStrings.java
o C:\tmp\android\app07\app\build.gradle
o C:\tmp\android\app07\app\src\main\res\layout\item_layout.xml
o C:\tmp\android\app07\app\src\main\res\layout\activity_main.xml
============================================================================
C:\tmp\android\app07\app\src\main\AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.kiss.app07">

<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
============================================================================
C:\tmp\android\app07\app\src\main\java\com\kiss\app07\mainActivity.java

package com.kiss.app07;

import android.content.Context;
import android.content.res.Resources;
import android.os.AsyncTask;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ListView;
import android.widget.TextClock;
import android.widget.TextView;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.LinkedHashMap;
import java.util.Map;

public class MainActivity extends AppCompatActivity {

ItemAdapter itemAdapter;
Context thisContext;
ListView myListView;
TextView progressTextView;
Map<String>, Double> fruitsMap = new LinkedHashMap<String>, Double>();

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

Resources res = getResources();
myListView = (ListView) findViewById(R.id.myListView);
progressTextView = (TextView) findViewById(R.id.progressTextView);
thisContext = this;

progressTextView.setText("");
Button btn = (Button) findViewById(R.id.getDataButton);
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
GetData retrieveData = new GetData();
retrieveData.execute("");
}
});
}
};
}

private class GetData extends AsyncTask<String, String, String> {
String msg = "";
// JDBC drivr name and database URL
static final String JDBC_DRIVER = "com.kill.app07.Driver";
// Example: 10.20.30.40:3306
static final String DB_URL = "jdbc:mysql://" +
DbStrings.DATABASE_URL + "/" +
DbStrings.DATABASE_NAME;

@Override
protected void onPreExecute() {
progressTextView.setText("Connecting to database...");
}

@Override
protected String doInBackground(String...params) {

Connection conn = null;
Statement stmt = null;

try {
Class.forName(JDBC_DRIVER);
conn = DriverManager.getConnection(DB_URL, DbStrings.USERNAME, DbStrings.PASSWORD);

stmt = conn.createStatement();
String sql = "SELECT * FROM fruits";
ResultSet rs = stmt.executeQuery(sql);

while (rs.next()) {
String name = rs.getString("name");
double price = rs.getDouble("price");

fruitsMap.put(name, price);
}

msg = "Process complete.";

rs.close();
stmt.close();
conn.close();

} catch (SQLException connError) {
msg = "An exception was thorn for JDBC.";
connError.printStackTrace();
;
} catch (ClassNotFoundException e) {
msg = "A class not found exception was thrown.";
e.printStackTrace();
} finally {

try {
if (stmt != null) {
stmt.close();
}
} catch (SQLException e) {
e.printStackTrace();
}
try {
if (conn != null) {
conn.close();
}
} catch (SQLException e) {
e.printStackTrace();
}

}

return null;
}

@Override
protected void onPostExexute (String msg){

progressTextView.setText(this.msg);

if (fruitsMap.size() > 0) {

itemAdapter = new ItemAdapter(thisContext, fruitsMap);
myListView.setAdapter(itemAdapter);
}

}

} //End of MainActivity
============================================================================
C:\tmp\android\app07\app\src\main\java\com\kiss\app07\ItemAdapter.java

package com.kiss.app07;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.kiss.app07.R;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
* Created by Example on 11/15/2018.
*/

public class ItemAdapter extends BaseAdapter {

LayoutInflater mInflator;
Map<String, Double> map;
List<String> names;
List<Double> prices;

public ItemAdapter(Context c, Map m) {
mInflator = (LayoutInflater) c.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
map = m;
names = new ArrayList<String>(map.keySet());
prices = new ArrayList<Double>(map.values());
}

@Override
public int getCount() {
return map.size();
}

@Override
public Object getItem(int i) {
return names.get(i);
}

@Override
public long getItemId(int i) {
return i;
}

@Override
public View getView(int i, View convertView, ViewGroup parent) {

View v = mInflator.inflate(R.layout.item_layout, null);
TextView nameTextView = (TextView) v.findViewById(R.id.nameTextView);
TextView priceTextView = (TextView) v.findViewById(R.id.priceTextView);

nameTextView.setText(names.get(i));
priceTextView.setText("$" + prices.get(i).toString());

return v;
}
}
============================================================================
C:\tmp\android\app07\app\src\main\java\com\kiss\app07\DbStrings.java

package com.kiss.app07;

public class DbStrings {

static final String DATABASE_URL = "129.0.0.1:3306";
static final String DATABASE_NAME = "mhs_example";
static final String USERNAME = "some_user";
static final String PASSWORD = "your_password";
}
============================================================================
C:\tmp\android\app07\app\build.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId "com.kiss.app07"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

compile project (':mysql-connector-java-8.0.13')
}
============================================================================
C:\tmp\android\app07\app\src\main\res\layout\item_layout.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent">

<TextView
android:id="@+id/nameTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginStart="24dp"
android:layout_marginTop="35dp"
android:layout_marginBottom="35dp"
android:text="Name" />

<TextView
android:id="@+id/priceTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/nameTextView"
android:layout_alignParentEnd="true"
android:layout_marginEnd="63dp"
android:text="Price" />
</RelativeLayout>
============================================================================
C:\tmp\android\app07\app\src\main\res\layout\activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<Button
android:id="@+id/getDataButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:text="Get Data"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/progressTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="Progress"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/getDataButton" />

<ListView
android:id="@+id/myListView"
android:layout_width="368dp"
android:layout_height="412dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</android.support.constraint.ConstraintLayout>
============================================================================
============================================================================

arlen michael holder

unread,
Nov 16, 2018, 12:08:19 AM11/16/18
to
On Sat, 10 Nov 2018 10:43:10 +0000, Bill wrote:

> I have now got through the text based button and message build, which
> works, and am starting on the first Butterfield video.

Bill

unread,
Nov 16, 2018, 12:37:25 AM11/16/18
to
In message <psj1r6$r3l$1...@news.mixmin.net>, arlen michael holder
<arlen_mich...@example.com> writes
>I'm sorry for you on losing all your work.
>
>It happened to me quite a few times, although for different reasons, as
>I reinstalled my Android Studio and moved directories around, and
>changed locations of SDKs and JDKs, etc., some of which screwed
>everything up.
>
It's hard to believe, but there was another MS update last night - they
are there in the Update History - and the same thing happened again.
This time everything was saved and restarted fine, but one or two other
things outside Android Studio seemed to get rearranged. I really do
think Microsoft have lost the plot, but here isn't the place to rant.

>In the future, there are a few ways to prevent that loss of all your
>work.
>One, of course, which you found, is
> AndroidStudio321:File > Save All (control+s)
>
>Another save method is to export to a zip file:
> AndroidStudio321:File > Export to zip file
>
>Later, when we get good at trusting Android Studio, we can use the
>built-in version-control menu system
> AndroidStudio321:VCS > Import into version control
>
>A method I use a lot lately is to right click in Windows file explorer
>and just zip it up whenever I want to create a checkin point, where
>there is app08_a.zip, app08_b.zip, app08_c.zip, etc..
>
>This way I can get back to where I last was if/when I screw up.

Zipping everything up is probably a good plan. Most of what I mess with
on various machines is audio, so I rely on rotating uncompressed backups
to a server on the network. As the W10 machine isn't really in the list
of serious PC's, it hasn't been getting backed up as much as others.
>
>BTW, once I figured out how to port app06 (grocery list) to app08,
>changing that grocery list to handle any number of items was trivial.
>
>These are real items, at my local grocery store, where I took pictures
>of what I normally buy there (i.e., the best deals).
>
>I'm curious how the prices are with respect to yours! :)

I'm afraid I have a wife who does the food shopping - we are looking
after someone with very weird dietary tastes - so I haven't checked out
or taken photos of any items and prices. I was surprised to see litres
in your list, it's a mess over here with litres, pounds, pints,
kilograms, feet, metres all mixed up. I just used some random photos I
found on the machine.

My wife doesn't drive, so I sit outside the stores waiting while she
gabs to all her friends. That's when I try to re-grasp Java from my
ancient book.
>

So, I've now completed Butterfield 3, and am thinking about what to do
next while I try to vaguely understand what I have done. I will watch
the 4th video and think about that and whether it as worth going through
it as is or thinking of some other way to move on.

Moving around the ide is, as you say, getting smoother and somewhat more
familiar. I do feel I need to get a grip on Java and more au fait with
where to find things asap.

Bill

unread,
Nov 16, 2018, 10:35:13 AM11/16/18
to
In message <psljbi$9ah$1...@news.mixmin.net>, arlen michael holder
<arlen_mich...@example.com> writes
>Everything below is simply detail on the information above. Don't do
>that fourth Butterfield product. Let's find another that's better.
>========================================================================
>====
>o Android Studio For Beginners Part 1, 2, 3, 4 by Bill Butterfield,
> Published on Jun 13, 2017
> https://youtu.be/dFlPARW5IX8 (part 1) a simple adder
> https://youtu.be/6ow3L39Wxmg (part 2) call a program outside the app
> https://youtu.be/rdGpT1pIJlw (part 3) grocery list
> https://youtu.be/bu5Y3uZ6LLM (part 4) mysql grocery list
>========================================================================
>====
>The first three videos are fantastic, but the fourth is almost
>impossible.
>o You need to set up an sql server and database on port 3306
>o You need to obtain & set up oracle mysql workbench
>o You need to add .NET Framework & Visual C++ runtimes if you don't
>have them
>o His video is mysql version 3 but the current version is version 8 o
>You need to import the java connector jar file library as a module o He
>cuts and pastes entire files during the video without scrolling! o
>That's critical since you can't follow easily what he's doing.
>
>This last video is NOTHING like the prior 3 videos in terms of
>handholding!

The situation at my end is that I still haven't had time to watch
through that 4th video, but I do still plan to at least do that before
moving on.

I've used simple database software for years and ended up ages ago
settling on mySQL as the one I always use. I have a bunch of mySQL
databases here.
I have used Workbench and ODBC in the past, but not JDBC. Like
everything else, I've forgotten how I set them up, but for the last few
years have just used them.

So, the plan is to look at the 4th video and see what I think.

For the record, I think your alarm would be a good starting point if we
can't find a good next step video or mini-course.

My personal app that I would like to have a shot at if I get more
confident is a very simple camera app with very few frills.

Stage 1: Opening screen with big buttons to select:
1. Single picture every 5 secs or continuous video
2. Light on or off
3. Front or back camera.
4. Go!
Having hit Go!, huge button or whole screen tap, toggles picture
sequence or video.

Stage 2 Same interface, but uses external "snake" type camera to poke
into things

The idea is to make something that is easy to use in awkward situations,
and was prompted by my efforts to inspect hidden engine areas on a
European-built Jeep Grand Cherokee with Merc engine of black-death fame
(now thankfully sold) and inspect the insides of various stringed
musical instruments like guitars, mandolins etc.

This is probably way beyond me, but we'll see.

arlen michael holder

unread,
Nov 16, 2018, 1:52:27 PM11/16/18
to
On Fri, 16 Nov 2018 15:33:46 +0000, Bill wrote:

> The situation at my end is that I still haven't had time to watch
> through that 4th video, but I do still plan to at least do that before
> moving on.

Hi Bill,

My main caveat on the Butterfield #4 video is that he pastes in entire
files, and then he does NOT show you what that entire file looks like!

So you have to "piece together" the jigsaw puzzle, from various screens
well before and well after that pasting of the entire file, just to figure
out what that file contained!

If he only added a simple page-by-page scroll the moment he pasted in a
file, it would be vastly easier for the first person to reproduce what he
wrote. I did that for you though, so that should "help" you (if) I
reproduced what he wrote faithfully.

If you copy the code I pasted prior, bear in mind one caveat which is that
Bill Butterfield copied (and modified) his code from the previous video #3
(simply grocery list) for
C:\tmp\android\app07\app\src\main\java\com\kiss\app07\ItemAdapter.java
So I did the same thing, with the one difference is that I kept the index
"i", but where Bill Butterfield used an index named "position".

The _reason_ I did that was because I didn't know what _other_ files
defined or used that index, so I didn't want to change what Android Studio
automatically created for me.

In hindsight, I should have changed it in the prior app to make it work,
but I didn't do that. Also in hindsight, I should have added a _comment_ at
the first instance of "i" instead of "position", which I will try to do in
the future since I'm posting the code here for you and others to use.

However, this "i" versus "position" is a minor difference between his and
my code, where, if you recall, I left it that way because his version of
Android auto-created "position" while my version of Android auto-created
"i".

Everything else I "tried" to keep the same as what he pasted.

> I've used simple database software for years and ended up ages ago
> settling on mySQL as the one I always use. I have a bunch of mySQL
> databases here.

Oh. Well. Then...

That makes a _huge_ difference!
I have _zero_ experience with mySQL.

In fact, I can't even pronounce mySQL!

So, when/if you do that #4 Bill Butterfield video, I'd love to know how you
set up the mySQL server, since I didn't even _touch_ the setup of the mySQL
server to localhost port 3306.

> I have used Workbench and ODBC in the past, but not JDBC. Like
> everything else, I've forgotten how I set them up, but for the last few
> years have just used them.

I have to be careful responding becuase I don't even know what a "java
connector" is, but, I can tell you the "download" and "import" step of that
"java connector" is pretty easy.

There are gotchas though, where, for example, in the video comments, people
made the _same_ mistake I made at first, which is that Oracle makes it
almost impossible to find that java connector zip file but I can give you a
direct URL to that zip file.

Oracle seems to constantly want you to download the entire all-encompassing
"msi" installer, when all you want is the thing called a "java connector".

Bearing in mind the current version is five main numbers higher than what
Bill Butterfield used in 2017 (he used version 3, the current version is
8), these are the only two steps you need, once you figure it all out:
1. On Windows, download & unzip the thing called a "java connector"
2. In Android Studio, "import" that "jar" file as a "modile.

Here is the URL to the current version of the Oracle java connector:
<https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java-8.0.13.zip>

Here is the Android Studio command to import the resultant jar file:
AndroidStudio321: Right click on app > new > module > import JAR/.AAR Package
C:\app\editor\android\sql\mysql-connector-java-8.0.13\mysql-connector-java-8.0.13.jar

Where, my Windows hierarchy under "android" has a new "sql" folder: :)
o C: === my main drive
o app === where all my applications get installed
o editor === where all editing programs get installed
o android === where android "stuff" was recently installed
0. how ==> all my text tutorials that I'm writing as a result
1. jdk === the JDK and JRE
2. sdk === the SDK and ADB
3. emu === MS, google, andyroid, genymotion, bluestacks, arm., emulators
4. ide === the Google Android Studio & Microsoft Visual Basic IDEs
5. cpu === the haxm, AMD, & Intel hyper-v & process identification utils
6. app === the archive of installed apps (app01.zip, app02.zip, etc.)
7. vid === the archive of tutorial videos (& text notes for each video)
8. sql === the newly downloaded sql java connectors & workbenches

> So, the plan is to look at the 4th video and see what I think.

That's a good plan Bill, where we can help each other since having a
database for the grocery list app is useful, especially since individual
members of a family could edit the home database from an iPad in the
kitchen whenever something goes low, and then the apps could pick up the
latest grocery list for use on the day that they go grocery shopping.

My problem is that I don't know how to spell SQL, let alone set it up.
So when you get Bill Butterfield's video #4 working, I could benefit from
your advice.

Meanwhile, I'll move on to a timer tutorial of some sort since my first
"real" app is supposed to be a 10-minute kiss timer.

If/when you're successful, I'll come back to that Butterfield #4 project,
so I'll leave a TBD space for "app07" as a placeholder.
<http://www.bild.me/bild.php?file=7991068androidstudio75.jpg>
app01 === Google "hello world"
app02 === Google "enter text, press button, shows up in next screen"
app03 === Butterfield adder of two numbers
app04 === Working port of the previous app (no small feat)
app05 === Butterfield opening of an outside activity (web browser)
app06 === Butterfield simple grocery list
app07 === TBD Butterfield sql grocery list
app08 === Custom port of the simple grocery app to my grocery store

I plan on app09 being a simple alarm timer of some sort...

> For the record, I think your alarm would be a good starting point if we
> can't find a good next step video or mini-course.

I agree with you, Bill, where I see the _need_ for a complete set of apps,
from app01 (hello world) to app99 (or whatever) which walks a person
through all the major types of coding situations on Android, where each app
does one thing well.

Most of us humans can take a part from one car and fit it in another, so to
speak, once we have the part working in one car, which is why that list of,
oh, say, 100 tutorials, each of which does one thing well, would be useful.

To that end, I'll see if I can dig up alarm clock tutorials, where that
would be my next approach. As you may have figured out, 9 out of 10
tutorials on YouTube suck, where, I'm at the point that if I hear another
Heavy-Non-English accent, I'm gonna ditch it on sight. Jesus. They're so
bad those tutorials that you wonder if they're being paid to just throw
them out there and they're being paid by the sheer number they produce
instead of by the quality of results. :(

> My personal app that I would like to have a shot at if I get more
> confident is a very simple camera app with very few frills.

Oh Yeah! I'm with you on the need for a KISS camera app!

In fact, I have _entire threads_ on what is wrong with camera apps!
They don't get the SIMPLE stuff right!

The first camera app I write will be so simple that it can be used under a
car to snap photos wearing gloves, where all the controls that get in the
way (like that idiotic selfie switch for example) will be removed!

I do a lot of work on cars as I keep them for decades (yes, plural), and
I've never once been to a mechanic in my life (I change & repair my own
tires, and balance my own wheels for example).

Here's a writetup, for example, on the clutch I recently replaced:
<https://groups.google.com/d/msg/alt.home.repair/qEhph1MmSKs/S_R2Y4gRBwAJ>
I must have snapped a thousand pictures for that tutorial, for example.
You only need one (maybe two) buttons (or commands).

> Stage 1: Opening screen with big buttons to select:
> 1. Single picture every 5 secs or continuous video

Yup. I have an _entire thread_ on that one feature alone!
What is a good TIMER photo app for Android?
<https://groups.google.com/d/msg/comp.mobile.android/9GPU430iHUg/QvBBYk9FCAAJ>

BTW, the _best_ (so far) that I can find for a camera "timer" app, is the
Mark Harmon "Open Camera" (watch out, there are multiple camera apps with
similar names due to the open source nature of things).

That guy really knows what a user needs when it comes to camera timers!

So others can find it easily, here are some references (as always, since I
don't deal with "imaginary solutions" like so many others constantly do):
<https://play.google.com/store/apps/details?id=net.sourceforge.opencamera>
<https://f-droid.org/en/packages/net.sourceforge.opencamera/>
<https://sourceforge.net/projects/opencamera/>
<https://opencamera.sourceforge.io/>
<http://mark-h.users.sourceforge.net/>
<https://forum.xda-developers.com/android/apps-games/app-camera-t2850557>
<http://opencamera.org.uk/>

Here's a specific post I made when I found that app (which is the only
timer app of the many I tested, that I've kept):
<https://groups.google.com/d/msg/comp.mobile.android/9GPU430iHUg/f2XFKL2RCAAJ>

> 2. Light on or off

Flashlight?

If so, this is good for working UNDER the car, where you can't see
anything, and where you can't put your hands on the camera (most of the
time), so you need a timer, so you have to pre-place the camera, where the
"flashlight" is a good feature, if that's what you mean.

> 3. Front or back camera.

Auuuuuurrrrrrrrrgggggggggmmmmmmmmmhhhhhh!
I hate that selfie button.
I've never wanted it once in my entire life.

In my kiss camera app, it won't exist! :)

> 4. Go!
> Having hit Go!, huge button or whole screen tap, toggles picture
> sequence or video.

Yup. I agree with you.
A simple camera app is a keeper for being on the list!

However, I think the alarm is easier as it interfaces less with hardware.

> Stage 2 Same interface, but uses external "snake" type camera to poke
> into things

Hehhehheh... I've been there, done that!
Ever try to retrieve a lost bolt inside an intake manifold?
(Don't ask if I have real-world experience in that!)

The snake camera I used (on another phone so I can't reference it), came
with its own app.

> The idea is to make something that is easy to use in awkward situations,
> and was prompted by my efforts to inspect hidden engine areas on a
> European-built Jeep Grand Cherokee with Merc engine of black-death fame
> (now thankfully sold) and inspect the insides of various stringed
> musical instruments like guitars, mandolins etc.

Wow, Bill. I agree with you 100%.

As I said, I do all my own mechanical work, so that means I've replaced
cooling systems, alternators, starters, etc., where if you've never done,
say, a starter, you'd think it was easy.

I mean, it's two 14mm bolts, right?
And, it's about the size of, oh, a quart jug of milk, right?

But, it weighs as much as a cannonball, and, worse, it's attached low down
in the absolute worst spot in a vehicle, attached to the flywheel.

Actually, it's not in the worst spot in a vehicle. If you know bimmers, the
CCV is in the absolute worst spot possible in an engine bay! I've done one
too (and I hope to never do another German PCV for the rest of my life!).

If people have never tried to snap pictures in these crunched low-light
greasy low room gloved hands situations, then they won't understand how
crappy camera controls really are for such things.

As an aside, it's always the people who have never done such things who
blithely proclaim all sorts of "googled solutions", which, is kind of funny
in that the less someone knows of the problem, the more so-called
"solutions" they can find on the net. :)

Three things, I see, based on this conversation, are needed:
1. A good video tutorial site with the first 25 apps one should code, and,
2. Specifically, a good alarm clock app coding tutorial (I think I have it)
3. And, specifically, a good camera customization coding tutorial.

I have an alarm clock tutorial that I'm exploring today so I hope to have a
solution for you when you're done with that Bill Butterfield SQL-based
grocery app (which I gave up on for now, due to lack of SQL experience).

arlen michael holder

unread,
Nov 16, 2018, 2:29:45 PM11/16/18
to
On Fri, 16 Nov 2018 00:19:17 +0000, Bill wrote:

> It's hard to believe, but there was another MS update last night

Oh my... I'm sorry for you... that update is a killer sometimes.

I have a relatively recent thread on the Windows 10 ng on how to _prevent_
all MS updates from happening. I was successful at preventing updates for
_years_, for example, until the Microsoft update around the late January
time frame _bricked_ my system.

It's a loooooooong well documented saga, where I even resorted to taking
the desktop to the huge Microsoft Store (right across from the huge Apple
Store in the local San Jose Valley Fair shopping mall) - and after two or
three days - they declared that they couldn't unbrick it either. Sigh.

At that point, I gave up on stopping Microsoft updates.... but then ... a
month or two later ... I tried to completely remove Cortana (and not just
to redirect it to a dead browser)... which I was successful at actually ...
until the next Microsoft Update, which, ... guess what ... bricked my
system again. Again the Microsoft Store couldn't unbrick it.

Guess what I do now?
(HINT: My Windows is 100% up to date, & it has that stupid Cortana.)

> Zipping everything up is probably a good plan.

Yep. In Windows, you can sequentially zip to app07_a.zip, app07_b.zip,
app07_c.zip, etc., and you always have a convenient "restore" point.

You can even zip to video tutorial time points, e.g.,
tutorial07_time15:45.zip, tutorial07_time20:30.zip, etc.

I'm not sure if you need to "Close" the Android project and to kill Android
Studio, but just in case there are files in a semi-accessible state (e.g.,
those in virtual memory?), I generally do the following before zipping:
1. AndroidStudio321:File > Save All
2. AndroidStudio321:File > Close Project
3. (I "x" out the project in the "Welcome Screen" that results)
4. AndroidStudio321:File > Exit

> I was surprised to see litres
> in your list, it's a mess over here with litres, pounds, pints,
> kilograms, feet, metres all mixed up.

Yup. Standard USA tire sizes, for example, are in inches (for the
diameter), millimeters (for the width), and percentages (for the height),
where I'm not sure how folks across the pond do tire sizes.

While everyone in the USA has duplicate sets of Imperial and Metric
wrenches, you UK folks have additional UK-specific sizes.

Most (if not all) of our liquids, solids, and gases (are there gases?) in
the grocery store, are in both Imperial and Metric quantities.

It's just our roads that are exclusively in Imperial units. They went to
metric before OPEC got mad at us in the 70s, but we pulled down all the
duplicated kilometer signs soon thereafter (in protest?).

While tools and groceries are dual-Imperial/Metric, I haven't seen a
kilometer road sign since the 70s.

> My wife doesn't drive, so I sit outside the stores waiting while she
> gabs to all her friends. That's when I try to re-grasp Java from my
> ancient book.

Out here, everyone drives. You can't survive without driving.
We haven't even invented a school bus in California.
Nor mass transit that actually goes anywhere you need to go.

I live in mountains above Silicon Valley where the roads are single lane
for miles and miles and miles. We're so far from anything that I stock my
own gasoline, for example, where I always keep 50 gallons on hand for
refueling (since the nearest gas station is a 30 mile round trip).

Likewise with groceries. We stock fifty-pound bags of sugar and flour and
rice from Costco. Unfortunately, pasta only comes in puny six-pound packs
but olive oil, conveniently, comes in four-liter and one-liter packages.

I think it would be fun to write a Costco-specific grocery app, since
Costco has good prices on large quantities ... where they don't allow
picture taking but I do it anyway (and where I write on the labels in
pencil the price per unit since they conveniently are haphazard about
that).

One app that would be nice is a grocery store price comparison app.

I covered them in gory detail in 2014, but I haven't visited them since.
Comparing prices for grocery shopping using Android free app (9/19/2014)
<https://groups.google.com/d/msg/comp.mobile.android/OlycIR5kIp8/cNmdPt0wD0MJ>

The trick is populating a price database for each store where shopping
comparisons for just the items you care about can be compared at home.

> So, I've now completed Butterfield 3, and am thinking about what to do
> next while I try to vaguely understand what I have done. I will watch
> the 4th video and think about that and whether it as worth going through
> it as is or thinking of some other way to move on.

**Kudos to you for completing Butterfield 3!**

I hope my text posts helped.
If not, let me know as it's a LOT of work to post that stuff.
(I post it to be helpful - but if it's not helpful - then I can save the
effort and spend it on learning more instead of posting more.)

BTW, moving forward, here are the short "timer" videos I'm evaluating...

*Android alarm clock tutorial, by Anna Xu, published Jan 18, 2016*
o Part 1: Demo and user interface <https://youtu.be/xbBlzOblD10>
o Part 2: Initializing UI <https://youtu.be/XIPSCe-38fM>
o Part 3: The onClickListener <https://youtu.be/KseXIsTLXaY>
o Part 4: Alarm Manager <https://youtu.be/R3AzhgzbpTc>
o Part 5: Ringtone Service I <https://youtu.be/GlLafRXJmGA>
o Part 6: Ringtone Service II <https://youtu.be/UDVfJzWpuWc>
o Part 7: Ringtone Service III <https://youtu.be/UCYv-TfKRMw>
o Part 8: Notifications <https://youtu.be/mgp7qjTXW2o>
o Part 9: Spinner I <https://youtu.be/eNZwsPEgVQI>
o Part 10: Spinner II <https://youtu.be/eNZwsPEgVQI>
o Part 11: Spinner III <https://youtu.be/TyFmKvvt3Zs>

Now that I gave up on the SQL endeavor (for now), today I downloaded
that set of Anna Xu videos to start the evaluation on the first one.

I'll report back when/if I have something of value to report
(as I'm all about "adding value" in every post, if possible).

> Moving around the ide is, as you say, getting smoother and somewhat more
> familiar. I do feel I need to get a grip on Java and more au fait with
> where to find things asap.

I agree on both points.

The IDE is happening as we inevitably get more comfortable with the IDE.
The java comprehension will happen as we inevitably need to debug errors.

arlen michael holder

unread,
Nov 16, 2018, 3:08:27 PM11/16/18
to
On Fri, 16 Nov 2018 18:52:27 -0000 (UTC), arlen michael holder wrote:

> As an aside, it's always the people who have never done such things who
> blithely proclaim all sorts of "googled solutions", which, is kind of funny
> in that the less someone knows of the problem, the more so-called
> "solutions" they can find on the net. :)

BTW, since I do all my own mechanical work, that means I do my own
suspension alignment (you know, camber, caster, & toe, X, Y, & Zed).

The measurement of X, Y, and Zee aren't difficult using cellphones, which
have the required accuracy for angles, and the adjustment of the bolts is
trivial, where toe plates and camber jigs help.

What's difficult s the MATH involved.
It makes your head explode.

Not because trig is difficult mind you, as trig is trivial.
Only someone who has done their own alignment would understand why I say
the math makes your head explode - which is where a cellphone app could
play a key role in simplifying things.

You see, what you measure at home for an alignment is NEVER what the spec
actually is. Why? I can't tell you why. I can just tell you that it is.

For example, my bimmer has toe spec'd in degrees, but, at home, you
typically measure toe in inches, not in degrees ... simply because it's
trivial to measure toe in inches at home to the desired accuracy.

Yet, most American cars (thankfully) spec toe in inches (which, for once,
makes sense), but of course, it's often inches to centerline, where you
then have to figure out what they define as the centerline (which can be
different on every vehicle).

For camber, at least you get a spec in degrees, but you can measure camber
in inches using just a plumb bob and a ruler, so again, you have to convert
(using basic trig) from inches to degrees.

Meanwhile, you compute caster from other measurements.

The point is that (a) each vehicle is different in how it differs from (a)
the specs it gives you, and (b) the specs you can easily measure at home.

All the work is NOT in the measurements (measuring camber and toe to the
required precision and repeatability is trivial for example) nor is there
any work in the adjustments (twisting a bolt is easy, and even easier to
replicate the normal position of the vehicle with niceties like toe plates
and camber jigs).

All the work is in the math.
That's where an app that measures angles and which can take as input
inches, can be a wonderful app that, to my knowledge, doesn't exist yet.

Does anyone here know of such an app for example?

Bill

unread,
Nov 16, 2018, 7:06:42 PM11/16/18
to
In message <psn3la$u0j$1...@news.mixmin.net>, arlen michael holder
<arlen_mich...@example.com> writes
>Auuuuuurrrrrrrrrgggggggggmmmmmmmmmhhhhhh!
>I hate that selfie button.
>I've never wanted it once in my entire life.
>
>In my kiss camera app, it won't exist! :)

Just a very quick follow up on this point. I thought that switch useful
for occasions when one might poke the camera into some area and yet be
able to see part of the screen to aim the image better up and under.

One of the Android 4 phones I have kept is still here because it has
just one hinged camera at the top. It can revolve through 180 degrees to
point front or back, straight up or anywhere in between. It has been
extremely useful, but I've never seen another phone like it. It's
branded "Timmy" and was extremely low cost, something like the
equivalent of $35 when I bought it new..

I had to be up this morning at 4.45 to drive daughter to a railway
station, and had no time to watch the No 4 video until late afternoon. I
saw about half, then went to sleep! So nothing achieved today.

arlen michael holder

unread,
Nov 16, 2018, 9:38:41 PM11/16/18
to
On Sat, 17 Nov 2018 00:04:53 +0000, Bill wrote:

> Just a very quick follow up on this point. I thought that switch useful
> for occasions when one might poke the camera into some area and yet be
> able to see part of the screen to aim the image better up and under.

Hi Bill,

What might be useful, at times, is a camera app that shows half the screen
with each camera, so half is front and the other half is back. :)

> One of the Android 4 phones I have kept is still here because it has
> just one hinged camera at the top. It can revolve through 180 degrees to
> point front or back, straight up or anywhere in between. It has been
> extremely useful, but I've never seen another phone like it. It's
> branded "Timmy" and was extremely low cost, something like the
> equivalent of $35 when I bought it new..

Hehhehheh ... I sliced a cut in a block of wood, so that I could wedge the
mobile phone into that slice, to make an el-cheapo "camera stand".

> I had to be up this morning at 4.45 to drive daughter to a railway
> station, and had no time to watch the No 4 video until late afternoon. I
> saw about half, then went to sleep! So nothing achieved today.

Since I had a hole at spot app07, I created a Kotlin-based variable-seed
die randomizer as per the Treehouse learning series tutorial videos, number
1, by Ben Deitch.
<http://www.bild.me/bild.php?file=5714883androidstudio82.jpg>

This 20-minute video is probably the _best_ video I've seen, in that they
_explain_ stuff, and, miracle of miracles, it is the first video that uses
the same version of IDE that we're using (AFAICT).
<http://www.bild.me/bild.php?file=5714883androidstudio82.jpg>

I think the rest of the videos cost money (I'm not sure), but if there are
more videos from this outfit, I'd give them a thumbs-up on clarity!

What's interesting is that it's starting to get boring to watch "beginner"
videos, because half the stuff we both know by now, which, I guess, is
progress. :)

Here, for your use and for the use of others following along, here is my
ad-hoc log file.
****************************************************************************
app07

Roll a die variable-seed randomizer, written in Kotlin instead of in Java
****************************************************************************
============================================================================
This is the first tutorial I've seen which uses a current IDE version!

How to Make an Android App for Beginners, by Treehouse, April 20, 2018
https://youtu.be/EOfCEhWq8sg (variable-seed randomizer, written in Kotlin)
============================================================================
Screenshot of the emulation:
<http://www.bild.me/bild.php?file=6391211androidstudio81.jpg>
Screenshot of the phone:
<http://www.bild.me/bild.php?file=5714883androidstudio82.jpg>
============================================================================
Main files:
C:\tmp\android\app07\app\src\main\java\com\kiss\app07\MainActivity.kt
C:\tmp\android\app07\app\src\main\res\layout\activity_main.xml
============================================================================
Note that the IDE provided the following code-improvement hints.
Issue id: HardcodedText

Hardcoded string "Roll the die", should use @string resource
Hardcoded string "Press ROLL button...", should use @string resource
Hardcoded string "Set the slider first...", should use @string resource

Hardcoding text attributes directly in layout files is bad for several
reasons:
* When creating configuration variations
(for example for landscape or portrait)
you have to repeat the actual text
(and keep it up to date when making changes)
* The application cannot be translated to other languages by just
adding new translations for existing string resources.
There are quickfixes to automatically extract this hardcoded
string into a resource lookup.
============================================================================
C:\tmp\android\app07\app\src\main\java\com\kiss\app07\MainActivity.kt

package com.kiss.app07

import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.widget.Button
import android.widget.SeekBar
import android.widget.TextView
import java.util.*

class MainActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)

val rollButton = findViewById<Button>(R.id.rollButton)
val resultsTextView = findViewById<TextView>(R.id.resultsTextView)
val seekBar = findViewById<SeekBar>(R.id.seekBar)

rollButton.setOnClickListener {
val rand = Random().nextInt(seekBar.progress) + 1
resultsTextView.text = rand.toString()
}
}
}
============================================================================
C:\tmp\android\app07\app\src\main\res\layout\activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<Button
android:text="Roll"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/rollButton" android:layout_marginBottom="24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginLeft="96dp"
android:layout_marginStart="96dp" app:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="96dp"
android:layout_marginRight="96dp"/>
<SeekBar
style="@style/Widget.AppCompat.SeekBar.Discrete"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:max="10"
android:progress="3"
android:id="@+id/seekBar" android:layout_marginEnd="32dp"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginRight="32dp"
android:layout_marginStart="32dp"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginLeft="32dp"
android:layout_marginBottom="24dp"
app:layout_constraintBottom_toTopOf="@+id/rollButton"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:id="@+id/textView" android:layout_marginLeft="24dp"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
android:layout_marginRight="24dp" android:layout_marginBottom="16dp"
app:layout_constraintBottom_toTopOf="@+id/seekBar"
tools:text="How many?" android:textSize="24sp"
android:text="Slide the slider"/>
<View
android:id="@+id/divider"
android:layout_width="368dp"
android:layout_height="1dp"
android:background="?android:attr/listDivider"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginBottom="16dp"
app:layout_constraintBottom_toTopOf="@+id/textView"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginLeft="8dp" android:layout_marginStart="8dp"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:id="@+id/resultsTextView"
android:layout_marginTop="8dp" app:layout_constraintTop_toTopOf="parent"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toTopOf="@+id/divider"
android:textSize="36sp" android:hint="Press ROLL button..."
app:layout_constraintHorizontal_bias="0.5"
android:gravity="center_vertical|center_horizontal"/>
</android.support.constraint.ConstraintLayout>
============================================================================
============================================================================

arlen michael holder

unread,
Nov 17, 2018, 12:25:24 AM11/17/18
to
On Sat, 17 Nov 2018 02:38:41 -0000 (UTC), arlen michael holder wrote:

> How to Make an Android App for Beginners, by Treehouse, April 20, 2018
> https://youtu.be/EOfCEhWq8sg (variable-seed randomizer, written in Kotlin)
> ============================================================================
> Screenshot of the emulation:
> <http://www.bild.me/bild.php?file=6391211androidstudio81.jpg>
> Screenshot of the phone:
> <http://www.bild.me/bild.php?file=5714883androidstudio82.jpg>
> ============================================================================
> Main files:
> C:\tmp\android\app07\app\src\main\java\com\kiss\app07\MainActivity.kt
> C:\tmp\android\app07\app\src\main\res\layout\activity_main.xml
> ============================================================================

Woo hoo!
*I successfully ported that Kotlin randomizer app to Java!*
o <http://www.bild.me/bild.php?file=8019905androidstudio85.jpg>

Speaking of non-imaginary solutions … check out what I just accomplished,
mostly on my own, just guessing at the steps!
o Kotlin -> Kotlin -> Java Bytecode -> Java
o <http://www.bild.me/bild.php?file=6618170androidstudio84.jpg>

It worked! (not the first time, but by the third attempt (or so),
it worked - which is pretty good when I was mostly guessing what to do!
(I guessed, for example, on the 2nd attempt, at using the "Refactor"
command … and … oddly enough … the darn thing worked!)

On the third attempt, I guessed that you have to clean, rebuild,
and then CLOSE Android Studio (it failed when I tested it before
doing those things).

When I re-opened the project in Android Studio, it worked!

Note: Since I don't know that this is documented ANYWHERE on the planet,
we could probably slim down the number of steps by a bit.

Also, I haven't TOUCHED DOS the xcopy DOS command in something like a
decade, so Windows experts are asked to improve the DOS commands below.

***************************************************************************
How to successfully port Kotlin-based app07 to Java-based app09
***************************************************************************
o <http://www.bild.me/bild.php?file=2733146androidstudio83.jpg>
o <http://www.bild.me/bild.php?file=6618170androidstudio84.jpg>
o <http://www.bild.me/bild.php?file=8019905androidstudio85.jpg>
============================================================================
Note: I probably could use better Windows commands but these worked for me:
rmdir /s
xcopy /f/j/s/w/z
============================================================================
STEP 1: *First port the Kotlin-based app07 to the Kotlin-based app09*
============================================================================
o Start Android Studio version 3.2.1
o Create a new project "c:\tmp\android\app09"
o Optionally, run the project in an emulator to ensure it works
o Exit Android Studio 3.2.1
rmdir /s c:\tmp\android\app09\app\src\main\java\com\kiss\app09
xcopy /f/j/s/w/z C:\tmp\android\app07\app\src\main\java\com\kiss\app07 C:\tmp\android\app09\app\src\main\java\com\kiss\app09
rmdir /s C:\tmp\android\app09\app\src\main\res\
xcopy /f/j/s/w/z C:\tmp\android\app07\app\src\main\res C:\tmp\android\app09\app\src\main\res
rmdir /s C:\tmp\android\app09\app\libs
xcopy /f/j/s/w/z C:\tmp\android\app07\app\libs C:\tmp\android\app09\app\libs
rmdir /s C:\tmp\android\app09\app\src\main\assets
xcopy /f/j/s/w/z C:\tmp\android\app07\app\src\main\assets C:\tmp\android\app09\app\src\main\assets
del C:\tmp\android\app09\app\src\main\AndroidManifest.xml
copy C:\tmp\android\app07\app\src\main\AndroidManifest.xml C:\tmp\android\app09\app\src\main\AndroidManifest.xml
vim C:\tmp\android\app09\app\src\main\AndroidManifest.xml
:%s/com.kiss.app07/com.kiss.app09/g
:wq
del C:\tmp\android\app09\app\build.gradle
copy C:\tmp\android\app07\app\build.gradle C:\tmp\android\app09\app\build.gradle
del C:\tmp\android\app09\gradle.properties
copy C:\tmp\android\app07\gradle.properties C:\tmp\android\app09\gradle.properties
rmdir /s C:\tmp\android\app09\gradle\wrapper
xcopy /f/j/s/w/z C:\tmp\android\app07\gradle\wrapper C:\tmp\android\app09\gradle\wrapper
o Start Android Studio version 3.2.1
o Open the project app09 (if it didn't open automatically)
o Wait for the message "Gradle build finished in (time)"
o Note that you can NOT run the app until the specified point below (or it will fail)
o Rightclick "Project | app" > Replace in path >
Line1 = app07
Line2 = app09
Select "In Project"
And then hit the button "Replace All"
(If it complains about replacing over a thousand instances, just tell it to continue.)
o Wait for the messages to indicate successful replacement:
In Project = 1,201 occurrences replaced
o Doublecheck the replacement worked for all four areas:
"In Project", "Module", "Directory", "Scope"
o AndroidStudio321:Build -> Clean Project
Wait for the message to indicate successful clean project:
"Gradle build finished in (time)"
o AndroidStudio321:Build -> Rebuild Project
Wait for the message to indicate successful rebuild project:
"Gradle build finished in (time)"
o Do not run the app yet (it will fail)
o Optionally save everything and close the project
AndroidStudio321:File > Save All
AndroidStudio321:File > Close Project
o Exit Android Studio version 3.2.1
o Start Android Studio version 3.2.1 & open the project app09
o Now you can test that app09 works on the emulator (and/or the phone)
o <http://www.bild.me/bild.php?file=2733146androidstudio83.jpg>
============================================================================
STEP 2: *Now port the Kotlin-based app09 to a Java-based app09*
============================================================================
o Now it's time to port Kotlin to Java using a multi-step process
In the "Project" pane, select "app | java | MainActivity"
AndroidStudio321:Tools > Kotlin > Show Kotlin Bytecode
[Decompile]
o Note: If you have additional plugins, you can decompile directly to Java
o This will create a tab named "MainActivity.decompiled.java"
o Copy that java code
o Replace all the Kotlin code in the "MainActivity.kt" tab
o A form will pop up asking:
Convert Code From Java
Clipboard contents copied from Java file.
Do you want to convert it to Kotlin code?
[Yes][No]
o Select "No"
o Now change the name of the "kt" file to a "java" file:
AndroidStudio321:Refactor > Rename File
Rename file 'MainActivity.kt' and its usages to:
MainActivity.java
[Refactor]
o AndroidStudio321:Build -> Clean Project
Wait for the message to indicate successful clean project:
"Gradle build finished in (time)"
o AndroidStudio321:Build -> Rebuild Project
Wait for the message to indicate successful rebuild project:
"Gradle build finished in (time)"
o Optionally save everything and close the project
AndroidStudio321:File > Save All
AndroidStudio321:File > Close Project
o Exit Android Studio version 3.2.1
o Start Android Studio version 3.2.1 & open the project app09
o Now you can test that app09 works on the emulator (and/or the phone)
o <http://www.bild.me/bild.php?file=6618170androidstudio84.jpg>

Voila!
o <http://www.bild.me/bild.php?file=8019905androidstudio85.jpg
============================================================================
C:\tmp\android\app09\app\src\main\AndroidManifest.xml
C:\tmp\android\app09\app\src\main\java\com\kiss\app09\MainActivity.java
C:\tmp\android\app09\app\src\main\res\layout\activity_main.xml
============================================================================
C:\tmp\android\app09\app\src\main\AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
package="com.kiss.app09">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>

</manifest>
============================================================================
C:\tmp\android\app09\app\src\main\java\com\kiss\app09\MainActivity.java

package com.kiss.app09;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.SeekBar;
import android.widget.TextView;
import java.util.HashMap;
import java.util.Random;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.Nullable;

@Metadata(
mv = {1, 1, 11},
bv = {1, 0, 2},
k = 1,
d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\u0012\u0010\u0003\u001a\u00020\u00042\b\u0010\u0005\u001a\u0004\u0018\u00010\u0006H\u0014¨\u0006\u0007"},
d2 = {"Lcom/kiss/app09/MainActivity;", "Landroid/support/v7/app/AppCompatActivity;", "()V", "onCreate", "", "savedInstanceState", "Landroid/os/Bundle;", "app_debug"}
)
public final class MainActivity extends AppCompatActivity {
private HashMap _$_findViewCache;

protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(2131296284);
Button rollButton = (Button)this.findViewById(2131165283);
final TextView resultsTextView = (TextView)this.findViewById(2131165279);
final SeekBar seekBar = (SeekBar)this.findViewById(2131165298);
rollButton.setOnClickListener((OnClickListener)(new OnClickListener() {
public final void onClick(View it) {
Random var10000 = new Random();
SeekBar var10001 = seekBar;
Intrinsics.checkExpressionValueIsNotNull(seekBar, "seekBar");
int rand = var10000.nextInt(var10001.getProgress()) + 1;
TextView var3 = resultsTextView;
Intrinsics.checkExpressionValueIsNotNull(resultsTextView, "resultsTextView");
var3.setText((CharSequence)String.valueOf(rand));
}
}));
}

public View _$_findCachedViewById(int var1) {
if (this._$_findViewCache == null) {
this._$_findViewCache = new HashMap();
}

View var2 = (View)this._$_findViewCache.get(var1);
if (var2 == null) {
var2 = this.findViewById(var1);
this._$_findViewCache.put(var1, var2);
}

return var2;
}

public void _$_clearFindViewByIdCache() {
if (this._$_findViewCache != null) {
this._$_findViewCache.clear();
}

}
}
============================================================================
C:\tmp\android\app09\app\src\main\res\layout\activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<Button
android:text="Roll the die"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/rollButton" android:layout_marginBottom="24dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent"
android:layout_marginLeft="96dp" android:layout_marginStart="96dp" app:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="96dp" android:layout_marginRight="96dp"/>
<SeekBar
style="@style/Widget.AppCompat.SeekBar.Discrete"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:max="10"
android:progress="3"
android:id="@+id/seekBar" android:layout_marginEnd="32dp"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginRight="32dp"
android:layout_marginStart="32dp"
app:layout_constraintStart_toStartOf="parent" android:layout_marginLeft="32dp"
android:layout_marginBottom="24dp" app:layout_constraintBottom_toTopOf="@+id/rollButton"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent"
android:id="@+id/textView" android:layout_marginLeft="24dp" android:layout_marginStart="24dp"
android:layout_marginEnd="24dp" android:layout_marginRight="24dp" android:layout_marginBottom="16dp"
app:layout_constraintBottom_toTopOf="@+id/seekBar" tools:text="How many?" android:textSize="24sp"
android:text="Set the slider first..."/>
<View
android:id="@+id/divider"
android:layout_width="368dp"
android:layout_height="1dp"
android:background="?android:attr/listDivider"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginBottom="16dp"
app:layout_constraintBottom_toTopOf="@+id/textView" android:layout_marginEnd="8dp"
android:layout_marginRight="8dp" android:layout_marginLeft="8dp" android:layout_marginStart="8dp"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent"
android:id="@+id/resultsTextView" android:layout_marginTop="8dp" app:layout_constraintTop_toTopOf="parent"
android:layout_marginBottom="8dp" app:layout_constraintBottom_toTopOf="@+id/divider"
android:textSize="36sp" android:hint="Press ROLL button..."
app:layout_constraintHorizontal_bias="0.5" android:gravity="center_vertical|center_horizontal"/>
</android.support.constraint.ConstraintLayout>
============================================================================
***************************************************************************

Bill

unread,
Nov 17, 2018, 10:47:39 AM11/17/18
to
In message <psn5r7$2bp$1...@news.mixmin.net>, arlen michael holder
<arlen_mich...@example.com> writes
>**Kudos to you for completing Butterfield 3!**
>
>I hope my text posts helped.
>If not, let me know as it's a LOT of work to post that stuff. (I post
>it to be helpful - but if it's not helpful - then I can save the effort
>and spend it on learning more instead of posting more.)
>
>BTW, moving forward, here are the short "timer" videos I'm
>evaluating...
>
>*Android alarm clock tutorial, by Anna Xu, published Jan 18, 2016*
>o Part 1: Demo and user interface <https://youtu.be/xbBlzOblD10>
>o Part 2: Initializing UI <https://youtu.be/XIPSCe-38fM>
>o Part 3: The onClickListener <https://youtu.be/KseXIsTLXaY>
>o Part 4: Alarm Manager <https://youtu.be/R3AzhgzbpTc>
>o Part 5: Ringtone Service I <https://youtu.be/GlLafRXJmGA>
>o Part 6: Ringtone Service II <https://youtu.be/UDVfJzWpuWc>
>o Part 7: Ringtone Service III <https://youtu.be/UCYv-TfKRMw>
>o Part 8: Notifications <https://youtu.be/mgp7qjTXW2o>
>o Part 9: Spinner I <https://youtu.be/eNZwsPEgVQI>
>o Part 10: Spinner II <https://youtu.be/eNZwsPEgVQI>
>o Part 11: Spinner III <https://youtu.be/TyFmKvvt3Zs>
>
>Now that I gave up on the SQL endeavor (for now), today I downloaded
>that set of Anna Xu videos to start the evaluation on the first one.
>
>I'll report back when/if I have something of value to report (as I'm
>all about "adding value" in every post, if possible).

With all this, you are racing ahead of me. I'm now just into the
beginning of Butterfield 4, having decided to set up mySQL from scratch
on the W10 machine to keep everything away from the working databases on
the main machines.

All your work listing all the files has been really helpful to me, so do
carry on if possible. The debugging problems I've had have mainly been
stupid things like additional or missing spaces in the middle of code or
problems with the case of characters. I seem to be almost blind to
these. You are obviously more organised than I'll ever be.

The lists of videos as above are also really useful, but again, I'm
finding it hard to keep up.

I may not keep up, but I don't usually give up.

arlen michael holder

unread,
Nov 17, 2018, 2:49:35 PM11/17/18
to
On Sat, 17 Nov 2018 15:37:21 +0000, Bill wrote:

> With all this, you are racing ahead of me.

Nope. It's not a race. It's just two people helping each other, and, at the
same time, giving encouragement to ANYONE who wants to try to write Android
apps from their desktop.

> I'm now just into the
> beginning of Butterfield 4, having decided to set up mySQL from scratch
> on the W10 machine to keep everything away from the working databases on
> the main machines.

Hi Bill,
This is GREAT. I gave up on even _thinking_ about setting up my own mySQL
server (remember, I can't even pronounce it, let alone understand it).

So I will get back to Butterfield #4 only after you've been successful (so
I can stand on your shoulders).

I replaced my placeholder "app07" with a Kotlin-based app for randomizing
<http://www.bild.me/bild.php?file=8019905androidstudio85.jpg>

Where the tutorial I used was the _best_ (bar none!) of _all_ we've seen!
<https://youtu.be/EOfCEhWq8sg>

Then I painstakingly converted it from Kotlin to Java, which took me
multiple tries, as, well, as you know ... everything about copying Android
projects on the net is either wrong or incomplete ... and then there's the
kotlin stuff to add to it (e.g., MainActivity.kt --> MainActivity.java) but
I wrote that all up (and posted it in this thread) to give back to Usenet
for what I found on the net.
<https://groups.google.com/d/msg/comp.mobile.android/aW64zYeBtF0/7scIwbp5AAAJ>

> All your work listing all the files has been really helpful to me, so do
> carry on if possible.

Hi Bill,
That's good as it's a _lot_ of effort to post the files (and all the
pictures and references takes a tone of effort also).

I do that extra effort to _help_ people ... so I'm glad it helped you!

(It's why I come down hard on those who have only "imaginary" solutions.)

> The debugging problems I've had have mainly been
> stupid things like additional or missing spaces in the middle of code or
> problems with the case of characters. I seem to be almost blind to
> these. You are obviously more organised than I'll ever be.

I'm "organized" but I made a ton of mistakes.
Always remember that the DIY always is an "ideal" case.
All the missed steps, the accidentally removed files, the typos, the wrong
buttons, etc., are conveniently absent from the DIY.

For example, this is the Kotlin-to-Java DIY I painstakingly figured out:
https://groups.google.com/d/msg/comp.mobile.android/aW64zYeBtF0/7scIwbp5AAAJ

It looks simple, right?
It looks so easy, right?

But it took multiple tries to figure out all the steps.
For example, it failed before I closed and then reopened Android Studio?
Why? I don't know why.
But that's why I inserted the step to close & then re-open Android Studio.

All tutorials are an "idealized" version of the real path! :)

> The lists of videos as above are also really useful, but again, I'm
> finding it hard to keep up.
>
> I may not keep up, but I don't usually give up.

*HEADS UP BILL!*

*Do NOT do the Anna Xu tutorials!*

It's too bad, as she's WONDERFULLY clear about all her steps.
She goes SLOWLY (perfectly slowly) in explaining things.

She's fantastic. But. But but but ... dammit ... but...
Anna Xu is using Android Studio 1.5.1 on Windows.

Drat. We're on version 3.2.1, which is EXTREMELY different!

For example, Anna Xu adds a "container" "time picker", which seems simple
enough, but that _entire_ time-picker GUI doesn't exist on our version of
the IDE. :(

It exists _only_ in code, apparently:
o https://developer.android.com/guide/topics/ui/controls/pickers

So, even at the _start_ of those Anna Xu videos, nothing is even close to
what we're doing. I don't know if when we're much better at this than we
are now, that we can follow (probably we can), but, for now, I have to
ditch those otherwise fantastic-seeming series of more than a dozen Anna Xu
tutorials on creating alarm clock apps.

Sigh.

PS: I have to write a novel for nanowrimo, so I am splitting my time.

Bill

unread,
Nov 18, 2018, 3:15:22 PM11/18/18
to
In message <psprce$klc$1...@news.mixmin.net>, arlen michael holder
<arlen_mich...@example.com> writes
>PS: I have to write a novel for nanowrimo, so I am splitting my time.

I hope that goes well and you devote a lot of time to it, as I'm very
conscious of slipping back. :-)

I've now got Butterfield 4 up and running to the point where it displays
a "Class not found exception" on the virtual phone. This appears to be
due to the connector, so I'm going to have to dig into that.
So there will now be a delay, unless I have a breakthrough in the next
few minutes, while I spend some time back in real life.

I see what you mean about his copying blocks of text in, making it much
more difficult to follow. I suppose course notes are too much to expect
on free guidance like this.

I'll report back any progress.

arlen michael holder

unread,
Nov 18, 2018, 10:36:39 PM11/18/18
to
On Sun, 18 Nov 2018 20:14:38 +0000, Bill wrote:

> I'll report back any progress.

Hi Bill,
You made great progress, as you have the SQL server, which Bill Butterfield
simply waved a hand assuming it was already made in that video #4.

I'm glad, in a way, that you concur with my observations where he just
pastes entire files, without going over them line by line, where it
took me at least an hour just to piece it all together.

I hope it helped.

I tried an experiment today, which failed, but which I will let you
know about so that you can learn from my many noob mistakes.
Actually, this experiment might work *for you* because you can
use the Google Emulators, which probably go up to Android 8 (Oreo).

Bill - do the Google emulators go up to Android 8 for you?

Anyway, these are the facts as I understand them:
a. The Google emulators don't work for me (on older AMD Windows CPUs)
b. The Microsoft emulator works GREAT, but it stops at Android 6.0
c. The Andyroid emulator works GREAT, but it stops at Android 7.1

The reason I need Android 8 (Oreo), is I tried this tutorial below,
but I didn't realize that getting Android 8 running on my older
AMD CPU was going to be so difficult! :)

The tutorial below essentially creates a rudimentary "youtube" app.
============================================================================
app10
This is a rudimentary youtube app
============================================================================
You'll need to run the "Component Installer" ahead of time in Android Studio:
Packages to install: Android SDK Platform 27 (platforms;android-27)
============================================================================
New Project: app10
Company domain: kiss.com
Minimum SDK: API 27: Android 8.1 (Oreo)
============================================================================
Activity: Empty Activity
Activity Name: MainActivity
Layout Name: activity_main
============================================================================
File > Settings > Editor > General > Auto Import >
Change from:
[_]Add unambiguous imports on the fly
[_]Optimize imports on the fly (for current project)
Change to:
[x]Add unambiguous imports on the fly
[x]Optimize imports on the fly (for current project)
============================================================================
Expand the following to ensure they exist & that you can find them:
app|manifests|AndroidManifest.xml
app|java|com.kiss.app10|MainActivity.java
app|res|layout|activity_main.xml
app|GradleScripts|build.gradle(Module: app)
Note: There are two "build.gradle" files (both of the same name)!
============================================================================
Modify the file: app|GradleScripts|build.gradle(Module: app)
============================================================================
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "comp.app.kiss.app10"
minSdkVersion 27
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
============================================================================
<Control+A><Control+V><Control+S>
============================================================================
Modify the file app|manifests|AndroidManifest.xml
============================================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="comp.app.kiss.app10"
android:installLocation="preferExternal">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
============================================================================
<Control+A><Control+V><Control+S>
============================================================================
Modify the file: app|res|layout|activity_main.xml
============================================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
</LinearLayout>
============================================================================
<Control+A><Control+V><Control+S>
============================================================================
Rightclick app|res|layout > New > Layout resource file
File name: video_view.xml
============================================================================
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="180dp">
<WebView
android:id="@+id/videoWebView"
android:layout_width="match_parent"
android:layout_height="180dp">
</WebView>
</android.support.constraint.ConstraintLayout>
============================================================================
<Control+A><Control+V><Control+S>
============================================================================
Rightclick app|java > New > Java Class
Name: YouTubeVideos
Note the lack of an extension (i.e., it's not "YouTubeVideos.java").
============================================================================
public class YouTubeVideos {
String videoUrl;
public YouTubeVideos() {
}
public YouTubeVideos(String videoUrl) {
this.videoUrl = videoUrl;
}
public String getVideoUrl() {
return videoUrl;
}
public void setVideoUrl(String videoUrl) {
this.videoUrl = videoUrl;
}
}
============================================================================
<Control+A><Control+V><Control+S>
============================================================================
Rightclick app|java > New > Java Class
Name: VideoAdapter
Note the lack of an extension (i.e., it's not "VideoAdapter.java").
============================================================================
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import java.util.List;
public class VideoAdapter extends RecyclerView.Adapter<VideoAdapter.VideoViewHolder> {
List<YouTubeVideos> youtubeVideoList;
public VideoAdapter() {
}
public VideoAdapter(List<YouTubeVideos> youtubeVideoList) {
this.youtubeVideoList = youtubeVideoList;
}
@Override
public VideoViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from( parent.getContext()).inflate(R.layout.video_view, parent, false);
return new VideoViewHolder(view);
}
@Override
public void onBindViewHolder(VideoViewHolder holder, int position) {
holder.videoWeb.loadData( youtubeVideoList.get(position).getVideoUrl(), "text/html" , "utf-8" );
}
@Override
public int getItemCount() {
return youtubeVideoList.size();
}
public class VideoViewHolder extends RecyclerView.ViewHolder{
WebView videoWeb;
public VideoViewHolder(View itemView) {
super(itemView);
videoWeb = (WebView) itemView.findViewById(R.id.videoWebView);
videoWeb.getSettings().setJavaScriptEnabled(true);
videoWeb.setWebChromeClient(new WebChromeClient() {
} );
}
}
}
============================================================================
<Control+A><Control+V><Control+S>
============================================================================
Modify the file: app|java|com.kiss.app10|MainActivity.java
============================================================================
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import java.util.Vector;
public class MainActivity extends AppCompatActivity {
RecyclerView recyclerView;
Vector<YouTubeVideos> youtubeVideos = new Vector<YouTubeVideos>();

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
recyclerView.setHasFixedSize(true);
recyclerView.setLayoutManager( new LinearLayoutManager(this));
youtubeVideos.add( new YouTubeVideos("<iframe width=\"100%\" height=\"100%\" src=\"https://www.youtube.com/embed/eWEF1Zrmdow\" frameborder=\"0\" allowfullscreen></iframe>") );
youtubeVideos.add( new YouTubeVideos("<iframe width=\"100%\" height=\"100%\" src=\"https://www.youtube.com/embed/KyJ71G2UxTQ\" frameborder=\"0\" allowfullscreen></iframe>") );
youtubeVideos.add( new YouTubeVideos("<iframe width=\"100%\" height=\"100%\" src=\"https://www.youtube.com/embed/y8Rr39jKFKU\" frameborder=\"0\" allowfullscreen></iframe>") );
youtubeVideos.add( new YouTubeVideos("<iframe width=\"100%\" height=\"100%\" src=\"https://www.youtube.com/embed/8Hg1tqIwIfI\" frameborder=\"0\" allowfullscreen></iframe>") );
youtubeVideos.add( new YouTubeVideos("<iframe width=\"100%\" height=\"100%\" src=\"https://www.youtube.com/embed/uhQ7mh_o_cM\" frameborder=\"0\" allowfullscreen></iframe>") );
VideoAdapter videoAdapter = new VideoAdapter(youtubeVideos);
recyclerView.setAdapter(videoAdapter);
}
}
============================================================================
<Control+A><Control+V><Control+S>
============================================================================
AndroidStudio321:File > Sync Project with Gradle Files
============================================================================
https://youtu.be/bSMZknDI6bg
http://android-coffee.com/wp-content/uploads/projecs/MyYouTubeVideos.apk
https://youtu.be/0pOpDFsIcGk
============================================================================
https://android-coffee.com/tutorial-how-to-play-youtube-videos-in-android-studio-3-1-1/
============================================================================

Bill

unread,
Nov 19, 2018, 4:44:30 AM11/19/18
to
In message <pstb3l$ldr$1...@news.mixmin.net>, arlen michael holder
<arlen_mich...@example.com> writes
>
>Bill - do the Google emulators go up to Android 8 for you?

Yes, they appear to go up to Android 8, and possibly 9.0. I haven't
actually tried to check they work, though.

No time for anything else at the moment ( babysitting and assisting with
vehicle movements etc.)
It is loading more messages.
0 new messages