samsung-mobile

make multi language android application

痞子三分冷 提交于 2019-12-30 06:51:41
问题 I created multi language (English, Russian, Uzbek) app. I put 4 string resoureses in 4 folders (values, values-en, values-ru, values-uz) as docs. When I change app language updates resourses configuration in App Controller like below: Settings.LANGUAGE = prefs.getString(User.LANG, Settings.RUSSIAN); Locale locale = new Locale(Settings.LANGUAGE); Locale.setDefault(locale); Configuration configuration = new Configuration(); configuration.locale = locale; getBaseContext().getResources()

Open ServiceMode menu programmatically in Android

爱⌒轻易说出口 提交于 2019-12-30 04:39:07
问题 How to open the Android ServiceMode menu programmatically on Samsung Phones ? Manually, I can do it by dialing the ussd code *#0011#. 回答1: This was a challenge and I've been a few hours looking for a solution. But i am afraid i don't have good news. 1. First attemp, Intent.ACTION_DIAL Is true that in the beginning, it was possible to directly call USSD codes from an app (using the intent Intent.ACTION_DIAL), and even from a website, just using the "tel:" schema. That opens the dialer, an puts

Turn ON/OFF Camera LED/flash light in Samsung Galaxy Ace 2.2.1 & Galaxy Tab

孤者浪人 提交于 2019-12-28 02:44:14
问题 I am turning ON Camera LED light using FLASH_MODE_ON . Samsung Galaxy Ace have only three flash modes : on, off and auto. FLASH_MODE_TORCH not working in Samsung Galaxy Tab & Samsung Galaxy Ace 2.2.1 Here is my code how i am turning ON my Camera LED Camera cam; cam = Camera.open(); Parameters params = cam.getParameters(); params.setFlashMode(Parameters.FLASH_MODE_ON); cam.setParameters(params); cam.startPreview(); cam.autoFocus(new AutoFocusCallback() { public void onAutoFocus(boolean success

Phonegap app performance on Nexsus vs Samsung

戏子无情 提交于 2019-12-25 04:49:14
问题 I'm developing a mobile game for kids in HTML5 using Construct 2 as game engine and Phonegap build to compile the game. I test my game on Nexus 4, 5, and 9 devices, on HTC and on Samsung Galaxy S4 and Samsung Note 3. On the Nexuses and on the HTC my game runs well, but on the Samsung devices my game stuck. What can be difference between the devices? 回答1: Short Answer: Many differences. Here are some helpful articles. Android Fragmentation Visualized http://opensignal.com/reports/2014/android

Basic sample program of Spen SDK throws Run time exception

感情迁移 提交于 2019-12-25 04:22:22
问题 I am writing a basic android app involving Spen SDK. My XML file is:- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin" tools

USB connection issues

╄→尐↘猪︶ㄣ 提交于 2019-12-25 02:18:29
问题 I am trying to run my android app in my samsung device GT-S6012. I use Windows 7 Home Basic. The driver is installed properly. As soon as I connect the mobile using USB cable, for some seconds "adb devices" shows my phone. But then I get a message USB connection error, windows is unable to detect the device and USB is malfunctioning. I tried uninstalling/re-installing driver, but no luck. I tried Google on this topic but nothing solved my issue.. Can Anyone let me know how can I fix it 回答1:

AccountManager only returning one account in extended activity

99封情书 提交于 2019-12-25 01:21:25
问题 I have a simple app which is an extended activity that registers a user's primary email account when accessing a specific NFC tag. Unfortunately, for some reason even though I can see several accounts provisioned on my Samsung device the code below only returns one, and not the full list. The one it returns appears to be the Samsung account ID and not the Google ID. Is this a simple case of user error or is there some other way to get to the Google ID? This code has been updated to reflect

“The package appears to be corrupt” while installing APK on Galaxy S7

自闭症网瘾萝莉.ら 提交于 2019-12-24 19:27:54
问题 I made an Android project on Android Studio. When I ran it on test Android device which was plugged to my system using a USB cable, it ran successfully. However, then I generated the APK and uploaded in Diawi website. When I tried to install this APK, I got following error: App not installed. The package appears to be corrupt. APK file however is not corrupt at all since when I installed it manually after copying it from build folder, it was successfully installed on the Galaxy S7. How to fix

How to request Do Not Disturb permission on Samsung S5 (SM-G800H)?

蓝咒 提交于 2019-12-24 18:53:00
问题 This is the usual way to request DND permission: Intent intent = new Intent(); intent.setAction("android.settings.NOTIFICATION_POLICY_ACCESS_SETTINGS"); startActivityForResult(intent, NOTIFICATION_REQUEST_CODE); However on (at least one) Samsung SM-G800H this throws ActivityNotFoundException . Apparently on that model they have something called 'Blocking Mode'. Anyone know the correct intent / how to handle on that model? See https://www.cnet.com/uk/how-to/where-to-find-do-not-disturb-mode-on

Android Studio not showing connected physical device

喜夏-厌秋 提交于 2019-12-24 15:53:41
问题 I am using the latest version of Android Studio(2.1.2) at the time of writing this post . The problem that I am experiencing is that the ADB instance used by Android Studio doesn't seem to be able to find my Galaxy Core Prime device (SM-G361F, stock Android version - 5.1.1). It can connect to an emulator just fine. What I had tried (most of these multiple times): enabling/disabling developer options enabling/disabling USB debugging revoking USB debugging authorization changing MTP to PTP and