android - Locate Bluetooth Inbox -


our app needs grab files bluetooth inbox after pushed external hardware device. there way programmatically find bluetooth folder location? on galaxy it's /mnt/sdcard/bluetooth, , on desire seems /mnt/sdcard/downloads/bluetooth.

thanks!

as far can tell, there's no simple , easy way via apis (although there should be!)

two solutions work (depending on usage context; first 1 seems better):

  1. on start-up, app checks if there's sharedpreference (e.g.) "bluetoothlocation". if doesn't find it, app searches either (a) fs or (b) fs rooted @ /mnt/ (probably (b) better) until finds file such that:

    • the name.equals("bluetooth"), , isdirectory().

then saves path, , there go. alternatively (depending on context) could,

  1. the first time external device connects, sends file long, hard-coded filename (e.g. greoermmvemoper190erjvw0j9e2.txt). app searches through fs until finds file shared, hard-coded name, , saves location.

these both far perfect, , viability depends on context. thought i'd throw out there. hope helps.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -