Import Deck for Android...

All suggestions and feature requests to improve wagic.
Sub forums Card Coding & Parser ,Game Mode ,Deck Editor
kevlahnota
Posts: 618
Joined: Tue Feb 08, 2011 3:00 pm
Location: Philippines
Contact:

Import Deck for Android...

Post by kevlahnota » Thu Jun 09, 2016 6:31 am

I really don't know about java but I hope we can have an Import button for decks downloaded from deckstats...

Just playing around from SDLActivity.java and I hope I can understand it..

Image

Djardin
Posts: 129
Joined: Sat Sep 04, 2010 11:40 am

Re: Import Deck for Android...

Post by Djardin » Thu Jun 09, 2016 8:29 am

I think the best way would be to declare that Wagic can be used to open a specific file format matching the one of deckstats, if I remember correctly this can be done easily in Android, but also on iOS or Windows.
Then, we need to add in Wagic that if the app was started to open a specific file, then it saves it into the user directory.
When we have all that, we could actually use Google Drive or Microsoft OneDrive Android apps to simply load a new deck into a Wagic Android app...

Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: Import Deck for Android...

Post by Zethfox » Fri Jun 10, 2016 5:55 pm

this is great and all but wagic currently cant even load external sd card images on android 4 or higher. baby steps?

kevlahnota
Posts: 618
Joined: Tue Feb 08, 2011 3:00 pm
Location: Philippines
Contact:

Re: Import Deck for Android...

Post by kevlahnota » Sat Jun 11, 2016 12:54 am

Zethfox wrote:this is great and all but wagic currently cant even load external sd card images on android 4 or higher. baby steps?
Can you try this if this works: https://mega.nz/#!9kRiWYpB!fHMdsLeOhCpl ... SOmp51_T6I

On my device (Android 5.0.2) it doesn't work but on my cousins phone with Android 4.2 it works...

edit: I think I've got it:

Image

Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: Import Deck for Android...

Post by Zethfox » Sat Jun 11, 2016 11:08 am

Didnt work for me.

kevlahnota
Posts: 618
Joined: Tue Feb 08, 2011 3:00 pm
Location: Philippines
Contact:

Re: Import Deck for Android...

Post by kevlahnota » Sat Jun 11, 2016 11:34 am

Zethfox wrote:Didnt work for me.
Here's my last attempt, please try:
https://mega.nz/#!htAn0KYa!MZxncZjrcBMV ... A626bawFlI

I forced the path if the mountpoints are null and the android version is kitkat and above...

Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: Import Deck for Android...

Post by Zethfox » Sat Jun 11, 2016 1:51 pm

That was closer yes, it didnt work but atleast it mounted. Error not allowed to write to that card.
Did any of the info i posted on this bug help? It said used that function i pointed and aet the sd card as somearray [0] or something cause that will be the location we are allowed to save and read.

kevlahnota
Posts: 618
Joined: Tue Feb 08, 2011 3:00 pm
Location: Philippines
Contact:

Re: Import Deck for Android...

Post by kevlahnota » Sun Jun 12, 2016 12:48 am

Zethfox wrote:That was closer yes, it didnt work but atleast it mounted. Error not allowed to write to that card.
Did any of the info i posted on this bug help? It said used that function i pointed and aet the sd card as somearray [0] or something cause that will be the location we are allowed to save and read.
Yeah, I read somewhere that As of Android 4.4 KitKat, applications can no longer write * to the "secondary storage" of a device. Write operations using the java.io.File API will thus fail. There is a workaround I think using Media Content Provider, but I don't know how to implement it. Anyway my device is using Android 5.0.2 and It's has a read and write access to SDCard since I'm using a Custom Firmware.

Anyway Just an Update :)
Image

The bug above is the path points to the same location...

kevlahnota
Posts: 618
Joined: Tue Feb 08, 2011 3:00 pm
Location: Philippines
Contact:

Re: Import Deck for Android...

Post by kevlahnota » Sun Jun 12, 2016 2:19 am

Update: I think I'm close... :) Using Droid4x as my emulator for Android :)

Image

kevlahnota
Posts: 618
Joined: Tue Feb 08, 2011 3:00 pm
Location: Philippines
Contact:

Re: Import Deck for Android...

Post by kevlahnota » Sun Jun 12, 2016 9:23 am

Another update: parsed the same file .dec or .txt success. just find a way to count existing deck and name it, then save :) :mrgreen: :mrgreen:

Image

Post Reply