In Flutter one can check available connected devices using flutter devices. When running one can do flutter run -d <device-name>. It turns out some devices have very long names, with numbers and letters combined. Is there a way to rename a connected device just for the current session?
There are few ways you can achieve this
Execute flutter run and it will display all devices in a numbered list. So all you have to do is enter a number and hit enter again
If your device is iohone xd45rchdjb...gjcf
You can execute flutter run -d iphone6.. you can ignore the ID part. Also you can pass only the ID and not pass the name. That will also work
Related
I am looking for a way or package that can help me to capture multiple screen.
I have been through some packages that supports single fullscreen screenshot but I want to capture all the screens connected.
Unfortunately, Flutter does not provide an API for capturing screenshots of multiple screens that are connected to the same device. To capture screenshots of multiple screens, you would need to use an operating system-level tool or an external screen capture software.
Unfortunately you cant do it in flutter you have to write native code to the platform you target, because flutter only can give access to app level not system level
i guess you could use
https://github.com/leanflutter/keypress_simulator
to simulate Windows key + Print Screen key
Specifically for flutter apps,
One way is to get the device id and then for each analytics call check if it is a test device or not. Is there a better way or function to do this at app level?
What if my test devices keep on changing all the time?
I think I found a way to make that happen. Of course, you have to do the query about which device it is, depending on how you recognize a test device. Probably via packages like "imei_plugin". We recognize this by the APi the app is connected to.
If you know that the device is a test device, then all you have to do is the following:
FirebaseAnalytics.instance.setAnalyticsCollectionEnabled(false);
or true if you want to enable the collection of data.
I am not sure it is possible in ionic or not. What i want to do is create an app that can record user calls. so app must be activate when user make or get a call.
can anyone tell me if it is possible, how to do this?
Beware this won't be an easy task but "never give up, never surrender". You'll want to use a variation of techniques first off this isn't an Ionic thing as much as it is a PhoneGap thing - ionic runs on phonegap.
Your workflow will look something like this:
User opens your app sees a list of contacts
(the formatted names of contacts are different for android & ios so be prepared to test for this.
http://ngcordova.com/docs/plugins/contacts/)
Contacts are displayed in ion-list user select one and phone's dialer launches (use href=tel:xxxxx)
From there you're going to want to trigger the audio capture plugin's API
https://github.com/apache/cordova-plugin-media-capture
To add the plugin to your project:
cordova plugin add cordova-plugin-media-capture
While it doesn't directly say it can record in call conversations it should still work.
It can definitely be done the storage space is also of concern, you'll have to set something in place to tell the user how many seconds/minutes they have the capacity to store.
That should get you started there will certainly be unforeseen nuances.
Good luck.
We can record calls with cordova-media-plugin plugin in android.
First install the media Plugin by executing the following command
cordova plugin add cordova-plugin-media
Then goto the Plugin folder and traverse into the following file “plugins\cordova-plugin-media\src\android\AudioPlayer.java” . Here in the startRecording function we have line
this.recorder.setAudioSource(MediaRecorder.AudioSource.MIC); line number is 154
Change it to this.recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL);
We can replace MIC with any audio source in the following link. for example VOICE_COMMUNICATION,VOICE_DOWNLINK,VOICE_RECOGNITION etc
https://developer.android.com/reference/android/media/MediaRecorder.AudioSource.html
I connected my iPhone 5s running iOS 8.3 to my mac which runs my script using "Automation Instrument" and I want to capture screenshots of UI during this process on my iPhone 5s and save them to my mac's disk at a particular location.
1.printing "target.logElementTree();" displays my elements but what I want is "Screenshot of device in realtime during run of automated script" so can we save the screenshot using this approach ????
2.I don't have the code of the app except the .ipa
Thanks for your time and efforts in going through or answering this question
With this command I am able to view the screenshot in trace log during automation.
UIATarget.localTarget().captureScreenWithName("Prabhu Konchada");
All we need to do is export these results to find them in the your desired folder !!!!
I'm working on a windows app to make diagnostics of android smartphone.
This app is performing adb commands to get many system informations.
For many months, I'm working on study logcat to make apps statistics and count :
Crashes by app
Number of start by app (or last starting date)
I'm using the command below
adb logcat -d -b events -v time
Thanks to this, I can extract and analyse occurences of "am_crash" lines and "am_activity_resume" to get some informations, but it seems that the output of my command is limited in the time. I'd like to get informations for many months, or if possible for all the lifetime of the smartphone connected.
Could someone help me to find a workaround ?
logcat buffers are circular and have predetermined size. You can change the size but the change won't be persistent. There is no "workaround" for the stock Android. You would need a custom logging app which would save all the events you want to a separate log.