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: 529
Last edited:

GMan

Well-Known Member
Licensed User
Longtime User
No' enough space and ram
 

GMan

Well-Known Member
Licensed User
Longtime User
The last lines after installing is:
B4X:
Unknown permission android.permission.NETWORK in package test.app
GC_FOR_MALLOC freed 30740 objects / 1499968 bytes in 141ms
Force stopping package test.app uid=123456
!!! FAILED BINDER TRANSACTION !!!
PackageAdded: package:test.app
Broadcast received: android.intent.action.PACKAGE_REMOVED
GC_EXPLICIT freed 18776 objects / 943736 bytes in 225ms
asec unmount test.app-2 force
unlink /data/dalvik-cache/mnt@asec@test.app-2@pkg.apk@classes.dex
Forcibly destroying container test.app-2
asec destroy test.app-2 force

Above the code is all okay, telling from packaging, transferring to device etc.

Maybe its not so important for other people, but i would like to code my apps compatible with at least OS-version 2.2
 
Last edited:

GMan

Well-Known Member
Licensed User
Longtime User
in the manifest the only part with "permission" is this one:
B4X:
<permission android:name="$PACKAGE$.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>

under this stands:

B4X:
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>

I connect via WLAN, not with cable and the error message is:

App not installed !

Nothing else or more...

Here is the whole manifest:
B4X:
AddApplicationText(<activity android:name="anywheresoftware.b4a.objects.preferenceactivity"/>
      <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="mygooglemaps_key"/>
        )

AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true" 
    android:normalScreens="true" 
    android:smallScreens="true" 
    android:anyDensity="true"/>
   <permission android:name="$PACKAGE$.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
   <uses-feature android:glEsVersion="0x00020000" android:required="true"/>
   )
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
 
Last edited:

GMan

Well-Known Member
Licensed User
Longtime User
with ADB ?
 

socialnetis

Active Member
Licensed User
Longtime User
Nice Update.
I think that would be really useful to raise an event when the ActionVerb button from the sendfeed have been pressed, and pass some useful parameters, because it's useless right now.
Is there a way to see bigger the picture in the feed? In the example you provide there are pictures that are bigger, or this is when it uses the Like button?
 

scringo

Member
Licensed User
Longtime User
Nice Update.
I think that would be really useful to raise an event when the ActionVerb button from the sendfeed have been pressed, and pass some useful parameters, because it's useless right now.
Is there a way to see bigger the picture in the feed? In the example you provide there are pictures that are bigger, or this is when it uses the Like button?

Regarding the actionVerb, you're absolutely right, and it's available in Scringo, just haven't externalized the API for B4A yet, I'll do it soon (actually on vacation now, just answering questions, can't really program ;-) )

The larger images are for the like indeed (I'll expose it for B4A as well soon).
The images you see that are for the send feed are too small? It's intended to be something a little different than the like, cause it comes with the description.
 

socialnetis

Active Member
Licensed User
Longtime User
Everytime you re-install the app, and register with facebook (or twitter), you start from 0. I mean, you lose your followers, followings and post. Is this a bug, or is intented to be like that? Because it would be nice to keep the state, for the users that want to install the app in their phone and tablets.

I was trying to extend the b4a library, with events and some other methods. Everything seems to work, except for the setLikeObject method.
Is there a way to use this method, by creating a dummy button by code? Something like:
B4X:
public void setLike(String objectId, ScringoLikeObjectType objectType,String objectDesc){
      ScringoLikeButton slb = new ScringoLikeButton(mBA.context,null);
      slb.setLikeObject(this.s, objectId, objectType, objectDesc);
}

But nothing appears in the feed. Maybe the second parameter of ScringoLikeButton shouldn't be null?
 

scringo

Member
Licensed User
Longtime User
@socialnetis, regarding the Facebook issue, I agree your suggested behavior is better than the implemented one, but we just didn't get the time to do it. There are sooo many feature requests from users! We'll get to it eventually.

It's incredible you're extending the B4A with the Scringo API, don't forget to publish the jar and xml when you're done on this thread! I'm actually on vacation and don't have full access here to the source code (and I have to admit I'm still not a B4A expert...). The null on the second parameter seems fine to me. The feed takes time to refresh, but I guess you waited enough ;-) is the button you created a "real" Scringo Like button, i.e. with the thumbs up and the number of likes on it?
 

scringo

Member
Licensed User
Longtime User
Hi Guys,

Updated the zip in the original post, per @Jack's request added pauseSwipe and resumeSwipe if you want to open the sidebar yourselves, and not have the swipe gesture
 

nrasool

Member
Licensed User
Longtime User
Hey Scringo,

This is a good library, really enjoying it for my first app. Just want to ask, at some point can you expose the following in Basic4Android, as it would be useful for us to use it as well :)

B4X:
scringo.setPopInAdsEnabled(false);
scringo.setPopInAdsEnabled(true);
scringo.setTwitterCredentials(twitterAppToken, twitterAppSecret);

Kind Regards
 

scringo

Member
Licensed User
Longtime User
Hey Scringo,

This is a good library, really enjoying it for my first app. Just want to ask, at some point can you expose the following in Basic4Android, as it would be useful for us to use it as well :)

B4X:
scringo.setPopInAdsEnabled(false);
scringo.setPopInAdsEnabled(true);
scringo.setTwitterCredentials(twitterAppToken, twitterAppSecret);

Kind Regards

Thanks for the kind works ;-)
The Twitter credentials thingy is already in if I remember correctly, and I'm not sure about the pop-in ads. if it isn't, I'll add it next week (soooo swamped with other stuff... sorry)
 

nrasool

Member
Licensed User
Longtime User
Hey scringo, Thanks for the information, but in Basic4Android, how do you do the twitter credential.

I've tried using scringo.setTwitterCredentials(twitterAppToken, twitterAppSecret) and also myscringo.setTwitterCredentials(twitterAppToken, twitterAppSecret) but both come up with errors when compiling. Using your latest version which I believe is 2.19

Kind Regards
 

scringo

Member
Licensed User
Longtime User
Hey scringo, Thanks for the information, but in Basic4Android, how do you do the twitter credential.

I've tried using scringo.setTwitterCredentials(twitterAppToken, twitterAppSecret) and also myscringo.setTwitterCredentials(twitterAppToken, twitterAppSecret) but both come up with errors when compiling. Using your latest version which I believe is 2.19

Kind Regards

question is, are you using the latest B4A wrapper (1.1)?
 

capisx

Member
Licensed User
Longtime User
i've tried scringo on my app, the problem is i couldn't sign in into facebook via scringo if the device also has official facebook app installed. After i uninstalled the facebook app i can sign in into facebook via scringo.

Tested it on Samsung G-Tab P1000 and Lenovo A800 (same issues on both)
 

scringo

Member
Licensed User
Longtime User
i've tried scringo on my app, the problem is i couldn't sign in into facebook via scringo if the device also has official facebook app installed. After i uninstalled the facebook app i can sign in into facebook via scringo.

Tested it on Samsung G-Tab P1000 and Lenovo A800 (same issues on both)

On the contrary, the official Facebook app on the device is what is letting users login more easily using the single sign-on. There are several pitfalls that devs fall in:
1. maybe the Facebook app (in the FB website app settings) shows you're in sandbox mode?
2. or maybe the debug.keystore isn't really the one you're using (it's in c:\Users\<Your_User>\.android\debug.keystore, Erel, correct me if I'm wrong regarding B4A)
 
Top