Creating Apps for use on Android mobile phones
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 29
- Joined: Mon Apr 20, 2020 1:00 pm
Re: Creating Apps for use on Android mobile phones
I cannot express my thanks enough to everyone who has contributed to this thread. I would also like to thank AxWald for contributing his in depth SQLiteAndroidDemo.
I will definitely need time to digest the information - AND really looking forward to getting to grips with all this information. Thank you so much for taking the time to provide this.
Regards
I will definitely need time to digest the information - AND really looking forward to getting to grips with all this information. Thank you so much for taking the time to provide this.
Regards
-
- VIP Livecode Opensource Backer
- Posts: 7238
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Creating Apps for use on Android mobile phones
We were all beginners at some point and we all took advantage of more experienced users to get where we are now. After that most of us pay it forward for the next person. We do it because we love the language and we want to help. I expect soon you will be paying it forward too.Dragondos2020 wrote: ↑Mon May 04, 2020 5:23 pmI will thanks, keep trying. And based on your encouragement I will not be shy in accepting additional help. I was just concerned that I was taking advantage of the generosity of more experienced LiveCoders.
This is one of the kindest and most thoughtful forums on the internet. We're at home here.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 29
- Joined: Mon Apr 20, 2020 1:00 pm
Re: Creating Apps for use on Android mobile phones
Hi All
I have managed to find the time to delve into the SQLiteAndroidDemo provided by AxWald. There was certainly a number of routines which were rather alien to me. But with the added comments, I was able to start to understand what was going on.
Using the information provided I attempted to take the code on board and use within my own project. Eventually I managed to build upon the code. I introduced the DataGrid, which I was able to use to display all the records held within the database, select a record and then display the details on to a record form (15 entries per record). I was able to ADD to records, DELETE records and display a datagrid list of all records and from that list select an individual record for displaying their full details.
So far, all good. I was able to run the project within the LiveCode Environment with no problems. I was also able to run the project within the Android Emulator, again with no problems. This is the furthest that I have ever been in successfully running a program on the Android Emulator. Thank you for providing the necessary information for me to get this far.
I have tried to copy the .apk file on to my Android Smartphone. Copied fine. But when I tried to select the .apk file to install, that when a few problems occurred. Firstly, the message "Do you want to install this application? It does not require any special access." "Cancel" or "Install". Selected "Install". Here it started to install, but then stopped with the message "App not installed".
I was able to install my previous attempts (prior to receiving the SQLiteAndroidDemo application) and was able to install, but could never access the membershipdatabase.db either by viewing or adding.
I thought that maybe my project using the code and knowledge gained from SQLiteAndroidDemo, had a bug within it which prevented the .apk from being installed. So I took the opportunity of using the SQLiteAndroidDemo without any changes being made (as received) and created the StandAlone and then copied the .apk file onto my Android Smartphone. The same problem occurred, it would not install.
So, I have three questions, if I may:
1. What is preventing the .apk from being installed on to my Android Smartphone (either my project or the unaltered SQLiteAndroidDemo?
2. I notice that when I save my projects they have the ,LIVECODE file extension. Whereas, the SQLiteAndroidDemo version has the extension .REV Not sure how you decide between the two when saving, and whether it effects the finished .apk file for installing on to the Android Phone.
3. Using your SQLiteAndroidDemo, I can see how you use the database file. Displaying the contents of the database file. Adding new records to the database file. Deleting a record from the database file and viewing a record from the database file. However, I cannot woprk out how to amend /update an existing record within the database file. I have tried various variations that I know about updating a record set. But using inconjunction with your code I am unable to amend or update a record. Any pointers or examples would be great.
Thank you.
Steve
I have managed to find the time to delve into the SQLiteAndroidDemo provided by AxWald. There was certainly a number of routines which were rather alien to me. But with the added comments, I was able to start to understand what was going on.
Using the information provided I attempted to take the code on board and use within my own project. Eventually I managed to build upon the code. I introduced the DataGrid, which I was able to use to display all the records held within the database, select a record and then display the details on to a record form (15 entries per record). I was able to ADD to records, DELETE records and display a datagrid list of all records and from that list select an individual record for displaying their full details.
So far, all good. I was able to run the project within the LiveCode Environment with no problems. I was also able to run the project within the Android Emulator, again with no problems. This is the furthest that I have ever been in successfully running a program on the Android Emulator. Thank you for providing the necessary information for me to get this far.
I have tried to copy the .apk file on to my Android Smartphone. Copied fine. But when I tried to select the .apk file to install, that when a few problems occurred. Firstly, the message "Do you want to install this application? It does not require any special access." "Cancel" or "Install". Selected "Install". Here it started to install, but then stopped with the message "App not installed".
I was able to install my previous attempts (prior to receiving the SQLiteAndroidDemo application) and was able to install, but could never access the membershipdatabase.db either by viewing or adding.
I thought that maybe my project using the code and knowledge gained from SQLiteAndroidDemo, had a bug within it which prevented the .apk from being installed. So I took the opportunity of using the SQLiteAndroidDemo without any changes being made (as received) and created the StandAlone and then copied the .apk file onto my Android Smartphone. The same problem occurred, it would not install.
So, I have three questions, if I may:
1. What is preventing the .apk from being installed on to my Android Smartphone (either my project or the unaltered SQLiteAndroidDemo?
2. I notice that when I save my projects they have the ,LIVECODE file extension. Whereas, the SQLiteAndroidDemo version has the extension .REV Not sure how you decide between the two when saving, and whether it effects the finished .apk file for installing on to the Android Phone.
3. Using your SQLiteAndroidDemo, I can see how you use the database file. Displaying the contents of the database file. Adding new records to the database file. Deleting a record from the database file and viewing a record from the database file. However, I cannot woprk out how to amend /update an existing record within the database file. I have tried various variations that I know about updating a record set. But using inconjunction with your code I am unable to amend or update a record. Any pointers or examples would be great.
Thank you.
Steve
Re: Creating Apps for use on Android mobile phones
Hi Dragondos2020,
So don't worry, it does not matter if you use REV or Livecode, the suffixes are interchangeable.
Some versions ago the app was named "Revolution" and later re-branded to "Livecode" and the suffix .rev is a remnant of that time and today LC automatically add -livecode.Dragondos2020 wrote: ↑Thu May 07, 2020 7:16 pm...
2. I notice that when I save my projects they have the ,LIVECODE file extension. Whereas, the SQLiteAndroidDemo version has the extension .REV Not sure how you decide between the two when saving, and whether it effects the finished .apk file for installing on to the Android Phone.
So don't worry, it does not matter if you use REV or Livecode, the suffixes are interchangeable.
-
- Posts: 29
- Joined: Mon Apr 20, 2020 1:00 pm
Re: Creating Apps for use on Android mobile phones
Thanks Klaus.
Appreciate the clarification.
Regards
Appreciate the clarification.
Regards
Re: Creating Apps for use on Android mobile phones
you don't need to create an apk for testing.
You need to enable developer mode on your android (it's written in this lesson http://lessons.livecode.com/m/2571/l/27 ... er-on-a-pc)
then connect your android to your pc/mac
then the android will ask if you allow this pc
then select the android phone in LC
then hit the test button to build it and install it on your phone, you can test right away(similair to emulator, just need to select your phone)
You need to enable developer mode on your android (it's written in this lesson http://lessons.livecode.com/m/2571/l/27 ... er-on-a-pc)
then connect your android to your pc/mac
then the android will ask if you allow this pc
then select the android phone in LC
then hit the test button to build it and install it on your phone, you can test right away(similair to emulator, just need to select your phone)
Re: Creating Apps for use on Android mobile phones
Hi,
Then check "it" if all was OK, or what was returned. "doSQL()" does all the work for you.
For changing records you'll use "INSERT" or "REPLACE", and you'll want to learn to construct "VALUES" strings.
Basically you create a valid SQL string, test it in your db manager, and then re-create it in LC, inserting variables for the various values, as in:
What's in StrSQL is what's sent to the db, and must run in the db manager, too - this way you can test it.
For sure, working with SQL databases requires at least intermediate knowledge of SQL. But learning the basics (table design, JOINs, views and the other basic syntax) is not this hard, and reading here will help. What's important, IMHO, is a good db manager as well as a powerful text editor. A good choice here can help a lot.
Have fun!
Probably the StandAlone Settings. I tried the stack with "Development/ Test" (see sphere's post above), and so didn't need to install. Additionally I see that I posted the 6.7.10 stack version, where there's other SA settings. I attached the LC 9.5.1 version that created a valid .apk for me - I had to choose both ARMV7 & ARM64, and "sign for development".Dragondos2020 wrote: ↑Thu May 07, 2020 7:16 pm1. What is preventing the .apk from being installed on to my Android Smartphone (either my project or the unaltered SQLiteAndroidDemo?
They are interchangeable. I prefer to use .livecode for the new (beta) versions, and .rev for (stable) 6.7.10.Dragondos2020 wrote: ↑Thu May 07, 2020 7:16 pm2. I notice that when I save my projects they have the ,LIVECODE file extension. Whereas, the SQLiteAndroidDemo version has the extension .REV
It's quite easy - check the script of the buttons. It comes down to this:Dragondos2020 wrote: ↑Thu May 07, 2020 7:16 pm3. Using your SQLiteAndroidDemo, I can see how you use the database file. Displaying the contents of the database file. Adding new records to the database file. Deleting a record from the database file and viewing a record from the database file. However, I cannot woprk out how to amend /update an existing record within the database file.
Code: Select all
put "Whatever you want to send to the database, in valid SQL;" into StrSQL
get doSQL("MDB",StrSQL)
For changing records you'll use "INSERT" or "REPLACE", and you'll want to learn to construct "VALUES" strings.
Basically you create a valid SQL string, test it in your db manager, and then re-create it in LC, inserting variables for the various values, as in:
Code: Select all
put "DELETE FROM `members` WHERE id = " & myID & ";" into StrSQL
For sure, working with SQL databases requires at least intermediate knowledge of SQL. But learning the basics (table design, JOINs, views and the other basic syntax) is not this hard, and reading here will help. What's important, IMHO, is a good db manager as well as a powerful text editor. A good choice here can help a lot.
Have fun!
- Attachments
-
- sqliteandroiddemo9.zip
- same as before, just as LC9
- (9.15 KiB) Downloaded 208 times
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!
-
- Posts: 29
- Joined: Mon Apr 20, 2020 1:00 pm
Re: Creating Apps for use on Android mobile phones
Wow! Its like being back at College. All this new information coming from all angles, just to help me in my quest. Just loving it! That might not be a 'cool' saying. But I am truly overwhelmed by the generosity of you all in ensuring that I have a better understanding.
I now do have a much better understanding. I can actually see the light at the end of the tunnel, and the future looks bright! I have turned my Android Phone into development mode. I am running the project on the phone. All appears to be working fine. Now I am able to work more on the interface and add more features into the project.
Thank you ALL for your patience, understanding, and encouragement. It really has been appreciated.
Best Regards
Steve
I now do have a much better understanding. I can actually see the light at the end of the tunnel, and the future looks bright! I have turned my Android Phone into development mode. I am running the project on the phone. All appears to be working fine. Now I am able to work more on the interface and add more features into the project.
Thank you ALL for your patience, understanding, and encouragement. It really has been appreciated.
Best Regards
Steve