• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps IOException - InputStream inputStream = httpURLConnection.getInputStream();

InputStream inputStream = httpURLConnection.getInputStream(); // line 43

Android 7.0 emulator run OK call to API - get the result response

Android API Q get error catch by
} catch (IOException e) {
e.printStackTrace();
this.dataParsed = "Not Found word-2"; // get this in output
}
and line 43 the error... in Logerror
Can you help???? I use Android Studio 4

Setting primary contact phone number.

So, this is what I want to do, and I know how to use Android to do this but what I want to do is a little different. My main contacts 'database' is with Microsoft Outlook on my PC (running Windows 10). This I can sync locally to my Android phone with no problems. The problem is that I'd like to set-up the primary (as in what Android regards as 'primary') contact phone number if, for instance, I install a new ROM on my phone then have to re-sync my contacts. Obviously in this case the 'primary' bit has been deleted. Another 'wrinkle' is that you don't seem to be able to use Google contacts on the web to do this either.

So, I was thinking that there "might" be an app that would allow you to save this information so that I could re-load it after a re-sync. Anyone know of something, maybe a way I've overlooked, to enable this?

Just to be clear. I will NOT be using a sync to Google to do this - seems like I need to set it on the phone in any case. I do not mind going through my contacts one-by-one initially to set this up. Just don't want to do it every time. Oh, and the main reason for having to do this is that Outlook doesn't have the concept of a 'primary' contact number so therefore no mapping to Gooles concept.

Thanks in advance.

Help Files application taking up 90 GB somehow

Hey, I have a Samsung Galaxy S10 Plus running Android Q (Android 10), and I have 128GB of storage. The other day, my storage usage went from about 30GB to 126GB from nowhere. I checked what was taking up my storage and it said "Other". So I checked on advanced storage usage and it says "My Files" (The App) is using up 90GB of storage! I try to go through the files I have on there and I can't find anything that could take up that much storage.

I also checked my DCIM to see how much storage my photos and videos are taking up and it says about 20GB (I take 4k resolution pictures). I can't figure out how this happened.

I'm thinking of uploading all my pictures and videos to Google Photos. I'm also gonna save all my other files (such as PDFs) on an SSD. Then factory reset/delete all data from the device. I was wondering if you guys know an app or something where I can check how much storage a directory is using up or it tells me what is taking up most of my storage. If there is an app that can do that, please let me know.

Otherwise, if you have any better ideas feel free to let me know. If not, I would really appreciate it if you guys can send me some tutorial videos on how to factory reset my device/delete all personal data from the device correctly.

Thanks!

Messages from Service to Client

Hi

I am creating an Activity(Client)/Service App. The Service is local and bound to the Activity. What I would like to do is send messages from the Service to the Activity. I've looked at the Messenger class and it looks promising, except the only examples I've found have the handler in the Service, where I would like the Handler in the Activity (Client) and am not sure how to reverse the examples I've found. The Client does not need to send messages to the Service. If need be, the Client will make method calls on the Service using the IBinder.

One example I've looked through is there;
https://developer.android.com/guide/components/bound-services
There are many others that do the same thing.

The plan is the Service will open comms with other processes and funnel up messages back to the Client.

Both Client and Service will be a long running process.

Any advice would be appreciated.

Edit:

I have an example of what I'd like to do
The activity example:
Java:
// Activity
public static class Binding extends Activity
{
   class IncomingHandler extends Handler   /// Handle messages from Service
    {
        @Override
        public void handleMessage(Message msg)
        {
            switch (msg.what)
            {
                case MessengerService.MSG_SET_VALUE:
                    mCallbackText.setText("Received from service: " + msg.arg1); /// MessengerService should be LocalService
                    break;
                default:
                    super.handleMessage(msg);
            }
        }
    }
   final Messenger mMessenger = new Messenger(new IncomingHandler());
  
   private LocalService mBoundService;   /// For Local Service
  
   private ServiceConnection mConnection = new ServiceConnection()
   {
        public void onServiceConnected(ComponentName className, IBinder service)
        {
  
            mBoundService = ((LocalService.LocalBinder)service).getService();  /// For Local Service

            mService = new Messenger(service);
        }
   }
   void doBindService()
   {
        bindService(new Intent(Binding.this, MessengerService.class), mConnection, Context.BIND_AUTO_CREATE);   /// MessengerService should be LocalService       
        bindService(new Intent(Binding.this, LocalService.class), mConnection, Context.BIND_AUTO_CREATE)); /// For Local Service

        mIsBound = true;
        mCallbackText.setText("Binding.");
    }
}

Example of the Service:
Java:
// Service
public class LocalService extends Service
{
   NotificationManager mNM;
   final Messenger mMessenger = new Messenger(new IncomingHandler());
  
   /// The Local Binder
   public class LocalBinder extends Binder
   {
      LocalService getService()
      {
         return LocalService.this;  /// Does this include both the ability to make local methods call and the messenger?
      }
   }

   class IncomingHandler extends Handler
   {
      @Override
      public void handleMessage(Message msg)
      {
      }
   }

   private final IBinder mBinder = new LocalBinder(); /// For Local comm with client (method calls)

   /// For the Messenger version
   @Override
   public IBinder onBind(Intent intent)
   {
     return mMessenger.getBinder();
   }
  
   /// For the Local method call version
   @Override
   public IBinder onBind(Intent intent)
   {
      return mBinder;   /// Does this include the messenger capability?
   }
}

So as you can see, I'm trying to do two things with my Service, make local method calls on it from the Activity through the IBinder and also have the Service send messages back to the Activity through a Messenger. I have to believe that this is possible, I would like to know if I'm on the right track?

Thanks...

Help Rooting Vivo y81i and making adoptable storage (internal external sd card storage)

Hey, I own a Vivo y81i. Has there been any new TWRP releases for this model now? The one on these sites (https://www.stupdroid.com/2018/08/Vivo-Y81-root-twrp.html and https://www.howtoapps.info/how-to-root-vivo-y81/) linked were for Vivo y81 (not for y81i). I've read somewhere that however similar a TWRP you found is to the TWRP you need is doesn't matter and won't work if they're not completely identical... (is that true?)

Another problem I have: I was planning on making an adoptable storage (using an SD card as internal storage). I've successfully followed this set of instructions: (https://highonandroid.com/android-h...rage-for-galaxy-s7-s7-edge-adoptable-storage/) but it still didn't work. (There is no built-in option to install an SD card as internal in vivo y81i so I resorted to the solution indicated in that last link). It just makes my 64 gb sd card unreadable after entering "sm partition disk:179,128 private" (but works again after I reformat it with a different device that recognizes it). I tried doing the same method again but now entering "sm partition disk:179,128 mixed 50" making only 50% of the sd card as internal and the other half remain external. All that happened was I lost half of my sd card memory and didn't gain any for my internal.

I even tested the device after doing this by pasting a 20 gb file unto my internal storage just to check if it wasn't truly just 16 gb (with only 9.something gb usable by default). The file wasn't pasted entirely, proving that it didn't truly merge the internal and external storage...

browser for old android

Is there a working web browser for android 2.1 with endless support ? Im using a smartphone from 2014 and intend to use it forever. Of course motherf rs from the Google and Co dont like this kind of affairs when people use old equipment decades on (because if everyone started doing that they would not receive money from sales and would have to shut down the company or work for little profit, what obviously they don't like) they want you to buy a new one every year and old one to throw to garbage, to Africa. So under pretense of security they make web browser unfunctional on old systems, renewing java and all other sh t so you cannot log in into stupid mail, google drive or open any site, enter capcha, ect. What i found so far out of huge range of sh t offered today is puffin browser, which later version is supposed to work on 2.3. Is there, can anyone create a good working alternative that would be without stupid security but receive updates on Google tricks to make equipment unfunctional?

Help How to make a system app on Android 9

I develop a custom tablet used Android 9.

I've tried to build a system app into '/system/priv-app', but after the device startup is completed, it automatically shuts down and transitions to the "Android Recovery" screen.

what do I have to do to get my device to boot successfully?

my system app is same as that shown on the following website,
and fixed a mk below.

https://devarea.com/aosp-creating-a-system-service/

・SampServiceApp/Android.mk
-------------
# LOCAL_SDK_VERSION := current
LOCAL_PRIVATE_PLATFORM_APIS := true
-------------
added "LOCAL_PRIVATE_PLATFORM_APIS" insted of "LOCAL_SDK_VERSION" for successful compilation.

and also, this app probably doesn't need any permissions with whitelist.
I run 'development/tools/privapp_permissions/privapp_permissions.py', but the results is empty like this.
---------
<?xml version="1.0" encoding="utf-8"?>
<permissions>
</permissions>
---------
https://source.android.com/devices/tech/config/perms-whitelist

Thank you in advance for your support.

Help TikTok ad after every phone call

I'm wondering if there's a known app associated with this TikTok ad, which pops up after I receive a call. It started happening about a month ago, out of the blue, I hadn't installed anything new around that time. There is also an additional screen that I have to tap now to answer the phone. A green circle (Answer) and red circle (Delete or Ignore), with circles or globes running up the left and right edges of the screen. Frustrating b/c that screen is not very responsive to my swipe so I'm always worried I'm going to miss the call.

Even though I never agreed to install Tiktok I noticed it was installed last week. Immediately deleted it. I have very few apps installed. Most of them well known, trustworthy and/or ad free. As I look at the list now I wonder if someone recently changed their policy, maybe Spotify? Target? The other big apps I have are Twitter, Lyft, Pixels, Upwork, Instagram, Iheartradio, Ebay, Freelancer. I had Color flashlight installed, read somewhere else that might be the culprit so I deleted it but that wasn't it. Any help appreciated.

Galaxy S8. Current carrier is Ting; originally it was AT&T. Version is 8.0.0. Not rooted.
Thanks
tiktokad.png

Android OS 9.0 , BLE 5.0 specific issue fetching list of services from BluetoothGatt

Developed the following source code for sending message from one Android device to another Android device using BLE: '

public static String SERVICE_STRING = "6exxxxxx-xxxx-xxxx-xxxx-xxxxxdcca9e";

public static String CHARACTERISTIC_ECHO_STRING = "6eyyyyyy-yyyy-yyyy-yyyy-yyyyycca9e";

List serviceList = bluetoothGatt.getServices(); On checking the list of services , on Realme 5 Pro(Android OS 9.0 , BLE v5.0) after a successful connection is established with another device, the list of services is not returning the specific service with service string as mentioned above , hence the following code(BluetoothGattService) is returned as null , so unable to send data to another device via BLE.

BluetoothGattService service = findService(serviceList);
if (service == null) {
Log.i("Null service", "Null service.");
return matchingCharacteristics;
}
private static BluetoothGattService findService(List<BluetoothGattService> serviceList) {
for (BluetoothGattService service : serviceList) {
String serviceIdString = service.getUuid()
.toString();
if (matchesServiceUuidString(serviceIdString)) {
return service;
}
}
return null;
}
private static boolean matchesServiceUuidString(String serviceIdString) {
return uuidMatches(serviceIdString, SERVICE_STRING);
}

The same source code is returning the list of services with the mentioned service string for other devices like Mi 4a(Android OS 7.0 , BLE 4.0) , Realme 3i(Android OS 9.0, BLE 4.2) and for them , the BluetoothGattService instance is returning the details which is not null and hence able to send messages to other devices.

Did anyone face the same issue with device with Android OS v9.0 and BLE v5.0 ?

Changing notifications sounds

I just picked up a Galaxy 10e the other day. I have been adjusting some of my settings and copying over some of my favorite notification sounds. I have my default notification sound set and have gone into Messages and set it's on town for that app. But the default notification sound is what sounds when I get a text. My S6 didn't do that. Is there a way to get the default sound to not work in just Messages?

Filter

Back
Top Bottom