Android

5K

Solutions

4K

Contributors

Android is a mobile operating system developed by Google, based on the Linux kernel and designed primarily for touchscreen mobile devices such as smartphones and tablets. Android's user interface is based on direct manipulation, using touch gestures that loosely correspond to real-world actions, such as swiping, tapping and pinching, to manipulate on-screen objects, along with a virtual keyboard for text input. In addition to touchscreen devices, variants of Android are also used on notebooks, game consoles, digital cameras, televisions, automobiles and other electronics. Applications are usually developed in Java programming language using the Android software development kit (SDK), but other development environments are also available, including Delphi, Ruby and Visual Studio (using C++).

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi
I have a situation. I had to change, for e new android mobile (Samsung S9) the base email address and Gmail account. I have managed to migrate to the new account all contacts and everything is perfect, except that, because its a novel account, I have lost the messages on WhastApp...

How can I migrate my old messages to the new account?

can anyone help me?
0
Is it possible to develop an Android app 100% locally/offline?

With Kotlin and Gradle. What is needed in order to do it successfully?

Thanks in advance,

Sam
0
My question is meant to save much time and energy by asking for a proven advice and pro tips from the experience of an expert who has built with Android/Kotlin/Gradle offline. That is the type of information which helps me very much, and I appreciate it to the utmost.

I have a need to build locally, in full & certainty, sometimes. It should be possible, quite surely in the cases when I have no need to add & resolve new dependencies. Please correct me if I got that wrong: if the JDK, the Studio IDE compiler and Kotlin are installed locally by default, then what I need to be sure about is if Gradle has cached locally the Android libraries I'm using and can resolve all the dependencies without network resources.

If Gradle cannot build a new source without network resources, so can it do it regularly offline after the the first build was done successfully online? i.e. Does Gradle can cache and caches locally everything it needs for a source (that won't add new dependencies)?

And in a case of a code error: do Studio and Gradle cover a reasonable amount of their build error-info offline as well? Or that you'll need to anyway go online and build again to get it?

Below is the Android site's information about the offline mode feature (naturally, it doesn't cover my question):

"Enable offline mode
If you are on a slow network connection, your build times may suffer when Gradle attempts to use network resources to resolve dependencies. You can tell Gradle to avoid using …
0
I am making an android camera application. My doubt is how do I pass the supported resolutions as parameters to the camera.

So, First I'am getting all the supported resolution sizes:

Size[] sizes = configurationMap.getOutputSizes(ImageFormat.YUV_420_888);
            Log.d("test","size:"+sizes.length);

            for(Size size : sizes){
                Log.d("test","width: "+size.getWidth()+" height"+size.getHeight());
            }
Then I am configuring the input with one of these sizes.

InputConfiguration inputConfiguration = new InputConfiguration(1920,1080,ImageFormat.YUV_420_888);
The I'am passing this input to a capture session

   cameraDevice.createReprocessableCaptureSession(inputConfiguration, Arrays.asList(previewSurface), new CameraCaptureSession.StateCallback() {
                @Override
                public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {
                    try {
                        cameraCaptureSession.setRepeatingRequest(mCaptureRequestBuilder.build(),null,handler);
                    } catch (CameraAccessException e) {
                        e.printStackTrace();
                    }
                }

                @Override
                public void onConfigureFailed(@NonNull CameraCaptureSession cameraCaptureSession) {
                    Toast.makeText(getApplicationContext(),"Camera Preview Failed!!",Toast.LENGTH_SHORT).show();
                }
            },null);
0
I am developing an android camera application, and I wanted to pass in the capture size to configure the camera before taking a picture.

This is my code:

        try {
            mCaptureRequestBuilder = cameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW);
            mCaptureRequestBuilder.addTarget(previewSurface);

            InputConfiguration inputConfiguration = new InputConfiguration(1920,1080,ImageFormat.JPEG); //error here.

            cameraDevice.createReprocessableCaptureSession(inputConfiguration, Arrays.asList(previewSurface), new CameraCaptureSession.StateCallback() {
                @Override
                public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {
                    try {
                        cameraCaptureSession.setRepeatingRequest(mCaptureRequestBuilder.build(),null,handler);
                    } catch (CameraAccessException e) {
                        e.printStackTrace();
                    }
                }

                @Override
                public void onConfigureFailed(@NonNull CameraCaptureSession cameraCaptureSession) {
                    Toast.makeText(getApplicationContext(),"Camera Preview Failed!!",Toast.LENGTH_SHORT).show();
                }
            },null);
}
So, I am trying to pass an input configuration to the camera here. My problem is I'am getting an error in the InputConfiguration line. This is my error:

0
Hi Experts,

I'm looking for a solution for my problem.

I have a captive portal setup for users to access Internet. Users authenticate via enter account and upload image. I'm trying to upload an image by using web-view (POPUP), but it does not work on mobile (Android, iPhone). I had tested it on normal browser of laptop, it works normally.

I am not android programmers, I am web developers.
0
In an Xamarin Forms project under Visual Studio 2017, I can't get the FCM (Firebase Cloud Messaging) token for Android devices (.Droid project) to register it to FCM.

I created an application on the Firebase console, and retrieved the ApplicationId, ApiKey, ProjectId and GcmSenderId.

Here is the code I use in the .Droid project on Xamarin.Forms:

var options = new FirebaseOptions.Builder()
                    .SetApplicationId("xxxx")
                    .SetApiKey("xxxxxxxxxxxxx") 
                    .SetProjectId("xxxxxxxxx")
                    .SetDatabaseUrl("xxxxxxxxxxxxxxx")
                    .SetGcmSenderId("xxxxxxxxxxxx")
                    .Build();

FirebaseApp app = FirebaseApp.InitializeApp(Android.App.Application.Context, options);
String token = FirebaseInstanceId.Instance.Token; // RETURNS NULL
String authorizedEntity = "xxxxxxxxxx";
String scope = "GCM";
String token2 = FirebaseInstanceId.Instance.GetToken(authorizedEntity, scope); // ALSO RETURNS NULL

Open in new window


I do not understand why the GetToken () function returns NULL.
Can you help me please ?

For the UWP project, I can recover it by the following method:
var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync ();
String Token = channel.Uri;

I followed this doc:
https://docs.microsoft.com/fr-fr/azure/app-service-mobile/app-service-mobile-xamarin-forms-get-started-push
0
I  am working on handheld Bluetooth weighting machine  
I got problem in Bluetooth socket connection  after paired device which  throw following  error
java.io.IOException: read failed, socket might closed or timeout, read ret: -1

Please refer below code
   private BluetoothSocket createBluetoothSocket(BluetoothDevice device) throws IOException {
        return  device.createRfcommSocketToServiceRecord(BTMODULEUUID);
        //creates secure outgoing connection with BT device using UUID
    }

new Thread()
            {
                public void run() {
                    boolean fail = false;

                    BluetoothDevice device = mBTAdapter.getRemoteDevice(address);

                    try {
                        mBTSocket = createBluetoothSocket(device);
                    } catch (IOException e) {
                        fail = true;
                        Toast.makeText(getBaseContext(), "Socket creation failed", Toast.LENGTH_SHORT).show();
                    }
                    // Establish the Bluetooth socket connection.
                    try {
                        mBTSocket.connect();
                    } catch (IOException e) {
                        try {
                            fail = true;
                            mBTSocket.close();
                            mHandler.obtainMessage(CONNECTING_STATUS, -1, -1)
                                    .sendToTarget();
                        } catch 

Open in new window

0
I've created a PWA app on https and its working great on android
When you visit the website, it asks to add to home screen, and after this it loads in full screen - all good with android!

With iOS it doesn't show a prompt to add to home screen.
I've tried with safari
Is there anyway possible to get this working where notifies user to add to homescreen on iOS ?
0
Credit Card process error shows up Insecure Internet Connection and won't process the credit card transaction.  Have you anyone experience this?
One time I have to replace the switch to get this going but it comes back again. I have 4 POS system all in the same network and same ip address range as others. Just one POS and one register give me this.  It is an Android POS device and has wifi and ethernet option. The result is the same whether it is WIFI or Ethernet. What could that be?
0
Hello I have a question about chrome (using with an android device), and how it organises frequently used bookmarks...

When i open a new tab, you can see 8 (i guess frequently used) bookmarks, can anyone tell me if you can edit the text or logos that appear with them, im talking about
the ones that appear on the new home page not the regular bookmarks if that makes sense, these seem to have been changed to round symbols recently..
0
I'm creating a digital planner and need a little Power Point help. I'm creating the graphics in Paint Shop Pro then importing them into PowerPoint to add the hyperlinks. Then I will be using the Xodo app to finish it and use it on my Android tablet and phone. (IOS users use Goodnotes but I don't have an Apple device).
    So I have tabs around 3 of the sides of my planner. I have the tabs set up on the left side (Jan- Dec) for monthly spreads and I have all those hyperlinks set up ok on all the pages.
   Now I'm working on the top 4 tabs and have all those but one done and that's where I need assistance. I have a "today" tab that obviously leads to the current date in the planner.  
    How can I add a hyperlink that changes daily?  I've seen others with the "today" tab, so I know it's possible, but I don't know how (yet).
    Any idea?
  Thanks!
0
Hi ,

I am Rajeshwari i have a issue in my mobile its Samsung j7 prime my problem is im not able to  install my google app when i go to google play store it says " you cannot install this app because another user has already installed an incompatible version on this device.so could you help me to install the app its getting very difficult.
0
We currently have 200 android tablet devices in a CLOUD only environment, no on prem.

What i would like to do is for the tablets to have restricted internet access, what is the best way to do this? Do not want any app installation or the use of a subscription such as openDNS where there is a cost associated to it. Cant use free as there are restriction on additional entries (may be wrong)

Anyway, would love help with this and what I can do to achieve this, as I said we are cloud based and using MerakiSM MDM to manage these. Step by Step would also be appreciated.

Thanks

John
0
I have a cordova app and would like to make some changes to the build.gradle file. Basically, I would like to remove some lines (with **) and add some new statements (*)

I have added the lines but when I build my code with  cordova  the gradle file gets regenerated and my changes are lost.

I know that I can use the android studio but I am automating my process and would do it with my current automation script

Can you please let me know how to make this change with maybe gradle.extra file

I am using Cordova 6.5.0

Thanks for the help

here is the snippet from the build.gradle file

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    debugCompile(project(path: "CordovaLib", configuration: "debug"))
    releaseCompile(project(path: "CordovaLib", configuration: "release"))
    **//compile "com.google.android.gms:play-services-gcm:11.+"**
    compile "com.android.support:support-v4:24.1.1+"
    compile "com.squareup.okhttp:okhttp-urlconnection:2+"
    **//compile "com.google.android.gms:play-services-gcm:+"**
    *compile 'com.google.firebase:firebase-messaging:10.2.6'
    // SUB-PROJECT DEPENDENCIES END
}
*apply plugin: 'com.google.gms.google-services'

Open in new window

0
Dear Experts,

 I have created a Restful API which is being consumed from android application. The api is below.

@CrossOrigin
      @Cacheable("locations")
      @RequestMapping(value = "/locations/", method = RequestMethod.GET, produces = { "application/json" })
      public List<Map<String, Object>> locations() throws Exception {
            this.daoFactory.setClass(Location.class);
            return getLocationMap(daoFactory.getLargestUnits());
      } and  



private List<Map<String, Object>> getLocationMap(List<Location> locations) {
            logger.info("fetching microplan location from: {}", locations.size());
            List<Map<String, Object>> jsonLocations = new ArrayList<Map<String, Object>>();
            for (Location location : locations)
                  jsonLocations.add(location.toJsonizedMap());
            logger.debug("loaded microplan location {}.", jsonLocations.size());
            return jsonLocations;
      }


sometimes it tells service is down from the application.
But  if I  just run this  this api from the postman and I could able to login into the application again and it works fine.

Experts,
what would be the root cause problem of it??


Thanks
0
exchange synchronisation problem with iphones and ipads and android phones
0
When I receive a text message containing a video, I receive the video as a photo (i.e., as only one frame of the video), along with a playable audio file the full length of the video I SHOULD have gotten. This is true no matter the size of the video, true even for two-second videos, and true whether I use the Android Messages app or the Samsung Messages app to access the text message. Fact is, I have never gotten videos via text message; only now I am getting them, and because of this issue I can't view them. I'm on the Verizon network, my wife is on the AT&T network, and while she is able to view the same texted videos I get, I am unable to view them. Both of us are using Android Messages, and all the settings on her app and mine are exactly the same. I've called Verizon about this and they are stumped. Note that the Android Messages online site, which is synced to my phone, receives the same text that my phone does, i.e., only one frame of the video, plus the playable audio file, but not the whole video. My phone: Samsung Galaxy Note IV. Operating system: Android 6.0.1 (Marshmallow). Any ideas what is going on?
0
I am creating an Android application that allows users to add notes, organize them into categories, and set reminders for the notes in the form of push notifications.

I am able to schedule reminder notifications when the phone is on. However, if you turn the phone off and then turn it on later, or restart it, then set multiple notifications: one that has a scheduled time after the phone has been rebooted or turned on again and one that is scheduled to go off at a time after the phone has been rebooted or turned off, then both notifications go off immediately after the phone turns on or is rebooted.

The expected behavior is that the notification that is scheduled at a time after the phone has rebooted fires at the scheduled time instead of right away.

Please see RebootReceiver.java and NotificationScheduler.java below and let me know if you need additional files from my project or information.

RebootReceiver Class:

package com.coolcoderz.notes2go;

import android.app.AlarmManager;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Toast;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

import static android.content.Context.ALARM_SERVICE;


public class RebootReceiver extends 

Open in new window

0
Who knows how to view the log on the phone, like this to see the log that the phone is running.
0
Display issue with bootstrap Col 4 and 8. between android and apple.

apple
android

apple once doesnt look like the apple one ? and im not sure why all it is bootstraps col-sm-4 . and col-sm-8 wrapped in bootstraps row.

this is only in apple phones not android.

is also display correctly on chrome but not saferia
0
I want to record my Whatsapp Voice calls on Android 7+ for free. I installed many apps from Google Play Store. None of them worked. Please introduce a free app which really works.
There are some screen recorder apps which records everything on your screen but they don’t record your contact voice if you don’t use the loud speaker. I want to record my contact voice when I use my phone normally.
Thanks
0
Hi all
We have a number of Android tablets, some of which are misbehaving. I need to be able to save (or send) the system logs (and maybe dmesg as well, if poss) continuously to the removeable SD card, or alternately, to send the logs out to an FTP server. Can someone help me do this please? I will not be able to "root" the devices.
Thanks in advance
Michael
0
I have an application called Clipper installed  on my LG Smartphone. It syncs with my Samsung  tablet. It stores all clippings loosely and securely stores my hundreds of usernames  and passwords.

My crappy Smartphone is having serious problems,  so I am entertaining the thought of wiping it and Reset to Factory Settings.
Will the synced copy of Clipper on my tablet survive if I wipe the phone?
0
I am writing an application with Xamarin.Forms and need to open a view/page in a different Activity.  I see a lot of reference for Xamarin.Android for doing this, but don't know how to tie it back to the Xamarin.Forms project.
0

Android

5K

Solutions

4K

Contributors

Android is a mobile operating system developed by Google, based on the Linux kernel and designed primarily for touchscreen mobile devices such as smartphones and tablets. Android's user interface is based on direct manipulation, using touch gestures that loosely correspond to real-world actions, such as swiping, tapping and pinching, to manipulate on-screen objects, along with a virtual keyboard for text input. In addition to touchscreen devices, variants of Android are also used on notebooks, game consoles, digital cameras, televisions, automobiles and other electronics. Applications are usually developed in Java programming language using the Android software development kit (SDK), but other development environments are also available, including Delphi, Ruby and Visual Studio (using C++).