w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Android Studio "Cannot resolve symbol XXX" on basic Android tutorial
so, it turns out that Studio is (understandibly) buggy, and that these errors are false negatives... I can also add the hierarchical parent by hand in the code so the question about the popup is moot too :/

Categories : Android

Can i use APNS/GCM for implementing an Instant messaging service iOS/Android
Yes and no. Remember gcm/apns have a limit and you got to paid when quota exceed. It is also discussed in other thread Is it good to use only GCM for developing chat applications for android ditching XMPP?

Categories : Android

Android: Emulator in Android Studio doesn't start/launch
Well, Android Studio is waiting for you to start the virtual device. You can do that from AVD Manager --> 'Select the device you chose in Android Studio' --> Start. I hope this answers your question

Categories : Android

Using Amazon Web Service SDK for Android in Android Studio
Found an answer myself, leaving this here since the answer will never match search terms for this specific problem. Follow the directions on the accepted answer here: Android Studio - Importing external Library/Jar Like the post right below it says, you don't have to exit from Android Studio, just Build->Rebuild Project

Categories : Android

Start an android service inside the same service to make a loop
You could create a thread in your service and put while loop there like this: new Thread(new Runnable(){ public void run() { // TODO Auto-generated method stub while(true) { Thread.sleep(60000) //REST OF CODE HERE// } } }).start(); But this is an easy quick fix, overall, creating a thread that sleeps all the time is not a good solution for mobile devices. You should consider using AlarmManager instead. It handles recurring events very well and was specifically designed for similar scenarios.

Categories : Android

How to start android service from another Android app
You should be able to start your service like this: Intent i = new Intent(); i.setComponent(new ComponentName("com.xxx.yyy", "com.xxx.yyy.SyncService")); ComponentName c = ctx.startService(i); You don't need to set ACTION or CATEGORY if you are specifying a specific component. Make sure that your service is properly defined in the manifest. EDIT Specified fully qualified class name as per suggestion from VenomVendor

Categories : Android

Unable to start Android Studio after installation
You need to set your JAVA_HOME path, which will allow Android Studio to run. Have you done that? Here is how to do that: Right click your Computer icon, and click Properties Windows 8 Users: Then click Advanced System settings to your left. Now, go to the advanced tab, click Environment variables, under system variables, click New, and add a JAVA_HOME variable, it should look like this (relative to your jdk version, if its the latest it should be identical). If you already have that covered I found a solution here that can help you: Go to your AndroidStudio directory where you installed your studio Like D:UserAndroidStudio In AndroidStudio go to AndroidStudiopluginsgradlelib and copy gradle.jar Paste this gradle.jar file to AndroidStudiolib directory. Download gradle directly fr

Categories : Android

Unable to start webserver service in android
The Problem is solved now i added intent filter action and it is working fine... Here goes the code: <service android:name="dolphin.developers.com.webser" android:enabled="true" > <intent-filter> <action android:name="dolphin.developers.com.webserv"> </action> </intent-filter>> </service>

Categories : Java

start my service on phone restart in android
Make Sure u have the permission in AndroidManifest File : <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> Change this to : @Override public void onReceive(Context context, Intent intent) { Intent serviceIntent = new Intent(context,BackgroundService.class); startService(serviceIntent); }

Categories : Android

Start activity from service isn't working (android)
See android start activity from service Intent i= new Intent(getBaseContext(), screen.class); i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); getApplication().startActivity(i); You error seems to be inside screen activity. There are many thread which might help to figure out the error that you are getting for the activity: Error in Android "SuperNotCalledException:Activity did not call through to super.OnCreate()" android.app.SuperNotCalledException: Activity did not call through to super.onStop() Update The error is because you haven't called: super.onCreate(savedInstanceState); in your screen activity's onCreate(). That should be the first thing to be called in onCreate(). Do something like this: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstan

Categories : Java

Android start service using broadcast receiver
In your activity, create a BroadcastReceiver variable private BroadcastReceiver mBootCompletedReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { // start your service right here... } }; and onCreate or onResume events of Activity you should register for that BroadcastReceiver super.registerReceiver(mBootCompletedReceiver, new IntentFilter("android.intent.action.BOOT_COMPLETED")); and onDestory or onStop or onPause whatever you in situation should unregister this BroadcastReceiver for not receiving this updates anymore. super.unregisterReceiver(mBootCompletedReceiver);

Categories : Misc

How to start a service from a service on android?
I found a solution here: https://groups.google.com/forum/#!topic/android-developers/LJkmfdy5SXE It works to use a fully-qualified class name when starting a service in another application: Intent i = new Intent(); i.setClassName("com.backgroundService", "com.backgroundService.MyService"); startService(i);

Categories : Android

Is this the correct way to start a service with alarm manager in Android?
in your manifest have you written <service android:enabled="true" android:name=".NotificationService " /> check the c.getCount() whether it is nonzero or not.

Categories : Android

Is Google Cloud Messaging from Android to Android possible?
As far as I'm aware, there has to be a server in the middle to send the push notifications (Android -> Personal Server -> GCM Server -> Android) So the Android device sending the notification would send some data to a script on the server (using a HTTP GET/POST), and that script would then send the push notifications to all the devices that you wanted it to

Categories : Android

Start an Android Service from Command Line in Version-Agnostic way
After Alex's suggestion, I wrote the following python fragment: results = env.Execute([env['ADB'], 'shell', 'am']) if "--user" in results: user_option = "--user 0" else: user_option = "" exec_line = 'am startservice ' + user_option + ' -a ' + app_id + '.GdbServerService --es command start --es gdbserver_name ' + remote_gdbserver + ' --ei gdbserver_port ' + str(env['ANDROID_REMOTE_DEBUG_PORT'])

Categories : Android

Create New Project Android Studio 0.2.3 - Unable to start Gradle daemon process
Well I managed to solve it after many hours of trying. First of all I use Windows 7, with 16GB ram, and it was the system path that was truncated! This left me without the proper GRADLE_HOME path. I manually downloaded the latest Gradle-1.7 build. Android studio 0.2.3 was using 1.6, but subsequently to my manual fix 0.2.5 uses Gradle-1.7. I created a System variable: GRADLE_HOME with value: D:gradle-1.7 that points to my manual Gradle install. I broke my 'real path' (before windows truncated it) into 'extended' path variables, thus shortening my actual path, and inserted the following at the end of the path: %GRADLE_HOME%/bin;%JAVA_HOME%/bin; There are many links on dealing with truncated windows path on stackoverflow. And that was all that was required to get it working. Hope I can

Categories : Gradle

Android: How can I open an older android project in Android Studio?
Look at this links. How do I open my existing Eclipse projects in Android Studio? http://developer.android.com/sdk/installing/migrate.html

Categories : Android

Android Studio - Build an Android project with Android library which depends on another Android Library
The manifest files for the library must currently have a <application /> node, even if it's empty. It's a restriction we'll remove at some point but for now, just add it.

Categories : Android

Android SMS Messaging like UI
I would say that that is a good approach. You will definitely need a list view, the real question is just how to build the list item background. Looking at the image you shared, the pointy part of the box (outlined in red) is really all that can't be stretched, so you could make a 9 patch similar to this. The top and left are the important part, they tell the 9 patch which parts can be stretched (or repeated, really. The bottom and right tell it which parts can contain content. So if you always need a certain amount of padding then you can use those to define that. I'm not a designer, but what I like to do is take an image like this, obviously trim out the content, then trim it down in the middle so one black line on either part (top/bottom, left/right) is only 2 pixels wide. This

Categories : Android

Authentication android messaging app
Associate each phone number with a unique device identifier Get the udid and send it with each request Create a signature that follow each request to your server. The signature shoukd be something like: secret key1+msg+phone number+udid+secret key2, then SHA1 the string and attach to th request. On server calculate the signature and compare to original that followed the message. If they match, ok, else don't send it. Use strong keys, and use two, to make brue force extraction, almost impossible.

Categories : Android

Installing windows service with InstallUtil from Visual Studio 2010 by Start Debugging (F5)
Here is complete solution. What Installing windows service automatically from Visual Studio when Start Debugging (F5) without adding any installing code to the project (except project installer you need to register windows service at all). Visual Studio 2010 project properties Right click your service project and choose properties. Go to Debug section. Input this: Start external program: C:WindowsSystem32cmd.exe (your path to cmd.exe) Command line arguments: /k "C:Program Files (x86)Microsoft Visual Studio 10.0VCvcvarsall.bat" x86 & sc delete MyServiceName & InstallUtil MyServiceFileName.exe & Exit (don't forget to change path to yours) MyServiceName is value of ServiceName property of serviceInstaller from ProjectInstaller.cs (generated by VS) MyServiceFileName

Categories : Visual Studio 2010

Creating an instant messaging app for Android
using a timer would abcolutly kill the phones battery at that interval. You need to look into using Google Cloud Messaging or XMPP to notify the device that a new message arrived

Categories : Android

Automatic messaging android application
If the app sends messages at user specified time and date, i would suggest using AlarmManager and Service to do the job instead of having Threads that sleep. This way your app doesnt have to be "visibly" running to the user to do the "cron" job.

Categories : Android

google cloud messaging in android lower than 4.1
With the old version of GCM (deprecated 1-2 month ago aprox.) you had to ask to the user to add a google account if he was running a version lower than 4.0.4 Looking at the API docs it is still a requirement Mobile Device The device that is running an Android application that uses GCM. This must be a 2.2 Android device that has Google Play Store installed, and it must have at least one logged in Google account if the device is running a version lower than Android 4.0.4. Alternatively, for testing you can use an emulator running Android 2.2 with Google APIs. GCM API I have not used the last version. If you decide to use the old one you have to generate an acces to the account settings to add an account: private String[] getAccountNames() { AccountManager accMan = A

Categories : Android

Android Google - Cloud Messaging Report
I am not sure of how to trace the confirmation but GCM Push service is not 100% reliable. There is a beautiful answer on Android GCM delivery monitoring question by @Nitin Sethi. I am quoting him here: Google does not guarantee delivery but they try for a max of 4 weeks to deliver the message. It depends on the duration that you set in the message you send to Google's GCM servers for which data would be available to them. It also depends on whether you wish to let Google keep the data for eventual delivery of message to the device, in case the device was offline when the message was to be delivered. However, there are certain conditions under which the GCM messages are not delivered: Background data is unchecked under Account and Sync settings. Prior to 4.0.4.(ICS), a Google account o

Categories : Android

Android: how to get own profile picture like in native Messaging app
Read up here http://developer.android.com/reference/android/provider/ContactsContract.Profile.html and then look into CursorLoader's and cursors, write one to query for the photo uri or photo thumbnail uri. Update I found similar questions that should help you Get profile picture of specific phone number from contacts information Get user/owner profile contact URI and user image with API 8 onwards

Categories : Android

How to receive messages using the new Google Cloud Messaging Api for Android?
The answer was much simpler than I thought. You no longer need gcm.jar nor gcm-server.jar. No need for a special service like GCMIntentService No need for the receiver to handle this action: com.google.android.c2dm.intent.REGISTRATION Actually a developer now needs to implement his own BroadcastReceiver which is as simple as that: in Scala class MyReceiver extends BroadcastReceiver { def onReceive(context: Context, intent: Intent) { log log "we have received something!"; val extraString = Option(intent.getStringExtra("json label here")); log log "the value of this json label is: " + extraString; } }

Categories : Android

Android Studio 0.2.2 + ActionBarSherlock setttings: Could not find class 'android.support.v4.app.FragmentActivity'
As you requested my settings to be shared, I here post my project settings window. Hope that you can help. 1. ActionBarSherlock project. Note that only android-support-v4 is checked to be exported. 2. My personal project settings windows. Nothing special but only ActionBarSherlock project is referenced.

Categories : Android

Android Studio & Gradle: Add outside java classes to Android main project
you might want to make your Dir a own module add include 'Dir' to your settings.gradle create a build.gradle inside your Dir directory with this content apply plugin: java now you can go into your main projects build.gradle and add to dependencies: compile project(':Dir') if your Dir uses android related stuff, you might want to use the New > Module(right click on your project in Android Studio) Function of Android Studio to create an Android Library. But i haven't tested that feature yet. If Android Studio throws an Exception when trying to use the New Module, you should try to update Android Studio, in the latest Version it works for me. You might also want to check the Gradle User Guide and the DSL Reference both are very helpfull in getting into Gradle and understanding i

Categories : Java

How do I add the library android-support-v7 in IntelliJ IDEA (Not Android Studio/Gradle)?
You just need to add "@string/abc_action_mode_done" in your appcompat/res/values/strings.Do not "set mediarouter as a dependency for appcompat library".(In my case,"@string/abc_action_mode_done" already exists in the appcompat/res/values/strings.I don't know why you miss it.) "add depenency appcompat to mediarouter" is necessary.

Categories : Android

Automatically versioning Android project from git describe with Android Studio/Gradle
After some further reading and several false starts, I ended up with this, added to the bottom of build.gradle in the project directory (that is, MyAppProject/MyApp/build.gradle, not MyAppProject/build.gradle -- confusing, I know, but the former directory is projectDir in Gradle so that's how I refer to it here). It depends on no external utilities other than Git, which is assumed to be in the path, so it should work on any OS (even though I used forward slashes in the paths, they get converted to backslashes on Windows). It could probably stand to be improved, I'm sure, as my understanding of Gradle is pretty rudimentary and my Groovy may not be very idiomatic (though that in particular is less of a concern). I have a feeling that my approach is suboptimal because it involves generatin

Categories : Android

How to setup and test an Android Library Project with Gradle and Android-Studio?
i think this tutorial will help you : http://cyrilmottier.com/2013/06/27/a-productive-android-development-environment/ !

Categories : Java

Android Studio Error: "You must install the Android Support Repository though the SDK Manager"
you must manualy run SDK Manager folder android-studio/sdk/tools search android or android-sdk new Support Repository must be already selected, and need only click "install" button

Categories : Android

Maven repository and "Android support library", revision 18 for Android Studio 0.2.x
Install fresh Android Studio 0.2.x. Upgrade from pre 0.2 doesn't work as mentioned here http://developer.android.com/sdk/installing/studio.html#Updating Reason is that new Android Studio is shipped with maven repo for serving support libraries. Alternatively edit build.gradle and replace compile 'com.android.support:support-v4:13.0.+' with compile files('/libs/android-support-v4.jar') then copy support jar to libs folder.

Categories : Android

Android Studio: Android Manifest doesn't exists or has incorrect root tag
I ran into a similar problem. Looks like my .../src directory for whatever reason moved under my .../lib directory. I moved it out of the /lib directory. Now both /lib and /src are at the same level. After a couple of clean rebuilds and restarts of Android studio everything is back to normal. My emulator started up fine. You might want to check your directory structure. Compare the directory structure with a working project. You might be able to see the difference.

Categories : Android

Wrong build being deployed on Android device using Visual Studio 2012 Xamarin.Android
I have no idea why it does this, I had this issue before. I also noticed that the device log was somewhat behind (ie, at 3.30pm, the last record on the device log was 11.00am). Uninstalling the app from the device and re-deploying it seems to correct it. Note: I had this issue in VS, didn't check with XS. I would look at the difference in your deployment settings in VS and XS (I think it may have something to do with the Fast Deployment option).

Categories : Visual Studio 2012

Implement CCS for Android push messaging on Google App Engine using python
As per https://developers.google.com/cloud-messaging/server#role Note that Google AppEngine does not support connections to XMPP (CCS).

Categories : Android

How to navigate/view/edit android platform sources (AOSP) using Intellij IDE (Android Studio preferably)?
Well, first you have to install Android studio from here: http://developer.android.com/sdk/installing/studio.html Then, if you already have a project in Eclipse here is how you export it to Android Studio: http://developer.android.com/sdk/installing/migrate.html

Categories : Android

Using Parse.com Android SDK in Java server as opposed to Android app
I write this in January, 2014. Parse.com is rapidly growing and expanding their platform. I cannot say how long this information will be correct or how long my observations will remain relevant. That said... Number one. Parse.com charges by the number of transactions. Many small transactions can result in a higher cost to the app owner. We are using Parse.com's Pro Plan. The Pro Plan has these limits: 15 million HTTP requests per month Burst limit of 40 requests per second If you have 4,500 users, each sending 125 HTTP requests to Parse.com per day, then you are already looking at 16,850,000 requests every 30 days. Parse.com also offers a higher level of service called Parse Enterprise. Details about this plan are not published. Second, Parse.com's intended purpose is to be a ligh

Categories : Parse Com

How do I migrate my Android Eclipse project to using Gradle and Android Studio?
You should create a folder in you project's root and name it libs. Then copy your jar file to that folder and add dependencies { compile fileTree(dir: 'libs', include: '*.jar') } to your build.gradle file. If above won't work. You may need to try this post

Categories : Java



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