2

I'm not good at English, so I'm sorry if there are any mistakes in the expression.

I want to Object detection application on Android.

Here is how the app works:

  1. Take some videos for which you want to perform object detection
  2. Select a video from the taken videos
  3. Detect specify object and get that coodinates

To develop avobe app,I have some videos for vertification.

Here is my question. Which folder should I put the vertification videos?

For now, I put the videos in raw folder.

But,I am creating an app assuming that the videos were taken with a camera. If so, should it be in the same place as if it were taken by the camera? and, which folder should the videos be placed in?

I'm new to android development. Could anyone give me some advice? Thank you.

y_ok
  • 55
  • 7
  • If you want to "simulate" a video that has been recorded by a user I would not include it into the app. Instead you can use Android Studio and upload the files manually to the app private directory select the folder where the app would save the recorded videos. https://stackoverflow.com/a/44089388/150978 – Robert Aug 14 '22 at 11:16
  • @Robert Thanks you very much for advice. I created a new ”Movies" folder and manually uploaded the videos to the folder(data/data/[package_name]/Movies/) as advised.Then I checked picture app on emulator,the uploaded videos aren't displayed. is it correct? Am I doing something wrong?? – y_ok Aug 14 '22 at 12:10
  • The picture app can of course not access private data of your app. The main question is where does your app stores the recorded videos for object detection? There you should also place the demo videos for testing. I was assuming you store them in the app-private data folder. – Robert Aug 14 '22 at 12:21
  • @Robert I see.I'm new to android, so I found out that I don't understand android folders. Thank you for your advice. I learn a little about android folders. – y_ok Aug 14 '22 at 12:40

1 Answers1

1

As you are new to Android development I am going to explain in detail.

First you have the videos for verification. You should put those videos in raw folder. But what if the size of those videos is too large? That means the size of your APK will also increase which is not a good thing if you want to upload your app on google play store. In this case, you can store those videos on your own server, and when user installs your app download those videos from the server.

Now let's come to the second question: Where should I put the videos taken with the camera?

You can put these videos in any of the following paths.

context.getFilesDir();

or

context.getExternalFilesDir(null);

These paths are on which you can store the camera-shooted videos and do any processing on them. If you want to know the difference between these two paths that's another topic. You can learn about them here.

Ali Asjad
  • 1,489
  • 1
  • 10
  • 11