I have an android app.I have a preference in my app which allows a user to enter his desired storage location for video recording it can be internal or external now the question is how can i determine if the user has entered the correct storage location path if he didnt enter the right path then how to show a toast and reset the path.
This is the preference
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This is the editext
Now if the user enters wrong path for example there are spaces in the path or the path is incorrect for video recording how can i check that
Without seeing some code it would be difficult to show you a way that would be easily integrated in to your app.
zalez said:
Without seeing some code it would be difficult to show you a way that would be easily integrated in to your app.
Click to expand...
Click to collapse
Yep, and when is it the "right" path?
The right oath is where a video recording file can be created it can be internal or external
If you've got a file object, you could check these:
Code:
boolean isFile = myFile.isFile();
boolean isDirectory = myFile.isDirectory();
I would implement a chooser instead of relying on your end user to type the correct path.
Take a look at this:
http://www.codeproject.com/Articles/547636/Android-Ready-to-use-simple-directory-chooser-dial
zalez said:
I would implement a chooser instead of relying on your end user to type the correct path.
Take a look at this:
http://www.codeproject.com/Articles/547636/Android-Ready-to-use-simple-directory-chooser-dial
Click to expand...
Click to collapse
Oh, you're right. Much more fool proof. :good:
Related
I'm having trouble populating my Spinner, so I'm using the tutorial on Google website,
http://developer.android.com/resources/tutorials/views/hello-spinner.html
When I get to part 4, and I put the code in the the java folder, a bunch of red X's pop up, giving me errors.
My questions is do I delete everything in the oncreate () .jave file and insert the code from Googles site? When I do it give me errors, this is what happens,
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I'm know my coding is wrong, can anybody point me in the right direction?
Hold your mouse over that first "Spinner" that is underlined....I bet you get a hint
You're missing a closing '}' tag at the end, it looks like your missing a spinner called "spinner" in your main.xml and it looks like you've not imported 'Spinner' or 'ArrayAdapter'.
I do have a Spinner in my main.xl, I don't have an arrayadapter though
Ok, I fixed 2 parts of the Spinner issue in the first error line,
I imported a Spinner like Root said, than the second error was it was looking for:
findViewById(R.id.spinner);
Than I realize my spinner is not called 'spinner', it was 'spinner1", so I put the 1 on and the error when away.
Now my next issue is the arrary adapter. I know I don't have one in my main.xml, but based on how far im in the tutorial I havent gotten to the part yet which is #5.
EDIT: It's telling me to "Now create a nested class that implements AdapterView.OnItemSelectedListener. This will provide a callback method that will notify your application when an item has been selected from the Spinner."
Where do I implement that?
Bump, please!
Hello everyone, I bring you this topic knowing that our G2s have some sort of crippled multi-user functionality.
But I was used to use the full multi-user support on my Galaxy Note since 4.2.2 (or any other Android with 4.2.2) which differs from LGs by a mile.
LGs implementation is limited to show only the apps you allow without means of changing wallpaper, pulling down the notification shade, etc. Android 4.2.2 can handle more than what LG gave us, like having a totally new and independent full session, including Sync accounts and apps which I found very convenient.
However when I tried the procedure described here it errors out for some reason with a "couldn't create user" error.
But when you get into the System Settings you get to see the new option "Users and Restrictions"
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
If you go there you'll see:
If you click Add User:
If you click OK:
Obviously that's because of the error I got inside Terminal. I also disabled LG's Guest Mode in case it had something to do with it but it was a no go.
I'll try some other methods and keep you posted. Any ideas are welcome.
Cheers!
this is neat, @Rayan are you already has the fix?
Nope, unfortunately I have not found a solution yet.
I have tried all methods available but no solution yet.
Sent from my LG-D801 using Tapatalk
Hey,
Apologies if I make you unable to unsee what I am about to show you:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
When I noticed this, it really bugged me: specifically how the dot of the 'i' is joined to the top of the 'f'. What was more annoying is that if the text was bold, ligature was removed.
I set out to root my phone and change the system font to something better. However, do not be fooled like me! Changing the system font is not an easy decision and even if you do change it, for some reason the lockscreen's time colon gets replaced by a square character. Link to lockscreen colon character issue screenshot
In the end, I edited the roboto-regular font using FontForge for mac and removed the 'fi' ligature. Then using a rooted file explorer, I just replaced the originally with the updated one.
It initially crashes the phone, but upon restart: you can now rejoice in writing all those 'fi' words.
Please see my github for a README and the modified roboto-regular.ttf.
Cheers!
edited:
I had also removed 'fl', 'ffi', 'ffl' glyph's too.
Actually, that's a ffi ligature, not a fi one.
nowster said:
Actually, that's a ffi ligature, not a fi one.
Click to expand...
Click to collapse
Ah! So true! I totally forgot I removed the similar ones too. Thanks. I have edited the post above and github to reflect the other glyphs removed. ('fi', 'fl', 'ffi', 'ffl')
Hello guys,
I think many of you know these advanced options of the fire tv stick.
For my current project I need to be able to query the displayed video information (especially the color standard) via commandline or some libary. I have almost no experience with android development, but if someone has a solution I should be able to figure the rest out myself.
I suppose I would have to root the fire tv stick. After that I have no idea what to do. Since the information can be displayed via the advanced options, I assume that there must be a way to query them via command line or a libary.
Maybe someone with more experience in this field has an idea
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
@chikko80
https://developer.amazon.com/docs/fire-tv/developer-tools.html#snapshot
>adb shell "dumpsys activity service com.amazon.ssm/.OverlayService|grep colorstandard"
[com.amazon.ssm.multimedia.video.colorstandard]: [BT709_8_SDR]
@Kramar111 Thats exactly what i need! Thank you!
I didn't even know that you can do this kind of stuff with adb.. Buts its really cool this way that you can ask remote via adb and run the scripts on another device
@Kramar111
I tested it today, and yeah basically its doing what i need, but the problem is, that i don't want to have open the Advanced Options all the time. The idea was to read out the color standard in the background without limiting the tv experience. So the advanced options menu should not be visible.
Do you have another idea?
@chikko80
No
Hey, I'm new to the forums. Decided to get the Nothing Phone 1. Seems ok atm but was a bit glitchy when first set up.
Just wanted to see if anyone could have a quick look through the app list to see if all looks ok.
Also I have some permissions which I'm unsure about for example on the shell app:
Reroute outgoing calls
android.permission.ACCEPT_HANDOVER
see and control calls through the system. (I noted this one because of the period at the end)
android.permission.REQUEST_OBSERVE_COMPANION_DEVICE_PRESENCE
android.permission.REQUEST_COMPANION_PROFILE_WATCH
download files without notification
android.permission.READ_NEARBY_STREAMING_POLICY
Edit: for some reason I can't attach the screenshots
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Edit: images resized
Edit2: I did resize the images smaller but showing as the original size again. Apologies
Nothing02 said:
Apologies for the large images. If anyone is able to edit these please?
Click to expand...
Click to collapse
What's your point man ? Nobody can't edit all yours apks .
What I've seen , you disabled randomly lot of important system apk so I think you may reset your phone , take a breath , learn some stuff on Google and after that you can setup again your phone , paid more attention on system apks .
No, I meant edit the image size, it's ok I'll work it out.
I've disabled the things I don't need for now. These permissions were there before I changed any settings. I did reset the phone after purchasing.
The most concerning me are reroute outgoing calls & download files without notification.
I haven't changed any settings in relation to this.
The reroute call permission also found in phone services