[android-developers] Digest for android-developers@googlegroups.com - 5 updates in 4 topics

Comments: (0)
Mike Starr <starrtennis@gmail.com>: Feb 07 03:05PM -0800

From the README:
"...offline, please make sure to download the necessary components while
*To start the SDK Manager, please execute the program "android".*
From the command-line you can also directly trigger an update by
tools/android update sdk --no-ui..."
I entered android in the command line (I'm on Ubuntu linux) and it said the
command wasn't found.
Thanks for your help.
Random Person <andreitache27@gmail.com>: Feb 07 02:00PM -0800

*So I am looking at buying a developer account on google play,but I need to
know a couple of things first:*
* - If I would buy a dev account, would I be able to send free copies of my
games (even if they are paid games) to friends or for game reviewers?*
* - Are there any restrictions that apply when publishing games (free or
paid) besides CopyRight?*
* - Is the account an "Add On" for another account or a separate account?*
* - Are there any extra fees besides the 25$ entering one?*
* - What other things should I know about dev accounts?*
*One big Thank you for you!!!*
Antonio Rausa <antoniorausa94@gmail.com>: Feb 07 06:59AM -0800

Hi guys, i'm developing Android's apps for one year now, but i can't log in
with my email in Google Play developer Console as it says my email is not
valid. What should i do now?
Mihail <dragomirescuu200@gmail.com>: Feb 07 12:51PM -0800

Have you tried to "Forgot Password" ?
On Sunday, February 7, 2016 at 4:59:51 PM UTC+2, Antonio Rausa wrote:
Vitaly Fadeev <fadeev.vitaly@gmail.com>: Feb 07 09:00AM -0800

суббота, 6 февраля 2016 г., 21:24:40 UTC+3 пользователь Vitaly Fadeev
> What is the reason of the error message ?
> I asked the question...
> I answer it...
I recreate the project in andoid developer studio and after it play
accepted the file...
I started my project about a half year ago...
It seems, that something bacame wrong after uptate andriod studio version
May be, the problem is in gradle config file ,,,
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to android-developers+unsubscribe@googlegroups.com.

[android-developers] Digest for android-developers@googlegroups.com - 14 updates in 13 topics

Comments: (0)
James Montgomery <looyclark@gmail.com>: Feb 06 09:25PM -0800

I'm getting this error when running 'My First App' from Android Developer
java.lang.IllegalStateException: This Activity already has an action bar
supplied by the window decor. Do not request
Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your
theme to use a Toolbar instead
My Acitivity_Display_Message.mxl looks like this:
<?xml version="1.0" encoding="utf-8"?>
app:popupTheme="@style/AppTheme.PopupOverlay" />
<include layout="@layout/content_display_message" />
android:src="@android:drawable/ic_dialog_email" />
How do I solve this error?
I would assume that I would need to insert code like ' <item name="android:windowActionBar">false</item>' somewhere here?
I can include my java code if it will help, but I'm sure there error is in the display message xml
James Montgomery <looyclark@gmail.com>: Feb 06 09:07PM -0800

I'm having the same problem as OP. My Activity_Display_Message.xml is
exactly the same as Haidar except for the Theme and popupTheme (Which I
don't think should make a difference in this case) and the addition of the
floating action button widget (the error comes up with and without the
I would expect the solution to this problem to look something like this:
<item name="android:windowActionBar">false</item>
Am I on the right track? Has anyone else encountered this issue?
On Monday, January 11, 2016 at 11:13:27 PM UTC-5, haidarde...@gmail.com
Martijn van Kekem <martijnvkekem@gmail.com>: Feb 06 01:39PM -0800

Currently i'm trying to make an chat program between mobile devices and
I have found an Eneter library and it's works perfectly but you have to
manually enter the IP address.
So i want that all the communication goes thru my CentOS server. Is that
Martijn van Kekem <martijnvkekem@gmail.com>: Feb 06 01:31PM -0800

How did you install Android Studio?
Try to reinstall Android studio and make sure you have the right version of
Java development.
Op vrijdag 5 februari 2016 18:49:51 UTC+1 schreef sandra salceda:
Martijn van Kekem <martijnvkekem@gmail.com>: Feb 06 01:29PM -0800

Is there nobody who can help me?
vuarangioele@gmail.com: Feb 06 09:27AM -0800

Hi all,
I'm a beginner in Android development and I'm looking for some guides. I've
tried also to read some ones in the Android developer site, but in this
<http://developer.android.com/training/basics/firstapp/starting-activity.html> one
I can see, in a void function, they use a findViewById to get a EditText
element, but I don't know where is it, because it's not been declared in
any layout file.
Can you help me please?
Thank you a lot.
Mark Phillips <mark@phillipsmarketing.biz>: Feb 06 02:03PM -0700

It is defined in the section "Building a Simple User Interface" -
https://developer.android.com/training/basics/firstapp/building-ui.html. Go
to Add a Text Field.
<EditText android:id="@+id/edit_message"
android:hint="@string/edit_message" />
Vitaly Fadeev <fadeev.vitaly@gmail.com>: Feb 06 10:24AM -0800

I have a problem, while publish my application in google play.
There is an icon description in
AndroidManifest.xml :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
There are files
res\drawable\drawable-hdpi\loss_picture.png 72x72
res\drawable\drawable-ldpi\loss_picture.png 36x36
res\drawable\drawable-mdpi\loss_picture.png 48x48
res\drawable\drawable-xhdpi\loss_picture.png 96x96
res\drawable\drawable-xxhdpi\loss_picture.png 144x144
res\drawable\drawable-xxxhdpi\loss_picture.png 192x192
in the project.
Pictures are displayed correctly on the emulator, and on the lenovo phones ...
But google play return error message "The is no image file in APK", when i try upload it in google play ?
What is the reason of the error message ?
Yile Ku <stiffstone@gmail.com>: Feb 06 10:22AM -0800

I am doing a custom build of Android to support a custom piece of USB
hardware. Our USB device appears as a networking interface 'eth0' when we
plug it in. We want to have android assign a static address to the
interface when it comes online. I see in linux that there are some
/etc/init.d/networking files, but I don't see them in the AOSP or from the
ADB shell on the phone we have our custom ROM on.
Thanks ahead of time,
Akash Paul <akashpaul0210@gmail.com>: Feb 06 08:09AM -0800

Hi have written some code which is supposed to send data via a http request
object in android, However i know the data is being sent or posted but the
UI thread does not like the way i have done things can anyone advise please?
async class definition:
private class Connection extends AsyncTask{
protected Object doInBackground(Object[] objects){
PostData(R.id.fullscreen_content, 3);
catch(IOException exception){
return null;
button click action:
/** Called when the user clicks the Happy button */
public void happy_click(View view) throws IOException {
new Connection().execute();
catch(Exception exception){
messageBox("Response was not successful","Failed to process response" + exception.getMessage());
PostData method:
protected void PostData(Integer Question_ID,Integer ResponseChosen_ID) throws IOException {
URL url = new URL("http://cce.swlgroup.com/");
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
HttpClient httpClient = new DefaultHttpClient();
HttpPost post = new HttpPost(conn.getURL().toString());
Date date = new Date();
SimpleDateFormat dt = new SimpleDateFormat("yyyy-MM-dd", Locale.UK);
SimpleDateFormat time = new SimpleDateFormat("HH:mm:ss",Locale.UK);
String nowDate = dt.format(date);
String nowTime = time.format(date);
String output = nowDate + "," + nowTime + ",";
ArrayList<NameValuePair> params = new ArrayList<>();
params.add(new BasicNameValuePair("Question ID",Question_ID.toString()));
params.add(new BasicNameValuePair("Response_Chosen_ID", ResponseChosen_ID.toString()));
params.add(new BasicNameValuePair("Timestamp", output));
post.setEntity(new UrlEncodedFormEntity(params));
HttpResponse response = httpClient.execute(post);
BufferedReader reader = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
StringBuilder builder = new StringBuilder();
String line = "";
while((line = reader.readLine()) != null){
messageBox("Response Submitted", "Response Submitted to server" + builder);
catch(Exception exception){
messageBox("Response Failed",exception.getMessage());
any advise would be much appreciated. Thanks for your time.
Joshua Brooks <joshuawbrooks@gmail.com>: Feb 06 07:45AM -0800

I'm developing an app widget. The phone I'm using is on Android 5.1. I
perform some initial configuration of the widget in the onUpdate function,
setting click intents and whatnot.
This works. However, after performing memory-intensive operations on my
phone, like loading videos, the widget seems to get reloaded, i.e. the
initial configuration including the click intent disappears. The onUpdate
callback doesn't get triggered. Clicking the widget has no effect.
Where can I do the configuration so that it will occur even if the OS
decides to reload the widget, or at least receive a callback that the
widget has been reloaded?
pippo2016 <inmobisoft@gmail.com>: Feb 06 04:05AM -0800

Is it possible to have Google Play Developer Account and Merchant
Account in different countries? The reason I ask is, I'm trying to help a
friend who is from a country that doesn't support creation of the Merchant
Account, while I'm in the country where this is possible. So, the idea was
that he creates his Developer Account, I create Merchant Account which is
linked with his Developer Account.
Thank you in advance
Ntagk Android <ntagkegames@gmail.com>: Feb 06 01:04AM -0800

I didn't find any similar topic,
so I want to ask u if is there any possibility to be paid from google with
a free app..
Thanks, *sorry for my bad english..*
Ritesh Mehandiratta <ritesh.mehandiratta@citizensalliance.co.in>: Feb 05 10:26PM -0800

Hi i am using google drive rest api v2.i am trying to upload a file in a
folder in android.i write a method for this.
public String uploadRequest(String token,byte[] body){
URL url = null;
String response="";
String body1 = Base64.encodeToString(body, Base64.DEFAULT);
Log.i("common-token", token);
String b = "--foo_bar_baz";
b +="\r\nContent-Type: application/json; charset=UTF-8";
b +="\r\n\r\n{\"title\":\"My File\",\"parents\":[{\"id\":\"0B5p7ccHwxN4Rak5QOGo1dUdtQk0\"}],\"mimeType\":\"image/png\"}";
b +="\r\n\r\n--foo_bar_baz";
b +="\r\nContent-Type: image/png";
b +="\r\nContent-Transfer-Encoding: base64";
b +="\r\n\r\n";
try {
url = new URL("https://www.googleapis.com/upload/drive/v2/files");
byte[] outputInBytes = b.getBytes();
int len= 0;
len += outputInBytes.length;
byte[] outputInBytes1 = body1.getBytes();
len += outputInBytes1.length;
String b1 =" \r\n--foo_bar_baz--\r\n";
byte[] outputInBytes2 = b1.getBytes();
len += outputInBytes2.length;
HttpURLConnection c = (HttpURLConnection) url.openConnection();
c.setRequestProperty("Authorization", "Bearer " + token);
c.setRequestProperty("Content-Type", "multipart/related; boundary=\"foo_bar_baz\";");
c.setRequestProperty("Content-Length", "" + len);
Log.i("common", "coming here");
OutputStream os = c.getOutputStream();
Log.i("common", "coming here 3");
Log.i("common", "coming here 4");
// os.flush();
Log.i("common", "length is: " + len);
Log.i("common", "coming here1");
InputStream is= c.getErrorStream();
Log.i("common","coming here1");
InputStreamReader isr =new InputStreamReader(is);
Log.i("common","coming here2");
BufferedReader br=new BufferedReader(isr);
StringBuilder sb = new StringBuilder();
Log.i("common","coming here1");
String line;
while ((line = br.readLine()) != null)
Log.i("common","coming here 2");
} catch (MalformedURLException e) {
} catch (IOException e) {
return "";
In bytes i am sending
File file = new File(j);
int size = (int) file.length();
byte[] bytes = new byte[size];
BufferedInputStream buf = new BufferedInputStream(new FileInputStream(file));
buf.read(bytes, 0, bytes.length);
i am getting Malformed multipart body error with 400 response code.i can't
use google-drive-android api(https://developers.google.com/drive/android/)
.i have to use google drive rest api.can anyone help with this error
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to android-developers+unsubscribe@googlegroups.com.

[android-developers] Digest for android-developers@googlegroups.com - 15 updates in 14 topics

Comments: (0)
Parth Kelkar <kelkar47@gmail.com>: Feb 05 09:51PM -0800

i am trying to use google offline speech recognition in my android app
which just converts speech into text but its not working. i have downloaded
offline language .
the same app works fine with internet connection on but doesn't work in
offline mode the main code is as follows:
package com.example.parth.texttospeech;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.speech.RecognizerIntent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import java.util.ArrayList;
import java.util.Locale;
public class MainActivity extends AppCompatActivity {
TextView resultTEXT;
protected void onCreate(Bundle savedInstanceState) {
public void onButtonClick(View v)
public void prompSpeechInput()
Intent i=new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
i.putExtra(RecognizerIntent.EXTRA_PROMPT,"say something");
}catch(ActivityNotFoundException e)
Toast.makeText(getApplicationContext(),"sorry device doesnt support text to speech",Toast.LENGTH_LONG).show();
public void onActivityResult(int request_code, int result_code, Intent i) {
case 100:if(result_code==RESULT_OK && i!=null)
ArrayList<String> result=i.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
bkpsusmitaa@gmail.com: Feb 05 09:04PM -0800

I want to use my existing Lap(Desk)top with Android installed, with
HSPA-UMTS datamodem with a SIM (for calls+data) card, headphone and Mic, as
a SmartPhone (which means both for accessing and browsing the internet and
make and receive phone calls over GSM network).
That will save my money. I won't have to buy a smartphone which doesn't
have powerful processors like those of the lap(desk)tops. Or when it has,
it is worth a fortune. Better, I want to use the laptop as an integrated
device for voice calls, accessing the internet and other works normally
done using a computer.
I had a Tablet with Pure Android first. When the UBISlate3G10 got damaged,
the company replaced it with a new tablet with forked Android, that did not
allow me to download software from Google Play Store, as I used to, but its
own store. Moreover, this time, I was prompted to agree to some queer Terms
and Conditions, which I chose not too. So whhen I talked to the company I
was asked to return the tablet and my payment was returned.
When I reported the matter to Android-x86 the users that I was not allowed
to download from Google Playstore, and that I was restricted from using my
tab the way I wanted, I was told that this is normal.The language used
there was very unpalatable, undesirable, and against the spirit of the
Social Contract. Worse, I was barred from posting on the group!
So my longstanding desire to use my own desk(lap)top with HSPA-UMTS
datamodem with a SIM (for calls+data) card, headphone and Mic, as a
SmartPhone can't be fulfilled.
It should not be difficult, I believe, as long as there are outstanding
programmers and thinkers. I wish to do it and this will immensely help the
FOSS community. And there is an existing structure to achieve this expected
I have used the datamodem+SIM to access the internet in
Debian/Knoppix/Ubuntu. I already have the script for connecting the
HSPA+UMTS datamodem to the internet.
So is it possible for you to help me?
"Илья Кулик" <mr.rosbi98@gmail.com>: Feb 05 04:29PM -0800

Hello, I beg your pardon for the errors in the text as I do not speak
English and for translations that use Google Translate
My problem is that I created the game for Android. With Unity3D and during
testing on your device, the app worked well. But as soon as I have uploaded to
Google Play tighter assembly that I tested on your device Google Play began
writing to me that my device does not support my application.
What is the problem and how to get rid of it? Thank you in advance.
Safa May <safamay02@gmail.com>: Feb 05 04:09PM -0800

> HI,
please i need your help i want to put my object 3d that i import in android
with min3d library in canvas but i don't know how ,i want to make it a
custom view .
Hunter Mayer <orionnoir@gmail.com>: Feb 05 01:48PM -0800

I tried manually installing our latest version (versus debug) and got the
2731 KB/s (49110251 bytes in 17.558s)
pkg: /data/local/tmp/dam-GooglePlay-release_v2.2.9_b54_armeabi.apk
rm failed for -f, Read-only file system
I've got more to go on now, but I am still hoping there is a tool out there
to pin point what SDK is to blame.
Thanks for any ideas I missed! I don't want to write off my 2.3x device
support when we don't use or need more than that what 2.3 (API level 10)
Martijn van Kekem <martijnvkekem@gmail.com>: Feb 05 11:30AM -0800

Currently i'm making an application for chatting to an Windows PC. I'm
using the Eneter library, but currently i have to enter the ip of the
computer manually.
Is there a way for searching PC's on the local network, that are listening
on a specific port. So for example: is listening on port 2343.
The android app searches on the local network to find pc's those are
listening on port 2343 and add all the ip's listening on that port, to a
string array.
Is that possible?
P.S. Sorry for my bad english
My current code is this:
package nl.martijnvk.computerblocker;
import eneter.messaging.diagnostic.EneterTrace;
import eneter.messaging.endpoints.typedmessages.*;
import eneter.messaging.messagingsystems.messagingsystembase.*;
import eneter.messaging.messagingsystems.tcpmessagingsystem.TcpMessagingSystemFactory;
import eneter.net.system.EventHandler;
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.*;
public class MainActivity extends Activity
// Request message type
// The message must have the same name as declared in the service.
// Also, if the message is the inner class, then it must be static.
public static class MyRequest
public String Text;
// Response message type
// The message must have the same name as declared in the service.
// Also, if the message is the inner class, then it must be static.
public static class MyResponse
public int Length;
// UI controls
private Handler myRefresh = new Handler();
private EditText myMessageTextEditText;
private EditText myResponseEditText;
private Button mySendRequestBtn;
// Sender sending MyRequest and as a response receiving MyResponse.
private IDuplexTypedMessageSender<MyResponse, MyRequest> mySender;
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState)
// Get UI widgets.
myMessageTextEditText = (EditText) findViewById(R.id.messageTextEditText);
myResponseEditText = (EditText) findViewById(R.id.messageLengthEditText);
mySendRequestBtn = (Button) findViewById(R.id.sendRequestBtn);
// Subscribe to handle the button click.
// Open the connection in another thread.
// Note: From Android 3.1 (Honeycomb) or higher
// it is not possible to open TCP connection
// from the main thread.
Thread anOpenConnectionThread = new Thread(new Runnable()
public void run()
catch (Exception err)
EneterTrace.error("Open connection failed.", err);
public void onDestroy()
// Stop listening to response messages.
private void openConnection() throws Exception
// Create sender sending MyRequest and as a response receiving MyResponse
IDuplexTypedMessagesFactory aSenderFactory =
new DuplexTypedMessagesFactory();
mySender = aSenderFactory.createDuplexTypedMessageSender(MyResponse.class, MyRequest.class);
// Subscribe to receive response messages.
// Create TCP messaging for the communication.
// Note: is a special alias to the loopback (
// on the development machine
IMessagingSystemFactory aMessaging = new TcpMessagingSystemFactory();
IDuplexOutputChannel anOutputChannel =
// Attach the output channel to the sender and be able to send
// messages and receive responses.
private void onSendRequest(View v)
// Create the request message.
MyRequest aRequestMsg = new MyRequest();
aRequestMsg.Text = myMessageTextEditText.getText().toString();
// Send the request message.
catch (Exception err)
EneterTrace.error("Sending the message failed.", err);
private void onResponseReceived(Object sender, final TypedResponseReceivedEventArgs<MyResponse> e)
// Display the result - returned number of characters.
// Note: Marshal displaying to the correct UI thread.
myRefresh.post(new Runnable()
public void run()
private EventHandler<TypedResponseReceivedEventArgs<MyResponse>> myOnResponseHandler
= new EventHandler<TypedResponseReceivedEventArgs<MyResponse>>()
public void onEvent(Object sender,
TypedResponseReceivedEventArgs<MyResponse> e)
onResponseReceived(sender, e);
private OnClickListener myOnSendRequestClickHandler = new OnClickListener()
public void onClick(View v)
Geef de code hier op...
sandra salceda <sandriuxsmsm@gmail.com>: Feb 05 09:49AM -0800

Hi i downloaded the android studio on my pc and i already try to launch my
app on diferent emulators, but i can't i get the following message:
Target device: Nexus_6_API_21 [emulator-5554]
Installing APK:
Uploading file to: /data/local/tmp/com.androidatc.mysecondandroidapplication
Installing com.androidatc.mysecondandroidapplication
Error: Could not access the Package Manager. Is the system running?
What can i do?
victor@boomzap.com: Feb 05 09:49AM -0800

I have an app that uses expansion files and it works fine on less than api
23 devices, but on android 6.0 the obb cannot be read neither by
FileInputStream nor by ndk fopen with permission denied error in case the
obb and apk are downloaded from store at once. If the runtime permission to
the app is granted from android settings it runs fine. If the downloader
code runs, or if the obb is uploaded to device into the same folder - the
obb can be read without runtime permissions.
Is it possible to read expansion file without runtime permissions for
WRITE_EXTERNAL_STORAGE (listed in manifest as well) on android 6 ?
"Jose M. Gonzalez A." <josemg08@gmail.com>: Feb 05 07:19AM -0800

Hi everyone, I went to stack overflow about this issue a few days ago
I haven't had any answer yet...
My problem is that I have an instance of android.hardware.Camera and I'm
taking a photo like this:
private void takePhoto() {
try {
mCamera.takePicture(null, null, new PhotoHandler());
} catch (Exception e) {
* Inner class to manage camera callbacks
public class PhotoHandler implements Camera.PictureCallback {
public void onPictureTaken(byte[] data, Camera camera) {
But I'm always getting the same image, I believe it has something to do
with the data that I'm getting in the method onPictureTaken. When I stop at
a breakpoint in onPictureTaken I see that data has always the same values.
I'm working with min api 14 and target 23.
What am I doing wrong? Has someone encounter this kind of issue?
Thanks for the help. Jose
Haldun Ceyhan <haldunceyhan@gmail.com>: Feb 05 05:56AM -0800

Im using Samsung Galaxy Note Pro 12,2
And I have some excel (or word) documents in SD CARD.
Im opening excel documents, and would like to make some changings on it.
But Im taking a warning that this file is only for read.
And saying please resave it (save as).
When I do save as, new document is going directly to internal memory. Not
to SD CARD. And then I can do changes on it.
How we can find a solution to this problem.
Kind Regards
Amit Lad <amid.lad@gmail.com>: Feb 05 04:18AM -0800

Hi All,
I am implementing global search for android tv and we are one major issues.
Whenever we say something by using mice button, global search gives a
callback to query() in content provider but its weird that we not getting
the callback all the time.
Sometimes we did not receive anything but youtube app receives it all the
I followed the example.
Please let me know if you people have any findings.
Amit Lad
Lars Fessen <kilaapps@gmail.com>: Feb 05 01:25AM -0800

I meant the questions in the "Content Rating".
Am Freitag, 5. Februar 2016 10:24:27 UTC+1 schrieb Lars Fessen:
Lars Fessen <kilaapps@gmail.com>: Feb 05 01:24AM -0800

I would like to integrate Google Play Games in my app. Do I have to answer
the questions about "sharing data with other users" and "sharing personal
data" (I do not know if these are the right expressions, I have the german
site) with "Yes" if I intgrate Google Play Games?
Massimo Del Zotto <massimodz8@gmail.com>: Feb 04 11:50PM -0800

Thank you very much! I have somewhat managed to miss the Application class
possibility completely.
In case anyone with write access to Android dev documentation reads this,
I've gone through the training and part of the API guides and I couldn't
recall this being viable.
I am going to move to deriving from Application right away.
Il giorno giovedì 4 febbraio 2016 22:35:11 UTC+1, bi...@bmorgan.com ha
Felik Junvianto <felikjunvianto93@gmail.com>: Feb 04 11:43PM -0800

I have an issue and I cannot find an answer everywhere. I just thought
someone from this group might have encountered the same problem in the past
and can help suggest a good workaround.
I need to restart a service when the application is being updated from
Google Play. Some sources said to listen to ACTION_MY_PACKAGE_REPLACED
intent broadcast from the system, and we can restart a service from there.
I succesfully managed to simulate a update scenario by using ADB command:
*adb install -r /path/to/apk*
After the command executed, I could verify that ACTION_MY_PACKAGE_REPLACED
was being triggered.
The problem is, whenever I select " Debug 'app' " (SHIFT + F9) from Android
Studio, ACTION_MY_PACKAGE_REPLACED also being triggered, which resulting
some unwanted behaviour because of the service restart not in the right
My question is, is there any way we can differentiate package being
replaced from Android Studio's " Debug 'app' " command and from manual
install from adb?
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to android-developers+unsubscribe@googlegroups.com.