The errors which you have received caused by wrong syntax of your Kotlin code.
In example which you have referenced initialization performed inside of onCreate method. In your code you placed initialization just inside of your class declaration. I am not familiar with Kotlin very well but it seems wrong. You should perform initialization inside constructor or init method of activity.
Also in your code you have one more problem - you have initialized SDK too many times.
You can try something like this
Where it has been difficult is that the missions video shows the MainActivity file as a .java file but Android Studio uses .kt instead. Also the FCM services is different in the GIT download (I’m not sure if this matters or not), so I haven’t been able to just follow the exact steps in the documentation and the video.
This whole process isn’t something I properly understand, so I’m not sure if this is even a question for Backendless anymore or if the issue lies elsewhere in the different Android files. But if there is anything you can do to help with getting this fixed and the device registration working, that would be great.
That is correct. I uninstalled the project and started again from the beginning. I also found this, which explained the errors I was getting in the Manifest. When I loaded the Android file as the top project in Android Studio it synced Gradle and resolved all of those errors.
Look’s like you try to edit the Android part in the Flutter project, I think it is could be not correct.
Besides, it looks like you ignored Andrew’s advice.
In example which you have referenced initialization performed inside of onCreate method. In your code you placed initialization just inside of your class declaration. I am not familiar with Kotlin very well but it seems wrong. You should perform initialization inside constructor or init method of activity.
Also, looks like your problems are not related to our services.
@viktor.liablin I think the problems do come from Flutter, so I will try to learn more about that.
Some feedback though, I am only using Flutter because this is Backendless’ suggestion for packaging my app from UI Builder into a native app.
I’ve used the github code from Backendless and followed the instructions from there, but this isn’t much use to me without the ability to send push notifications or request camera access.
I will start to learn about flutter and the different coding needed for the files, but this takes me away from the ‘no code’ approach that Backendless has enabled up until now.
I think it would be easier for your customers if you built the push notifications and other native app access requests into the github instructions for packing with Flutter, or if the instructions here were updated to explain how to do this with flutter: