I would like to share the first development experience on Xamarin. Prior to this, I had not written a single application for mobile devices, however, as it turned out, with Xamarin, you can quickly and easily write an application. The development was conducted mainly in the evenings and, periodically, on weekends, therefore, despite the fact that there are many days in the diary, a small number of hours were actually spent.
So, the diary ...
Day 1
Weekend was pleasant, interesting, but, unfortunately, absolutely useless. Savoring the bitterness of the loss of time, sad.
Day 2
I decided that something needs to be changed. No, really, how long can you live life purposelessly? I thought about what can help me. Invented nothing. Sad. Ate cookies. Let go.
')
Day 3
Collecting the will in a fist, washed the dishes. The idea of ​​some application in which you can somehow take into account your actions began to emerge in your mind. For example, washed the dishes - +1 point to wash. Dangled dumbbells - +1 to ... sport. Googled I did not find anything normal. Sad.
Day 4
Again, gathering the will into a fist, I decided to write an application for Android myself. Well, there is quite a bit of work. At the top is a cap with general progress, under it is a list with skills. By clicking we increase the skill by +1. There are 3 days of holidays ahead, I will quickly do it on Xamarin.
Day 7
In a day, you can also make it. Probably.
Day 8
Well ... I didn’t think I didn’t know Xamarin. I got used to something that usually arises the question “Why?” In programming, and the question “How?” Recently pops up rarely and remains between the lines. No, not that nothing happened at all. I started writing on Xamarin.Forms, I learned to position the elements, I made a hat ... But it seems that I could not write as quickly as I planned. Sad. Ate cookies. Let go.
Day 9
Made a list of skills through ListView. Maybe everything is not so bad and by the end of the week I will finish it.
Day 11
Not like that? Why is ListView so inhibited? Cashing Strategy changed, layout changed, still an annoying lag remained. Redid on the tableview. Got better. I was delighted. Ate cookies.
Day 12
Solved the issue with storing a list of skills. The gods forgive me, but I decided to save them all together in the same parameter in the config. Yes, with any skill change, I have to rewrite all skills. Yes, it does not. Yes, the pain of the offense pierces my soul.
Day 13
Made adding and deleting skills in the interface. Made an animation. Animation throws an error. I'm sad.
Day 14
I realized that the error throws out the double use of the animation when you quickly press the buttons. Ie, let's say it works like this:
await grid.RotateYTo(grid.RotationY + rotation, 125); longTapGrid.IsVisible = true;
But so no longer:
await grid.RotateYTo(grid.RotationY + rotation, 125); longTapGrid.IsVisible = true; await grid.RotateYTo(grid.RotationY + rotation, 125);
Long deliberated with Google. He recommended that I use synchronization primitives. Something did not work. Whether primitives work, or not, I’m not completely sure. Left, just in case, but the problem is not solved.
Turned to the spirits. They ordered not to ask any questions:
await grid.RotateYTo(grid.RotationY + rotation, 125); longTapGrid.IsVisible = true; await Task.Run(async () => await grid.RotateYTo(grid.RotationY + rotation, 125));
What can I say ... 1: 0 in favor of the spirits.
Day 15
Corrected errors. I reconciled with the almost complete absence of a description of the error and the exception stack, and was used to using Device Log.
Day 16
Corrected errors generated by the previous error correction.
Day 17
I was glad that almost everything was ready and ate cookies.
Day 18
Played with the application and realized that there is not enough statistics. Just monstrously not enough. Got upset. I started to do statistics, at the same time connecting SQLLite and getting rid of pain tormenting my soul regarding the storage of skills in the config file.
Day 19
For Xamarin there are components that allow you to draw elegant graphics. Chartjack columns, pie charts of such beauty that eyes begin to water. True, they are a little paid, somewhere from $ 300-400. Brushing away a tear, connected the free Oxyplot to the project. Then disconnected. Then he connected again. There are no special options.
Day 21
In principle, almost everything is ready. He polished, ate cookies, and wondered what to do next.
Day 22
Today was a black day. The rain hit ice streams into the ground, the wind tore trees, lifted water from the asphalt and threw it at passersby, and I decided to add an advertisement to the application and upload it to google play.
Everything collapsed. But, perhaps, I will start in order.
So, googling how advertising is done, I added Xamarin.GooglePlayService.Ads to the project. After that, something happened to me in the project. Whether something is crookedly added, or something else has happened, but some links have become insoluble ... In general, looking at this, I made a mistake. I decided to update all the components in the project, in the hope that the links will be corrected. Do not do this.
What happened next, I remember vaguely. I remember that Nuget broke down and stopped deleting / changing components, and on all my actions, it produced the error “This collection is read-only” that always made me angry.
Well, who does that? What is it about? What is the read-only collection? The word “This” was the most annoying. It seemed to hint that everyone should be clear what kind of collection. In second place for irritability was the fact that neither the place of the error nor any error code was indicated. In the usual place where this information should be, it was empty.
Much has been done about this, but in the end it turned out that if you unload the Android project from the solution and then load it, you can remove the component or the other ... Before the error reappears.
After that there were still a lot of mistakes. For example, “java.lang.outofmemory” (decided by increasing heapsize), or “java.exe exited with code 2” (decided to remove Xamarin.GooglePlayService.Ads, while Xamarin.GooglePlayService.Ads.Lite remained), or Proguard started in as an error, produce cracks (decided to transfer sdk to the root of the disk so that the path to it does not contain spaces). There were also quite strange errors associated with updating components to the latest version.
Anyway, in the evening I corrected everything and returned to where the day began.
Day 23
Added advertising and tested release build. No problem. So what was it yesterday?
Day 24
Filled in Google Play. Long philosophically pondered whether the application is a game or not. I really wanted it to be a game, but perhaps this is not so. Creaking my heart, put the category "Lifestyle", condemning the application to obscurity. However, not in the downloads of happiness ... Although, I must admit, they would have pacified my vanity. The main thing is the experience of developing on Xamarine ... Well, of course, the application itself, I hope, will also be of some use to me.
Day 32, or Conclusion
It took a little more than a week after the publication of the application. About 40 people downloaded it. A little more than half of it has not yet removed. I myself, too, oddly enough, use the application.
The first days of 5 downloads were not. It is somewhat demotivating and distressing, and even cookies do not save.
Yes, I did the application mainly for myself. Yes, this is my first project on Xamarin, in which I became acquainted with the platform. Yes, there was no goal to get a huge number of downloads or earn any money. But damn, sadly, when the result of your work finds no response. Conversely, the thought that someone else is using the application, or that someone else needs it, pleasantly warms the soul.
Even if it's only twenty people. Even if it is just one person.
PS I can not guarantee that everything was exactly as described. In fact, I do not like cookies.
PPS Well, yes, except for cookies, it was so.