In App Inventor, how to share a TinyDB between screens? - app-inventor

I added the component TinyDB1 to Screen1.
Then I went to Screen2 and tried to add the same database as a component, but it's not there in the palette (left hand side screen). It's also not recognized in the call block I added
I would like a common TinyDB as a way to transfer data between screens ...

In the designer of Screen2 you first have to drag a TinyDB component from the storage drawer into the working area, see also the TinyDB tutorial by Stephen.
A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook http://www.appinventor.org/book2 ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro and the aia files for the projects in the book are here: http://www.appinventor.org/bookFiles
How to do a lot of basic things with App Inventor are described here: http://www.appinventor.org/content/howDoYou/eventHandling .
Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Related

Create multiple buttons dynamically in MIT App Inventor

I am searching a way to programmatically create buttons in a vertical scroll alignment layout in MIT App Inventor but unable to find proper tutorial or documents not available. Could someone highlight if it's possible.
Thanks.
To create components dynamically is not possible in the core system of MIT App Inventor, but there is an extension you can use, which is able to do it, see here Dynamic Components Extension (for all App Inventor components) by Yusuf Cihan
See the App Inventor Extensions document about how to use an App Inventor Extension.
For the extensions directory see here.

Implementing other maps than Google or Mapbox

As in title. Is it possible to implement maps other than Google Maps or Mapbox (they are expensive)? I would aim into Open Street Maps or other free solution as I would like to use it in my commercial app.
You should be able to use open street maps fine in a NativeScript application.
https://wiki.openstreetmap.org/wiki/Apple_iOS & https://wiki.openstreetmap.org/wiki/Android
You would just need to call into the OSM maps API. You can check out several blogs from nsbloggers.com as several bloggers have written posts on how to take a native component and make it into a NativeScript plugin.

Can you create the UI in Xamarin Android / iOS and the code in Xamarin.Forms?

I'm new to Xamarin development and feel a little bit strange about how to design the UI interface in Xamarin.Forms (portable/shared).
If I just design the Xamarin Android or the Xamarin iOS, I can get the GUI with drag and drop to finish my UI (like in Windows Forms application) and the code for the UI is automatically generated. But in Xamarin.Forms, this one is not supported (we must use code or xaml). I understand that if we use Xamarin.Forms, the same code apply for both Android or iOS.
However it's a long approach to create the UI. Is it possible in Xamarin to create the UI in Xamarin Android / iOS project and then only do the functionality code in Xamarin.Forms (portable or shared)?
I know this is a common question but it can help many new developers either to choose using Xamarin or not...
There is the Xamarin.Forms XAML Preview for when you are coding in XAML:
But in the end, yes, you are coding events, and data converters, etc... and even with tools like the Interface Builder for iOS, you still have to do all the coding to tie the UI together.
On a personal note: Almost ALL the groups that I have worked with do not use the GUI design tools for any apps that are larger then a screen or two. On iOS we avoid .xib & .storyboard like they are the cause of the black plague.
I understood perfectly your situation. A good start is a Xamarin book that you can download for free for this page https://developer.xamarin.com/guides/xamarin-forms/creating-mobile-apps-xamarin-forms/
If you have been developed with WPF, in Xamarin you have the same concept. A good start is trying example in working apps to understand the structure and the app lifecycle. You can find a collection of examples and code at this link. You can create a form or with XAML or in the code. There are two ways. I advice you to start with XAML and C#.
I advice you to use Portable project and in this way you can share that not just across Xamarin project but with other kind of projects (such as a ASP.NET project).
You can think design Xamarin Forms UI like design Website.
Design website
You knowledge HTML
You need web browser to review
Design Xamarin Forms.
You knowledge XAML
You need Xamarin Previewer to review (Gorilla player, xamarin live player, LiveXaml)
Xamarin.Forms is great, for better understanding of XAML I encourage you to take the time and watch this video (https://evolve.xamarin.com/session/56e201d2bad314273ca4d813) where Charles Petzold goes into detail of how XAML works.
Before Xamarin Studio o Visual Studio had a XAML previewer for Xamarin.Forms I used GorillaPlayer (http://gorillaplayer.com/) is free and works well.
Also take a look in the Xamarin University and Examples.
James Montemagno is a name you must research when talking about Xamarin, he did some really cool and helpfull Xamarin Nuget Packages.
Hope I had pointed you in the right direction.
I understand that you are new to Xamarin.Forms. What I did when I was new to the framework was following a few courses on https://www.xamarin.com/university it is free for 30 days if I'm right (that must be enough to understand the basics). About the previewers I don't have good expierence with them. They are often slow or not working. For me it was often faster to just debug on the phone. Hopefully this will help you a bit.
Even if a nice designor was available, I would still argue that coding by hand is much more efficient : no bad code generated (exemple with constraint : no padding /margin set at the wrong place. No hardcoded size when it's not required etc).
You will have a better understanding and the learning curve is fast.
Back in the days, I started XAML with Silverlight with the amazing Microsoft UI designor : Blend. After few months, I ended up with an architecture that broke the designor (because of dependencies injected in constructor or because the designor struggled to discover controls in external assemblies). It was really painful and I lost a lot of productivity. Few months later, I was fluent with XAML and was even more productive than with a designor.
Nowadays, Visual Studio is snippet friendly for XAML control. I've created a few of them (like a grid with several column row auto, a snippet to generate the ContentPage.Resource with a style, etc).
It's a pain that is worth it.
Moreover you will learn a lot a things and will be more confident in your skills.
Give it a try for few months : you won't regret it !
Last but not least, as other suggest, when building a big app, even in iOS, most developpers I know don't use designor but code everything by hand because of snippet, helpers, extension methods etc.

Undo/redo button in App Inventor 2?

Is there any undo/redo button in App Inventor 2? Surprisingly I haven't found any. Did I miss something?
App Inventor 1 used to have such buttons for the block editor:
Edit: this feature is available again in more recent versions, please see answers below.
Surprisingly UNDO / REDO buttons have been removed in App Inventor 2.
If I can remember correctly they were causing some issues when blocks were undone after removing. Here is the issue which you can star, if you want more advanced tools you should take a look at Java as App Inventor is only the very basics of coding.
It's available in the new blockly version in latest update. (there was some issues with undo in MIT app inventor 2 previously).
Check this link and explore the new features:
http://ai2-test.appinventor.mit.edu
They are no UNDO/REDO buttons in App Inventor 2, unfortunately.

Custom Color action buttons, transparent card background,full screen custom layout notifications.Changing card color

Custom Color action buttons, transparent card background,full screen custom layout notifications.Changing card color,ttf fonts for texts. changing text color . placing on different areas.
are these things possible ??
if its , why we cant use .
if its not how these peoples used these things
I really wanted to develop apps with these features. but current public api is really bad.
it provides nothing at all.but when we see screenshots new beautiful features exists.
I liked google wear and i see future about it . but when we compare with samsung galaxy gear or sony smartwatch, development in public goes slow.Maybe google devs doing things at the background,but if we don't have resources,how can developers can build apps for it.
I shared a basic app with my wishes and ideas.nobody answered about 2 days on google+ no one cares about posts on google+.public support of google wear for developers is sucks at the moment.
I need more customizable things for android wear to build apps.
but in current stage,i can't do much things with it.
i wish we had these features in screenshots below..
Those things are still not possible with the current preview release of AndroidWear.
If you look closely, you'll see that they've been using photoshop (or some other photo editing software)
Using these templates to design an app for Android Wear.
And for testing the design on the watch they used Android Design Preview which is a tool that lets you mirror a portion of your desktop to your device:

Resources