w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Android Push Notification from device to other devices
Check out the official tutorial on the Android developers site: http://developer.android.com/google/gcm/notifications.html#upstream You can just upstream a message to the Google cloud and it will be sent to other devices in the same notification group. I'd suggest that you always start with the official tutorials first and then move on to third-party blogs, it's just easier that way.

Categories : Java

Android app pop up when a GCM push notification is received on the device
If I understood correctly, what you want is to start the app directly instead of create the notification. In order to do that you just need to replace the call to generateNotification() with this code: Intent LaunchIntent = getPackageManager().getLaunchIntentForPackage("your.package.name"); startActivity(LaunchIntent); Is that what you need?

Categories : Android

Android push notification- No device registred in the server
I had issues when I tried that demo because my tomcat was running locally, but the emulator has like a "virtual router" per say so I can't access my tomcat server just using http://localhost:8080 from my android app. I'd have to use the IP of my machine running the Tomcat server, so it'd be like http://[my-machine's ip]:8080/gcm-demo where [my-machine's ip] is something like this 192.168.1.10 NOTE: You can get the IP by running ifconfig on Linux or MacOS, or ipconfig on Windows. the ip adress is the value of IPv4 field.

Categories : Java

Can you specify which resource folder an Android device uses?
You can use the following code to get the size and then scale the image to the required size based on the size of the display. Display display = getWindowManager().getDefaultDisplay(); int width = display.getWidth(); int height = display.getHeight(); DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics); int screenDensity = metrics.densityDpi;

Categories : Android

Android GCM push notifications - sending notification to a specific device instead of all devices
But It runs notification to all the devices instead of specific device Since GCM does not support sending a notification to all devices, this is not possible. GCM supports sending a message to a specific device, or to all devices registered to same user (if you use the opt-in user notifications feature). Here what is the meaning of 3rd party Application. This is defined on the very Web page that you linked to. You can tell this by reading that page, and seeing: 3rd-party Application Server: An application server that you write as part of implementing GCM. The 3rd-party application server sends data to an Android application on the device via the GCM connection server.

Categories : Android

Project imported from Eclipse to Android Studio. APK files and some other files in bin folder are not updating anymore
I don't know if there's a way to get a clean build via the UI (I haven't found it yet, anyway), but it's pretty easy via commandline. From the root directory of your project: ./gradlew clean

Categories : Android

Cannot open /data folder in a rooted Android device
If you have installed supersu like apk. When you do 'su' in the shell, there might be a notification on screen asking that if you agree the program to run 'su'. You have to grant the permission.

Categories : Android

How to access package folder(/data/pakcage_name) in android device
if your device isn't root follow these steps to access that: 1- open adb 2- perform $ sudo ./adb shell 3- to access to data folder use ran-as command: shell@android:/ $ run-as app.package.name now, you can access to files of your project. but maybe you don't have permission use chmod 4- shell@android:/data/data/app.package.name $ chmod 777 databases/database_ame and also you can put/get files in/from that such as $ sudo ./adb pull /data/data/app.package.name/databases/database_ame /home or $ sudo ./adb push /home/database_ame /data/data/app.package.name/databases/database_ame Edit: By the way, if you work in linux I think you should install ia32-libs

Categories : Android

Moving files from one folder to a hot folder BUT only move one at a time when the hot folder is empty
Pretty sure this should do what you want in vbscript: Set objFS = CreateObject("Scripting.FileSystemObject") set objFolderA = objFS.GetFolder("c:Folder A") set objFolderB = objFS.GetFolder("c:Folder B") For each objFile in objFolderA.Files Do While True If objFolderB.Files.Count = 0 Then objFS.MoveFile objFile.Path, ojbFolderB.Path & "" Exit Do End If Loop Next

Categories : Batch File

Access external files (Outside of AVD device) using Android JUnit
You cannot access the internal structure of your java project that way. When you install your apk on the device, your java code gets converted to dex code for the Dalvik Virtual Machine, and you won't have the file structure from your project. You can try the following: If you only want to read the config.properties you should use the http://developer.android.com/reference/android/content/res/AssetManager.html class, and put your config.properties in /assets/ in your project. If you also want to write your .properties file, consider creating a temporary file like this: Creating temporary files in Android. Best Regards.

Categories : Java

access of files on windows pc from android device, bluetooth?
If you are going to use bluetooth, from personal experience you need to interact on both the computer and tablet. As a confirmation window for a file transfer appears on either the computer or the tablet. Wireless can be a better method of transferring files as I believe you can get a file manager app for android so you can easily manage files between desktop and tablet. Some recommended file managers are available here - http://android.appstorm.net/roundups/utilities-roundups/top-10-file-managers-for-android/ Hope this helps.

Categories : Android

Copying files into asset folder in android
You cannot modify assets -- including adding or removing them -- at runtime. You are welcome to store your downloaded files on internal storage or external storage.

Categories : Android

Issue with application files folder in android
Make sure you : have rooted your device have the rights to write on the internal storage are not trying to test it with the usb storage enabled on your phone added the permission <uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" /> in your manifest

Categories : Android

How to save music files from raw folder into sdcard in android
Use Like this: list1.add(R.raw.intro_letter_report_card); list1.add(R.raw.intro_title_page2); for(int name : list1) { cnt++; InputStream stream = null; File direct = new File(Environment.getExternalStorageDirectory() + "/Songsnew1"); if(!direct.exists()) { if(direct.mkdir()); //directory is created; } stream = getResources().openRawResource(name); String outFileName = Environment.getExternalStorageDirectory() + "/Songsnew1/song1"+cnt+".mp3"; OutputStream myOutput = null; try { myOutput = new FileOutputStream(outFileName); } catch (FileNotFoundException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } // transfer bytes from the input file to th

Categories : Android

how to automatically move files in a certain folder in android programmatically?
For move file you can use below code: File from = new File(Environment.getExternalStorage().getAbsolutePath()+"/folder1/file.ext"); File to = new File(Environment.getExternalStorage().getAbsolutePath()+"/folder2/file.ext"); from.renameTo(to); just use this method for folders that be on same mount point.

Categories : Android

Play SWF Files on Android Device Without Flash Player Plugin and without webview
You can check the following source code for android-swf-player http://code.google.com/p/android-swf-player/source/checkout

Categories : Android

Why are there some class files contained in the android-support-v4.jar but not in its source folder?
It's probably just an artifact of the decompilation. It seems like it's defined within FragmentManager.java, see grepcode.

Categories : Android

Android studio file explorer not showing files in data folder
I found a solution based on the answer in stack overflow . How to access data/data folder in Android device? First i rooted the device .Then i modify the access permission of data folder using adb shell. the code is $ adb shell $ su # mount -o rw 1|root@android:/ # chmod -R 777 data/ Now i can access the files.Thank you @param for your valuable comment.

Categories : Android

Converting folder of XML files to folder of HTML files
I think XQuery would be more convenient if you had all of your XML in a database, but on the filesystem XSLT may be simpler. I would just use Saxon-PE, and invoke it from a shell script. You could also use Automator.

Categories : HTML

why my jsp 's compiled files i.e java files n class files are not visible in work folder
You can find where the class resides (inside a jar or whatever), via: <!-- This classes URL: <%= getClass().getProtectionDomain().getCodeSource() .getLocation().toExternalForm(); %> --> The getLocation delivers an URL.

Categories : Jsp

Copying files from one folder to another & rename at destination folder using shell scripting
Write this script: #!/bin/sh for f in $1/*; do read -p "New name for $f:" g scp $f $2/$g done And then on the command line: ./my-script.sh folder-a folder-b

Categories : Linux

Rails server command generates another folder in project's folder with default folders and files
This is because you are using rails 2 gem version, you can check by rails -v. As well you can see, there is no app/assets folder. there are only public/javascripts etc rails2 style directories Try to install rails 3 by gem install rails --version '>3.0.0'

Categories : Ruby On Rails

Rename files recursively by adding them the folder's name and move them into another folder
This is a little bit tricky on windows ;) But you can do it the following way: create 2 batch files outside the folder which should be "scanned" first one should be named findfiles.bat forfiles /p %1 /s /c "cmd /c if @isdir==FALSE %~p0 enameit.bat @relpath @file %1 %~p0" the second one should be named renameit.bat @echo off set oldname=%1 set oldname=%oldname:.=% set oldname=%oldname:"=% set tmpname=%2 set newname=%oldname:=_% set newname=%newname:"=% move "%4%3\%oldname%" "%4%3\%newname%" now you can execute the findfiles.bat with the main folder as parameter. (so in your example : Pictures) So for example if your Pictures folder resides in D: then create the 2 batch files in D: then go to cmd and execute findfiles.bat Pictures But be careful! Try to execute this on a copy of y

Categories : Windows

Move all files and Subdirectories from a folder to another Subdirectory of the same folder
This is gonna be very simple. Directory.Move("SourcePath", "DestinationPath"); Process all directories in the source folder and use the above syntax for each and every folder using forloop or foreach to move to your destination folder.

Categories : C#

how can I copy the files in path.txt to new folder with same folder structure?
You dont't need to read a list from a file. You could simply try this in command prompt: xcopy "full path to your folder" "full path destination folder" /e Below is what you get if you type xcopy /? in command prompt: Copies files and directory trees. XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W] [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U] [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/EXCLUDE:file1[+file2][+file3]...] source Specifies the file(s) to copy. destination Specifies the location and/or name of new files. /A Copies only files with the archive attribute set, doesn't change the attribute. /M Copies only files with the arc

Categories : Batch File

c# copying files from source folder to target folder
You can check for each file if it exists this way: string curFile = @"c: emp est.txt"; Console.WriteLine(File.Exists(curFile) ? "File exists." : "File does not exist."); put this inside your loop. then copy those files there. MSDN CODE: // Simple synchronous file copy operations with no user interface. // To run this sample, first create the following directories and files: // C:UsersPublicTestFolder // C:UsersPublicTestFolder est.txt // C:UsersPublicTestFolderSubDir est.txt public class SimpleFileCopy { static void Main() { string fileName = "test.txt"; string sourcePath = @"C:UsersPublicTestFolder"; string targetPath = @"C:UsersPublicTestFolderSubDir"; // Use Path class to manipulate file and directory paths. string sourceFile

Categories : C#

Urban Airship Android push getting "This app is not configured for iOS push"
What you have is correct, however you need to include the following HTTP header: Accept: "application/vnd.urbanairship+json; version=3; For beginner Ruby developers, it can be achieved like this: req = Net::HTTP::Post.new(uri.path) req["Accept"] = "application/vnd.urbanairship+json; version=3;" When, e.g., posting a notification to UrbanAirship.

Categories : Android

UDID for Push Notification instead of Device Token?
No, you can only use the Device Token. The push notification server API will only accept Device tokens and will also check if you are allowed to sent a notification to that installation by checking the Certificate. The Device token is unique for your app on a specific device. If the user has multiple device he/she will also have multiple device tokens (one for each install of your app). When the user deletes you app and reinstalls it the device token can also change. Also the UDID is no longer useable by developers, Apple has restricted the use of the UDID and you can longer use the UDID anywhere in you code.

Categories : IOS

Control push notification device registration
There's nothing wrong in the way you are registering to APNS, but you can do it more efficiently. Apple suggests that you register to the APN service every time the app is launched (and not only on the first time it is launched), because theoretically the device token might change (though it practice it almost never does). An application should register every time it launches and give its provider the current token. By requesting the device token and passing it to the provider every time your application launches, you help to ensure that the provider has the current token for the device. If a user restores a backup to a device or computer other than the one that the backup was created for (for example, the user migrates data to a new device or computer), he or she must launch the

Categories : IOS

How to push updates to IOS device through TCP/IP socket from server?
Your proposed solution will only work if the app is actually running. (And perhaps, crippled, if the user let's it run in the background - see Apple's multitasking in iOS documentation for details). When running in the background, you won't be able to bring up a UI for the user to see, and you won't be able to provide a message or badge in the built in iOS message center. It will also be a lot of work to implement. A common approach is to use Apple push notifications, and let the payload be an identifier, which your app can use to retrieve the actual (larger) payload from your API. Using Apple push notifications has a lot of benefits, such as being tightly integrated in the OS. As for your actual question: One solution is to poll the DB from the Java code. But it really depends on where

Categories : Java

Get device token for push notifications after app was deleted
From Push Notification Programming Guide An application should register every time it launches and give its provider the current token. It calls the registerForRemoteNotificationTypes: method to kick off the registration process. By requesting the device token and passing it to the provider every time your application launches, you help to ensure that the provider has the current token for the device. If a user restores a backup to a device or computer other than the one that the backup was created for (for example, the user migrates data to a new device or computer), he or she must launch the application at least once for it to receive notifications again. If the user restores backup data to a new device or computer, or reinstalls the operating system, the de

Categories : IOS

For Apple push notification, can I send without device token?
You can not send PUSH notification without enabling on appId and with out device token. please check programmer guide of apple developer http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html

Categories : IOS

Push sent successfully using JAVAPNS but not received in client device
According to Apple Documentation: Important: Delivery of notifications is a “best effort”, not guaranteed. It is not intended to deliver data to your app, only to notify the user that there is new data available. In other words, you are lucky to have one (the latest) push notification delivered. Any additional delivery is a bonus. To deliver data, simply notify your app, then have your app download the data from the server.

Categories : IOS

How to get device token id of windows phone for push notification?
You can use the DeviceExtendedProperties - byte[] myDeviceID = (byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId"); string idAsString = Convert.ToBase64String(myDeviceID);

Categories : Windows Phone 8

Push Notification service is not working, When device is switch off
Apple Push Notification service includes a default Quality of Service (QoS) component that performs a store-and-forward function. If APNs attempts to deliver a notification but the device is offline, the notification is stored for a limited period of time, and delivered to the device when it becomes available. Only one recent notification for a particular application is stored. If multiple notifications are sent while the device is offline, each new notification causes the prior notification to be discarded. This behavior of keeping only the newest notification is referred to as coalescing notifications. If the device remains offline for a long time, any notifications that were being stored for it are discarded.

Categories : Objective C

how to select multiple music files from device,and to save those selected files in some whare
It does not seem like there is a way to select multiple files below API 19. See Select multiple files with Intent.ACTION_GET_CONTENT

Categories : Android

Black/unclickable folder in github after push
git rm -r --cached . untracks all your files in a directory, leaving them as simple files on your drive. That's why you still see them on your local repo, but they disappeared on GitHub. To roll back to previous state, assuming you didn't commit anything after the rm commit, do: git reset --hard HEAD~ git push --force Instead, you'll want to selectively remove the files you want to ignore with git rm --cached <files>, add them to .gitignore, and commit.

Categories : GIT

Bash script that move files from one directory with lots of files to a month folder
something like this? DEBUG=echo cd ${directory_with_files} for file in * ; do dest=$(stat -c %y "$file" | head -c 7) mkdir -p $dest ${DEBUG} mv -v "$file" $dest/$(echo "$file" | sed -e 's/.* (.*)/1/') done DISCLAIMER: test this in a safe copy of your files. I won't be responsible for any lost of data ;-)

Categories : Bash

android device does not show up under Android Device Chooser
Make sure you are using the correct android API and SDK version compatible with your device's version in the code. (In the android SDK for eclipse this is in Android Manifest.xml) If the two don't match up, then they won't show up when you try to test it on the device.

Categories : Android

getting warning messages while sending push notification to multiple iphone device
might seem like a dumb answer, but have you tried your firewall / iptables? Those errors without further information look like connection issues to me. First thing you need to resolve is the timeout problem.

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.