It's tough to get going. I feel for you. I went from zero to a finished app in the AppStore and I can tell you it was pulling teeth the whole way. That's partly because my app is quite complex for a first project but mostly the hurdle was ignorance. I'm working on another app now and it's a joy to just get stuff done instead of try to learn stuff. This time I'm spending far more time on the math and logic under the hood instead of interface issues and all the other little hurdles; how to change fonts, background color, position of an item when screen size changes between devices, and a million other details. The hardest concept for me to grasp was asynchronous processing, where you ask the system to do something and carry on while that gets done, and then intercept it when it comes back. Sounds simple enough but it's nothing like the linear execution in good old Fortran or Excel for that matter.... it's proving a bit of challenge for me, but I'm managing. It's written for people already familiar with Java (I'm not) and some chapters are a bit dense for me.
You might also consider Ionic -- especially if you intend to write apps for both Android and iOS. The same Ionic code works for both.also because of its ease of translation between Android and iOS...
FWIW, I believe Visual Studio is the cross-platform standard. Ionic does look interesting. I have zero experience with either.You might also consider Ionic -- especially if you intend to write apps for both Android and iOS. The same Ionic code works for both.
Darn you, Joey... you made me doubt my decision ...You might also consider Ionic -- especially if you intend to write apps for both Android and iOS. The same Ionic code works for both.
While you're second guessing yourself, maybe it'd be a good time to fix the spelling error in the thread title, which I only just noticed.Darn you, Joey... you made me doubt my decision ...
Me too! ... already fixed, thanks for the heads up.While you're second guessing yourself, maybe it'd be a good time to fix the spelling error in the thread title, which I only just noticed.
Good luck with that!But I want a method that has an easy learning curve!
Not about B4A but RFO BASIC. I took the pain to learn it (not too hard) and managed to create a simple app that did what I wanted. After being out of the game for 3 years, when I was about to resume my practice, found out that development was discontinued and two spinoffs are now in the wake. Frustrating.While the topic of writing code for Android is open--does anyone have an opinion on B4A (Basic for Android)?
https://www.b4x.com/b4a.html
Just totally casually, it would be fun to be able to write Android apps, and we've all got time to spare these days. But I want a method that has an easy learning curve!
In spite I asked in their forum about what happened nobody answered my question. I felt really angry for the effort thrown overboard and how good it was. And easy to use.I got RFO Basic too, and was disappointed when it basically became an orphan product. What was attractive about that was that the author had done his best to think of everything, and give you a simple routine to control it. Graphics, Bluetooth, camera interface, it all seemed to be there.
individually identified. It might be worth buying a cheap tablet just to build into an application like this.
package com.example.prueba02
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.widget.TextView
import kotlinx.android.synthetic.main.activity_main.*
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
textHello.text="12345"
}
fun trimNumber(v:View){
if(textHello.text.toString().isNotEmpty()) { //instead of: textHello.text.toString().length != 0
textHello.text =
textHello.text.toString().substring(0, textHello.text.toString().length - 1)
} else {
textHello.text="12345"
}
}
}
The world is your oyster now!Ok. I've just finished the book I bought, and I must say that I'm almost as lost as when I started.
Make sure you test every possible Android version, mobile device, and screen size...Ok. I've just finished the book I bought, and I must say that I'm almost as lost as when I started.
First, an extremely simple code. What it does is it displays a "12345" text in a textbox, and then it deletes the rightmost character when a button is pressed until it becomes an empty string. It then starts over.
Code:package com.example.prueba02 import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.view.View import android.widget.TextView import kotlinx.android.synthetic.main.activity_main.* class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) textHello.text="12345" } fun trimNumber(v:View){ if(textHello.text.toString().isNotEmpty()) { //instead of: textHello.text.toString().length != 0 textHello.text = textHello.text.toString().substring(0, textHello.text.toString().length - 1) } else { textHello.text="12345" } } }
Will do. But I was planning on doing that after the app is finished. Or would you recommend I perform that sort of test as the code progresses?Make sure you test every possible Android version, mobile device, and screen size...
package com.example.prueba02
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.net.wifi.WifiManager
import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import kotlinx.android.synthetic.main.activity_main.*
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
// findViewById<TextView>(R.id.textHello).text="12345"
textHello.text="12345"
}
fun addNumber(v:View){
ScanForNetworks()
}
fun ScanForNetworks(){
val wifiManager = applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
val wifiScanReceiver = object : BroadcastReceiver() {
fun scanSuccess() {
val results = wifiManager.scanResults
textHello.text="Success"
// ... use new scan results ...
}
fun scanFailure() {
// handle failure: new scan did NOT succeed
// consider using old scan results: these are the OLD results!
val results = wifiManager.scanResults
textHello.text="Failure"
// ... potentially use older scan results ...
}
override fun onReceive(context: Context, intent: Intent) {
val success = intent.getBooleanExtra(WifiManager.EXTRA_RESULTS_UPDATED, false)
if (success) {
scanSuccess()
} else {
scanFailure()
}
}
}
wifiManager.startScan()
textHello.text = wifiManager.toString()
}
}