Closed castelo3442 closed 3 years ago
Not sure about the former but yes you can do the latter. You just have to change these lines to your fully qualified activity name that derives from LOVE's GameActivity
.
https://github.com/love2d/love-android/blob/89c9fc0a70345ebf39807c17d627807a02591bdb/app/src/main/AndroidManifest.xml#L33 https://github.com/love2d/love-android/blob/89c9fc0a70345ebf39807c17d627807a02591bdb/app/src/embed/AndroidManifest.xml#L18
Ive figured out how to create the button in GameActivity, so I believe I don
t need to change it in the Android Manifest. But once a call setContentView(R.layout.activity_game) for the button to work; I cant come back to the regular app screen after the button is clicked in "OnClick ()". (A) How do I do it, onceI find no layout? Or, if it
s not the best way, and I must do it in 2 different Activities, (B) how do I call the gameActivity back? Will it not start the game from the beginning? Would I use the billing activity as the main one?
I'm not quite sure about that. Your way is probably interfere with SDL however so I can't say anything about it.
When running in Android, can I pick and read/write a variable that is inside the .love file, or in a shared save file?
Does https://github.com/bartbes/jniwrap work for you?
Thanks!!!
I`m trying to implement in-app purchases on Android Studio. Can I create a button in the GameActivity using Android Studio, so it would appear while my app is "running" in the background? Or is it possible to use another Activity after love-android compilation? So far, I can setup the billingClient, PurchasesUpdatedListener, start the connection, and query skus, but when I try to use a button in the java/xml files to start the "billing flow", the game crashes. Maybe I'm just doing it wrong, but maybe there is a very specific way to do it while running the .love file. Any suggestion?