-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NullPointerException when creating a session #11
Comments
It seems to me that the method Did you created a custom Android Activity as described into the readme ? Could you post me the Android Activity source code and the AndroidManifest.xml are you using ? |
Hi, thanks for the quick reply! I did create the custom activitiy and also added the activity to the AndroidManifest.xml file, as described in the readme file. However, I am relatively new to the android stuff, so maybe I misunderstood something. The AndroidManifest.xml and my custom activity are attached. I renamed both files to *.txt, as github doesn't support those filetypes (I also added a *.zip file with the files and their original file ending, in case renaming the files to *.txt messes up the formatting). Thanks again for helping me with this! Kind Regards |
The android manifest is wrong. |
Here the changes that you have to apply in order to make it working:
It's the 4th line of your AndroidManifest.xml that has been changed. Look at the attribute 'android:name' changed from the default QtActivity to MyCustomAppActivity. |
Thanks for the detailed description. I checked my sourcecode again step by step and changed it accordingly. However, now I am getting a few error messages during compilation:
I am pretty sure, that I am just making a stupid little mistake, but I can't find it. If you want to take a look, I attached my project. (only replaced the app_name and app_id in strings.xml with some dummy values). I would really appreciate it. Kind Regards |
Here it is :-) Sorry, the error was coming from something I didn't documented. So, I moved the java source file (MyCustomAppActivity) away the android directory and placed into a directory called java. |
Hi, it's working! I can't tell you how happy I am right now ;-) Now it's time to play a little bit with your library. Hopefully I understand anything and maybe even can contribute something to QtFacebook in the future as well. Many thanks for your help and patience! Just an idea, but would it make sense to add your fixed example as an Android sample project? Thanks and have a nice day Kind Regards |
Yes, it's a good idea to add an Android sample project. |
I just decided to extend the sample project a little bit and add other stuff (at least the possibility to logout) too. It will probably take a little while, but I will create a pull request once I'm done. Kind Regards |
Hi,
first of all, thanks for the great project! I am really looking forward to integrating QtFacebook into my application. I just tried to add QtFacebook to my Qt 5.6 (Android) application, but unfortunately when I run the following small sample program...
...I get the following NullPointerException:
Do you have an idea what could be the reason for the NullPointerException? I tried to do all the things you described in the Readme file.
Thanks for your time!
Kind Regards
Bernhard
The text was updated successfully, but these errors were encountered: