AdMob with no internet connection - android

How can I use AdMob in android if I cannot connect to internet? Is there any way of simulating a google service on own my laptop so I can test my application even if I cannot connect to internet?

Well you can show an admob on the device if you don't have an internet connection, how you will guarantee that the add get viewed the number of times the app say.
So im gonna say (sadly) the answer its NOT.
Now if you don't want to break the app when there is not internet connection you can show a custom imagen follow this tutorial for more information
Is there any way of simulating a google service
Wich one? there is a lot

Related

Progressive Web App in different devices on local network

We are starting to develop a Web App that can work in different devices and still be connected between them even if there is no internet connection, but a working local network.
We need to send notifications between devices in the same local network with no internet, and we would really like to develop a PWA, if not possible work with native mobile apps.
If anybody knows how to make Service Workers work this way, we would appreciate it.
UPDATE:
We found this information:
https://developer.chrome.com/apps/app_network
We think that maybe using UDP we can manage to make it work, but we are not sure...

Sync between two devices without Internet connection: Is it possible?

My coursework requirement is to build an Android application that lists all available mobile devices within close proximity. None of the devices have access to the internet.
To make things easier, the assumption is that all devices have my application installed.
When user first installs my app, they must define a user name and upload a profile picture.
When they launch my app, it should display the following profile info about other devices nearby:
User Name Profile picture
Now, I know this is an open ended question, but I'm totally stumped and need some guidance.
Specifically, I find these points challenging:
How to establish communication between devices/my app without internet?
How to retrieve other devices' profile picture without having to store everything locally on the device
I did some research and found Wi-Fi Peer to Peer, but not sure if this will be suitable for my use case as I don't have internet access. Bluetooth is another option but I think devices would have to be paired first before exchanging data.
You can starting Wifi hotspot with name like "YourAppName".
And create simple brodcasting this data inside this network.
So:
user opens your app and registering;
your application, checks if there is WIFI "YourAppName".
if NO, your app start hot spot "YourAppName".
if YES, your app promt user to connect to this network.
If connection successfully established, you will need to think how to transmit the list of data to your app, and represent it to user
Hope that this steps will helps you! Good luck

Multiplayer game on local network without internet

I am creating a multiplayer android game as a part of my coursework. This is my first game. I intended to allow users to connect to the game over a simple network. I don't want to use internet at all hence I wont be using the android game services. How do I go about this. I have no clue at all. I have tried various tutorials but all of them are using a central game server. I just want to create a simple Client - Server network. One user will host a game and others will join.
it's my first time answering a question here. I usually just read here in stackoverflow. I'm also currently working on my first game. It connects devices using wifi peer-to-peer or WifiDirect (without a wifi hotspot). It requires high version of android OS (4.0 or 4.1?) but I believe you can also try the other way on which the devices needs to connect in the same wifi hotspot for lower OS version requirements. The latter, I haven't tried yet.
After I connect the devices on the same network (peer-to-peer), I use sockets to exchange data between them. I use serializable objects for sending data. I don't know if it's the best way but it works for me.
My game can connect more than two players in wifi peer-to-peer. One device acts as the network owner (and also the game server).
See android's tutorial/documentation for WifiDirect connection :
http://developer.android.com/training/connect-devices-wirelessly/wifi-direct.html
Be sure to read also the adjacent lessons.
Also, Sockets must be used with Threads so you also need to read about it if haven't.
Hope I helped ^^
I finally got the solution and made the Android application. Simply used java socket programming. It works on Hotspot. This works on client - server framework.
Please find the code here and contact me if you require any assistance.
https://github.com/rohitramkumar308/GameOfCards
and this is the link to the app
https://play.google.com/store/apps/details?id=srk.syracuse.gameofcards
Hope this helps you.

How to send notification from one android device to another android device in same wifi network

I want to send notification from one android device (android tv without bluetooth, telephony) to another android device (phone/tablet). Both are on same wifi network. Through the notification, I want to launch an app or open a page in phone/tablet browser.
I went through GCM messaging and also saw some options where we can have a kind of http server on the phone running but could not understand implementation.
Can someone help with idea and if possible, some piece of code as well.
As I need it for demo, so even any hack solution is fine for me :-)
Thanks for any help or reading.
Your best bet as a hacky solution is to do simple Socket connection between two devices. Since they are on same Wifi, it will be simpler and won't have any firewall restrictions.
Avoid GCM, it requires setting up a GCM Server and then complex registration. It also makes your solution dependent upon Internet connectivity & Google ofcourse.
See an example here:
http://android-er.blogspot.in/2014/02/android-sercerclient-example-client.html
Basically one device such as TV can be a socket listener. The phone/tablet can connect to that socket and then you can initiate a notification on either device based on your requirements and data exchange.

Android: connecting two device without internet

I am developing an application. In which the idea is like - i want to connect two devices as two mobile or two tabs or mobile to tab or mobile to server or tab to server. Means i want to send data from one device to other device mostly xml.
I want to connect two devices with out internet and blue tooth, I want to connect them with wifi having no internet. And than want to transfer data.
My point is i am having an application which is used to generate a xml and after generation of xml i want to send it to other device or tab or desktop server on a button click.
I searched on Google and found Ad-hoc network, but it is quite difficult to understand me. Is any other way by which i can easily understand Ad-hoc or other way by which i can connect.
So please guide me what should i do, how can I achieve my task. I need your guidance and suggestions.
Socket connection would be a great idea in your situation, you dont need to have Internet to do so. Here is one of many examples if you google it: http://examples.javacodegeeks.com/android/core/socket-core/android-socket-example/
Hope this helps
You can use iJetty. iJetty can be configured to use in your application and when you start wifi router on one android device another can get connected on that device and if it's your client applciation you can configure it to look on a specific port.
Try this : http://puregeekjoy.blogspot.in/2011/06/running-embedded-jetty-in-android-app.html
You could use Wi-Fi Direct if your version of Android is 4.0 or later and your hardware works with it.

Categories

Resources