How to add live location tracking in Flutter even app is terminated? - android

I want to implement Google Map live location tracking to my application. For example I have two users, one is a carrier and one is a customer. When customer want to see where is my cargo, my application will show carrier's location to customer even carrier's application closed. How can I make this logic? I already tried packages like Workmanager. My application will work IOS and Android both. Do I have to write native code for both? If so, I maybe can write for Android but I dont know IOS side. How popular applications like Whatsapp or Snapchat do that? Is it possible to do this in Flutter?

You should have a look on the following package: https://pub.dev/packages/geolocator. It implemented your use-case by allowing background fetching of the position. It even handles the Foreground service on Android as far as I know.

Related

Making voice calls from android and ios to any phone number

I am working on a project that connects two user using opentok(tokbox now). It allows the users to be able to chat, do voice/video calls. But now we want that some admin can call another number even when they don't have my app installed.I want the admins to be able to call someone directly from the app and they shouldn't use their own phone.
Some example for this type of working is textnow, 2nd line, and much more apps like this.
So what i am asking here is that which third party services i can use in order to achieve this task.

find users nearby cordova like facebook nearby

I am working on an android application which can find users nearby. I need help in design that application.
Imagine you are in the street, you connect to the app and will see a gps view
with all other people that have the same app, so i need to see them in my map.
How can i archive this in cordova app?
I am thinking about:
When I start my application, I use API to find my location.
I send that location to my server.
server returns a list of other users nearby.
That can be possible but for that user need to keep open or put app in background for get above task and it will drained all battery.
I need to get functionality that Facebook user for nearby user find. Have you any one help me on this to archive this ?
To be very frank i am confused to what approach i need to be use.
Please guide me.

How to embed a mobile application in other application?

I'm building a mobile application for a company and I need to add in the company mobile application a button that go directly in a different application .
Anyone know a solution to embed 1 mobile app in other app???
Inside the code of your button, you can launch an explicit/implicit intent that can launch another application (authored by someone else). The application won't be running inside your application, but to the user, he/she will have the illusion that the other application running is part of your own. This is assuming of course that the second application is already installed on the user's phone. If it isn't installed, your button can just fetch the relevant application's installation page from Google Play for the user to install the app, and then run the application once installed.
In your application, you can also provide a content provider to keep your data. A content provider provider exposes a set of public CRUD interfaces to your data for other applications to access. This is how the contacts database is shared on Android for instance between many different applications, even non-Google applications.
Basically, you first need start at the beginning and educate yourself on the fundamentals of Android. If you start reading about intents and content providers, those constructs may not make any sense to you until you first learn about Activities, the Activity's lifecycle, stacks/tasks, and the way security generally works on Android. You may even want to look on Youtube, there are some very good highly rated Google I/O videos on there that talk about the fundamental concepts of Android.

How to get the content of running applications in Android?

I want to make a application that has similar function as Android Beam, but the question is how to get the content of those running apps. For example, if the web browser, Youtube and Google Map is running, how do I get the web address, the video link and the location? Thank You.
You will only be able to get information like this if the running application provides it through some sort of global access method, e.g. a service or content provider. It is highly unlikely that any application will do this as it has some serious security/privacy implications.
You will only be able to develop such an application by writing a system application aka you'll need root permissions.
The best approach in my opinion will be that you look through the Android Beam source code, to see how it's done there. The official API will not help you here. Since the functions used in such system applications is not in the API there is no guarantee that it will work with future versions of Android, so be careful.
I doubt that this will be an easy task. If it's really similar to Android Beam, try building your code on top of the official source.
For Android Beam, the app itself is sharing the data. The NFC background service gets the data to be shared via Android Beam delivered to it by the app's Activities. An Activity either calls at the beginning (e.g. in onResume()) the method NfcAdapter.setNdefPushMessage() to share a static piece of data or it calls NfcAdapter.setNdefPushMessageCallback() to register a callback that will create the data to be shared at the moment Android Beam becomes active.
A number of the standard Android and Google apps have been extended to support this in Android 4.0 ICS, for example Browser, Gmail, Maps, People and Youtube. Apps that have no support for this, will by default share a link to the download page of that app in the Google Play store.

Is it possible to receive notifications when a contact is added on the iOS and Android platforms?

Question says it all. Looking for a way for a custom app to be able to keep track within minutes of when a contact has been added to the built in contacts database on both of these platforms. For example, if I get an email on my iPhone, and add the sender to my contacts, I'd like for the custom app to be able to know that within a minute at most.
Are there hooks for this? Naturally it would require the user authorizing the custom app to have access to this information.
There aren't any hooks for this in iOS. You can access the address book, but only when your application is running.

Categories

Resources