I'm using TransferUtility.download to get a file from a bucket but the transfer state is stuck in WAITING forever.
While searching for answers the most common answer I found for this is to check I have the transfer service enabled. I have ensured I do without misspelling it:
<service android:name="com.amazonaws.mobileconnectors.s3.transferutility.TransferService"
android:enabled="true" />
Also I can upload a file all fine. Any suggestions?
I wasn't able to figure out the reason but once I started firing only one request at a time it seems to have fixed itself.
Related
I'm implementing an alarm application for Android with Flutter. With the android_alarm_manager package, I'm able to create and receive alarms. Furthermore, the package bringtoforeground is useful to bring the application to foreground when using another app. However, I haven't found a way to wake up the phone screen, yet. Does anybody knows how to do that? Also, It should be possible to have the application open without entering a password or something comparable.
Thank you in advance!
I've found an answer to my question. Additionally to the two packages said, there is a modification to be made in the AndroidManifest.xml file. Two more properties are needed in the activity tag as follows:
<activity
android:showWhenLocked="true"
android:turnScreenOn="true">
Im using GcmTaskService for sending data in the background, In most cases it works well, altough lately i got one complaint from a client that data is not being sent out of the device. Ive brought the device and I notice that my GcmTaskService's onRunTask never being called on this specific device.
This is how i initiate the service :
GcmNetworkManager gcmNetworkManager = GcmNetworkManager.getInstance(FarmWorkApplication.context);
Class<FarmWorkSyncOutService> gcmTaskService = FarmWorkSyncOutService.class;
String name = gcmTaskService.getName();
gcmNetworkManager.cancelTask(name, gcmTaskService);
OneoffTask task = new OneoffTask.Builder()
.setService(gcmTaskService)
.setTag(name)
.setExecutionWindow(0L, maxDelay)
.setRequiredNetwork(Task.NETWORK_STATE_CONNECTED)
.build();
gcmNetworkManager.schedule(task);
This is the service definition in the manifest :
<service android:name=".FarmWorkSyncOutService"
android:permission="com.google.android.gms.permission.BIND_NETWORK_TASK_SERVICE"
android:exported="true">
<intent-filter>
<action android:name="com.google.android.gms.gcm.ACTION_TASK_READY"/>
</intent-filter>
</service>
The device is connected to the internet by WIFI and is surfing the internet very well.
This line :
gcmNetworkManager.cancelTask(name, gcmTaskService);
is just to assure the service runs once, i also tried to remove it and it didnt help
I tried force stopping GooglePlayServices and remove its data, it didnt help what else can i do to debug this? any1 got any idea why this could happen?
This was the Power Saving Mode's fault. once i disabled it the device started syncing out. wonder if that was smart of them to make Services never run in the background at all...
I am trying to run openfeint android sample on Android 2.2 to verify its functionality. I am sure that I have enter product keys, etc, correctly. I have two problems:
1> message appear at bottom "feint requires an active network connection".(Am sure my internet connection is fine)
2>sometime openfeint loading page appear and automatically disappear itself without showing page one which asking for user permission.(and this happen frequently)
Please advice how can i solve above problems.
Thanks in advance.
-You'll need an active internet connection obviously with the following permission in the manifest:
<uses-permission android:name="android.permission.INTERNET" />
-Thats interesting. When do you want to connect to OpenFeint? I strongly suggest that you should call it after you load etc the main menu. But without further information, it's hard to find out.
Hello and thanks very much in advance for any help.
I'm trying to figure out how to send an Intent to an exported service that resides in another application. The service has no intent-filters or other attributes. Just a name and exported="true".
I know how to do this when the service specifies a unique action. But, in this case, I have nothing but the service name. I know it sounds a bit strange. Why would I want to do this. But, I'm trying to launch the service before launching the main app so that I can observe behavior. I've tried everything I can think of and googled for several days now to now avail.
Thanks very much again for the help.
Several of my Android applications show the following type message in the logcat output:
I/UsageStats( 59): Unexpected resume of com.totsp.test while already resumed in com.totsp.test
In this case I created the default Hello World app by letting the ADT tool generate it, and it still gets this message. I am not doing anything special in onCreate and don't even have any other methods defined.
I realize this is an INFO level message, and it doesn't appear to hurt anything, but I was curious what was going on so I made a test application that keeps track of the onResume invocations. It is indeed re-resuming when this occurs. I'm wondering why this this occurs? While I haven't noticed a problem (other than these annoying log messages), it seems like it could be using more resources than necessary to do all this stuff an extra time.
I have searched and read a similar question here on SO, and the answer there seems dubious to me: Unexpected resume of "package name" while already resumed in ''package name" Error in Android. Specifically, no, you don't want to use android:configChanges="orientation" because that is just subverting the orientation tear down/resume, rather than fixing it. Even the documentation notes "this attribute should be avoided and used only as a last-resort" (http://developer.android.com/intl/de/guide/topics/manifest/activity-element.html#config).
Also I have seen thread in the Android dev group where Mr. Murphy says the "unexpected resume" is "benign": http://groups.google.com/group/android-developers/browse_thread/thread/567410dbfcc163c2.
I'll dig into the source when I get a chance, but I figured I would first just ask the all-knowing hivemind and see if someone already knows: why does this occur, and is it truly benign?
Don't worry about it, it is just a message from some internal state tracking that is not really a problem (hence it being INFO level). I'll make sure it is removed in the next platform version.
My whole Activity flow changes every time this error comes,
but i have handled this by adding android:configChanges="orientation" in the activity in Manifest File.
<activity android:name=".YourActivity" android:label="#string/app_name" android:configChanges="orientation" android:screenOrientation="nosensor">
Hope this helps you