Share My Creation [B4X] B4X Pleroma - open source client for Mastodon / Pleroma social networks

What is Mastodon?


Pleroma is a lightweight implementation that extends Mastodon.

B4X Pleroma is a client for these social networks.
More information here: https://www.b4x.com/android/forum/threads/119426/#content

It is based on quite a few B4X components including: BCTextEngine, BitmapCreator, MiniHtmlParser, OkHttpUtils2, OAuth, KeyValueStore, XUI Views, B4XPages, B4XDrawer, B4XGifView, B4XPreferencesDialog, BCToast, xCustomListView, BitmapsAsync, RequestsManager and ZoomImageView.
Whenever possible, I tried to implement it in such way that other developers will be able to reuse classes in their own projects (with minimal modifications).
It has good performance. Better than other clients that I've tested.
The resources handling and caching is quite sophisticated. Resources = images, videos and animated gifs.

Google Play: https://play.google.com/store/apps/details?id=b4a.pleroma
iOS app store: https://apps.apple.com/app/b4x-pleroma/id1538396871
Code: https://github.com/AnywhereSoftware/B4X-Pleroma


.

MediaChooser - cross platform "intent based" camera, video and gallery:


You can try it without an account, though many of the features require an account. Best to create an account here: https://mas.to
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I've released a new version (B4A + B4i) with support for dark mode.
In B4A, it is done through the user settings menu. You need to sign in for this.
In B4i, it is based on the device setting.

This code, in Main module of the B4i project, adds an event that is raised when the mode changes:
B4X:
Private Sub TraitCollection_Changed
    Dim delta As Long = DateTime.Now - BackgroundTime
    Log("TraitCollection_Changed: " & delta)
    If delta < 1000 Then Return
    If B4XPages.IsInitialized And B4XPages.MainPage.IsInitialized And B4XPages.MainPage.Theme.IsInitialized Then
        B4XPages.MainPage.Theme.SetDark(IsDark)
    End If
End Sub

'dark mode event
#if OBJC
@end
@interface UIWindow (DarkMode)
@end
@implementation UIWindow (DarkMode)
- (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection {
    if (self.class == NSClassFromString(@"UIWindow"))
        [[b4i_main new].bi raiseEvent:nil event:@"traitcollection_changed" params:nil];
}
#End If

The event is raised twice when the app moves to the background. iOS is doing it to capture light and dark screenshots. In this case the two state changes are ignored.

Changing the theme at runtime is not trivial as the layout is quite complicated and made of many components.
The interface related classes register for a custom Theme_Changed event:
B4X:
mTheme.RegisterForEvents(Me)

Later the events are raised with this simple code:
B4X:
Private Sub ThemeChanged
    For Each target As Object In ThemeChangedTargets.AsList
        CallSub(target, "Theme_Changed")
    Next
End Sub

 

Erel

B4X founder
Staff member
Licensed User
Longtime User

Erel

B4X founder
Staff member
Licensed User
Longtime User
Note that v1.42 was released.




- Support for polls.
- Lock icon for private statuses.
- Status text length counter.
- Support for approving follow requests.
- Bug fixes.

Creating polls, like many other features, are implemented using B4XPreferencesDialog.
The polls are displayed in a CLV. I'm using CLVSelections class to support multiple and not temporary selections.
 
Use mas.to instead (with a new account). The pleroma.com server is no longer online.
Hi Erel im new to B4X When i Download the Source Code and Try to run it it says there is Missing Librarys Where i can find them (i didnt Find them in Library Tab)

Much Love and Thanks In Advance.
 

josejad

Expert
Licensed User
Longtime User
Cookies are required to use this site. You must accept them to continue using the site. Learn more…