Is it possible to use android phone as a hotspot from my router? Please read details :3? [duplicate]

This question already has an answer here:

  • Can we use an Android phone as a Wi-Fi repeater? 6 answers

I got galaxy s2. I know the phone can share its own cellular internet. What I want to do is to share the wifi routers internet again via wifi through my android phone. I live in a 3 story house and the router is on the 1st floor Im on the 3rd, so I want to connect to the internet on the 2nd floor on my phone and share it there so I can connect from my laptop on the 3rd floor :3

Android MVP, Dagger, Memory Leaks

I am looking at code from this repository https://github.com/frogermcs/GithubClient/tree/1bf53a2a36c8a85435e877847b987395e482ab4a specifically SplashActivity.java SplashActivity.java and SplashActivityPresenter.java. I wanted to clarify some things around memory leaks to make sure I understand them here. Thanks

  1. If the user rotates the screen while the username is being fetched we are leaking the activity instance being referenced inside the observer’s callbacks since the activity is destroyed.
  2. If the user rotates the screen without an in-progress fetch, the activity instance is not leaked.
  3. In order to fix this leak(1), we need to store the subscription and unsubscribe it in presenter.onDestroy() (called from SplashActivity onDestroy()).
  4. Someone told me that doing (3) is not enough, and that inside onDestroy() we must also set the activity instance to null. I disagree because unsubscribing the subscription cancels the request, preventing the callbacks(like onNext(User)) that reference the activity from being invoked.
  5. The presenter is not leaked on rotation because it is a member variable that gets destroyed with the activity.

Backup not listed to restore from on new Android device

I have 3 android devices synced to the same Google account:

  • OnePlus One running Lineage OS 15.1 (up to date, not currently rooted)
  • NVidia SHIELD Tablet K1
  • OnePlus 3T – new, in factory reset state

I am trying to move all of my apps and data from the One to the 3T. Google Drive on the One shows under “Backups” (text translated from Spanish w/best guesses from context, etc):

  • Backup from A0001 – today at 21:49
  • Backup from NVidia SHIELD Tablet K1 – today at 10:57

However, booting the 3T, setting up the SIM, Wifi, and copying Google account information over using “Set up my device”, entering account password, skipping “share my data” questions gets me eventually to the restore screen, which shows only the K1 backup to restore from.

How can I fully restore from my One to the 3T? I estimate reinstalling all of my apps (from 3 sources – Play store, F-Droid, and Humble Bundle) and getting data syncing working and synced for my personal data to take at least 5 hours, and would not include call data, chrome tabs, game saves, etc – so anything faster than that is fair game. I have set up ADB for my One and used it for file transfers a number of times, and can probably set it up for the 3T, so ADB is fair game.

Edit: currently open tabs on this issue (might save some time):

  • How to manually restore Call Log from adb backup on OnePlus One? (SMS already restored)
  • Why is my Android not restoring the app data from its Google Drive backup?
  • Restore apps from backup on Google Drive
  • https://android.gadgethacks.com/how-to/get-all-your-data-onto-your-new-android-phone-0183525/ (most useful from google search results page 1 for various searches

Do all Android phones come with these emergency features?

I have recently bought an ASUS Zenfone 4 Max (ASUS_X00HD) phone. It comes with several emergency calling “features” with seemingly no option to disable them. There is an emergency button on the power menu below the restart button (similar to this), that people who have the same phone say immediately dials the emergency services. People also say that – at least with phones in the same series – pressing the power button three times accidentally also makes an emergency call. Having to constantly watch out not to press the wrong button makes using the phone so stressful that I’ve decided that I will buy a new one. My question is: Is this a “feature” that all newer Android phones have? Is this something that is implemented in the common Android operating system, or is this just a feature that ASUS added to their phone(s)? Is there a way of knowing which phones do not have this? If you know of Android phones that do not have this, that would also be really helpful to know.

Программное изменение(инициализация) элемента ListView (Android)

Имеется ListView, содержащий массив имен, подгружаемый из XML файла. Единица ListView это элемент CheckedTextView.

При старте Activity происходит подключение к устройству, получение массива байт, эквивалентное массиву имен. Полученный массив содержит информацию о включенности того или иного имени, которое должно выражаться в наличии либо отсутствии галочки чекбокса.

Вопрос – как произвести инициализацию всего списка значениями включен/выключен(чекбокс установлен/снят)?

Мои попытки инициализировать значения:

for(int i = 0; i <= choiceModeList.getLastVisiblePosition() -                      choiceModeList.getFirstVisiblePosition(); i++) {      CheckedTextView chkd =       choiceModeList.getChildAt(i).findViewById(android.R.id.text1);      chkd.setChecked(data[i]); } 

В этом случае чекбоксы устанавливаются, но только для актуального вида (в случае прокрутки – значения пропадают).

Тогда я попробовал создать свой ArrayAdapter и переопределить метод getView

    //data - массив содержащий актуальное состояние чекбоксов для каждого элемента списка      public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {     CheckedTextView checkbox;     View tempView = convertView;      if(tempView == null) {         LayoutInflater inflater = context.getLayoutInflater();         tempView = inflater.inflate(android.R.layout.simple_list_item_multiple_choice, null, true);         checkbox = tempView.findViewById(android.R.id.text1);         CharSequence[] chars = names;         checkbox.setText(chars[position]);         tempView.setTag(checkbox);      } else {         checkbox = (CheckedTextView) tempView.getTag();     }      if(data != null) {         if (data[position] == 1) {             checkbox.setChecked(true);         } else {             checkbox.setChecked(false);         }     }     return tempView; } 

Мне кажется, что я упускаю что-то очевидное и важное. Возможно, я как-то не так гуглю этот вопрос. Если у вас есть совет, или ссылка на материал/статью на русском/английском языке, то я с огромной благодарностью приму вашу помощь! Заранее вам спасибо!

Can I use android tablet as a handsfree or headset bluetooth device profile ? Status in 2018

This question is a duplicate of this thread from 2011. I am asking because I suspect android may have been subject to an update or two since then.

My use case is

Old car with aux input

Tablet screwed into the dash

Tablet audio out into the car radio and wired microphone next to the rear view mirror into the tablet.

I want to get in my car and take a call, without taking my phone out of my pockets. I’ve been searching an hour, reading 25 page long forum threads, still no definitive answers and almost all threads are from 2012 or so.

With all the people screwing tablet into their car’s dash, there just has to be a way to do this right ?

I am not able to connect Android Auto (Sony AX 5000) with my Realme1 (8GB/128 GB)

I am trying to connect Android Auto in Sony AX-5000 with my Realme1 phone, unfortunatley it is showing me “device not supported”. I am able to connect android auto with other phones. Can somebody give me solution to resolve the issue. Is it permission related issue with ColorOS or something else? Many thanks!

Creating a letterbox screen for Android devices

I want that the screen looks the same on every Android device without distorting the sprites.

One player should not see more of the map than another player just because they have a bigger screen or different resolution on their device.

I use (1334, 750) as my virtual resolution and only landscape mode is supported. But at the moment, you can see more of the map on top and on the bottom if you have a device with different aspect ratio.

How would I create a letterbox on top and on the bottom so that the visible game window keeps the same aspect ratio and portion of the game world visible on every device?

Do I need to modify my 2D camera when I create a letterbox screen?

At the moment it looks like this:

Android emulator

But it should look like this so that everyone can see the same map on the screen:

Letterboxed

 public class Game1 : Game     {         GraphicsDeviceManager graphics;         SpriteBatch spriteBatch;         Camera camera;         Vector2 vp, gameWorldSize = new Vector2(1334, 750);          float ScaleX, ScaleY, Scale;         Vector2 Newcameraposition;         Texture2D Background;                   public Game1()         {             graphics = new GraphicsDeviceManager(this);             Content.RootDirectory = "Content";             graphics.IsFullScreen = true;             graphics.SupportedOrientations = DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight;         }          protected override void Initialize()         {             base.Initialize();         }          protected override void LoadContent()         {             spriteBatch = new SpriteBatch(GraphicsDevice);             Background = Content.Load<Texture2D>("background");                           vp = new Vector2(GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height);             ScaleX = vp.X / gameWorldSize.X;             ScaleY = vp.Y / gameWorldSize.Y;             Scale = Math.Min(ScaleX, ScaleY);                            camera = new Camera(new Vector2(gameWorldSize.X / 2, gameWorldSize.Y / 2), Scale, vp);         }          protected override void Update(GameTime gameTime)         {             Newcameraposition = new Vector2(gameWorldSize.X / 2, gameWorldSize.Y / 2);             camera.Update(gameTime, Newcameraposition, Scale, vp);              base.Update(gameTime);         }          protected override void Draw(GameTime gameTime)         {             GraphicsDevice.Clear(Color.CornflowerBlue);              spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend, null, null, null, null, camera.GetMatrix());             spriteBatch.Draw(Background, new Rectangle((int)gameWorldSize.X / 2, (int)gameWorldSize.Y / 2, Background.Width, Background.Height), null, Color.White, 0, new Vector2(Background.Width / 2, Background.Height / 2), SpriteEffects.None, 0.0f);                      spriteBatch.End();                  base.Draw(gameTime);         }     } 

My 2D camera:

 public class Camera     {         public Vector2 PlayerPosition;         private Vector2 Viewport;         private float Scale;          public Camera(Vector2 playerposition, float scale, Vector2 viewport)         {             PlayerPosition = playerposition;             Scale = scale;             Viewport = viewport;         }          public void Update(GameTime gameTime, Vector2 playerposition, float scale, Vector2 viewport)         {             PlayerPosition = playerposition;             Scale = scale;             Viewport = viewport;         }          public Matrix GetMatrix()         {             return Matrix.CreateTranslation(new Vector3(-PlayerPosition.X, -PlayerPosition.Y, 0))          * Matrix.CreateScale(Scale, Scale, 1)          * Matrix.CreateTranslation(Viewport.X / 2, Viewport.Y / 2, 0);         }     } 

Android Emulator problem on Turkish Ubuntu 18.10

I just installed Ubuntu 18.10 with Turkish language. And installed Android studio and emulator. Emulator is crashed to start with this command “./emulator -avd Nexus_5_API_21 -qemu -m 2047 -enable-kvm”. But qemu/kvm is working properly with virt-manager GUI.

Android Emulator is working with Ubuntu English system language without problem but when I change system language to turkish again crashed.