[plugin] firebase

Post your completed addons to share with the community

Post » Tue Dec 13, 2016 3:51 am

Update

rex_firebase_storage plugin:
- add parameter "Metadata" in uploading actions, to upload file with metadata in JSON string. Metadata of last uploaded file is in "Expression:LastMetadata".
- add "Action:Get metadata", to get metadata from server, trigger "Condition:On get metadata" to get the result, otherwise trigger "Condition: On get metadata error". ( sample capx )
- add "Action:Update metadata", to update new metadata, trigger "Condition:On update metadata" , or "Condition:On update metadata error" if failed.

Interface of Expression:LastMetadata
- LastMetadata , to get all metadata in JSON string
- LastMetadata( key ) , to get the key in metadata, for example LastMetadata("contentType")
- LastMetadata( key , defaultValue ) , return defaultValue if metadata or key does not exist.



@randomly
Here it is.
B
108
S
26
G
266
Posts: 4,455
Reputation: 149,245

Post » Tue Dec 13, 2016 3:49 pm

rexrainbow wrote:@randomly
Here it is.


Wow, your updating speed is amazing, thanks so much!
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
B
27
S
11
G
8
Posts: 528
Reputation: 7,091

Post » Tue Dec 13, 2016 6:10 pm

I'm sorry to bother you again, but I got a problem when uploading from the FileChooser with metadata.
This is my code:
Image

When I preview in NW.js or Chrome, it gives me this error:
Image

When I export to NW.js or preview in any other browser, it just never finishes uploading.
(I know that because there is a text object that would change if it finished)

Uploading a simple string with the same settings works perfectly.

Any advice what I did wrong?
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
B
27
S
11
G
8
Posts: 528
Reputation: 7,091

Post » Wed Dec 14, 2016 2:10 am

Update

rex_firebase_storage plugin: now the default metadata is {}


@randomly
Fixed, try it again.
B
108
S
26
G
266
Posts: 4,455
Reputation: 149,245

Post » Sun Dec 18, 2016 8:10 am

Message: ByBraiiaN can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Javascript error!
TypeError: window.FirebaseItemListKlass is not a constructor
http://localhost:50000/Rex_Firebase_Lea ... _plugin.js, line 133 (col 18)

This may be a bug in Construct 2 or a third party plugin or behavior - please report it to the developer following the bug report guidelines. Subsequent errors will be logged to the console.

:(
B
4
Posts: 1
Reputation: 202

Post » Sun Dec 18, 2016 3:43 pm

@ByBraiiaN

Try update rex_firebase_apiV3 again, assume that you are using apiV3.
B
108
S
26
G
266
Posts: 4,455
Reputation: 149,245

Post » Mon Dec 26, 2016 1:04 pm

@rexrainbow

Hello. Sorry that i haven't sent you an axample about firebase bug for 3 month's. Although only i have this problem :) I made example and i'll tell you how to reproduce the bug

So, to reproduce this bug (firebase plugin returns "offline" even if i online) i used this way:

1. Enter in game using wi-fi (Online mode). Firebase returns ONLINE https://pp.vk.me/c637825/v637825234/261 ... gUT4jI.jpg

2. Off wi-fi and enter in game (Offline mode). And saving doesn't work. Firebase returns OFFLINE (Everything as it should to be)
https://pp.vk.me/c637825/v637825234/261 ... VhveGY.jpg

3. But... Now enter in game using wi-fi (Online mode). And it returns OFFLINE again. Why?
https://pp.vk.me/c637825/v637825234/261 ... ZCPWSQ.jpg

Btw to return (firebase online) back you should reinstall app or clear cache.

Here is capx (r239): https://www.dropbox.com/s/tcl5z2nmiq9vv ... .capx?dl=0
And APK (If you need): https://www.dropbox.com/s/oogacmad90a2i ... g.apk?dl=0

Sorry for a lot of mistakes. And thanks. I very very hope you'll fix it
B
32
S
10
G
2
Posts: 195
Reputation: 3,458

Post » Tue Dec 27, 2016 9:27 am

@norman74

Your test capx is not simple enough. Here is my test capx, which only append "Online" or "Offline" when connected or disconnected.
This test capx worked fine in my notebook (win7 64bit). I turn on/off network(wifi) and the "Online" or "Offline" are appended.
Could you test with this capx again?
B
108
S
26
G
266
Posts: 4,455
Reputation: 149,245

Post » Tue Dec 27, 2016 10:20 am

@rexrainbow

Yes, it works on PC, but not on mobile (cocoon io). I know that you can't test it, but i can. Is it possible to fix?
B
32
S
10
G
2
Posts: 195
Reputation: 3,458

Post » Tue Dec 27, 2016 10:44 am

@norman74

I could try. Now I updated a new version of rex_firebase plugin, to modify some code of connection detecting.
Hope it will fix this issue.
B
108
S
26
G
266
Posts: 4,455
Reputation: 149,245

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 3 guests