B4A Library Scringo for Basic4Android is live!

[Lib] Scringo for Basic4Android is live!

Hi all, We just released Scringo's support for Basic4Android.

For those of you who don't know Scringo, it's a Social Sidebar with lots of stuff you can add there. Just a few features:
1. Chat - your users can talk to each other
2. Activity Feed - your users can see what interesting things other people are doing in your app
3. Like button - you can add it and let users see what other people like in your app
4. Feedback - let your users send you feedback about your app
5. Rate us - let them rate the app
6. Push notifications - send push notifications and system messages to your users
7. Chat room - start a topic and let your users say express themselves (managed and moderated using the dev zone)
8. Custom buttons - don't know where to place a button - place it on the sidebar and get a notification once it is clicked

And lotsa other stuff. It's all configurable from our dev zone, no need for an upgrade to add or remove features once you integrated the SDK.

And of course, it's all free.

Here's a demo project: http://www.b4x.com/android/files/ScringoB4AExample.zip

Attached are the library files (jar and xml). Place them in your libs folder and include them in your b4a project.

Then you'll need to follow these steps:
1. Register in scringo.com, get an App ID, and download the SDK. (use this link instead of the one in the dev zone, customized for B4A devs: https://dev.scringo.com/downloads/scringo-android-2.2.2-b4a.zip)
2. Open the zip and place the jars from the libs folder in your b4a libs folder (should be the same folder as above).
3. Add the contents of the ScringoManifest.txt from the zip using the B4A Manifest Editor (Project -> Manifest Editor -> Paste this: )
AddApplicationText(
<Contents of ScringoManifest.txt>
)
4. Merge the res folder from the ScringoResources with your Objects/res, and set them all to read-only (In a Windows Browser, Right click the folder -> Read Only, no need to do it one by one)
5. add the scringo.properties from the zip to the Files folder and add it to the B4A project in the Files tab, edit the file and add your Scringo app ID in the scringo.app.id property
6. Add some (or all) of this code to your code (assuming you have a MainLayout with Button1 in it):
B4X:
Sub Globals
   Dim myScringo As Scringo
   
End Sub

Sub Activity_Create(FirstTime As Boolean)
   Activity.LoadLayout("MainLayout")
   myScringo.Initialize
End Sub

Sub Activity_Resume
   myScringo.onStart
End Sub

Sub Activity_Pause (UserClosed As Boolean)
   myScringo.onStop
End Sub

Sub Activity_KeyPress (KeyCode As Int) As Boolean
If KeyCode = KeyCodes.KEYCODE_BACK Then
   If myScringo.onBackPressed Then
      Return True
   End If
End If
Return False

End Sub

Sub Button1_Click
   myScringo.openMenu
End Sub

That's it, you're good to go. Tell us how it went!

For any questions, you can drop me a line at ofer@scringo.com

The Scringo Team
 

Attachments

  • ScringoB4A.zip
    3.3 KB · Views: 518
Last edited:

Jack Cole

Well-Known Member
Licensed User
Longtime User
Error message

The example app appears to work fine for me. However, when I tried integrating with an existing app of mine, I get the following error: android.content.res.Resources$NotFound: Resource ID #0x0.

I made a backup of my existing res folder, and then copied the res folder from ScringoResources. I then copied my original backup res folder back over the top to bring back in things related to the app.

I also tried just copying the res folder from ScringoResources without coping the backup res folder back over the top.

I added the text to the manifest and the code outlined above to work with the library.

Any suggestions?
 

scringo

Member
Licensed User
Longtime User
Erel's right, that is usually the case. Jack, tell me if it helped.
 

scringo

Member
Licensed User
Longtime User
Could it be that you didn't fill in the app ID in the scringo.properties file in the Files folder? Now that I think of it, I should edit the original post... forgot to explain about it.
Thanks for bringing it up Jack, I owe you one ;-)
 

Jack Cole

Well-Known Member
Licensed User
Longtime User
That could be it, because I didn't try that. I'll give it a try later today and report back to you. The functions of the library look interesting and the interface is slick.
 

Jack Cole

Well-Known Member
Licensed User
Longtime User
That was it! I didn't have that file in the files folder and needed to put the app ID in there.

The only thing is that it shows at the top: "Make the most out of Scringo Sample App Connect with Facebook or Twitter." Where can this be changed?

There is also a place for Facebook App ID and Twitter App Token and Secret in the properties file. What are these used for?
 

susu

Well-Known Member
Licensed User
Longtime User
Hi Scringo,

Add the contents of the ScringoManifest.txt from the zip using the B4A Manifest Editor

Where is ScringoManifest.txt? I can't find it in your 2 zip files.
 

socialnetis

Active Member
Licensed User
Longtime User
Wow Looks really nice, how does the users get an id? Do they have to register themselves for a nickname or something?
Where are all the chats and comments stored? Are you offering some kind of space in the cloud for free (it's kind of hard to believe)?
I'll give it a try
 

socialnetis

Active Member
Licensed User
Longtime User
I have 0 knowledge about facebook apps developments, I have created a dummy app in facebook (just create, and use the app id), and its seems to be ok for using Scringo.
It's that gonna be enought to use Scringo?
And one last thing, I don't see anyway to use the Like button, is this not implemented yet for B4A?
 
Last edited:

scringo

Member
Licensed User
Longtime User
Change Scringo strings

Jack, regarding changing strings, if you want to change general strings, they're all in the res folder, look for the string you want to change and do it.

However, if you meant only the name of the app, that can be done without code or xml changes at all, it's simply the name of the app you create in the dev zone (https://dev.scringo.com). Change it there and you'll see how it changes in the app. Actually you can configure just about anything from the dev zone...

Ofer
 

scringo

Member
Licensed User
Longtime User
socialnetis, creating the Facebook app and configuring it in the scringo.properties would be enough (after figuring out Facebook's somewhat complex hash key thingy)
 

socialnetis

Active Member
Licensed User
Longtime User
socialnetis, creating the Facebook app and configuring it in the scringo.properties would be enough (after figuring out Facebook's somewhat complex hash key thingy)

Yes, I'm dealing with the hash thing right now.

About Twitter, I see that the secret key is stored in the clear in the apk file, shouldn't it be encripted or something?

Can you provide a wrapper for the like button? After watching some of the documentation I guess it will be enought a method like "scringo.Like (Title, Type, Link)" and we can call it from a click event of any view in B4A
 

jegadk

Member
Licensed User
Longtime User
Running the sample project. Added an id to properties file.

In the log tab, what does it mean

File 'scringo.properties' is not used. (warning #15) ??

Everything seams to work. Done a feedback in the app, and back from dev zone.

Jesper
 
Top