4D Blog

Home Product 4D for Mobile : Get Mobile Users’ Cookies

4D for Mobile : Get Mobile Users’ Cookies

October 18, 2022

Product

As you probably know, scalable sessions have been available since 4D v18 R6. They’re a web session type that is able to handle several processes in preemptive mode. This means they can handle several user-agent requests simultaneously and share data between these processes.

Well, 4D v19 R7 greatly enhances this feature and makes it available to 4D for Mobile.

What does it mean for your mobile app?

From now on, your app users can be identified using the same session for web or mobile, a very convenient way to keep users’ data and offer an optimized user experience. This feature is promising as it’s the first step toward bridging the gap between (mobile) web and native apps and getting the best of both worlds in a single 4D for Mobile application.

How does it work

Technically speaking, when user sessions are enabled, web clients can reuse the same server context from one request to another. You can now get a user session for a user that uses a mobile app from their mobile device.

You can get the Session object from :

  • On Mobile App Authentication database method: when the user authenticates
  • On Mobile App Action database method: when the user launches an action from his mobile app
  • webareas: when the user opens a webarea from his mobile app

 

For example, here is session data that you can get from the On Mobile App Authentication database method :

And here is what you can get from a web area using 4D tags and the Session object in a mobile app :

blank

 

Where To Go From Here?

You can already use more web areas in your applications, which gives you more freedom in creating your application. For instance, with our last preset open URL action, you have the convenience of using the powerful 4D backend with native mobile abilities and the advantage of leveraging the fast and consistent UI development offered by 4D tags or whichever framework you choose.

Combining this session management feature with open URL action gives you more than front-end flexibility; this feature opens the doors to real-time data updates on your mobile; think about stock symbols and their values, temperature changes, employees and their geolocation, or even their online/offline status — just to name a few scenarios when data that arrives is updated frequently.

Let us know your thoughts on the 4D forum, and check out the documentation for more details!

Discuss

Tags 4D for Android, 4D for iOS, Go mobile, Mobility, v19 R7

Latest related posts

  • June 16, 2025

    Generate, share and use web sessions One-Time Passcodes (OTP)

  • May 20, 2025

    Automatic Refresh of OEM Build Licenses

  • May 16, 2025

    New class to handle incoming TCP connections

David Azancot
David Azancot
• 4D for iOS Product Owner •David Azancot joined the 4D Product team as a Product Owner in 2017. He's in charge of writing the user stories and translating them into functional specifications. His role also includes making sure that feature implementations meet customers' needs.David graduated with an MBA in Marketing, Internet and Mobility from the Leonard De Vinci Institute and began his career in 2011 with a mobile start-up company, later acquired by Madvertise (a mobile marketing group). Passionate about mobile interfaces, he was the natural choice to develop interactive mobile ad formats for the group in 2015. In parallel, David has been developing his own iOS and Android applications since 2012.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • 4D View Pro
  • 4D Write Pro
  • 4D for Mobile
  • Email
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • Qodly Studio
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Listbox Logs Mail Microsoft 365 Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Listbox Logs Mail Microsoft 365 Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor
Subscribe to 4D Newsletter

© 2025 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

Contact us

Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!

* Your privacy is very important to us. Please click here to view our Policy