enhost Blogs

Global Reader

Welcome to the Global Reader, your window into the vibrant community of enhost BLOGS! Here, you'll find a dynamic feed of the latest posts from all our users, showcasing the diverse voices and perspectives within our Fediverse network. Explore fresh ideas, discover new writers, and engage with content that sparks your curiosity. Dive in and see what the enhost BLOGS community is creating today!

from The Pragmatic Pixel

Hi folks, Jamie here again.

Last time we chatted about authentication – getting users securely logged into our applications. Today, let's talk about what happens after they're logged in: consuming data via APIs.

If you're building a Laravel backend to power a Flutter mobile app (or any mobile app, really), just throwing together some resource controllers that map directly to your database tables often isn't enough. Mobile clients have different needs than web browsers: they operate over potentially flaky or slow networks, have smaller screens influencing data display, and can't easily make dozens of requests to stitch together a view.

Designing a good API – one that's efficient, predictable, and easy for your Flutter app to consume – requires some specific thought. Here are some practical tips from my experience building Laravel backends for mobile frontends.

1. Think Beyond Raw Database Models: Use Transformation Layers

Your database schema is optimised for storage and relationships, not necessarily for direct display on a mobile screen. A single screen in your Flutter app might need data combined from multiple models, or fields formatted in a specific way.

Don't just return raw Eloquent models. This leaks internal structure and often sends way more data than needed.

Do leverage Laravel's API Resources. These are fantastic transformation layers. They allow you to define precisely how your models should be represented as JSON, letting you:

  • Rename attributes ('user_name' => $this->name).
  • Add related data conditionally ($this->mergeWhen(...)).
  • Include computed properties or links.
  • Maintain consistency across your API responses.

Start using API Resources early; they make your API cleaner and decouple your frontend from your database structure.

2. Keep Payloads Lean: Mind the Mobile Network

Every byte counts on mobile networks. Sending huge JSON payloads drains battery, consumes data allowances, and makes your app feel sluggish.

  • Be Selective: Use your API Resources (see Tip 1!) to only include the fields the client actually needs for a given view. Avoid select * mentality.
  • Prevent N+1 Queries: On the backend, excessive database queries dramatically slow down response times. Use Laravel's eager loading (->with('relation')) religiously in your controllers before passing data to your API Resource. Tools like Laravel Debugbar or Telescope can help spot N+1 issues.
  • Consider Sparse Fieldsets: For more advanced cases, allow clients to request only specific fields, e.g., /api/v1/posts?fields[posts]=title,author. JSON:API specs offer guidance here, though implementing it fully adds complexity.

3. Handle Relationships Intelligently

How do you include related data (e.g., a post's author and comments)?

  • Embedding: Include related resources directly within the main resource response. API Resources make this easy ('author' => new UserResource($this->whenLoaded('author'))). — Pro: Reduces the number of HTTP requests the client needs to make. — Con: Can significantly increase payload size if you embed too much or too deeply.
  • Linking: Include only the IDs of related resources and require the client to make separate requests if needed. — Pro: Keeps initial payloads small. — Con: Can lead to a “chatty” API requiring many requests to build a single screen.

Find the balance. Embed essential, commonly needed relationships (like the author of a post). Link to less critical or potentially large collections (like comments, which might be loaded on demand). Use whenLoaded in your API Resources to only include relations if they were eager-loaded in the controller.

4. Implement Sensible Pagination

Your Flutter app probably uses infinite scrolling or “load more” buttons for long lists. Your API needs to support this efficiently.

  • Use Laravel's Pagination: Don't fetch all records at once! Use ->paginate() or ->simplePaginate() in your controllers. simplePaginate is often slightly more efficient as it only generates “next” and “previous” links, which is usually enough for mobile UIs.
  • Provide Clear Metadata: Ensure your API response includes clear pagination information (current page, next page URL, total items if using paginate). Laravel's paginator objects, when returned directly or wrapped in an API Resource, handle this automatically.

5. Design for Predictable Error Handling

When things go wrong (and they will), your Flutter app needs to know what went wrong to display useful feedback or attempt recovery.

  • Use HTTP Status Codes Correctly: Don't just return 200 OK with an {'error': '...'} payload. Use standard codes: — 400 Bad Request: Generic client error. — 401 Unauthorized: Missing or invalid authentication. — 403 Forbidden: Authenticated but lacks permission. — 404 Not Found: Resource doesn't exist. — 422 Unprocessable Entity: Validation errors (Laravel's specialty!). — 500 Internal Server Error: Something broke on the backend.
  • Provide Meaningful Error Payloads: Especially for 422 validation errors, return a structured list of errors keyed by field name (Laravel does this by default). For other errors, a simple {'message': 'Human-readable error'} payload is often sufficient.
  • Leverage Laravel's Exception Handler: Customize App\Exceptions\Handler.php to render your API exceptions into consistent JSON error responses.

6. Version Your API from Day One

Mobile apps live on user devices, and you can't force everyone to update instantly. If you change your API in a way that breaks older versions of your app, you'll have unhappy users.

Introduce API versioning right from the start (e.g., prefixing your routes with /api/v1/). This allows you to evolve your API (/api/v2/) while maintaining compatibility for older deployed app versions.

Quick Mention: What About GraphQL?

We've focused on REST principles here. It's worth mentioning GraphQL as a powerful alternative. Its main strength is allowing the client (your Flutter app) to request exactly the data fields and relationships it needs in a single query, potentially solving over-fetching and under-fetching issues inherent in REST. Libraries like Lighthouse PHP make adding a GraphQL layer to Laravel quite elegant. While potentially overkill for simple APIs, it's definitely worth investigating for complex data requirements.

Conclusion

Building an API for mobile clients isn't rocket science, but it pays to be thoughtful. By leveraging Laravel's API Resources, mindful data loading, consistent error handling, and versioning, you can create APIs that are a joy for your Flutter frontend (and its developers!) to consume. Focus on the client's needs, keep things efficient, and aim for predictability.

What are your go-to API design tips when working with Laravel and mobile frontends?

Cheers,

Jamie C.

 
Read more...

from The Pragmatic Pixel

Hey everyone, Jamie here again.

So, you've built a slick Laravel backend. Your database is structured, your business logic is humming along... but now you need to let users log in. If you're only dealing with traditional server-rendered web pages, Laravel's built-in session authentication is fantastic – simple, secure, and gets the job done.

But what happens when your clients aren't just web browsers? What about Single Page Applications (SPAs) built with Vue or React, or native mobile apps built with Flutter, like we often discuss here? Suddenly, session cookies aren't always the neatest solution. This is where things get interesting, and where tools like Laravel Sanctum step into the spotlight, alongside powerful third-party options.

Let's dive into some authentication strategies for these modern application stacks.

The Challenge: Authenticating SPAs and Mobile Apps

Traditional session-based authentication relies on cookies tightly coupled to your web domain. This works great when the browser and server are on the same domain. However:

  • SPAs: Often served from a different domain or port than the API backend, making cookie sharing tricky due to browser security policies (CORS, SameSite cookies).
  • Mobile Apps (Flutter, etc.): These aren't browsers! They don't inherently handle cookies in the same way, and making HTTP requests requires a different approach, usually involving tokens.

This leads us towards token-based authentication. The client logs in, receives a token, and includes that token in the header of subsequent requests to prove its identity. Laravel has long offered Passport for full OAuth2 server implementation, which is powerful but can be overkill for simpler first-party scenarios.

Enter Laravel Sanctum: The Lightweight Powerhouse

This is exactly where Laravel Sanctum comes in. Introduced as a simpler alternative to Passport, Sanctum is designed specifically to solve authentication for SPAs, mobile apps, and simple token-based APIs.

Here's why I often find myself reaching for Sanctum:

  • Simplicity: Compared to setting up a full OAuth2 server with Passport, Sanctum is significantly easier to configure and understand. Fewer moving parts mean less complexity.
  • Brilliant SPA Authentication: Sanctum provides a beautifully simple way to authenticate your SPAs if they live on the same top-level domain as your backend. It cleverly uses Laravel's existing session authentication system (cookie-based) but handles the necessary CSRF protection and SameSite cookie configurations, making it feel almost seamless. Your SPA frontend makes requests just like a traditional web app.
  • Effortless API Token Authentication: This is key for mobile apps (like our Flutter projects!) or any third-party consumer of your API. Sanctum allows users to generate API tokens (either long-lived personal access tokens or shorter-lived tokens tied to OAuth flows if needed, though typically used more simply). These tokens can be assigned specific “abilities” (scopes) for granular permission control. Your Flutter app just needs to store this token securely and send it along in the Authorization: Bearer header. Easy peasy.
  • Tight Laravel Integration: It feels like a natural part of the framework because it is. It leverages existing Laravel components (middleware, guards, user model) seamlessly.
  • Full Control: You manage the entire authentication flow, user database, and token lifecycle within your own application. You own your data and the logic.

Sanctum is often my go-to choice when:

  • Building a first-party SPA that communicates with its own Laravel API.
  • Creating a backend API specifically for consumption by my own Flutter mobile application.
  • Needing a simple, secure token system without the full baggage of OAuth2 grants.

Considering the Alternatives: Third-Party Heroes (Auth0, etc.)

Now, Sanctum is great, but it's not the only game in town. Sometimes, offloading authentication entirely to a dedicated third-party service makes more sense. Think platforms like Auth0, Okta, Firebase Authentication, AWS Cognito, and others.

These services specialize purely in identity management. Here's why you might consider them:

  • Rich Feature Set: They often come packed with features that would take significant time to build yourself: robust multi-factor authentication (MFA), extensive social login options (Google, Facebook, GitHub, etc.), passwordless login, anomaly detection, sophisticated user management dashboards, compliance certifications.
  • Reduced Security Burden: Handling password hashing, secure storage, reset flows, and staying ahead of vulnerabilities is their core business. Offloading this can reduce your own security surface area.
  • Scalability & Reliability: These platforms are built to handle authentication at massive scale.
  • Standard Protocols: They usually fully implement standards like OAuth2 and OpenID Connect, which can be beneficial for complex integration scenarios or B2B applications.

However, there are trade-offs:

  • Cost: Pricing is often per-user or per-active-user, which can become significant at scale.
  • Vendor Lock-in: Integrating deeply means migrating away later can be challenging.
  • Less Control / Data Residency: Your user data lives on their platform, and you rely on their infrastructure and feature roadmap.
  • Integration Complexity: While they aim for simplicity, integrating their SDKs and managing the callback flows can still involve its own learning curve.

A third-party provider might be the better choice if:

  • You need features like social logins or advanced MFA right now.
  • You want to heavily offload the security and operational burden of identity management.
  • You're operating in a highly regulated environment requiring specific certifications.
  • Your budget accommodates their pricing model.

Making the Call: Context is King

There's no single “best” answer.

  • For straightforward first-party SPAs and mobile apps talking to your Laravel API, Laravel Sanctum often hits the sweet spot. It provides elegant solutions for both web and mobile clients, keeping things simple, integrated, and under your control.
  • If your needs are more complex, require rapid integration of many third-party logins, or if you want to completely abstract away the identity layer, exploring services like Auth0 is definitely worthwhile.

Think about your project's specific requirements, your team's expertise, your budget, and your long-term control needs. Both approaches are valid and powerful when used in the right context.

What are your experiences? Do you lean towards Sanctum or third-party providers for your Laravel-powered APIs? Let me know in the comments!

Cheers,

Jamie C.

 
Read more...

from The Pragmatic Pixel

Hi everyone, Jamie Carmichael here. Thrilled to finally launch my new blog, The Pragmatic Pixel!

So, a quick backstory: I've spent years building web applications, mostly deep in the PHP and Laravel world – stuff I genuinely enjoy for crafting solid backends. But like many, I got pulled towards cross-platform development and landed squarely with Flutter for building mobile UIs.

Why start this blog now?

Honestly, it feels like the right moment. I've spent enough time working at the intersection of Laravel and Flutter on real projects – designing APIs, figuring out auth flows, debating state management from both perspectives – that I've built up a stash of practical insights, workarounds, and opinions.

I kept finding myself wishing there was one place that consistently tackled the specific challenges of making these two powerful ecosystems play nicely together. Instead of just wishing, I figured, why not build it?

So, The Pragmatic Pixel is born out of that need: a place to share practical tips, tutorials, and real-world learnings focused specifically on bridging the gap between robust PHP backends and fluid Flutter frontends.

It's time to start documenting and sharing what I'm learning in the trenches. Hope you'll follow along!

More content coming very soon.

Cheers,

Jamie C.

 
Read more...

from The Pragmatic Pixel

Hey everyone, and welcome!

I'm Jamie Carmichael, and this is the very first post on my new blog, The Pragmatic Pixel. It's incredibly exciting to finally hit 'publish' and start sharing my thoughts and experiences with you all.

For years, my professional world has revolved around building scalable and reliable web applications. Like many of you, I've spent countless hours deep in the world of PHP, particularly leveraging the elegance and power of the Laravel framework. It's a fantastic ecosystem for crafting robust backends, APIs, and complex web platforms – it's been the engine behind numerous projects I've built, both for my own small consultancy and for clients.

But the tech landscape is always evolving, isn't it? A few years back, the siren call of cross-platform mobile development became too loud to ignore. I wanted a way to build beautiful, performant, native-feeling apps for both iOS and Android without necessarily maintaining two entirely separate codebases. My exploration led me, perhaps inevitably, to Flutter. The developer experience, the declarative UI paradigm, and the sheer potential hooked me almost immediately.

Bridging Two Worlds

And that's really the why behind The Pragmatic Pixel.

While there are countless excellent resources dedicated solely to PHP/Laravel or solely to Flutter, I often found myself grappling with the challenges and opportunities that arise right at the intersection of these two powerful technologies.

  • How do you best structure a Laravel API specifically for consumption by a Flutter app?
  • What are the most effective authentication patterns (Sanctum, Passport?) when bridging this gap?
  • How do concepts from backend development translate (or not!) to state management in Flutter?
  • What are the practical deployment pipelines for a full-stack application built this way?

This blog is my space to document my journey exploring these questions, sharing solutions, and offering practical insights gained from real-world projects.

What to Expect Here

My goal is to be pragmatic. We'll be focusing on:

  • Practical Tutorials: Step-by-step guides on integrating Laravel backends with Flutter frontends.
  • Architectural Discussions: Thoughts on structuring full-stack applications using these technologies.
  • API Design: Best practices for creating APIs that are efficient and easy for Flutter to consume.
  • Tooling & Deployment: Exploring workflows, CI/CD, and hosting solutions for both parts of the stack.
  • Comparisons & Opinion Pieces: Honest takes on different approaches, libraries, and state management techniques, always grounded in experience.
  • Occasional Musings: Thoughts on the broader software development landscape, viewed through the lens of someone working across the stack.

Who Is This For?

If you're:

  • A PHP/Laravel developer curious about adding Flutter to your skillset.
  • A Flutter developer looking for robust backend solutions or coming from a web background.
  • Anyone interested in the practicalities of building and deploying modern, cross-stack applications.

...then I hope you'll find value here. Let's Get Started!

I'm genuinely excited to build this space and share what I'm learning. Technology is more fun when it's a conversation, so please feel free to leave comments, share your own experiences, or suggest topics you'd like to see covered.

For now, thanks for stopping by!

Cheers,

Jamie C.

 
Read more...

from Virtus Computing

This tutorial continues from the last one in the NotePad app set Basic4Android: Notepad – Part1 (Designing). In this tutorial i am taking the design and adding code to make the app load the text from files and display it in one of the four slots.

App start up

When the app starts up we are going to load in the design with the buttons and the text box in. We are also going to put things into the menu. All of this start up code goes inside the Activity create sub.

Sub Activity_Create(FirstTime As Boolean)
    'Code to run here
End Sub

Loading the layout

First of all loading the layout, all this is done with one line of code which just loads the file we saved in the first tutorial. We made main.bal in the first tutorial and now we are displaying that.

Activity.LoadLayout("main.bal")

Adding menu items

Adding menu items is very simple, we are going to add three menu items Clear, Save, Exit. These will only appear when the menu button is pressed so it saves on screen space. It is one line of code for each menu item. We are only using text items so the line of code is this:

Activity.AddMenuItem("title", "event")

The title is what you want the menu button to say example “Clear” and the event is where you want to run the code example “clear” which would run the sub “clear_Click”. We are adding the three menu items below:

	Activity.AddMenuItem("Clear", "clear")
	Activity.AddMenuItem("Save", "save")
	Activity.AddMenuItem("Exit", "exit")

Loading the slots

When each slot button is pressed two things will happen.

  • The data for that slot will be loaded and displayed.
  • The strings will be changed so that when saved the data is saved to the right slot. We will do the second one first as it is the simplest to do and requires only a few lines of code. First we need to set up the variable to store which slot is open. To do this we Dim the string in the Globals sub. Inside there under the setting up of the buttons and text box add the two lines. Dim slot As String slot = "0" That line lets the program know that if slot is used that it is a bit of data. Right under that line we are going to set slot to 0. This is because we don’t want bugs when a user clicks save straight away. Now we need to put a bit of code into each button so that the slot string changes. For example the button for slot 1 will be: Sub slot1_Click slot = "1" End Sub This needs to be added to all of the other subs, they should have been generated in the first tutorial, so all you need to do is add the second line to each sub. Remember to change the number so that slot2_Click contains slot = “2″ and so on.

Now we need to load the data for each slot. This is very simple to do we just need to load a text file when each button is clicked. this is done in one line, but we are going to make sure the file is there before opening to stop any errors. So under the line above we need to check for a file like this:

If File.Exists(File.DirInternal,"notepadapp-slot" & slot & ".txt") Then
    	notepadbox.Text = File.ReadString(File.DirInternal, "notepadapp-slot" & slot & ".txt")
	ToastMessageShow("Data loaded for slot " & slot & ".", True)
Else
	notepadbox.Text = "There is no data for slot" & slot
	ToastMessageShow("No data loaded for slot " & slot & ".", True)
End If

That code checks to see if the file notepadapp-slow1.txt is there, if it is then it will load the data into the text box. If not then it will display a message. The slot can still be loaded without there being data, and when it is saved for the first time it will create that file for the next time. That code needs to be put in all the four slot buttons and does not need to be modified.

Saving the slots

saving the slots is very easy, it is again just one line of code to do so. You will need to create a new sub like below with the following code inside. It can be anywhere in the code i added it at the bottom.

Sub save_click
	File.WriteString(File.DirInternal, "notepadapp-slot" & slot & ".txt", notepadbox.Text)
	ToastMessageShow("Data saved for slot " & slot & ".", True)
End Sub

The Clear button

The clear button just resets the files to default and removes all the data from it, it is only a few lines of code. it sets the text box to having no data and then writes that to the file. A new sub is need for the clear button just like with save.

Sub clear_click
	notepadbox.Text = "There is no data for slot" & slot
	File.WriteString(File.DirInternal, "notepadapp-slot" & slot & ".txt", notepadbox.Text)
	ToastMessageShow("Data deleted for slot " & slot & ".", True)
End Sub

The exit button

The last button in the menu is the exit button, this is to fully stop the program and not leave it running in the background. I like this in my apps so i can close them and speed up my phone and save battery. The code is very simple and uses a new sub.

Sub exit_Click
	Activity.Finish
	ExitApplication
End Sub

Finishing off

The app now fully works, there is one last thing i want to do to make it work better across phones with big screens. There are many things that can be edited along with colors designs, and loading the slots in a list box. This is the trick i used to make it better on bigger phones it just makes the text box adjust to the screen size, this code goes right after the menu code near the top.

notepadbox.Width = Activity.Width
notepadbox.Height = (Activity.Height - 50)

Done

That is now the app working fully. There is many things that can be added and made better, but this is a working android program that uses files to store data.

Screenshots

notepadappscreenshot (1) notepadappscreenshot (2) notepadappscreenshot (3)

End result

The app on Google Play

Written by Zachary.

 
Read more...

from Virtus Computing

In this set of tutorials i will go through how to make a notepad app. A very simple one with 4 slots and a text box to edit the text in them slots. It will save the data on the SD card if there is one and on the phone if not. I will have settings to change fonts and colours for each slot. This tutorial will be split into 2 parts:

  • Designing
  • Saving and loading slots

After that i will go on to add more functions and explain more things that can be done in B4A and how to use them.

Application settings.

First of all open up B4A and click save, this is because you can not use the GUI designer without saving it first. I recamend making a new folder to save it in like NotepadApp. Put the file name as notepad and click save. Saving the Notepad app.

When it is saved we can start to set up the settings of the app, Like the Name, Icon and Version number. Got to Project and select Choose Icon. Then select the icon from your computer. I am going to use a simple one i found on the internet. (You can download it here)

The next thing we want to edit is Package Name, this is a unique field that identifies your app and will be different from all other apps. Most of the time Developers put this to:

*appname*.*developername*.*companyname*

That is because it has to conation at least two words with a dot between them, it must all be lowercase. In this tutorial i am going to set mine to notepad.virtuscomputing.tutorial. You may use that name as well.

The last one we are going to change today is the Application Label, This is the name of your app and the one that is displayed on the app draw, in your settings, and on the top of the app. I set mine to NotePad.

Designing.

Now we can open up the designer and start to build the GUI. It will be one big Text-box with a tab host along the top. There will be a menu with a Save, Clear and Exit buttons on it. This will be most of the app interface for now. Open up the designer and click Add View then Edit Text, Drag it around the form with the square in the corners. It needs to fit the entire screen, starting from 50 from the top going all the way down to the bottom. You can then add 4 buttons and spread them across the gap left in the top. To make our code easy to read and understand rename the buttons to slot1, slot2, slot3, slot4. And the textbox to notepadbox. This is done by selecting the item, and looking at the top of the list of propities and changing the Name field.

Notepad Design Form

You should end up with something like the form above. At this point you can move thigs around to how you want them to be. Then click File –> Save, and name it main. Once this is done there is one more thing we need to do before starting to code the app. Select Tools –> Generate Members. When the new form opens up Select all views to select all the boxes. On slot1, slot2, slot3, and slot4 open then with the little + to one side and select the box for Click. Once this is done for all of them press Generate Members.

Notepad Generating Members

This inserts all the code into the file to make all them forms appear That is the last of the designing for now. You can move things around in the designer and make them look how you want.

All the code is in Basic4Android: Notepad – Part2 (Code)

Written by Zachary.

 
Read more...

from Virtus Computing

To make the test application we are just going to do the hello world app. This just prints the words hello world on the form to prove that it works. When you clickt he text hello world it will change, just to show how events are handled.

To start when you open Basic4Android it gives you a set of code already. We will be using this code to click Save and select where you want to save the project and all its files. I recommend making a new folder just for the project. Then name the project what you want. here is it called Testing for Tutorial then click save.

After we have save the project the file is created with a .b4a on the end (as seen in the picture above). Once we have saved we can now open up the designer, Click Designer on the menu bar. Two new windows will open up like the below. One of them (The bigger one) Is the control properties window. The other is the Designer.

You can now click Add New and then Label. It inserts the label onto the form and called it Label1 You can drag this around and re size it if you want to (When the item is clicked on the properties window you can change the test font and size. You can input the text there, but we are going to do it programmatic for now. Right click on the label and hover over Generate then Dim Label1 As Label, Then do that again but select Click this time.

Once that has been done we can save the layout, Click File then Save and give the layout a name of main and click Ok. The window should look like the one below.

Once we have done that we can close the designer and begin on the code. There is not allot of code for this program. The first bit it to load the label one we start the program. And then to print text into the label.

Sub Activity_Create(FirstTime AsBoolean)
Activity.LoadLayout("main")
'The line above is to load in the layout we made, remember the name "main"
Label1.Text = "Hello World"
'The line above print the text "Hello World" onto label1
End Sub

The code above should replace the code already in the Activity_Create. The code below is to change the text when the user clicks on the label.

Sub Label1_Click
Label1.Text = "I've been clicked"
'The line above print the text "I've been clicked" onto label1
End Sub

The code above should replace whats in Label1_Click. When the activity is started it calls the first bit of code which sets up the windows and loads in the forms. It then prints the first bit of text to the label. When the label is clicked it calls the second bit of code which changes the text. Make sure to save at this point!

Testing on a android device

If you are using a physical android device then connect it to the same WiFi to the computer(this is the way i do it) Download the Program to your phone (The Basic4Android Bridge linked in the top) Then run it, it needs to configuration and should have some buttons on there. Click the button that says Start – Wireless, it should then start the service. It will say “waiting for connections” when it is ready. Then go to your computer and in basic for android go to Tools then B4A Bridge then Connect – Wireless.

It will prompt you for an IP, This is displayed on your phone and should be something like 192.168.1.68. Type it in and click connect.

If it has worked your phone will say connected.

If it has worked then you can now click the Blue Arrow on basic for android and it will compile the application. When it is done your device will prompt you to install the app automatically. But the APK file is in /objects/Testing for Tutorial.apk so you can send it to your device another way.

Installing the app on the phone. You need to click Install at the first screen, It will then install the application

After it has installed you can Open or Done, You want to open it and make sure it has worked. If you click the label the text will change.

Make sure to press Stop on B4A Bridge to save your battery when you are done.

Written by Zachary.

 
Read more...

from Virtus Computing

Basic4Android is a very useful program to write applications for the android operating system. It runs on windows and has a very similar feel to VB.net. The IDE is very clean and easy to use. And with the remote bridge software you can install the applications straight to a mobile device.

Getting all the files.

Java JDK 7 (32-bit or 64-bit)

http://www.oracle.com/technetwork/java/javase/downloads/jdk7u9-downloads-1859576.html

Android SDK

http://dl.google.com/android/installer_r20.0.3-windows.exe

Basic4Android trail setup (If you have bought it then use the setup sent in the email)

Enterprise Standard (Trial)

Basic4Android Bridge (From the market onto your phone – Optional)

https://play.google.com/store/apps/details?id=anywheresoftware.b4a.b4abridge (http://vcurl.co/?i=f2ea)

Installing

Java

Installing java first as everything needs it. To install java i find it is best to uninstall any Java things you have previously installed. That way you are starting from scratch. Once it has been uninstalled run the Java setup program and install Java to the default place. (The Java JDK development tools will still work for any other java resource. including your browser) Once the Java install has completed do not restart your computer.

Android SDK

Installing the android SDK is a little more complicated. Run the setup and follow through the instructions. Install it all to the default place after the install has completed go to your Start menu and find the “SDK Manager” run that and wait while it starts up (This can take some time). Once it has started up wait for it to refresh the package lists. One it has done select. Android 4.1 (And all that’s inside it) Then click Install packages… You will have to select Agree and Install. Then the bar at the bottom will show the progress of the installation.

Basic4Android

One everything else is installed, i recommend you have restarted before installing Basic4Android. If you are installing the trail then you need to run the file you downloaded at the top. If you have bought it then download the file from your emails and download that file to install. When running the file just install the the default places.

Configuration

When all programs are installed, it is time to configure Basic4Android to work with the Android SDK, and Java JRE. Doing this is very simple and it is only inputting two file paths. One for the javaac.exe and the other for android.jar. To do this open up Basic4Android, Once it has loaded (you will have to select Trail, unless you have a key in which case select the key). Go to Tools then Configure Paths

After you click that you are presented with the window below. You need to locate the two files it says about. It has a location of where they should be but i found that it is not there anymore. Click browse to find the files. Which for me are in these locations (Just remember to change to your username, and correct versions.)

C:\Program Files\Java\jdk1.7.0_07\bin\javac.exe

C:\Users\Zachary Claret-Scott\AppData\Local\Android\android-sdk\platforms\android-16\android.jar

The Additional Libraries folder is if you want to specify an extra folder for it to look for them. It already looks in the program files for them and that’s were we will place them. I will cover libraries in other posts but they allow you to do more stuff like tracking the usages of an app, or talk to ftp.

In the next Guide i will Talk about how to make a application. (Here)

Written by Zachary.

 
Read more...

from keleven

Hopefully this blog will chart my motorbike rides on my trusty Royal Enfield 350 Classic.

I might add other things that I find interesting, then I might not.

 
Read more...

from Zachary Claret-Scott

#music #spotify #lastfm #data

I’ve been tracking my music listening habits for decades on last.fm ever since my dad introduced me to the platform – it’s great to see what music I listened to overtime.

I used to use last.fm daily to find new music by exploring radios, in a time before streaming when ripping mp3s of disk (or online) was king it was the best way to find new music. Once Spotify took over I dumped my local music collection and exclusively listened to streamed music, I had my last.fm connected and mostly ignored it while it silently collected my data.

I’m not sure when last.fm changed but it’s a far throw from its glory days now and it’s hard to see really simple stats about my listening history without signing up for a pro membership. Recently I found an alternative which is exclusive to Spotify called YourSpotify. It is self hosted and pulls recent listening data in real time from the Spotify API but requires a data export from Spotify (which takes up to 30 days) for full historic listening data.

Cover Image

 
Read more...

from Zachary Claret-Scott

#services #selfhosted #homelab

I have wanted to host my own fediverse/activity pub compatible server for a while – however I felt running a full on Mastodon server was to heavy for my use case. And other options seemed to take a bit too much effort to host for my liking.

I had all but given up until I came across Write Freely which is a blog focused platform that just so happens to share posts via activity pub. Setting it up was super simple as a single docker container and it supports single user mode, or multi user mode with very basic permissions.

I have put it up on a spare domain which I can use as my federated username @prra.xyz because it is generic I can also use it as a social media post engine for all my company accounts.

Cover Image

 
Read more...

from Zachary Claret-Scott

#services #selfhosted #jobs #career #softwaredeveloper

I am due to start a new role next week which I am very excited for, but before I confirmed I had to go through the process of trying to find roles available in my industry and area. While sites like Indeed, and LinkedIn have vast amount of job postings I found them difficult to navigate and often out of date – or companies straight up don't post to them.

I have a list of local companies or companies in my ideal sector which I would like to work for, you could call this my list of dream jobs. It includes some interesting tech startups nearby, charities I like the mission off etc.. Most of these organisations have a careers page which I can visit to see any open roles, but it's hard work checking 15 or so job pages every few days to see if anything has opened up.

Thats where some self hosted software came into play, I setup my own instance of Change Detection and loaded in all of the companies I wanted to track. Now twice a day I get an email if any of them post new job listings, even if they don't post those roles to large job sites.

Cover Image

 
Read more...