roam-ai / roam-flutter Goto Github PK
View Code? Open in Web Editor NEWFlutter Location SDK. High accuracy and battery efficient location SDK for iOS and Android by Roam.ai
Home Page: https://roam.ai
License: MIT License
Flutter Location SDK. High accuracy and battery efficient location SDK for iOS and Android by Roam.ai
Home Page: https://roam.ai
License: MIT License
Can yall guys make a better example. That's be hard to read and i'm cannot understand with this examples
I got this message when I tried to run the initialize on Android:
Caught unhandled_exception: MissingPluginException(No implementation found for method initialize on channel roam_flutter)
I also got this message on the example app.
With sound null safety in stable we should migrate the package to support it. Users using in Flutter stable will get this dart analysis warning.
The library 'package:roam_flutter/roam_flutter.dart' is legacy, and should not be imported into a null safe library.
Try migrating the imported library.
Hello @jothipriyadharshanr
I have flow all the steps adding SDK to flutter. and it working but when I startTracking there are not methods available to track the user's current location. (if there are I did not find them on docs.).
Can you please let me know if there are any methods or streams available for continuous user tracking?
Thanks in advance.
Hi,
I am trying this out in a flutter app on iOS.
The following code, never returns.
await Roam.initialize(publishKey: Constants.roamId).then((value) {
debugPrint('[[MJ]] ==> isInitialized $value');
}).catchError((e) {
debugPrint('isInitialized error $e');
});
Neither does this:
await Roam.initialize(publishKey: Constants.roamId);
If I do not await the initialization, and go ahead with tracking and subscription -- app crashes on iOS.
I tried posting on the Support forums -- but they are having trouble sending a validation key to my email for the past 2 days -- so I can not post there!
Any help will be appreciated.
I'm just testing your plugin on an Android device and when I call Roam.initialize()
the console prints:
E/GS402 (15207): Either publishable_key or package_name is wrong
W/Gralloc3(15207): mapper 3.x is not supported
I/gralloc (15207): Arm Module v1.0
The publishable_key
isn't wrong because is provided by the Dashboard and I just copy and paste it.
The app I created is very simple, is pretty easy to reproduce the error.
This is my code:
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:roam_flutter/roam_flutter.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key});
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
Future<void> init() async {
Roam.initialize(publishKey: "PUBLISH_KEY");
await Roam.getUser(
userId: "USER_ID",
callBack: ({user}) {
print(user);
});
final startTrackingResult = await Roam.startTracking(
trackingMode: "active",
);
print("startTrackingResult: $startTrackingResult");
}
@override
void initState() {
init();
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: const Text("Roam"),
),
);
}
}
PS. About the Android configuration, I've added all the permissions in the AndroidManifest.xml
file (as is shown in the guidelines), the targetSdkVersion
is 32
, and the compileSdkVersion
is 32
as well.
The plugin version is roam_flutter: ^0.1.5
.
While I'm testing Roam.getUser
on android in debug mode, everything is fine. But, when I built the app in the release mode, some exceptions started to be thrown.
I edited the RoamFlutterPlugin.java
to return the error of Roam.getUser
for the flutter side using MethodChannel.Result as follow:
@Override
public void onFailure(RoamError roamError) {
result.error(
"roam_" + roamError.getCode(),
roamError.getMessage(),
null
);
}
So I saw on my logs that roamError.getCode()
returns "GS402" and roamError.getMessage()
returns JSON response error
. But, I couldn't discover anything beyond that.
Is there anything else that I can do?
I have used roam's roam.startTracking()
to start tracking. I want to know how to subscribe to this location and show the location data in another flutter application. I have tried roam.subscribeUserLocation("userId"), but it returns a bool.
How can I achieve this task of getting the location from one device and showing geo coordinates of that user, on another device in Flutter SDK?
Test issue to connect with JIRA service desk
Hi,
When I call Roam.startTracking(trackingMode: "active")
is printed the error Location services error or permissions not granted
, but as a response, I receive true
. (but the tracking doesn't work)
Before tracking the user, I successfully call Roam.initialize()
and Roam.getUser()
. (I get the user).
Am I doing something wrong?
I receive this error on iOS
, as you can see by the attached pictures I configured the platform as shown.
Furthermore, the app has all the permissions to access the location (also locationAlways
), and the localization is turned on
.
PS. I'm using the roam_flutter: ^0.1.5
version and the global platform of the project (in the Podfile
) is 14
as it is in your example app.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.