Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
For the purpose of testing, I would like to mock Cloud Storage because it slows tests down.
Is there Google Cloud Storage emulator?
Google has an in-memory emulator you can use (majority of core functions are implemented).
You need com.google.cloud:google-cloud-nio on your test classpath (:0.25.0-alpha currently). Then you can use/inject Storage interface implemented by the in-memory LocalStorageHelper test-helper service.
Example usage:
import com.google.cloud.storage.Storage;
import com.google.cloud.storage.contrib.nio.testing.LocalStorageHelper;
#Test
public void exampleInMemoryGoogleStorageTest() {
Storage storage = LocalStorageHelper.getOptions().getService();
final String blobPath = "test/path/foo.txt";
final String testBucketName = "test-bucket";
BlobInfo blobInfo = BlobInfo.newBuilder(
BlobId.of(testBucketName, blobPath)
).build();
storage.create(blobInfo, "randomContent".getBytes(StandardCharsets.UTF_8));
Iterable<Blob> allBlobsIter = storage.list(testBucketName).getValues();
// expect to find the blob we saved when iterating over bucket blobs
assertTrue(
StreamSupport.stream(allBlobsIter.spliterator(), false)
.map(BlobInfo::getName)
.anyMatch(blobPath::equals)
);
}
There isn't an official emulator provided by Google for the time being.
I'm currently using project Minio (https://www.minio.io/) for mocking Google Storage's behavior in development (Minio uses the filesystem as storage backend and provides compatibility with S3 apiV2, which is compatible with Google Storage).
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I am building an online shop app using Flutter, and I am wondering what is the best way to persist data after the user exit the app or when the app is killed. The data I want to persist is the cart information, which contains a complex structure.
It worth mentioning that I'm using Provider for state management.
I was thinking of the below approaches:
Creating a local file and read/write info from/to it.
Shared preferences
The new Flutter feature with RestorationMixin, (I don't know how to deal with a complex structure in addition to using Provider).
SharedPreferenceis the possible solution for you.
you can convert your object into json String by using jsonEncode(object) and save it in the sharedpreference and when you need back the object from json string you can use jsonDecode(string) to get your object back.
If you want to save the data offline. I'd suggest using sqflite. SQFlite is an sql database that will be saved locally on the device. It's easy to use and is persistant as you requested.
If you want to save data online in the cloud somewhere then I'd advice looking into Firebase (Google database, works really well with providers) or mongodart (MongoDB database)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Is an application server required in order to develop programs for Google Home devices, or can development be done in a way that does not require me to host my own code?
OAuth2.0 is only needed if the Google Home device/user needs to be linked to an external account. (For example if you need complicated setup and load that off to an own Android App or if you need to access third party services that require authorization on behalf of the Google Home user and impersonating as that user)
An action that runs only on the device and built with Dialogflow or the Actions SDK can be deployed on Google's Firebase Cloud without the need for any own services.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have a Java application and I want to transcribe, not a file, but a LIVE stream(rtmp:// or m3u8) that is being served by Wowza.
Is that possible?
Thank you
PS: I'm willing to pay any of those cloud services that offer audio transcription, but the ones I've seen don't seem to have this functionality.
There are a few options!
Google has one that is in beta, but seems very promising! Their documentation is a little light at this point but here is a good github example. https://github.com/GoogleCloudPlatform/java-docs-samples/tree/master/speech
and their documention on it:
https://cloud.google.com/java/
The other option is IBM's Bluemix:
https://github.com/watson-developer-cloud/text-to-speech-java
Best of luck! If you end up trying out both I would love to have an update on which one you felt worked best!
EDIT Another useful link: Stream audio from mic to IBM Watson SpeechToText Web service using Java SDK while it doesn't interface with Wowza, this might be a good place to start for IBM.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am trying to upload a video file to Amazon S3.
Please send an example using Swift
Thanks
Try to download this framework: AFAmazonS3Manager
Then add a bridge header to your code this way
Now just use this framework from Swift, it'll be very simple with Xcode auto-complete, something like this:
var s3Manager : AFAmazonS3Manager = AFAmazonS3Manager(
initWithAccessKeyID: "your access key", secret: "your secret key");
s3Manager.requestSerializer.region = AFAmazonS3USWest1Region;
s3Manager.requestSerializer.bucket = "my-bucket-name";
s3Manager.postObjectWithFile(..read the docs..);
It's all here:
Including the way to install the SDK (there are links to all the requirements)
http://docs.aws.amazon.com/mobile/sdkforios/developerguide/s3transfermanager.html
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
We're using Flurry to track events made in our iOS app (similar to Google Analytics, Mixpanel). It's great, but there's no way to get the raw dump of all the events that have been fired - all these analytics services will aggregate them for you.
We need the raw data to do custom queries and correlate the events with server-side information. Ideally, it would be a hosted data logging system where we post events from the iOS side and then download logs from the server. Any recommendations?
Localytics also supports full-data exports of session-level data for enterprise customers. (Full disclosure- I work there).
We used Flurry until we had the same requirements as you. We've found the Google Analytics Data Export API serves our needs well.