Android Development Possibilities

Thread Starter

MrAl

Joined Jun 17, 2014
11,496
Hello there,

Anyone else here interested in Android dev projects for cell phones?
I was thinking of getting into it a little so i cam make some apps for my phone. I've been making apps for my PC for years and years and years now but none for Android and that has become very popular these days.

Only problem is i never worked with Java yet. I wonder how hard the transition is going from C and C++ and Pascal like languages to Java.

Ideas/suggestions would be appreciated, thanks.
 

Thread Starter

MrAl

Joined Jun 17, 2014
11,496
Java is simple and boring. The problem with Android dev projects is the million of libraries for doing millions of number of things and the fact the Android is a moving target with tons of incompatibilities from early versions to the present.
https://developer.android.com/studio
Hi,

Yet so many apps on Google Play made by so many developers. There must be a way.
Yes i have already run into many incompatibilities that drive you nuts.
 

atferrari

Joined Jan 6, 2004
4,771
RFO Basic worked for me.

Intensive work behind it to keep it up to date with more recent trends.

Make sure you download the manual for the last version.

Forum is helpful with the typical "I know everything" ones but hey, they really know...

Suggest you go straight and read the instruction set.
 

Thread Starter

MrAl

Joined Jun 17, 2014
11,496
RFO Basic worked for me.

Intensive work behind it to keep it up to date with more recent trends.

Make sure you download the manual for the last version.

Forum is helpful with the typical "I know everything" ones but hey, they really know...

Suggest you go straight and read the instruction set.
Hi,

Thanks for bringing that program up.
I have an older version i DL'd a long time ago.
Yes i did some nice programs with it but two or three things that bother me.

One, why isnt it available for install on Goohle Play?
Two, it was way too slow for my cell phone digital volt meter i created using Arduino that could link iwth the cell phone/tablet, and all it had to do was read the keyboard input and display a single reading like "4.35v".
Three, you cant upload any Basic programs to Google Play for sale or just for fun to let people have your creation. You can upload a Basic interpreter programmed in something like Java, but no programs that run within that Basic environment.

The fact that it is not available on Google Play tells me it does not meet some standard of either functionality or security. Maybe you could ask about this and find out. This is the biggest downer for me.
I used it on my tablet which never connected to the internet for any reason.
 

atferrari

Joined Jan 6, 2004
4,771
Hi,

Thanks for bringing that program up.
I have an older version i DL'd a long time ago.
Yes i did some nice programs with it but two or three things that bother me.

One, why isnt it available for install on Goohle Play?
Two, it was way too slow for my cell phone digital volt meter i created using Arduino that could link iwth the cell phone/tablet, and all it had to do was read the keyboard input and display a single reading like "4.35v".
Three, you cant upload any Basic programs to Google Play for sale or just for fun to let people have your creation. You can upload a Basic interpreter programmed in something like Java, but no programs that run within that Basic environment.

The fact that it is not available on Google Play tells me it does not meet some standard of either functionality or security. Maybe you could ask about this and find out. This is the biggest downer for me.
I used it on my tablet which never connected to the internet for any reason.
I developed a nice application using my laptop. Pushing (touching) keys to develope code on my phone / tablet is not my idea of comfortable. From there to the phone or tablet it was just simple to transfer. The app, once completed, did run standalone with no add ons.
 

Thread Starter

MrAl

Joined Jun 17, 2014
11,496
I developed a nice application using my laptop. Pushing (touching) keys to develope code on my phone / tablet is not my idea of comfortable. From there to the phone or tablet it was just simple to transfer. The app, once completed, did run standalone with no add ons.
Hi,

You mean you used a compiler to compile the Basic into an APK file?
 

atferrari

Joined Jan 6, 2004
4,771
Hi,

You mean you used a compiler to compile the Basic into an APK file?
Yes. Right now I forgot the details. It was 4++ years ago and two extinct PCs in between. The laptop linked to the tablet via USB (IIRC, also possible via Bluetooth but not sure).
There is one guy who created the software allowing all the above.
Even you have options on the IDE (or it is on the Editor?).

The learning curve is not steep at all. Much less for people like you.
 

Thread Starter

MrAl

Joined Jun 17, 2014
11,496
Java is simple and boring. The problem with Android dev projects is the million of libraries for doing millions of number of things and the fact the Android is a moving target with tons of incompatibilities from early versions to the present.
https://developer.android.com/studio
Hi,

I think i know what you mean about the boring part. It looks like many things are already thought out and wrapped into classes so you just pick out what you need. I am thinknig that maybe building an app from the ground up may be so complicated that pre wrapped classes may be the only sane way to go.
Dont have much experience at all with this yet though.
 

Thread Starter

MrAl

Joined Jun 17, 2014
11,496
Yes. Right now I forgot the details. It was 4++ years ago and two extinct PCs in between. The laptop linked to the tablet via USB (IIRC, also possible via Bluetooth but not sure).
There is one guy who created the software allowing all the above.
Even you have options on the IDE (or it is on the Editor?).

The learning curve is not steep at all. Much less for people like you.
Oh i see, well maybe you could ask on the forum why it does not appear on Google. They say it was because of the SMS security issue, but when they removed SMS it still does not appear. Smells too funny to me now.
 

nsaspook

Joined Aug 27, 2009
13,315
Hi,

Yet so many apps on Google Play made by so many developers. There must be a way.
Yes i have already run into many incompatibilities that drive you nuts.
Sure there's a way, it's just not simple to do something cool.

My old BLECM2 Android app for the PIC24 BLE board still works with the latest SDK and API's but I'm limiting the version to 27. Once you get past 27 and enter AndroidX the world changes.
https://developer.android.com/jetpack/androidx


https://github.com/nsaspook/blecm_new_app
This app

connects to this board via BLE using custom characteristics.
https://forum.allaboutcircuits.com/threads/pic24-bluetooth-low-energy-dk.128497/page-2#post-1060969

It helps to have horsepower while compiling apps.

 
Last edited:

atferrari

Joined Jan 6, 2004
4,771
Oh i see, well maybe you could ask on the forum why it does not appear on Google. They say it was because of the SMS security issue, but when they removed SMS it still does not appear. Smells too funny to me now.
Search for "launcher" or "mougino" (the author). The Basic stays in your PC laptop.
 

Thread Starter

MrAl

Joined Jun 17, 2014
11,496
Sure there's a way, it's just not simple to do something cool.

My old BLECM2 Android app for the PIC24 BLE board still works with the latest SDK and API's but I'm limiting the version to 27. Once you get past 27 and enter AndroidX the world changes.
https://developer.android.com/jetpack/androidx


https://github.com/nsaspook/blecm_new_app
This app

connects to this board via BLE using custom characteristics.
https://forum.allaboutcircuits.com/threads/pic24-bluetooth-low-energy-dk.128497/page-2#post-1060969

It helps to have horsepower while compiling apps.

Hi,

Very interesting. I have 8 cores and it still takes something like 30 seconds to build a small project. Myabe it is because of low memory.
 

Thread Starter

MrAl

Joined Jun 17, 2014
11,496
Search for "launcher" or "mougino" (the author). The Basic stays in your PC laptop.
Hi,

Yeah i was looking at that. Looks interesting too. Maybe i will try it at some point but right now i am working in the Android Studio trying to make headway. It's been slow though because the examples on the web dont work in Kotlin or whatever that language is. I'll probably have to go to pure Java.

But it is so weird that out of seven different examples, not one of them worked. Kept triggering errors.
In particular, it could not get setOnClickListener() to work and i tried all different syntax and examples from the web and nothing but nothing worked as it kept triggering errors. It's nuts.
 

402DF855

Joined Feb 9, 2013
271
Anyone proficient with C++ should have no trouble with 95% of Java.

Things have improved somewhat since Android Studio replaced Eclipse for Android development. Still, one needs to be patient and rely on Google searches to resolve the constant barrage of incoherent and inscrutable error messages that are unavoidable with app development. Unfortunately there is a fair amount of XML coding involved, although one can try to minimize that by instantiating GUI objects (for example) in the Java code rather than XML.

I've used setOnClickListener quite a bit to implement callbacks on GUI elements (pushbuttons, checkboxes, etc.) so you can post the errors you are seeing and perhaps I or someone else can offer suggestions.

At one point, while using Eclipse, I could use the code generation tools to create a new basic Hello World type app, and it wouldn't run straight out of the box. I learned to keep my expectations low for Android development tools. Just be happy once you get it working.
 

Thread Starter

MrAl

Joined Jun 17, 2014
11,496
Anyone proficient with C++ should have no trouble with 95% of Java.

Things have improved somewhat since Android Studio replaced Eclipse for Android development. Still, one needs to be patient and rely on Google searches to resolve the constant barrage of incoherent and inscrutable error messages that are unavoidable with app development. Unfortunately there is a fair amount of XML coding involved, although one can try to minimize that by instantiating GUI objects (for example) in the Java code rather than XML.

I've used setOnClickListener quite a bit to implement callbacks on GUI elements (pushbuttons, checkboxes, etc.) so you can post the errors you are seeing and perhaps I or someone else can offer suggestions.

At one point, while using Eclipse, I could use the code generation tools to create a new basic Hello World type app, and it wouldn't run straight out of the box. I learned to keep my expectations low for Android development tools. Just be happy once you get it working.
Hi and thanks for the reply.

I was referring to what they call "Kotlin" which is some kind of language other than Java that is somewhat like Java i guess.
For example, i create a button in the Layout with something like:
<Button
android:id="@+id/button_1"

Then in the MainActifivy i did:
button_1.setOnClickHandler{
}

and it says something like "expected a function declaration"
I've seen empty code like that too that is supposed to build OK and run just nothing happens when the button is clicked, but it wont even accept that simple statement.
So far though EVERY code snippette i see on the web is DIFFERENT, and i tried all variations and nothing was accepted. I even found one variation where the android "onClick" function was overridden so as to create a new function and that code was accepted, but still could not use "setOnClickHandler" in any way or the function that was created from the override. It's like there is more than one variation of Kotlin and every web site shows a different one being used.

I was going to make a simple calculator, but geeze i spent hours trying to get this to work so i think i'll just go back to counting on my fingers that way i can at least calculate up to 10 (ha ha).

Oh and the example given in the help web page for the Android Studio, they use pure Java not Kotlin so that does not work either.
 
Last edited:

Thread Starter

MrAl

Joined Jun 17, 2014
11,496
Hello again,

I find that the problem is not Java it's that dang "Kotlin". I dont know who the heck came up with that "language" but there is no reference on the web that seems to work in that language in Android Studio.

I switched to using Java and got things up and running in an hour or two. Yes it does write a lot like C++ so i cant officially say i learned Java in three hours :)

But there are still some goals to be reached. I need to find out how to create apps that adopt to every screen size and pixel density or at least for a range of devices like phones and perhaps tablets. That way the app can run on any device not just one or two.
What happened was i created a simple random number generator and the layout was fine in the Android Studio environment, but on my phone one of the buttons was off screen and there seems to be no way to get it back on screen. IT has to be accounted for in the app design.
Once i get that far i think i'll have it down because everything after that is just a matter of becoming familiar with the classes available, and maybe at some point creating new classes to do lots of wonderful things :)
 

402DF855

Joined Feb 9, 2013
271
Congratulations upgrading to Java!

I've struggled with device compatibility with my apps; I'd get a new smart phone, and my app wouldn't format correctly. I finally got to where I'm happy with the current state by adjusting GUI element sizes based on canvas size:
C:
protected void onDraw(Canvas canvas) {
int cw=canvas.getWidth();
int ch=canvas.getHeight();
//...
}
I also added the a Settings option in the menu to change the font size to one of: small, mediam, large, extra large. (This and other settings are persistent.)

You can make use of the Tools->AVG Manager to create instances of different emulators to ensure your app is compatible with various screen sizes etc.
 

atferrari

Joined Jan 6, 2004
4,771
Hello again,

I find that the problem is not Java it's that dang "Kotlin". I dont know who the heck came up with that "language" but there is no reference on the web that seems to work in that language in Android Studio.

I switched to using Java and got things up and running in an hour or two. Yes it does write a lot like C++ so i cant officially say i learned Java in three hours :)

But there are still some goals to be reached. I need to find out how to create apps that adopt to every screen size and pixel density or at least for a range of devices like phones and perhaps tablets. That way the app can run on any device not just one or two.
One of the very first things I solved with RFO Basic.
 
Top